* GDB doesnot catches segmentation fault
@ 2011-07-05 6:39 Mahmood Naderan
2011-07-05 7:13 ` Phil Muldoon
0 siblings, 1 reply; 4+ messages in thread
From: Mahmood Naderan @ 2011-07-05 6:39 UTC (permalink / raw)
To: gdb
Hi
I have attached a PID to gdb. Although the code crashed with segmentation fault, but gdb ignores that and I am not able to view backtrace.
The output of my program is
...
loading script...
Begin simulation
Segmentation fault
Done :D
....
and the gdb output on another terminal contains
mahmood@mpc:~$ gdb - 23425
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
-: No such file or directory.
Attaching to process 23425
Reading symbols from /home/mahmood/gem5/build/ALPHA_FS/m5.debug...done.
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libutil.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /usr/lib/libpython2.6.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpython2.6.so.1.0
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...Reading symbols from /usr/lib/debug/lib/libgcc_s.so.1...done.
done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libssl.so.0.9.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libssl.so.0.9.8
Reading symbols from /lib/libcrypto.so.0.9.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/python2.6/lib-dynload/datetime.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/python2.6/lib-dynload/datetime.so
0x0000000000447bfb in Event::initialized (this=0x41ec648) at build/ALPHA_FS/sim/eventq.hh:84
84 initialized() const
(gdb) c
Continuing.
Segmentation fault
mahmood@mpc:~$
Any idea bout that?
// Naderan *Mahmood;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB doesnot catches segmentation fault
2011-07-05 6:39 GDB doesnot catches segmentation fault Mahmood Naderan
@ 2011-07-05 7:13 ` Phil Muldoon
2011-07-05 7:24 ` Mahmood Naderan
0 siblings, 1 reply; 4+ messages in thread
From: Phil Muldoon @ 2011-07-05 7:13 UTC (permalink / raw)
To: Mahmood Naderan; +Cc: gdb
Mahmood Naderan <nt_mahmood@yahoo.com> writes:
> Hi
> I have attached a PID to gdb. Although the code crashed with segmentation fault, but gdb ignores that and I am not able to view backtrace.
> 0x0000000000447bfb in Event::initialized (this=0x41ec648) at build/ALPHA_FS/sim/eventq.hh:84
> 84 initialized() const
> (gdb) c
> Continuing.
> Segmentation fault
> mahmood@mpc:~$
This looks like GDB crashed with a segmentation fault.
There is not enough information to work with here. There are two things
you could try: A newer GDB, the problem might already have been
fixed. Or, submit a backtrace for GDB.
If you have debug information installed for GDB you can do this. I am
not sure of the method for installing debug information for installed
packages with Ubuntu. But assuming you do have them:
Type:
ulimit -c unlimited
in the terminal where you will launch GDB (This will allow core-files
to be generated).
Attach GDB to the program (as you did above) and replicate the scenario
to crash GDB.
Then:
gdb gdb --core=yourcore.pid
Where "youcore.pid" is the core-file that GDB generated on crash.
Then type "bt" into GDB. This will produce a backtrace of the crashing
GDB process.
Then create a bug at:
http://sourceware.org/bugzilla/
for gdb, and paste the "bt" output. Also include any supplemental
information you think is useful.
Cheers,
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB doesnot catches segmentation fault
2011-07-05 7:13 ` Phil Muldoon
@ 2011-07-05 7:24 ` Mahmood Naderan
2011-07-05 7:51 ` Phil Muldoon
0 siblings, 1 reply; 4+ messages in thread
From: Mahmood Naderan @ 2011-07-05 7:24 UTC (permalink / raw)
To: pmuldoon; +Cc: gdb
>Then:
>gdb gdb --core=yourcore.pid
>Where "youcore.pid" is the core-file that GDB generated on crash
Where does it save that file? I can not find it
// Naderan *Mahmood;
----- Original Message -----
From: Phil Muldoon <pmuldoon@redhat.com>
To: Mahmood Naderan <nt_mahmood@yahoo.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Sent: Tuesday, July 5, 2011 11:43 AM
Subject: Re: GDB doesnot catches segmentation fault
Mahmood Naderan <nt_mahmood@yahoo.com> writes:
> Hi
> I have attached a PID to gdb. Although the code crashed with segmentation fault, but gdb ignores that and I am not able to view backtrace.
> 0x0000000000447bfb in Event::initialized (this=0x41ec648) at build/ALPHA_FS/sim/eventq.hh:84
> 84 initialized() const
> (gdb) c
> Continuing.
> Segmentation fault
> mahmood@mpc:~$
This looks like GDB crashed with a segmentation fault.
There is not enough information to work with here. There are two things
you could try: A newer GDB, the problem might already have been
fixed. Or, submit a backtrace for GDB.
If you have debug information installed for GDB you can do this. I am
not sure of the method for installing debug information for installed
packages with Ubuntu. But assuming you do have them:
Type:
ulimit -c unlimited
in the terminal where you will launch GDB (This will allow core-files
to be generated).
Attach GDB to the program (as you did above) and replicate the scenario
to crash GDB.
Then:
gdb gdb --core=yourcore.pid
Where "youcore.pid" is the core-file that GDB generated on crash.
Then type "bt" into GDB. This will produce a backtrace of the crashing
GDB process.
Then create a bug at:
http://sourceware.org/bugzilla/
for gdb, and paste the "bt" output. Also include any supplemental
information you think is useful.
Cheers,
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB doesnot catches segmentation fault
2011-07-05 7:24 ` Mahmood Naderan
@ 2011-07-05 7:51 ` Phil Muldoon
0 siblings, 0 replies; 4+ messages in thread
From: Phil Muldoon @ 2011-07-05 7:51 UTC (permalink / raw)
To: Mahmood Naderan; +Cc: gdb
Mahmood Naderan <nt_mahmood@yahoo.com> writes:
>>Then:
>>gdb gdb --core=yourcore.pid
>>Where "youcore.pid" is the core-file that GDB generated on crash
>
> Where does it save that file? I can not find it
>
> // Naderan *Mahmood;
With Fedora 15, it places it in the same place from where the program
was executed:
[user@localhost test]$ ulimit -c unlimited
[user@localhost test]$ sleep 5000
Segmentation fault (core dumped)
[user@localhost test]$ ls core.31559
Cheers,
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-05 7:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-05 6:39 GDB doesnot catches segmentation fault Mahmood Naderan
2011-07-05 7:13 ` Phil Muldoon
2011-07-05 7:24 ` Mahmood Naderan
2011-07-05 7:51 ` Phil Muldoon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox