aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-10-30 15:51:33 +0000
committerYao Qi <yao.qi@linaro.org>2015-10-30 15:54:58 +0000
commit4081c0f1222810746068579c6fbbcd8a9b59cbb8 (patch)
tree56d33d087007a6d44c27bb0f3f4ae623ebc49ebf /gdb/infrun.c
parent10268a4c0d64b3892397aeaafbc4b91f6a1e0dc8 (diff)
downloadgdb-4081c0f1222810746068579c6fbbcd8a9b59cbb8.zip
gdb-4081c0f1222810746068579c6fbbcd8a9b59cbb8.tar.gz
gdb-4081c0f1222810746068579c6fbbcd8a9b59cbb8.tar.bz2
Simplify gdb.threads/wp-replication.exp on counting HW watchpoints
Nowadays, test gdb.threads/wp-replication.exp uses a while loop to repeatedly insert HW watchpoint, resume and check no error message coming out, in order to count HW watchpoints There are some drawbacks in this way, - the loop could be endless. I think this is use to making trouble to S/390, since we had such comment # Some targets (like S/390) behave as though supporting # unlimited hardware watchpoints. In this case we just take a # safe exit out of the loop. I hit this today too because a GDB internal error is triggered on "continue" in the loop, and $done is 0 invariantly, so the loop can't end. - the code counting hardware watchpoint is too complicated. We can use "set breakpoint always-inserted on" to get the result of inserting HW watchpoint without resuming the inferior. In this way, watch_count_done and empty_cycle in c file is no longer needed. In this patch, I change to use "set breakpoint always-inserted on" trick, and only iterate $NR_THREADS times, to count the HW watchpoint. In this way, the loop can't be endless, and GDB doesn't need to resume the inferior. gdb/testsuite: 2015-10-30 Yao Qi <yao.qi@linaro.org> * gdb.threads/wp-replication.c (watch_count_done): Remove. (empty_cycle): Remove. (main): Don't call empty_cycle. Don't use watch_count_done. * gdb.threads/wp-replication.exp: Don't set breakpoint on empty_cycle. Rewrite the code counting HW watchpoints.
Diffstat (limited to 'gdb/infrun.c')
0 files changed, 0 insertions, 0 deletions