LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-15-2004, 08:53 PM   #1
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 53
Finding function name from address


I'm looking for a way to look up the name of a function using the address of the function to look it up. So if I have like 'void (*funcptr)() = somefunc;' is there a way to get "somefunc" by just using funcptr? Do I have to read the symbol table in the binary? If I do does anyone have any idea how to do that or any useful links?

Thanks!
 
Old 07-15-2004, 11:26 PM   #2
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
i think you store the addresses and symbols in a structure...
but there isnt any direct way of getting the symbol, it would be a good idea to see how gdb does that ..cos i am sure that it goes thru the symbol table to generate that info...
 
Old 07-16-2004, 01:26 AM   #3
shilpig
LQ Newbie
 
Registered: May 2004
Posts: 8

Rep: Reputation: 0
There is a bfd (binary format descriptor) library, using its API set this can be done easily.
 
Old 07-16-2004, 02:16 AM   #4
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Original Poster
Rep: Reputation: 53
Thanks, I got my hands on some documentation for the BFD library and got it to work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Ip address with Mac address rupeshdwivedi Linux - Networking 6 09-01-2005 07:44 AM
finding the address bruse Linux - Newbie 4 02-16-2005 11:14 AM
Finding Function always be not responding! Flamenco Mandriva 6 12-29-2004 04:34 AM
Finding IP Address [WebCarnage] Linux - Networking 3 03-07-2004 06:41 PM
Finding IP address... daemon_14 Linux - Networking 4 08-31-2003 11:57 PM


All times are GMT -5. The time now is 04:31 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration