From: Brian Foster <brian.foster@innova-card.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>, linux-mips@linux-mips.org
Cc: Martin Gebert <martin.gebert@alpha-bit.de>,
TriKri <kristoferkrus@hotmail.com>
Subject: Re: Debugging the MIPS processor using GDB (and FS2 EJTAG probe breakpoint issues)
Date: Thu, 14 Aug 2008 13:42:20 +0200 [thread overview]
Message-ID: <200808141342.20496.brian.foster@innova-card.com> (raw)
In-Reply-To: <200808131707.30570.brian.foster@innova-card.com>
On Wednesday 13 August 2008 17:07:30 Brian Foster wrote:
>[ ... ]
> On Wed, 13 Aug 2008, Brian Foster wrote:
> > Re the FS²: [ ... ] at least one thing doesn't work
> > reliably for me [ ... ]: 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'm using the most recent FS² (2.4.4) with the most recent
> SDE-Lite from MIPS (V6.06.01). Older versions of FS²/SDE
> had the same(?) issue. (This is with a 4KSd core, running
> Little Endian.)
>[ ... ]
> The behavior [ is ]:
>
> s1. gdb b xxx_open
> s2. target cat /dev/xxx
> s3. (breakpoint detonates)
> s4. gdb x/i $pc (all is Ok)
> s5. gdb c (Ok)
> s6. target cat /dev/xxx
> s7. (breakpoint detonates)
> s8. gdb x/i $pc (wrong! instruction is ‘sdbbp’.)
>
> I'm now stuck. Any attempt to ‘c’ or ‘s’ just hits the
> breakpoint again.
>[ ... ]
> ( I seem to recall also having an issue with hardware
> breakpoints, but cannot recall for certain ATM; tests
> will have to wait until later .... ;-\ )
Hello!
Just in case someone recognizes these symptoms (or has
any ideas) ....
I tried hardware breakpoints from ‘gdb’ and got:
h1. gdb hb xxx_open
h2. gdb says:
warning: Cannot query hardware breakpoint/watchpoint resources.
warning: Available functionality may be limited.
h3. target cat /dev/xxx
h4. Nothing happens! (The breakpoint does not detonate.)
The warnings from ‘sde-gdb’ (h2) have me puzzled. As I read
the VHDL synthesis definitions for our implementation of the
4KSd core — an advantage of working for a HW company! — we
should have 4 I and 2 D hardware breakpoints in Debug (EJTAG)
Mode. Related, and maybe significantly, ‘info reg’ from
‘sde-gdb’ reports “xxxxxxxx” for the ‘debug’ register (WTF?).
I also tried the ‘sysnav’ command ‘bkpt’ (via the ‘monitor’
command in ‘gdb’). It works! ‘set’, ‘setsw’, and ‘sethw’
all work as expected in my simple test (below, 0xVIRTUAL is
the virtual address of xxx_open()):
m1. gdb monitor bkpt set 0xVIRTUAL
m2. target cat /dev/xxx
m3. (breakpoint detonates)
m4. gdb x/i $pc (all is Ok)
m5. gdb c (Ok)
m6. target cat /dev/xxx
m7. (breakpoint detonates)
m8. gdb x/i $pc (all is Ok)
m9. gdb c (Ok)
(... and repeat ad infinitum (‘s’ also works) ...)
I presume I can cook up some ‘gdb’ macros to can (simplify)
those horrible ‘monitor bkpt ...’ commands, but I shouldn't
have to do that, should I? ;-\
Any ideas? (And yes, I'm attempting to pursue this with
FS²/MIPS, but .... .)
cheers!
-blf-
--
“How many surrealists does it take to | Brian Foster
change a lightbulb? Three. One calms | somewhere in south of France
the warthog, and two fill the bathtub | Stop E$$o (ExxonMobil)!
with brightly-coloured machine tools.” | http://www.stopesso.com
next prev parent reply other threads:[~2008-08-14 11:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-12 13:23 Debugging the MIPS processor using GDB TriKri
2008-08-12 14:14 ` Martin Gebert
2008-08-12 14:37 ` Brian Foster
2008-08-12 16:27 ` Maciej W. Rozycki
2008-08-13 7:05 ` Brian Foster
2008-08-13 13:49 ` Maciej W. Rozycki
2008-08-13 15:07 ` Brian Foster
2008-08-13 15:16 ` Maciej W. Rozycki
2008-08-14 11:42 ` Brian Foster [this message]
2008-08-14 23:11 ` Debugging the MIPS processor using GDB (and FS2 EJTAG probe breakpoint issues) Maciej W. Rozycki
2008-08-13 14:41 ` Debugging the MIPS processor using GDB Jon Fraser
2008-08-13 15:12 ` Brian Foster
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=200808141342.20496.brian.foster@innova-card.com \
--to=brian.foster@innova-card.com \
--cc=kristoferkrus@hotmail.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=martin.gebert@alpha-bit.de \
/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