This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

a function's loaded address in memory


I use ptrace() to get the PC of system call site.
Say I get two system call invocation during runtime, PC=0x8048988/sys_write() and PC=0x19279a/sys_write(). Can I know within which function the system call is invoked?


For example, the 0x8048988/sys_write() should be from the "int 80(I wrote in assembly)"
in main(); the 0x19279a/sys_write() should be from the "int 80" in the write() of libc.so.


If I can know write() is (dynamically) loaded to 0x192780--0x19279c, then I know that
0x19279a/sys_write() is from it because 0x19279a belongs to [0x192780, 0x19279c].
My question is: is there an easy mechanism that I can get the information of which function is loaded where in a run?


Thanks a lot

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]