From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30965 invoked by alias); 19 Feb 2008 19:38:41 -0000 Received: (qmail 30949 invoked by uid 22791); 19 Feb 2008 19:38:39 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Feb 2008 19:38:18 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 9F16C3C02A; Tue, 19 Feb 2008 11:38:16 -0800 (PST) Subject: Re: How do you debug gdb? From: Michael Snyder To: Ray Hurst Cc: gdb@sources.redhat.com In-Reply-To: References: Content-Type: text/plain Date: Tue, 19 Feb 2008 20:19:00 -0000 Message-Id: <1203449896.19253.165.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00142.txt.bz2 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.