Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Martin Rivers <rivers@lexmark.com>
To: Ian Soanes <ians@lineo.com>
Cc: Fabrice Bellard <bellard@email.enst.fr>, linux-mips@oss.sgi.com
Subject: Re: gdb single step ?
Date: Tue, 24 Apr 2001 09:17:01 -0400	[thread overview]
Message-ID: <200104241317.JAA07302@interlock2.lexmark.com> (raw)
In-Reply-To: 3AE541B0.410FDF8A@lineo.com

Ian,

Hmmm, this was the most problematic portion of the code.  I remember that I
fought the kernel support in what it wanted to report as the epc (pc).  The
module of interest (at least for 2.4 linux) is arch/mips/kernel/traps.c and the
function do_bp().  In an earlier version of the kernel (if I remember right), it
would call a routine to "fix up" the pc.  This lead to the pc being backed up by
4 bytes which confused gdb.  Anyway, you want to make sure that the kernel is
reporting the pc of the bpt instruction with your version of linux.

Also, in regards to your subsequent email, you are correct in reporting that
mips16 is not supported (at least by my code).  We never use it as we support
various models of the cpu that don't support that instruction set.

martin

> 
> Ralf Baechle wrote:
> >
> > On Mon, Apr 23, 2001 at 06:31:20PM +0200, Fabrice Bellard wrote:
> >
> > > Did someone make a patch so that gdb can do single step on mips-linux ? If
> > > not, do you prefer a patch to gdb or a patch in the kernel to support the
> > > PTRACE_SINGLESTEP command ?
> >
> > Last I used GDB single stepping has been working fine for me, so I wonder
> > what is broken?
> >
> 
> Hi Fabrice,
> 
> This may not be totally relevant, but I'm currently trying to get
> gdbserver working on a RC32334 IDT board. I've been having some issues
> with single stepping, but am making a bit of progress.
> 
> 1/ I started with a mips gdbserver port kindly supplied by Martin
> Rivers. It mostly works well but had some problems single stepping
> through conditional branches (the problem may have been due to a
> different target than Martin was using, or me... I am kind of new to
> this :)
> 
> 2/ Previously I've had some luck single stepping kernel and module code
> with the kernel gdbstub (arch/mips/kernel/gdb-stub.c), so I ported the
> relevant single stepping code into gdbserver. The results were much
> better. The only thing that seems to be wrong now is stepping over
> function calls isn't working quite right. I can step into functions OK
> though.
> 
> If you're interested I'll let you know how I get on over the next few
> days. If not, I won't be offended :)
> 
> Best regards,
> Ian

  parent reply	other threads:[~2001-04-24 13:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-23 15:40 ld.so-1.9.x for mips Michael Shmulevich
2001-04-23 16:31 ` gdb single step ? Fabrice Bellard
2001-04-23 20:04   ` Ralf Baechle
2001-04-24  9:04     ` Ian Soanes
2001-04-24 12:45       ` Ian Soanes
2001-04-24 13:49         ` Fabrice Bellard
2001-04-24 14:07           ` Ian Soanes
2001-04-24 14:38             ` Martin Rivers
2001-04-24 14:56               ` Ian Soanes
2001-04-24 13:17       ` Martin Rivers [this message]
2001-07-31  3:44       ` Need your help:about RC32334 questions? machael thailer
2001-07-31  3:44         ` machael thailer
2001-04-23 20:03 ` ld.so-1.9.x for mips Ralf Baechle
2001-04-24  7:25   ` Michael Shmulevich
2001-04-24  8:24     ` Ryan Murray
2001-04-24  8:46       ` Michael Shmulevich
2001-04-24 10:49         ` Florian Lohoff
2001-04-24 10:59           ` Michael Shmulevich
2001-04-24 15:02             ` Ralf Baechle
2001-04-25  7:42               ` Michael Shmulevich
2001-04-24 13:43     ` Alan Cox
2001-04-24 13:43       ` Alan Cox
2001-04-24 10:48 ` Florian Lohoff

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=200104241317.JAA07302@interlock2.lexmark.com \
    --to=rivers@lexmark.com \
    --cc=bellard@email.enst.fr \
    --cc=ians@lineo.com \
    --cc=linux-mips@oss.sgi.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