Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Orjan Friberg <orjan.friberg@axis.com>
Cc: gdb@sources.redhat.com
Subject: Re: Register fudging (CRISv32)
Date: Fri, 03 Sep 2004 16:03:00 -0000	[thread overview]
Message-ID: <20040903160329.GA18755@nevyn.them.org> (raw)
In-Reply-To: <4138800F.9050503@axis.com>

On Fri, Sep 03, 2004 at 04:30:39PM +0200, Orjan Friberg wrote:
> Daniel Jacobowitz wrote:
> >
> 
> Daniel, thanks for you answers.
> 
> >Up to you.  I think doing it in the kernel stub and kernel ptrace
> >support is a better strategy, esp. if you have additional information
> >confirming that a breakpoint was hit.
> 
> In the kernel I know for sure it was a breakpoint (or, more 
> specifically, a certain break instruction was executed, which is how 
> ordinary breakpoints are implemented).
> 
> >There's arguments both ways for this.  For instance, I think it would
> >be reasonable to do this in the kernel.
> 
> Except for the fact that the "PC" doesn't exist in the kernel - it's a 
> made up register, which is set either from the exception return pointer 
> register (+ possibly delay slot adjustment), or from the single-step PC 
> (when we're single-stepping that is).  Or are you suggesting that the 
> pseudo-PC *should be* in the kernel (if not part of the pt_regs struct, 
> then at least accessible by ptrace)?

Precisely.  It sounds like the kernel can do a more accuarate job than
gdbserver can easily.  For instance, if we single-step a task, and
detach leaving it stopped, and attach another debugger - that debugger
won't have the state to know whether the task was last stepped or
trapped.

> >Not sure what you mean by this.
> 
> For example, in case of a PTRACE_CONT I set the single-step PC to 0 to 
> disable single-stepping (similar to what the m68k does).

Ah, I think I see.  I don't remember what your original question was
though :-)

-- 
Daniel Jacobowitz


  reply	other threads:[~2004-09-03 16:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 12:37 Orjan Friberg
2004-09-03 13:47 ` Daniel Jacobowitz
2004-09-03 14:31   ` Orjan Friberg
2004-09-03 16:03     ` Daniel Jacobowitz [this message]
2004-09-06 12:00       ` Orjan Friberg

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=20040903160329.GA18755@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=orjan.friberg@axis.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