From: Mark Beckwith <mark@intrig.com>
To: Jay Monkman <jtm-list-gdb@smoothsmoothie.com>
Cc: gdb@sources.redhat.com
Subject: Re: bdi2000 and gdb (newbie question)
Date: Wed, 01 Sep 2004 16:18:00 -0000 [thread overview]
Message-ID: <20040901161829.GI14091@john.intrig.com> (raw)
In-Reply-To: <20040827175419.GD26065@smoothsmoothie.com>
Thanks for your help. I realized that something was very wrong with my
setup. Turns out I had to recompile gdb with the configure option
"--target=arm-linux". I guess this is one of the things that I was just
supposed to know. Still, it would be nice to get a "target not supported"
error when I do the "target remote" command. Would this be possible? If
so I would like to volunteer.
So I'm debugging just fine now out of ram. However, when I set BREAKMODE
HARD and try to step through flash, only one breakpoint gets hit, and then
can't step or set another. The documentation I've read states that the
breakpoint will be cleared once it is hit, but that doesn't seem to be
happening. Also the delete command doesn't seem to clear the hardware
breakpoint. I have to do a "ci" all the time from the bdi. Any
suggestions on working with hardware breakpoints?
Thanks,
Mark
On Fri, Aug 27, 2004 at 12:54:20PM -0500, Jay Monkman wrote:
> On Fri, Aug 27, 2004 at 11:24:07AM -0500, Mark Beckwith wrote:
> > (gdb) br main
> > Note: breakpoint -2 also set at pc 0x2011beac. // don't know where this came from
> > Breakpoint 1 at 0x2011beac: file main.c, line 45.
>
> That seems odd. Maybe it's an artifact of using HW breakpoints, but I
> don't think so.
>
> > Program received signal SIGTRAP, Trace/breakpoint trap.
> > <function called from gdb>
>
> What is the PC when you get here? (It will probably be off by 8 bytes
> from the next instruction to be executed.) My guess is that the CPU
> ended up running through the weeds.
>
> It looks like you have a problem in your program between your entry
> point (0x20110070) and main(). Maybe instead of putting your break
> point at main(), put it earlier or even start single-stepping from
> your program's entry point.
>
> Are you running from RAM or some kind of ROM? If you are running from
> RAM, you'll probably be better off using SW breakpoints. Since the
> ARM920 only has 1 HW breakpoint, it limits your ability to debug.
>
> Based on the addressess, it looks like you are running from SDRAM. Are
> you initializing it before loading the program (like in the BDI-2000's
> config file)?
>
>
>
>
>
> > Current language: auto; currently asm
> > (gdb) next
> > // here, there is a very long pause here, then:
> > Warning:
> > Cannot insert breakpoint 0.
> > Error accessing memory address 0xdead: Unknown error 4294967295.
> > // the bdi console also outputs:
> > # TARGET: all hardware breakpoints in use
>
> This is because you've got a breakpoint at main() and using 'next'
> causes gdb to insert a breakpoint for the next line of code. The
> ARM920 only has one HW breakpoint, and you are trying to use two.
>
--
Mark Beckwith, Intrig (http://www.intrig.com)
next prev parent reply other threads:[~2004-09-01 16:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-26 20:57 Mark Beckwith
2004-08-26 21:06 ` Daniel Jacobowitz
2004-08-26 22:12 ` Jay Monkman
2004-08-27 16:24 ` Mark Beckwith
2004-08-27 17:49 ` Jay Monkman
2004-09-01 16:18 ` Mark Beckwith [this message]
2004-09-01 18:53 ` Jay Monkman
2004-09-01 21:00 ` Mark Beckwith
2004-08-27 6:59 ` Fabian Cenedese
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=20040901161829.GI14091@john.intrig.com \
--to=mark@intrig.com \
--cc=gdb@sources.redhat.com \
--cc=jtm-list-gdb@smoothsmoothie.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