Can gdb log all instructions and their addresses solely within a particular shared library?

33 Views Asked by At

Using gdb I wish to log all instructions and their addresses - and preferably register values before and after each instruction if possible - but only within a library. I am debugging an Android application and can break and step within the library but I'd like to more or less automate the collection of instructions and register values within said library. I am connected to gdb on an Android emulator via gdbserver on the Android instance and gdb with remote target on my local machine.

1

There are 1 best solutions below

0
On

Can gdb log all instructions and their addresses solely within a particular shared library?

It can, but doing this will be excruciatingly slow.

Also, there is no easy way to do this: you will have to use embedded Python and write script to print whatever data you want.