From mboxrd@z Thu Jan 1 00:00:00 1970 From: jtc@redback.com (J.T. Conklin) To: mathieu_dube@videotron.ca Cc: gdb@sources.redhat.com Subject: Re: finding a function with address Date: Thu, 01 Feb 2001 15:56:00 -0000 Message-id: <5m4ryet0tr.fsf@jtc.redback.com> References: <0102011549450J.24336@therver.local2.lan> X-SW-Source: 2001-02/msg00013.html >>>>> "Mathieu" == Mathieu Dube writes: Mathieu> Im debugging an application with gdb and when the app Mathieu> segfaults gdb outputs : 0x400da0a4 in ?? () Mathieu> 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. For example: $ cat foo.c int (*foo)() = 0x12345678; main() { foo(); } $ gcc foo.c $ gdb a.out . . . (gdb) run Starting program: /tmp/a.out Program received signal SIGSEGV, Segmentation fault. 0x12345678 in ?? () (gdb) bt #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)? --jtc -- J.T. Conklin RedBack Networks