[Intel-gfx] [PATCH i-g-t] i915/gem_mmap_gtt: Simulate gdb inspecting a GTT mmap using ptrace()

Chris Wilson chris at chris-wilson.co.uk
Fri May 1 15:01:54 UTC 2020


Quoting Matthew Auld (2020-05-01 15:58:29)
> On Thu, 30 Apr 2020 at 20:42, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > +       ptrace(PTRACE_ATTACH, pid, NULL, NULL);
> > +       for (int i = 0; i < OBJECT_SIZE / sizeof(long); i++) {
> > +               long ret;
> > +
> > +               ret = ptrace(PTRACE_PEEKDATA, pid, gtt + i);
> > +               igt_assert_eq_u64(ret, CC);
> > +               cpy[i] = ret;
> > +
> > +               ret = ptrace(PTRACE_POKEDATA, pid, gtt + i, AA);
> > +               igt_assert_eq(ret, 0l);
> 
> igt_assert_eq_u64() ?

In this case it will either be 0 or -1 + errno.

So "%d" vs "%llx" should not affect debugging.
-Chris


More information about the Intel-gfx mailing list