I'm finding it really annoying to have to disassemble large swathes of library code just to get enough context to see what is causing a crash. Is there any way that I can just hand objdump an address, and have it find the boundaries of the containing function for me?
EDIT: Better yet, can I have it disassemble an entire stack trace for me?
Something like this perhaps?
$ objdump -S --start-address=0x42 foo.o | awk '{print $0} $3~/retq?/{exit}'
It prints the dis-assembly listing starting from 0x42
till it finds a ret(q)
, assuming the boundary is marked by ret(q)