From: David Miller <davem@xxxxxxxxxxxxx> Date: Mon, 01 May 2017 23:51:58 -0400 (EDT) > From: Alexei Starovoitov <ast@xxxxxx> > Date: Mon, 1 May 2017 20:49:21 -0700 > >> (gdb) x/10i bpf_prog1 >> 0x0 <bpf_prog1>: ldimm64 r0, 590618314553 >> 0x10 <bpf_prog1+16>: stdw [r1+-8], r10 >> 0x18 <bpf_prog1+24>: lddw r10, [r1+-8] >> 0x20 <bpf_prog1+32>: add r0, -1879113726 >> 0x28 <bpf_prog1+40>: lddw r1, [r0+0] >> 0x30 <bpf_prog1+48>: exit >> 0x38: Cannot access memory at address 0x38 >> >> the last line also seems wrong. Off by 1 error? > > Maybe, I'll look into it tomorrow. This is not a BPF specific problem, GDB does this for any non-linked object you try to inspect under it. F.e. on a sparc object: (gdb) x/10i 0 0x0 <foo>: retl 0x4 <foo+4>: clr %o0 0x8: Cannot access memory at address 0x8 (gdb) Same behavior.