|
From: Peter S. <Pet...@gm...> - 2003-10-16 12:52:00
|
Hello, is the following problem really a valgrind problem (and maybe resolved in the latest snapshot)? I did not read anything about it in the news section, but had the same problem using the new gdb-6.0 version. http://sources.redhat.com/cgi-bin/gnatsweb.pl?database=gdb&user=guest&password=guest&cmd=query And then go to bug number 1406 (the direct link to bug entry was way to long). Peter gdb bug 1406: [...] Description: gdb 5.3 or gdb 6.0 won't display the stack frame [ "Previous frame identical to this frame (corrupt stack?)" ] when is has been invoked by valgrind --gdb-attach=yes. I did not have this problem with gdb 5.2, and it does not seem to be related to a particular valgrind version or gcc version. [...] From the answer As you probably realised, the duplicate frame check isn't the real probelm here. If you look at the backtrace you provided: (gdb) where #0 vg_do_syscall3 (syscallno=4294966784, arg1=3161, arg2=0, arg3=0) at vg_mylibc.c:92 #1 0x40191b7d in vgPlain_system (cmd=0xbffff040 "/usr/bin/gdb -nw /proc/3160/exe 3160") at vg_mylibc.c:1277 #2 0x4018d727 in vgPlain_start_GDB_whilst_on_client_stack () at vg_main.c:1821 #3 0x40194e48 in vgPlain_swizzle_esp_then_start_GDB() from /usr/lib/valgrind/valgrind.so #4 0xbffff0d8 in ?? () #5 0x08048401 in coin () at k.c:5 Previous frame identical to this frame (corrupt stack?) (gdb) There's something rather suspicious about frame #4; I doubt that you're really executing code on the stack. It's defenitely more likely that GDB is unable to properly unwind frame #3. I took a quick look at valgrind, and vgPlain_swizzle_esp_then_start_GDB() is hand-coded assembler that fiddles with the stack. I'm not surprised that GDB chockes on this, and teaching GDB to properly unwind this particular frame is very difficult. It's properly a better idea to ask the author of valgrind to add DWARF Call Frame Info (DWARF CFI) to this particular bit of code. -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ |
|
From: Dirk M. <dm...@gm...> - 2003-10-16 13:08:16
|
On Thursday 16 October 2003 14:49, Peter Seiderer wrote: > is the following problem really a valgrind problem (and maybe resolved in > the latest snapshot)? I did not read anything about it in the news section, > but had the same problem using the new gdb-6.0 > version. We know about the problem, but there is no fix yet. As we play some nasty tricks with the stack, it is "okay" that gdb feels confused. It worked before because gdb wasn't able to correctly disassemble the method in older versions. Now it can, and we cannot trick it into unwinding the stack correctly anymore. Another solution has to be found. |
|
From: Dirk M. <dm...@gm...> - 2003-10-16 14:24:28
Attachments:
vg_startup.diff
|
On Thursday 16 October 2003 15:07, Dirk Mueller wrote: > We know about the problem, but there is no fix yet. As we play some nasty > tricks with the stack, it is "okay" that gdb feels confused. It worked > before because gdb wasn't able to correctly disassemble the method in older > versions. Now it can, and we cannot trick it into unwinding the stack > correctly anymore. Another solution has to be found. Ok, it was easier than I thought, and I committed this patch, which makes it work for me. let me know if you experience problems. |