From 20106cfbdb78a987e33d0ebc38946c01be275c26 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 28 Mar 2011 20:07:12 +0000 Subject: [PATCH] gdb/testsuite/ * gdb.ada/arrayparam.exp (print first after function call): Use explicit package name. Add a comment (print lasta after function call): Rename ... (print last after function call): ... it and use explicit package name. (print length after function call): Use explicit package name. * gdb.ada/str_ref_cmp.exp (operator = works for strings): New test. * gdb.ada/sym_print_name.exp: Change `i' to `integervar'. (multiple matches for symbol i): Rename ... (multiple matches for symbol integervar): ... it. * gdb.ada/sym_print_name/foo.adb (Foo): Change `I' to `IntegerVar'. * gdb.ada/sym_print_name/pck.ads (Pck): Likewise. --- gdb/testsuite/ChangeLog | 15 +++++++++++++++ gdb/testsuite/gdb.ada/arrayparam.exp | 11 ++++++----- gdb/testsuite/gdb.ada/str_ref_cmp.exp | 13 +++++++++++++ gdb/testsuite/gdb.ada/sym_print_name.exp | 10 +++++----- gdb/testsuite/gdb.ada/sym_print_name/foo.adb | 4 ++-- gdb/testsuite/gdb.ada/sym_print_name/pck.ads | 4 ++-- 6 files changed, 43 insertions(+), 14 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 89aaaed8c1..defd8c772e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2011-03-28 Jan Kratochvil + + * gdb.ada/arrayparam.exp (print first after function call): Use + explicit package name. Add a comment + (print lasta after function call): Rename ... + (print last after function call): ... it and use explicit package + name. + (print length after function call): Use explicit package name. + * gdb.ada/str_ref_cmp.exp (operator = works for strings): New test. + * gdb.ada/sym_print_name.exp: Change `i' to `integervar'. + (multiple matches for symbol i): Rename ... + (multiple matches for symbol integervar): ... it. + * gdb.ada/sym_print_name/foo.adb (Foo): Change `I' to `IntegerVar'. + * gdb.ada/sym_print_name/pck.ads (Pck): Likewise. + 2011-03-25 Andrew Burgess * lib/gdb.exp (default_gdb_start,gdb_init): Clear the GREP_OPTIONS diff --git a/gdb/testsuite/gdb.ada/arrayparam.exp b/gdb/testsuite/gdb.ada/arrayparam.exp index a861916080..016361b6cd 100644 --- a/gdb/testsuite/gdb.ada/arrayparam.exp +++ b/gdb/testsuite/gdb.ada/arrayparam.exp @@ -42,17 +42,18 @@ gdb_test "print call_me (\"bonjour\")" \ "print call_me (\"bonjour\")" # Verify that the array was passed properly by checking the global -# variables that Call_Me sets as side-effects. +# variables that Call_Me sets as side-effects. Use the package name to avoid +# name clash with debug info of system libraries. -gdb_test "print first" \ +gdb_test "print pck.first" \ "= 98 'b'" \ "print first after function call" -gdb_test "print last" \ +gdb_test "print pck.last" \ "= 114 'r'" \ - "print lasta after function call" + "print last after function call" -gdb_test "print length" \ +gdb_test "print pck.length" \ "= 7" \ "print length after function call" diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp index 70acf83f6e..76de844f68 100644 --- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp +++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp @@ -34,6 +34,19 @@ clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" +# BINOP_EQUAL incorrectly resolves with system debug info to Ada.Strings.Maps. +set test "operator = works for strings" +gdb_test_multiple {print "a" = "a"} $test { + -re " = false\r\n$gdb_prompt $" { + kfail ada/12607 $test + untested ${testdir}.exp + return 0 + } + -re " = true\r\n$gdb_prompt $" { + pass $test + } +} + # Verify that we can compare a string slice with another string. gdb_test "print String_Var (1 .. 3) = \"Hel\"" \ diff --git a/gdb/testsuite/gdb.ada/sym_print_name.exp b/gdb/testsuite/gdb.ada/sym_print_name.exp index acca51c8f4..993646d0db 100644 --- a/gdb/testsuite/gdb.ada/sym_print_name.exp +++ b/gdb/testsuite/gdb.ada/sym_print_name.exp @@ -45,14 +45,14 @@ clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" -set menu [multi_line "Multiple matches for i" \ +set menu [multi_line "Multiple matches for integervar" \ "\\\[0\\\] cancel" \ - "\\\[1\\\] pck\\.first\\.i.*" \ - "\\\[2\\\] pck\\.second\\.i.*" \ + "\\\[1\\\] pck\\.first\\.integervar.*" \ + "\\\[2\\\] pck\\.second\\.integervar.*" \ "> $" ] -set test_name "multiple matches for symbol i" -gdb_test_multiple "print i" "$test_name" \ +set test_name "multiple matches for symbol integervar" +gdb_test_multiple "print integervar" "$test_name" \ { -re "$menu" { pass "$test_name" diff --git a/gdb/testsuite/gdb.ada/sym_print_name/foo.adb b/gdb/testsuite/gdb.ada/sym_print_name/foo.adb index f50084eb1f..46beee6f96 100644 --- a/gdb/testsuite/gdb.ada/sym_print_name/foo.adb +++ b/gdb/testsuite/gdb.ada/sym_print_name/foo.adb @@ -17,6 +17,6 @@ with Pck; use Pck; procedure Foo is begin - Do_Nothing (First.I); -- STOP - Do_Nothing (Second.I); + Do_Nothing (First.IntegerVar); -- STOP + Do_Nothing (Second.IntegerVar); end Foo; diff --git a/gdb/testsuite/gdb.ada/sym_print_name/pck.ads b/gdb/testsuite/gdb.ada/sym_print_name/pck.ads index a20f2d0f86..22384eb2e5 100644 --- a/gdb/testsuite/gdb.ada/sym_print_name/pck.ads +++ b/gdb/testsuite/gdb.ada/sym_print_name/pck.ads @@ -15,11 +15,11 @@ package Pck is package First is - I : Integer := 48; + IntegerVar : Integer := 48; end First; package Second is - I : Integer := 74; + IntegerVar : Integer := 74; end Second; procedure Do_Nothing (Val : in out Integer); -- 2.34.1