GDB: look at an assembly at a specific address?

I am working on some JIT compiler and I am using GDB to debut it, my code crashes at some point (segment fault) but it crashes with jitted code (they are generated "on the fly") so I don't get any info about the stack frame, but I got the following backtrace:

#0  0x0000000001d98f22 in ?? () // JITTED CODE
#1  0x000000000000001d in ?? () // JITTED CODE
#2  ...callattribuite function....

      

I'm wondering if GDB can parse the code at 0x0000000001d98f22 and display it to me. I tried disas 0x0000000001d98f22

but GDB complainedNo function contains specified address.


EDIT: I also fixed this myself, the team disas

needs an end address to work properly.

+3


source to share


1 answer


if GDB can parse the code in place 0x0000000001d98f22

Yes: (gdb) x/20i 0x0000000001d98f22



If your JIT is made by Java, you should read this answer as well .

+3


source







All Articles