aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.gdb/complaints.exp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-16 23:22:54 -0600
committerTom Tromey <tom@tromey.com>2018-05-23 09:17:03 -0600
commitff1cf532dbabdee0d34974a77809bf2fa23d43a5 (patch)
treececf18799007e3199cef48eecf5ef0eee54f0c54 /gdb/testsuite/gdb.gdb/complaints.exp
parent7ff8817441fcebe3d32343dbd9d514366bfe8e23 (diff)
downloadfsf-binutils-gdb-ff1cf532dbabdee0d34974a77809bf2fa23d43a5.zip
fsf-binutils-gdb-ff1cf532dbabdee0d34974a77809bf2fa23d43a5.tar.gz
fsf-binutils-gdb-ff1cf532dbabdee0d34974a77809bf2fa23d43a5.tar.bz2
Remove struct complain
At this point, struct complain is just holds a key, a value, and a "next" pointer to form a linked list. It's simpler to replace this with an unordered map. gdb/ChangeLog 2018-05-23 Tom Tromey <tom@tromey.com> * complaints.c (counters): New global. (struct complain): Remove. (struct complaints) <root>: Remove. (complaint_sentinel): Remove. (symfile_complaint_book): Update. (find_complaint) Remove. (complaint_internal, clear_complaints): Update. gdb/testsuite/ChangeLog 2018-05-23 Tom Tromey <tom@tromey.com> * gdb.gdb/complaints.exp (test_initial_complaints): Simplify.
Diffstat (limited to 'gdb/testsuite/gdb.gdb/complaints.exp')
-rw-r--r--gdb/testsuite/gdb.gdb/complaints.exp16
1 files changed, 4 insertions, 12 deletions
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index 886b435..65b6bdc 100644
--- a/gdb/testsuite/gdb.gdb/complaints.exp
+++ b/gdb/testsuite/gdb.gdb/complaints.exp
@@ -57,26 +57,18 @@ proc test_initial_complaints { } {
# Unsupress complaints
gdb_test "set stop_whining = 2"
+ gdb_test_no_output "set var \$cstr = \"Register a complaint\""
+
# Prime the system
gdb_test_stdio \
- "call complaint_internal (\"Register a complaint\")" \
+ "call complaint_internal (\$cstr)" \
"During symbol reading, Register a complaint."
- # Check that the complaint was inserted and where
- gdb_test "print symfile_complaint_book.root->fmt" \
- ".\[0-9\]+ =.*\"Register a complaint\""
-
# Re-issue the first message #1
gdb_test_stdio \
- "call complaint_internal (symfile_complaint_book.root->fmt)" \
+ "call complaint_internal (\$cstr)" \
"During symbol reading, Register a complaint."
- # Check that there is only one thing in the list. How the boolean
- # result is output depends on whether GDB is built as a C or C++
- # program.
- gdb_test "print symfile_complaint_book.root->next == &complaint_sentinel" \
- ".\[0-9\]+ = \(1|true\)" "list has one entry"
-
# Add a second complaint, expect it
gdb_test_stdio \
"call complaint_internal (\"Testing! Testing! Testing!\")" \