This is the mail archive of the
mailing list for the GDB project.
Re: core-file debugging with gdb
- From: Don Howard <dhoward at redhat dot com>
- To: Tung Bui <Tung dot Bui at meriton dot com>
- Cc: <gdb at sources dot redhat dot com>
- Date: Mon, 22 Apr 2002 14:19:44 -0700 (PDT)
- Subject: Re: core-file debugging with gdb
On Mon, 22 Apr 2002, Tung Bui wrote:
> Good day,
> I am using gdb to debug a core file gererated by a propietary target using
> OSE illuminator.
I'm not familiar with OSE illuminator. What is your proprietary target?
> Basically, I can read in the core file, get the symbols etc.
> I read the GNU document, but not a lot of mentioning what we can do to debug
> a core-file, such as how to know where the program crashed, how to trace back.
You can invoke gdb with the executable and the core file as arguments:
gdb <executable> <core-file>
Then you can get a stack trace (and find out where your program crashed)
by using the backtrace command:
You can select a frame using the frame command:
(gdb) frame <n>
Once a frame is selected, you can examine local variables.
These commands are documented here:
> I appreciate very much any information you might have.
I hope this helps.
In the future, please direct questions regarding gdb to
email@example.com. Many people monitor this list and will be able to
provide answers where I may not.