Fixed top frame assumption in watchpoint-hw-attach
authorRichard Bunt <richard.bunt@arm.com>
Thu, 28 Jun 2018 07:59:59 +0000 (08:59 +0100)
committerRichard Bunt <richard.bunt@arm.com>
Thu, 28 Jun 2018 07:59:59 +0000 (08:59 +0100)
commitbe1b6474f0d471c01f5c4d1f33e4f13df9ffb82c
tree01271d5ddfb17393fd02321024491e3480acb73c
parent291f9a9643f87fa4eb6a7c280eaa3877c11e3a1f
Fixed top frame assumption in watchpoint-hw-attach

watchpoint-hw-attach.exp was noticed to fail on some machines.
Thanks to the input from sergiodj and palves on the IRC channel,
it was concluded that the test case incorrectly assumed that on
attach it was landed in the top-most frame of the inferior. This
was fixed by running to a break point in main by explicitly
defining the source file name before continuing with the test.

Tested on the following architectures x86_64, aarch64 and ppc64le.

gdb/testsuite/ChangeLog:

* gdb.base/watchpoint-hw-attach.c (main): Remove unneeded
code.
* gdb.base/watchpoint-hw-attach.exp: Break in outermost frame.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/watchpoint-hw-attach.c
gdb/testsuite/gdb.base/watchpoint-hw-attach.exp