This is the mail archive of the gdb@sourceware.org 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]

Reset breakpoint after load?


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


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