gdb backtrace with core files
Greg,
Is your GDB hosted on MIPS or another machine? Are those patches freely available? If so, can you provide a link? Google seems to find mostly kgdb patches - are these what you used?
Brian
Quoted 23 lines · --- Greg Weeks
Quoted 4 lines · Brian Kuschak
Is anyone succesfully using gdb for mipsel to debug core dumps? If so, can you share your secrets for success? I tried various recent versions (6.3, 6.1.1), but backtrace never works right, even
though
Quoted 10 lines
the stack pointer appears to be valid. gdb-5.3 partially works, but not completely.
Forcing gdb to use a specific stack pointer and PC (frame <sp> <pc>) doesn't seem to help either.
Using linux 2.4.25 and gcc 3.3.3.
It appears to work for me. My gdb has a ton of patches from Amit Kale
though. The kernel is the latest malta with a couple of patches that
shouldn't affect gdb.
Quoted 15 lines
-bash-2.05b# gdb
GNU gdb TimeSys Linux (6.2.1-1rh)
Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mipsel-linux". (gdb) filegdb_core_tester
Reading symbols from
/root/TestWare/TTS_2.4.2/command/gdb_man/gdb_core_tester...done.
Quoted 27 lines
Using host
libthread_dblibrary "/lib/libthread_db.so.1".
(gdb) core-file core.2045
Core was generated by `./gdb_core_tester'. Program terminated with signal 11, Segmentation fault.
Reading symbols from/usr/lib/libgcc_s.so.1...done. Loaded symbols for/usr/lib/libgcc_s.so.1Reading symbols from/lib/libc.so.6...done. Loaded symbols for/lib/libc.so.6
Reading symbols from/lib/ld.so.1...done. Loaded symbols for/lib/ld.so.1
#00x00400f48inadd_node(rootptr=0x1000105c, nodeval=193)at create_core.c:7575
if(node_ptr->value.value >= nodeval)
{
(gdb) bt
#00x00400f48inadd_node(rootptr=0x1000105c, nodeval=193)at create_core.c:75 #1 0x00400fcc in add_node (rootptr=0x10001048, nodeval=193) at create_core.c:81 #2 0x00400f74 in add_node (rootptr=0x10000140, nodeval=193) at create_core.c:76
Quoted 7 lines
#3
0x00400df8increate_tree(rootptr=0x10000140) at create_core.c:38
#40x00400b4cin main (argc=1, argv=0x7f931b44) at main.c:25Greg Weeks
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
Quoted 9 lines · Brian Kuschak
Greg,
Is your GDB hosted on MIPS or another machine? Are those patches freely available? If so, can you provide a link? Google seems to find mostly kgdb patches - are these what you used?
I have an i386 hosted gdb and a mips native gdb. The backtrace test I did was for the native gdb.
I'm not sure which patches are available. I'll check. I'm in the process of working up our first BSP with this toolchain.
Greg Weeks
Quoted 6 lines · Brian Kuschak
Greg,
Is your GDB hosted on MIPS or another machine? Are those patches freely available? If so, can you
OK, I checked.
Most of what's in our patches should be in gdb HEAD. We're currently at 6.2.1 and don't want to take the time to move to head. If you're interested and no one objects I can post them to the mips list. There are 37 patches totaling 285K. Not all are mips related and gdb isn't totally working for me yet.
Greg Weeks