This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bdi2000 and gdb (newbie question)


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]