linux-mips
[Top] [All Lists]

Re: Debugging the MIPS processor using GDB

To: "Brian Foster" <brian.foster@innova-card.com>
Subject: Re: Debugging the MIPS processor using GDB
From: "Jon Fraser" <jfraser@broadcom.com>
Date: Wed, 13 Aug 2008 10:41:34 -0400
Cc: linux-mips@linux-mips.org, "Maciej W. Rozycki" <macro@linux-mips.org>, "Martin Gebert" <martin.gebert@alpha-bit.de>, TriKri <kristoferkrus@hotmail.com>
In-reply-to: <200808130905.53671.brian.foster@innova-card.com>
Organization: Broadcom
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <18944199.post@talk.nabble.com> <200808121637.42148.brian.foster@innova-card.com> <Pine.LNX.4.55.0808121720370.24222@cliff.in.clinika.pl> <200808130905.53671.brian.foster@innova-card.com>
Reply-to: jfraser@broadcom.com
Sender: linux-mips-bounce@linux-mips.org

FYI,

      I use the FS2 probe with sde-gdb on a nearly daily basis.
Are you compiling your kernel with -g -O1 ?

You can also try 'hbreak' instead of 'break' in sde-gdb.

Jon


On Wed, 2008-08-13 at 09:05 +0200, Brian Foster wrote:
> On Tuesday 12 August 2008 18:27:42 Maciej W. Rozycki wrote:
> > On Tue, 12 Aug 2008, Brian Foster wrote:
> > >   I'm using the commercial FS² (First Silicon Systems, now owned
> > >  by MIPS) EJTAG probe.  [ ... ]  There is no ‘gdbserver’ in this
> > >  setup per se, albeit I suppose the protocol between ‘gdb’ and
> > >  the FS² software [ ... ] might be similar/identical[?]
> > 
> >  Not really -- it uses a C API called MDI -- the spec is available from
> > MIPS Technologies.  I am happy to read somebody finds it useful. :) 
> > Debugging the Linux kernel with GDB and this piece of hardware is
> > certainly a lot of fun.
> 
> Maciej,
> 
>   Thanks for the clarification.  I didn't know if MDI
>  was related to the remote-‘gdbserver’ stuff or not.
> 
>   Re the FS²:  When it works, my (somewhat limited)
>  experience to-date is it works Ok.  And the use of
>  TCL on the Host workstation side allows some neat
>  tricks.  However, at least one thing doesn't work
>  reliably for me, albeit I've never investigated:
>  Breakpoints in the Linux kernel.  They do detonate.
>  Then, sometimes, I can ‘c’(ontinue) or ‘s’(tep) Ok.
>  But other times, when I ‘c’ or ‘s’, the breakpoint
>  detonates again and I'm stuck.  I cannot proceed.
>  (The same breakpoint might even work once or twice
>  and then fail.)   Any ideas?   AFAICR, this can also
>  happen if I try to use the ‘sysnav’ console instead
>  of ‘gdb’.
> 
>   I understand my predecessor in my job I gave up on
>  the FS² (very possibly because of this breakpoint
>  issue?) and used a competing (E?)JTAG probe.
> 
>   Weirdly, I've only seen this effect with the Linux
>  kernel — other kernel-mode software (e.g., the trivial
>  custom bootloader) — doesn't seem to suffer from these
>  “flakey FS² breakpoints”?
> 
> cheers!
>       -blf-
> 



<Prev in Thread] Current Thread [Next in Thread>