From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9608 invoked by alias); 20 Jun 2007 20:34:46 -0000 Received: (qmail 9596 invoked by uid 22791); 20 Jun 2007 20:34:46 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 20 Jun 2007 20:34:44 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 5D751982FF; Wed, 20 Jun 2007 20:34:42 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 35787982BA; Wed, 20 Jun 2007 20:34:42 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1I16tF-00064O-Dk; Wed, 20 Jun 2007 16:34:57 -0400 Date: Wed, 20 Jun 2007 20:34:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: "maint print registers" crash Message-ID: <20070620203457.GA22707@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <20070620194737.GA14838@caradoc.them.org> <200706202026.l5KKQTZo009602@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200706202026.l5KKQTZo009602@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00404.txt.bz2 On Wed, Jun 20, 2007 at 10:26:29PM +0200, Ulrich Weigand wrote: > Daniel Jacobowitz wrote: > > I used to be able to start GDB and print out the current register > > layout without needing a target, by "maint print registers". Now that > > crashes GDB, because current_regcache is NULL. What do you think - > > refuse to dump values and use the gdbarch_descr in that case? > > Ah, that usage of current_regcache is a bug anyway; I must have > overlooked it. current_regcache can now be NULL at other times > as well (always after registers_changed () for example); no code > should simply use that variable any more. > > The following patch changes it to use get_current_regcache () > instead, which currently always succeeds allocating a register > cache (even if we don't have an inferior yet). > > That gets "maint print registers" immediately after startup > working for me. Does this solve your problem? Yes, this works great - thanks! -- Daniel Jacobowitz CodeSourcery