Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH][SH] invalid registers
Date: Thu, 30 Mar 2006 20:52:00 -0000	[thread overview]
Message-ID: <20060330171503.GJ32409@nevyn.them.org> (raw)
In-Reply-To: <437B5C5F.5080500@st.com>

On Wed, Nov 16, 2005 at 04:20:47PM +0000, Andrew STUBBS wrote:
> Hi,
> 
> The attached patch teaches GDB which registers are invalid in previous 
> frames when the CFI does not say otherwise.
> 
> It does this using the SH4 ABI. This is backwards compatible with the 
> sh1-sh3 and variants. I have not attempted to deal with the DSP 
> registers as I don't know the ABI. They will be treated as ever.
> 
> The only thing this patch actually does is allow the 'info registers' 
> command (and friends) to show '*invalid register*' when there is no way 
> to know the true value.
> 
> Andrew Stubbs

> 2005-11-16  Andrew Stubbs  <andrew.stubbs@st.com>
> 
> 	* sh-tdep.c (sh_dwarf2_frame_init_reg): New function.
> 	(sh_gdbarch_init): Call dwarf2_frame_set_init_reg().

Hi Andrew,

This is OK.  Only S/390 uses the frame_init_reg hook this way today,
but it seems sensible.  But please wait a day or two in case anyone has
comments on the downside.

The downside is that you can't do this:

(gdb) break *abort
(gdb) continue
...
(gdb) up
(gdb) info registers

Instead, you have to look at the registers while you're in the bottom
frame (i.e. abort) instead of the aborting function.

Would it be more useful if GDB could output "0x40000000 (may be
clobbered)" somehow in info regs for DWARF2_FRAME_REG_UNDEFINED?
But, not a big deal either way.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-03-30 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 17:09 Andrew STUBBS
2006-03-30 20:52 ` Daniel Jacobowitz [this message]
2006-04-03 12:59   ` Andrew STUBBS
2006-04-03 13:03     ` Daniel Jacobowitz
2006-04-03 14:33       ` Andrew STUBBS

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=20060330171503.GJ32409@nevyn.them.org \
    --to=drow@false.org \
    --cc=andrew.stubbs@st.com \
    --cc=gdb-patches@sources.redhat.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