Brendan
Brendan

Reputation: 55

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

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.

Upvotes: 0

Views: 36

Answers (1)

Employed Russian
Employed Russian

Reputation: 213877

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.

Upvotes: 0

Related Questions