diff options
author | Guinevere Larsen <guinevere@redhat.com> | 2024-08-02 08:46:28 -0300 |
---|---|---|
committer | Guinevere Larsen <guinevere@redhat.com> | 2024-09-20 16:08:23 -0300 |
commit | b0170acd5a9e834e2b37ff151fa817e9a7a1412a (patch) | |
tree | 32f2046417fa67c01d8d4fde37265e009364aaee /gdb/python/py-cmd.c | |
parent | c588e374965509b81a623ce9ef79a026f27d2592 (diff) | |
download | binutils-b0170acd5a9e834e2b37ff151fa817e9a7a1412a.zip binutils-b0170acd5a9e834e2b37ff151fa817e9a7a1412a.tar.gz binutils-b0170acd5a9e834e2b37ff151fa817e9a7a1412a.tar.bz2 |
gdb/testsuite: rework bp-cond-failure to not depend on inlining
The test gdb.base/bp-cond-failure is implicitly expecting that the
function foo will be inlined twice and gdb will be able to find 2
locations to place a breakpoint. When clang is used, gdb only finds
one location which causes the test to fail. Since the test is not
worried about handling breakpoints on inlined functions, but rather on
the format of the message on a breakpoint condition fail, this seems
like a false fail report.
This commit reworks the test to be in c++, and uses function overloading
to ensure that 2 locations will always be found. Empirical testing
showed that, for clang, we will land on location 2 with the currest exp
commands, no matter the order of the functions declared, whereas for gcc
it depends on the order that functions were declared, so they are
ordered to always land on the second location, this way we are able to
hardcode it and check for it.
Reviewed-by: Keith Seitz <keiths@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-cmd.c')
0 files changed, 0 insertions, 0 deletions