Jeff Schwab <[EMAIL PROTECTED]> writes:
>> Why can't gdb show me the function name for that function?
>
> Because it can't find the debug symbols for the file.
Gdb doen't need any debug symbols to deduce function name:
$ cat t.c && gcc t.c && gdb -q ./a.out
void crash()
{
int *ip = (int*)0;
ip[1] = 1;
}
void foo() { crash(); }
void bar() { foo(); }
int main() { bar(); return 0; }
(no debugging symbols found)...Using host libthread_db library
"/lib/tls/libthread_db.so.1".
(gdb) r
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0804834f in crash ()
(gdb) bt
#0 0x0804834f in crash ()
#1 0x08048362 in foo ()
#2 0x0804836f in bar ()
#3 0x08048386 in main ()
Note the 'no debugging symbols found', and the names of all functions
in the stack trace. However, gdb does need the symbol table to
be present:
$ strip a.out && gdb -q ./a.out
(no debugging symbols found)...Using host libthread_db library
"/lib/tls/libthread_db.so.1".
(gdb) r
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0804834f in ?? ()
(gdb) bt
#0 0x0804834f in ?? ()
#1 0x00000000 in ?? ()
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus