Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: "Maciej W. Rozycki" <macro@mips.com>
Cc: gdb-patches@sourceware.org, Chris Dearman <chris@mips.com>,
		"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: mips-tdep.c: Adjust breakpoints in branch delay slots
Date: Fri, 25 May 2007 13:19:00 -0000	[thread overview]
Message-ID: <20070525131910.GA28994@caradoc.them.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0705251318500.13913@perivale.mips.com>

On Fri, May 25, 2007 at 01:21:57PM +0100, Maciej W. Rozycki wrote:
> On Fri, 25 May 2007, Maciej W. Rozycki wrote:
> 
> >  In principle on bare iron it should be doable, but the problem is, IIRC, 
> > the state of cp0.cause.bd is not propagated under Linux to userland in any 
> > way.  And at the moment I'm not sure how this would affect EJTAG debugging 
> > either.
> 
>  FYI, I have now checked Linux and it should be fine -- must have been my 
> bad memory.  EJTAG has provisions for handling this correctly 
> (cp0.debug.dbd), but I'm not sure if associated software gets it right.

Great.  Want to take a look at doing this the other way then?

The best option I can think of would be to fake the PC value based on
the value of BD.  You might be able to do this cleverly; have a
register named "$pc" which shows the hardware contents of the PC
register, and have read_pc / unwind_pc / write_pc adjust based on BD.
I'm not sure if that will work, but it does mimic the architecture
behavior, which is an encouraging sign; and some other platforms do
similar magic (e.g. HP/UX and IA64).

It might be best to eliminate the setting of PC_REGNUM first, but
that's multi-arch work; I see that dwarf2-frame.c relies on it unless
you set dwarf2_frame_default_init_reg.

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2007-05-25 13:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 18:08 Maciej W. Rozycki
2007-05-24 18:21 ` Mark Kettenis
2007-05-24 18:31 ` Daniel Jacobowitz
     [not found]   ` <Pine.LNX.4.61.0705251217190.13913@perivale.mips.com>
2007-05-25 12:50     ` Maciej W. Rozycki
2007-05-25 13:16     ` Maciej W. Rozycki
     [not found]     ` <Pine.LNX.4.61.0705251318500.13913@perivale.mips.com>
2007-05-25 13:19       ` Daniel Jacobowitz [this message]
2007-06-15 14:38         ` Maciej W. Rozycki
2007-05-25 13:21   ` Maciej W. Rozycki
2007-05-25 13:26     ` Daniel Jacobowitz

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=20070525131910.GA28994@caradoc.them.org \
    --to=drow@false.org \
    --cc=chris@mips.com \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@linux-mips.org \
    --cc=macro@mips.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