From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id F38613858D1E; Mon, 7 Nov 2022 15:48:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F38613858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667836125; bh=fix6bzNWUWUNcxQMuDl2DmKszcPbDKxChJkc/DW4z04=; h=From:To:Subject:Date:From; b=b0E/p4gqhmDs3/2iP3FvRG8QBDr/AYuN3OS2uO6SjU3XsArSJOnwD3J32s9oMquON yZy44oSakOBf74bhGJGyoXIBh3lKEpPX2ghde1KDXpbcbIejg02hdvntPwhiCDuW1x DBio3wtqYOJ2ALdAH9xpE9bP5qigrrt+nVpqRRjA= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: use a more unique name in gdb.mi/mi-breakpoint-multiple-locations.exp X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: b7096df235486ce718c2a0bfda8a0db074dcb671 X-Git-Newrev: 240e07bd94a8da9270c57cde394f6883e43b8497 Message-Id: <20221107154844.F38613858D1E@sourceware.org> Date: Mon, 7 Nov 2022 15:48:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D240e07bd94a8= da9270c57cde394f6883e43b8497 commit 240e07bd94a8da9270c57cde394f6883e43b8497 Author: Simon Marchi Date: Mon Nov 7 09:38:12 2022 -0500 gdb/testsuite: use a more unique name in gdb.mi/mi-breakpoint-multiple-= locations.exp =20 I see failures in this test, due to the function name "add" being too generic, and unexpected breakpoint locations being found in my libstdc++, such as (wrapped for readability): =20 { number=3D"2.4",enabled=3D"y",addr=3D"0x00007ffff7d67e68", func=3D"(anonymous namespace)::fast_float::bigint::add", file=3D"/usr/src/debug/gcc/libstdc++-v3/src/c++17/fast_float/fa= st_float.h", fullname=3D"/usr/src/debug/gcc/libstdc++-v3/src/c++17/fast_floa= t/fast_float.h", line=3D"1815", thread-groups=3D["i1"] } =20 Change the test to use a more unique name. =20 Change-Id: I91de781be62d246eb41c73eaa410ebdd12633d1d Diff: --- gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.cc | 8 ++++---- gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.exp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.cc b/gdb= /testsuite/gdb.mi/mi-breakpoint-multiple-locations.cc index ab820ffdb64..969e3cbe723 100644 --- a/gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.cc +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.cc @@ -16,13 +16,13 @@ along with this program. If not, see . = */ =20 static int -add (int a, int b) +a_very_unique_name (int a, int b) { return a + b; } =20 static double -add (double a, double b) +a_very_unique_name (double a, double b) { return a + b; } @@ -30,7 +30,7 @@ add (double a, double b) int main (void) { - int i =3D add (3, 4); - double d =3D add (3.0, 4.0); + int i =3D a_very_unique_name (3, 4); + double d =3D a_very_unique_name (3.0, 4.0); return 1; } diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.exp b/gd= b/testsuite/gdb.mi/mi-breakpoint-multiple-locations.exp index 8600b1bebc0..51647471f52 100644 --- a/gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.exp +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-multiple-locations.exp @@ -67,12 +67,12 @@ proc do_test { mi_version use_fix_flag expect_fixed_out= put } { =20 # Check the breakpoint-created event. set pattern [make_breakpoints_pattern $expect_fixed_output 2 y y] - mi_gdb_test "break add" \ - [multi_line "&\"break add\\\\n\"" \ + mi_gdb_test "break a_very_unique_name" \ + [multi_line "&\"break a_very_unique_name\\\\n\"" \ "~\"Breakpoint ${decimal} at.*\\(2 locations\\)\\\\n\"" \ "=3Dbreakpoint-created,${pattern}" \ "\\^done" ] \ - "break add" + "break a_very_unique_name" =20 # Check the -break-info output. mi_gdb_test "-break-info" \ @@ -81,7 +81,7 @@ proc do_test { mi_version use_fix_flag expect_fixed_outpu= t } { =20 # Check the -break-insert response. set pattern [make_breakpoints_pattern $expect_fixed_output 3 y y] - mi_gdb_test "-break-insert add" "\\^done,${pattern}" "insert breakpoi= nt with MI command" + mi_gdb_test "-break-insert a_very_unique_name" "\\^done,${pattern}" "= insert breakpoint with MI command" =20 # Modify enableness through MI commands shouldn't trigger MI # notification.