Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Reset breakpoint after load?
@ 2010-01-19  7:36 Jie Zhang
  2010-01-21 10:01 ` Dave Korn
  0 siblings, 1 reply; 12+ messages in thread
From: Jie Zhang @ 2010-01-19  7:36 UTC (permalink / raw)
  To: gdb

Hi,

While testing Blackfin GCC on bare metal using gdb-comm.exp, I found a 
problem, which I don't know if it's a bug of gdb or by design.

gdb-comm.exp sets breakpoints on exit and abort before load. The problem 
is that GDB tries to skip prologue according to what it reads from 
memory, which might contain random data since the executable has not 
been loaded into memory. In my case, sometimes skip_prologue might skip 
one or two more instructions, which happens to be an exception 
instruction and will trap the processor into an exception event loop 
after running the executable before hit the breakpoints.

Currently I change gdb-comm.exp to set breakpoints after load. In this 
way GDB can set breakpoints in the correct addresses and our GCC testing 
runs fine. But Is it a good idea to ask GDB to reset breakpoints after 
load just as we do on connecting to a new target?


Thanks,
Jie


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-01-22 18:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19  7:36 Reset breakpoint after load? Jie Zhang
2010-01-21 10:01 ` Dave Korn
2010-01-21 12:52   ` Jie Zhang
2010-01-21 18:29   ` Michael Snyder
2010-01-21 21:20     ` Daniel Jacobowitz
2010-01-21 22:41       ` Jie Zhang
2010-01-22  2:15         ` Paul Koning
2010-01-22  3:05           ` Jie Zhang
2010-01-22 11:46             ` Paul Koning
2010-01-22 13:46               ` Daniel Jacobowitz
2010-01-22 18:19               ` Michael Snyder
2010-01-21 22:35     ` Jie Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox