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]

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


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