how to align breakpoint address
bjgnu@sunnorth.com.cn
bjgnu@sunnorth.com.cn
Fri Jul 13 08:40:00 GMT 2007
Hello,
Following is a question when porting GDB.
If user set breakpoint at invalid address such as 0x1001, I would align it
to 0x1000 in function target_breakpoint_from_pc.
But, after this breakpoint, step will not work.
It seems that there is something wrong in function bpstat_stop_status ():
if (b->loc->address != bp_addr) /* address doesn't match
*/
continue;
b->loc->address is 0x1001, while bp_addr is 0x1000, but
b->loc->placed_address is 0x1000.
I think b->loc->placed_address should be used to compare with bp_addr.
Anyone can tell me the truth? Or how to align a breakpoint address?
Thanks.
Ligang
More information about the Gdb
mailing list