Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: "maint print registers" crash
Date: Wed, 20 Jun 2007 20:34:00 -0000	[thread overview]
Message-ID: <20070620203457.GA22707@caradoc.them.org> (raw)
In-Reply-To: <200706202026.l5KKQTZo009602@d12av02.megacenter.de.ibm.com>

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


  reply	other threads:[~2007-06-20 20:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 19:47 Daniel Jacobowitz
2007-06-20 20:26 ` Ulrich Weigand
2007-06-20 20:34   ` Daniel Jacobowitz [this message]
2007-06-20 20:52     ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070620203457.GA22707@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox