* Bug: debugging with GDB is broken under 2.6.6
@ 2004-06-14 19:16 Stas Sergeev
0 siblings, 0 replies; only message in thread
From: Stas Sergeev @ 2004-06-14 19:16 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
Hello.
It seems some bug in 2.6.6 (and up to
2.6.7-rc3-mm2) makes gdb useless - it
is no longer possible to produce even
a simple stack trace for any program.
Attached it the test-case to demonstrate
the bug. Its output under any 2.6.6 kernels
is:
---
(gdb) #0 0xffffe410 in ?? ()
#1 0xbffffa88 in ?? ()
#2 0x00000000 in ?? ()
---
Absolutely broken backtrace.
And under 2.6.5 (the one that comes with
RedHat FC2 at least) and under 2.4 kernels:
---
(gdb) #0 0x00558402 in ?? ()
#1 0x0041ce83 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2 0x08048645 in main (argc=1, argv=0xfef20f84) at gdb_tst.c:26
---
Perfect backtrace.
Any ideas what have caused this? As I am
using gdb very frequently, this bug gives
me some headache.
[-- Attachment #2: gdb_tst.c --]
[-- Type: text/x-csrc, Size: 534 bytes --]
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]) {
char buf[255];
int s;
FILE *f;
pid_t pid;
switch((pid = fork())) {
case 0:
sprintf(buf, "gdb %s %i", argv[0], getppid());
f = popen(buf, "w");
fprintf(f, "bt\n");
fprintf(f, "quit\n");
fflush(f);
wait(&s);
pclose(f);
break;
case -1:
return 1;
default:
waitpid(pid, &s, 0);
}
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 82 bytes --]
Scanned by evaluation version of Dr.Web antivirus Daemon
http://drweb.ru/unix/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-14 19:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-14 19:16 Bug: debugging with GDB is broken under 2.6.6 Stas Sergeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox