This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How do you debug gdb?
- From: Michael Snyder <msnyder at specifix dot com>
- To: Ray Hurst <rhurst2 at cox dot net>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 19 Feb 2008 11:38:16 -0800
- Subject: Re: How do you debug gdb?
- References: <fpavs9$sa7$1@ger.gmane.org>
On Sun, 2008-02-17 at 20:00 -0800, Ray Hurst wrote:
> It seemed that this question was better suited for the development group
> than in the general group.
>
> How do you debug gdb?
>
> In other words, if I have a problem with gdb itself how do I go about
> debugging the issue?
It's a little counter intuitive, but just as you compile GCC
with GCC, you also debug GDB with GDB.
After all, GDB is just a program...
If you do it in the build directory, you will find that
there is already some infrastructure in place. See the
existing file ".gdbinit", which sets some breakpoints
and changes the prompt.
Changing the prompt is perhaps the number one
most important thing to do --- that way you can
tell by looking at the prompt whether you are
talking to the gdb-being-debugged or to the
gdb-doing-the-debugging.