From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31842 invoked by alias); 16 Mar 2005 14:38:53 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31563 invoked from network); 16 Mar 2005 14:38:46 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 16 Mar 2005 14:38:46 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1DBZfP-00072M-NJ; Wed, 16 Mar 2005 09:38:35 -0500 Date: Wed, 16 Mar 2005 14:38:00 -0000 From: Daniel Jacobowitz To: James Yu Cc: gdb-discuss@gnu.org, gdb@sources.redhat.com Subject: Re: [Gdb-discuss] How to debug vmlinux and gdb itself at the same time ? Message-ID: <20050316143835.GA26932@nevyn.them.org> Reply-To: gdb@sources.redhat.com Mail-Followup-To: James Yu , gdb-discuss@gnu.org, gdb@sources.redhat.com References: <60bb9541050316061351d55169@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60bb9541050316061351d55169@mail.gmail.com> User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-03/txt/msg00158.txt.bz2 This is not the right list to ask GDB questions; redirected to gdb@. On Wed, Mar 16, 2005 at 10:13:49PM +0800, James Yu wrote: > Since current "info all-registers" provided in gdb doesn't output the > values of hardware registers CR0, CR1, CR2, CR3, CR4, GDTR, LDTR and > etc... I backtraced the gdb with gdb itself and tried to see how gdb > retrieves hardware register values, so I can get the content of the > registers previously mentioned myself. GDB doesn't support those registers; a future version may, but updates to your kgdb stub would also be required. > However, when I traced up to "registers_info()" in gdb/infcmd.c:1596, > the first test of "if (!targt_has_registers)" failed. Then I came up > with an idea of debugging a gdb that is debugging a vmlinux (so I'll > have some registers to print out in the inner gdb env), just I don't > know whether it works and how to carry it out. > > Or maybe there are other ways to get the registers mentioned above ? You can debug a GDB doing anything, just like any other program. For instance, "gdb --args gdb vmlinux". -- Daniel Jacobowitz CodeSourcery, LLC