This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
how to align breakpoint address
- From: bjgnu at sunnorth dot com dot cn
- To: gdb at sourceware dot org
- Date: Fri, 13 Jul 2007 16:40:25 +0800
- Subject: how to align breakpoint address
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