I notice that bp_tgt won't be fully initialized if to_insert_breakpoint
isn't called in record_full_insert_breakpoint, and bp_tgt->reqstd_address
is zero, so an entry is added to record_full_breakpoints, but its address
is zero, which is wrong. This patch is to call gdbarch_breakpoint_from_pc
in the else branch to set bp_tgt->reqstd_address and bp_tgt->placed_size.
gdb:
2016-04-07 Yao Qi <yao.qi@linaro.org>
* record-full.c (record_full_insert_breakpoint): Set
bp_tgt->reqstd_address and bp_tgt->placed_size.
+2016-04-07 Yao Qi <yao.qi@linaro.org>
+
+ * record-full.c (record_full_insert_breakpoint): Set
+ bp_tgt->reqstd_address and bp_tgt->placed_size.
+
2016-04-06 Don Breazeal <donb@codesourcery.com>
* value.c (value_actual_type): Don't try to get rtti type
in_target_beneath = 1;
}
+ else
+ {
+ CORE_ADDR addr = bp_tgt->reqstd_address;
+ int bplen;
+
+ gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
+
+ bp_tgt->placed_address = addr;
+ bp_tgt->placed_size = bplen;
+ }
bp = XNEW (struct record_full_breakpoint);
bp->addr = bp_tgt->placed_address;