This is the mail archive of the
mailing list for the GDB project.
Re: finding a function with address
- To: mathieu_dube at videotron dot ca
- Subject: Re: finding a function with address
- From: jtc at redback dot com (J.T. Conklin)
- Date: 01 Feb 2001 15:56:00 -0800
- Cc: gdb at sources dot redhat dot com
- References: <0102011549450J.email@example.com>
- Reply-To: jtc at redback dot com
>>>>> "Mathieu" == Mathieu Dube <firstname.lastname@example.org> writes:
Mathieu> Im debugging an application with gdb and when the app
Mathieu> segfaults gdb outputs : 0x400da0a4 in ?? ()
Mathieu> I would like to find out the name of the function that should
Mathieu> be in the place of the "??".
GDB should be able to determine the name of the function if it has a
symbol for that address. If it doesn't, perhaps the PC has gone
outside your programs boundaries. One common way this occurs is
when a function pointer is corrupted.
$ cat foo.c
int (*foo)() = 0x12345678;
$ gcc foo.c
$ gdb a.out
Starting program: /tmp/a.out
Program received signal SIGSEGV, Segmentation fault.
0x12345678 in ?? ()
#0 0x12345678 in ?? ()
#1 0x10ee in main ()
Perhaps you could share more information? What is the target? Is the
executable linked staticly or dynamically? Is 0x400da0a4 within the
text segment of your executable. Can you still get a backtrace (the
stack might not be corrupted)?