From: Joerg Bruehe <joerg@sql.de>
Subject: Re: Segmentation fault (core dumped)
Date: Tue, 11 Sep 2001 11:40:39 +0200 [thread overview]
Message-ID: <3B9DDC17.B4331D58@sql.de> (raw)
In-Reply-To: 3B9DAFD3.714AC82C@ilt.fhg.de
Hi Rolf,
Rolf Wester wrote:
>
> Hi,
>
> I have a question concerning core dumps. I have a program written in c++
> (compiler is cxx) that makes a segmentation fault with subsequent core
> dump. This happens some time after program start, so debugging would be
> quite tedious. Is it possible to get information about the source line
> where the segmentation fault happens from the core dump?
typically: Yes.
"Debugging" does not necessarily mean "tracing" or "single-stepping".
You should start by getting a stack backtrace from the core dump,
the command is specific to the debugger you use:
"adb" -> '$c', "dbx"/"gdb" -> 'where', "sdb" -> 't'.
This should give you a function name, where the segmentation fault
(= use of an invalid address via a pointer) occurred.
If that info is insufficient, add a "debug" option ('-g' ?)
and recompile the program. When degugging the new core,
you should also see line numbers.
Regards,
Joerg Bruehe
--
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
(speaking only for himself)
mailto: joerg@sql.de
next prev parent reply other threads:[~2001-09-11 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-11 6:31 Segmentation fault (core dumped) Rolf Wester
2001-09-11 7:10 ` Markus Pesti
2001-09-11 8:30 ` Rolf Wester
2001-09-11 9:40 ` Joerg Bruehe [this message]
2001-09-12 22:31 ` Tim Mooney
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox