View Single Post
Old 14 December 2020, 16:10   #10
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by Warty View Post
And line 1109 in app.c is the last line in the .c file (blank, to boot).
It's probably the last known line-debug info before the given offset. The clib was compiled without source level debugging information.

Quote:
If I m or d 3f01xx, it seems to have been unloaded, as it's all 0s.
You can prevent unloading by adding an infinite loop at the end of your main() function. Otherwise it is pure luck what is left in memory.

An alternative approach, without using debug-info and findhunkoffset, would be to find the hunk-offset in the linker's map file (call vlink with -M option). It will show you to which object file the offset belongs. Then reassemble the object file.

Quote:
If I knew where in memory the code was, I could put a breakpoint in mon, start the app quit sequence, and it would stop and let me examine everything.
Adding a breakpoint in vfprintf() doesn't help much, when you call it from multiple places. Thomas is right. In such a case you have to traverse the stack frame trace-back one or two levels deeper to find the caller.
phx is offline  
 
Page generated in 0.12013 seconds with 11 queries