forked from Imagelibrary/binutils-gdb
gdb/testsuite: use a more unique name in gdb.mi/mi-breakpoint-multiple-locations.exp
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):
{
number="2.4",enabled="y",addr="0x00007ffff7d67e68",
func="(anonymous namespace)::fast_float::bigint::add",
file="/usr/src/debug/gcc/libstdc++-v3/src/c++17/fast_float/fast_float.h",
fullname="/usr/src/debug/gcc/libstdc++-v3/src/c++17/fast_float/fast_float.h",
line="1815", thread-groups=["i1"]
}
Change the test to use a more unique name.
Change-Id: I91de781be62d246eb41c73eaa410ebdd12633d1d
This commit is contained in:
@@ -16,13 +16,13 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
add (int a, int b)
|
a_very_unique_name (int a, int b)
|
||||||
{
|
{
|
||||||
return a + b;
|
return a + b;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double
|
static double
|
||||||
add (double a, double b)
|
a_very_unique_name (double a, double b)
|
||||||
{
|
{
|
||||||
return a + b;
|
return a + b;
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@ add (double a, double b)
|
|||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
int i = add (3, 4);
|
int i = a_very_unique_name (3, 4);
|
||||||
double d = add (3.0, 4.0);
|
double d = a_very_unique_name (3.0, 4.0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,12 +67,12 @@ proc do_test { mi_version use_fix_flag expect_fixed_output } {
|
|||||||
|
|
||||||
# Check the breakpoint-created event.
|
# Check the breakpoint-created event.
|
||||||
set pattern [make_breakpoints_pattern $expect_fixed_output 2 y y]
|
set pattern [make_breakpoints_pattern $expect_fixed_output 2 y y]
|
||||||
mi_gdb_test "break add" \
|
mi_gdb_test "break a_very_unique_name" \
|
||||||
[multi_line "&\"break add\\\\n\"" \
|
[multi_line "&\"break a_very_unique_name\\\\n\"" \
|
||||||
"~\"Breakpoint ${decimal} at.*\\(2 locations\\)\\\\n\"" \
|
"~\"Breakpoint ${decimal} at.*\\(2 locations\\)\\\\n\"" \
|
||||||
"=breakpoint-created,${pattern}" \
|
"=breakpoint-created,${pattern}" \
|
||||||
"\\^done" ] \
|
"\\^done" ] \
|
||||||
"break add"
|
"break a_very_unique_name"
|
||||||
|
|
||||||
# Check the -break-info output.
|
# Check the -break-info output.
|
||||||
mi_gdb_test "-break-info" \
|
mi_gdb_test "-break-info" \
|
||||||
@@ -81,7 +81,7 @@ proc do_test { mi_version use_fix_flag expect_fixed_output } {
|
|||||||
|
|
||||||
# Check the -break-insert response.
|
# Check the -break-insert response.
|
||||||
set pattern [make_breakpoints_pattern $expect_fixed_output 3 y y]
|
set pattern [make_breakpoints_pattern $expect_fixed_output 3 y y]
|
||||||
mi_gdb_test "-break-insert add" "\\^done,${pattern}" "insert breakpoint with MI command"
|
mi_gdb_test "-break-insert a_very_unique_name" "\\^done,${pattern}" "insert breakpoint with MI command"
|
||||||
|
|
||||||
# Modify enableness through MI commands shouldn't trigger MI
|
# Modify enableness through MI commands shouldn't trigger MI
|
||||||
# notification.
|
# notification.
|
||||||
|
|||||||
Reference in New Issue
Block a user