[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linking problems with gdb-7.2

On Mon, 2011-03-21 at 22:19 +0100, Samuel Thibault wrote:
> Svante Signell, le Mon 21 Mar 2011 22:09:37 +0100, a écrit :
> > It also works, At least I could run random programs
> > with gdb: mutt+mutt-dbg and ls.
> Did you try to reproduce
> http://sourceware.org/bugzilla/show_bug.cgi?id=12222

$ cat > test.c
int main(void){ *(int*)0=0;}
$ gcc -g -o test test.c

Works fine:
$ gdb ./test
GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
and "show warranty" for details.
This GDB was configured as "i486-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/srs/DEBs/gdb/test...done.
(gdb) run
Starting program: /home/srs/DEBs/gdb/test 
[New Thread 4944.5]

Program received signal SIGSEGV, Segmentation fault.
0x0804846c in main () at test.c:1
1	int main(void){ *(int*)0=0;}

Only quitting talks about bogus threads:
(gdb) quit
A debugging session is active.

        Inferior 1 [bogus thread id 0] will be killed.

Any more examples to try?

Reply to: