aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2018-01-05 16:05:34 +0000
committerPedro Alves <palves@redhat.com>2018-01-05 16:05:34 +0000
commit7a19098f86ba3a4abfeb4dff33e2a1929f6fbaa8 (patch)
tree3836645410ba77422774ab7d079b7e44d95038a4 /gdb/testsuite
parent7a9dac5b3cc3b50f9733deef0a606c28b099ed1f (diff)
downloadbinutils-7a19098f86ba3a4abfeb4dff33e2a1929f6fbaa8.zip
binutils-7a19098f86ba3a4abfeb4dff33e2a1929f6fbaa8.tar.gz
binutils-7a19098f86ba3a4abfeb4dff33e2a1929f6fbaa8.tar.bz2
Fix gdb.ada/info_addr_mixed_case.exp (PR gdb/22670)
The comments about mixed case in the testcase are actually a red herring. The problem here is that we'd get to ada_lookup_encoded_symbol with "my_table", which wraps the looked up name in "<>"s to force a verbatim match, and that in turn disables wild matching. Fix this by swapping around the internals of ada_lookup_encoded_symbol and ada_lookup_symbol, thus avoiding the encoding and verbatim-wrapping in the ada_lookup_symbol case, the case that starts with a user-provided lookup name. Ada encoding is still done of course, in the ada_lookup_name_info ctor. This could be also seen as avoiding the double-encoding problem in a different way. gdb/ChangeLog: 2018-01-05 Pedro Alves <palves@redhat.com> PR gdb/22670 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of ada_lookup_symbol. (ada_lookup_symbol): Reimplement in terms of ada_lookup_symbol_list, bits factored out from ada_lookup_encoded_symbol. gdb/testsuite/ChangeLog: 2018-01-05 Pedro Alves <palves@redhat.com> PR gdb/22670 * gdb.ada/info_addr_mixed_case.exp: Remove kfail. Extend test to exercise lower case too, and to exercise both full matching and wild matching.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.ada/info_addr_mixed_case.exp15
2 files changed, 14 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ea9d65c..35bf048 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2018-01-05 Pedro Alves <palves@redhat.com>
+
+ PR gdb/22670
+ * gdb.ada/info_addr_mixed_case.exp: Remove kfail. Extend test to
+ exercise lower case too, and to exercise both full matching and
+ wild matching.
+
2018-01-04 Joel Brobecker <brobecker@adacore.com>
PR gdb/22670
diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
index e9fce0d..7840a43 100644
--- a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
+++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
@@ -31,12 +31,11 @@ if ![runto "foo.adb:$bp_location" ] then {
# The following test exercises the situation when uppercase letters
# are used in the name of the symbol passed to the "info address"
-# command. This should not make a difference, as the language is
-# Ada, and Ada is case-insensitive.
+# command. This should not make a difference, as the language is Ada,
+# and Ada is case-insensitive. Also, exercise both fully-qualified
+# name matching and wild matching.
-# commit b5ec771e60c1a0863e51eb491c85c674097e9e13 (Introduce
-# lookup_name_info and generalize Ada's FULL/WILD name matching)
-# caused the following test to fail. KFAIL it while investigating...
-setup_kfail gdb/22670 "*-*-*"
-gdb_test "info address My_Table" \
- "Symbol \"pck\\.my_table\" is static storage at address $hex\\."
+foreach sym {"my_table" "My_Table" "pck.my_table" "Pck.My_Table"} {
+ gdb_test "info address $sym" \
+ "Symbol \"pck\\.my_table\" is static storage at address $hex\\."
+}