diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/record-full.c | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 39f77f8..dfd49b9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2016-04-07 Yao Qi <yao.qi@linaro.org> + * record-full.c (record_full_insert_breakpoint): Return + early if entry on the address is found in + record_full_breakpoints. + +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. diff --git a/gdb/record-full.c b/gdb/record-full.c index 066a8e7..d8aa89c 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -1650,6 +1650,7 @@ record_full_insert_breakpoint (struct target_ops *ops, { struct record_full_breakpoint *bp; int in_target_beneath = 0; + int ix; if (!RECORD_FULL_IS_REPLAY) { @@ -1681,6 +1682,22 @@ record_full_insert_breakpoint (struct target_ops *ops, bp_tgt->placed_size = bplen; } + /* Use the existing entries if found in order to avoid duplication + in record_full_breakpoints. */ + + for (ix = 0; + VEC_iterate (record_full_breakpoint_p, + record_full_breakpoints, ix, bp); + ++ix) + { + if (bp->addr == bp_tgt->placed_address + && bp->address_space == bp_tgt->placed_address_space) + { + gdb_assert (bp->in_target_beneath == in_target_beneath); + return 0; + } + } + bp = XNEW (struct record_full_breakpoint); bp->addr = bp_tgt->placed_address; bp->address_space = bp_tgt->placed_address_space; |