Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dladdr: getting non-static symbols from within program

Status
Not open for further replies.

PieterWinter

Programmer
Jul 8, 2002
41
NL
Hi,

I'm trying to obtain symbol names from within a running program using dladdr() (using program counter values). The problem is that dladdr() [ on Solaris 2.6 and 2.8 ] only returns 'global' symbols and not 'local' ones.

I.e.

void globalFn(void) { ... }
static void staticFn(void) { ... }

when using dladdr on an address that resides in staticFn, it still returns globalFn.

Does anyone have a suggestion on how I can get 'staticFn' in this case?

Thanks,
Pieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top