This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/3] Testsuite: Rename "end()" to avoid libinproctrace C++ symbol clash


On 03/16/2018 07:47 PM, Andreas Arnez wrote:

> Subject: [PATCH] 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.
I agree this is the right patch for now.  I actually posted something
like this a while ago, but forgot to push it in:

 https://sourceware.org/ml/gdb-patches/2017-12/msg00123.html

Note that I think it's a design flaw that users can run into this, though.
I had filed:

  https://sourceware.org/bugzilla/show_bug.cgi?id=22560

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]