Testsuite: Fix ambiguous "break" due to libinproctrace
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Mon, 19 Mar 2018 12:13:09 +0000 (13:13 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Mon, 19 Mar 2018 12:13:09 +0000 (13:13 +0100)
commit194ed4130dadb7dd1668f6af87405bdcd8041199
tree1564928c0f3aa70fdbcf37469b43952cf1cca6b6
parent315aa1cf834a3d78a567263fa3fbda9b2027457e
Testsuite: Fix ambiguous "break" due to libinproctrace

Some of GDB's trace test cases define a function end() and place a
breakpoint there with "break end".  However, when libinproctrace is linked
to the binary, there are multiple methods named "end", such as
std::string::end() from the C++ library or format_pieces::end() from
common/format.h.  GDB then creates multiple breakpoints instead of just a
single one, and some FAILs result, such as these:

  FAIL: gdb.trace/trace-mt.exp: ftrace on: break end
  FAIL: gdb.trace/trace-mt.exp: ftrace off: break end

Fix this by adding the "-qualified" option to the break commands.  For
consistency, change all occurrences of "break end" (and similar) in all
trace test cases, even if the current behavior does not cause problems.
Also, consequently use the gdb_breakpoint convenience proc.

gdb/testsuite/ChangeLog:

* gdb.trace/actions-changed.exp: Call gdb_breakpoint with the
"qualified" option when setting breakpoints.
* gdb.trace/backtrace.exp: Likewise.
* gdb.trace/circ.exp: Likewise.
* gdb.trace/collection.exp: Likewise.
* gdb.trace/disconnected-tracing.exp: Likewise.
* gdb.trace/ftrace-lock.exp: Likewise.
* gdb.trace/ftrace.exp: Likewise.
* gdb.trace/infotrace.exp: Likewise.
* gdb.trace/packetlen.exp: Likewise.
* gdb.trace/passc-dyn.exp: Likewise.
* gdb.trace/qtro.exp: Likewise.
* gdb.trace/read-memory.exp: Likewise.
* gdb.trace/report.exp: Likewise.
* gdb.trace/signal.exp: Likewise.
* gdb.trace/status-stop.exp: Likewise.
* gdb.trace/strace.exp: Likewise.
* gdb.trace/tfind.exp: Likewise.
* gdb.trace/trace-break.exp: Likewise.
* gdb.trace/trace-condition.exp: Likewise.
* gdb.trace/trace-mt.exp: Likewise.
* gdb.trace/tstatus.exp: Likewise.
* gdb.trace/tsv.exp: Likewise.
* gdb.trace/unavailable-dwarf-piece.exp: Likewise.
* gdb.trace/unavailable.exp: Likewise.
* gdb.trace/while-dyn.exp: Likewise.
26 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/actions-changed.exp
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/gdb.trace/circ.exp
gdb/testsuite/gdb.trace/collection.exp
gdb/testsuite/gdb.trace/disconnected-tracing.exp
gdb/testsuite/gdb.trace/ftrace-lock.exp
gdb/testsuite/gdb.trace/ftrace.exp
gdb/testsuite/gdb.trace/infotrace.exp
gdb/testsuite/gdb.trace/packetlen.exp
gdb/testsuite/gdb.trace/passc-dyn.exp
gdb/testsuite/gdb.trace/qtro.exp
gdb/testsuite/gdb.trace/read-memory.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/signal.exp
gdb/testsuite/gdb.trace/status-stop.exp
gdb/testsuite/gdb.trace/strace.exp
gdb/testsuite/gdb.trace/tfind.exp
gdb/testsuite/gdb.trace/trace-break.exp
gdb/testsuite/gdb.trace/trace-condition.exp
gdb/testsuite/gdb.trace/trace-mt.exp
gdb/testsuite/gdb.trace/tstatus.exp
gdb/testsuite/gdb.trace/tsv.exp
gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
gdb/testsuite/gdb.trace/unavailable.exp
gdb/testsuite/gdb.trace/while-dyn.exp