From: mooney@dogbert.cc.ndsu.NoDak.edu (Tim Mooney)
Subject: Re: Segmentation fault (core dumped)
Date: 12 Sep 2001 22:31:25 GMT [thread overview]
Message-ID: <9nonnt$lkb$7@news.ndsu.nodak.edu> (raw)
In-Reply-To: 3B9DAFD3.714AC82C@ilt.fhg.de
In article <3B9DAFD3.714AC82C@ilt.fhg.de>,
Rolf Wester <wester@ilt.fhg.de> 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.
I think you're confusing "debugging" with single-stepping through a program.
Try this:
ladebug your-program-name
and then within ladebug type
run any arguments you would normally supply on the command line go here
i.e. if you normally would run you program and give it the name of a file
to read data from, you just
run filename
Then just use your program as you normally do. When your program gets
a fatal signal, ladebug will catch it before the program cores and before
it exits. From there you can use commands like `where' to get a stack back
trace and `print' to get information on variables.
If your program wasn't compiled with debugging symbols, you'll have an easier
time getting more and better information if you recompile it with debugging
symbols (i.e. -g option to compiler and/or linker, and don't strip the
binary -- running `file' on the program should indicate `not stripped' in
the output).
> Is it possible to get information about the source line
> where the segmentation fault happens from the core dump?
Yup. It's generally easier to do more if you catch the fatal signal while
running under a debugger, but you can even get some postmortem just by
doing
ladebug programname core
and then typing
where
Be sure you're using a recent version of ladebug. It's improved a lot.
I would recommend the GNU debugger gdb, but it frankly doesn't work all that
well on Tru64.
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
prev parent reply other threads:[~2001-09-12 22:31 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
2001-09-12 22:31 ` Tim Mooney [this message]
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