diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-16 23:22:54 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-23 09:17:03 -0600 |
commit | ff1cf532dbabdee0d34974a77809bf2fa23d43a5 (patch) | |
tree | cecf18799007e3199cef48eecf5ef0eee54f0c54 /gdb/testsuite | |
parent | 7ff8817441fcebe3d32343dbd9d514366bfe8e23 (diff) | |
download | gdb-ff1cf532dbabdee0d34974a77809bf2fa23d43a5.zip gdb-ff1cf532dbabdee0d34974a77809bf2fa23d43a5.tar.gz 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')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.gdb/complaints.exp | 16 |
2 files changed, 8 insertions, 12 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4f727db..4b27640 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2018-05-23 Tom Tromey <tom@tromey.com> + * gdb.gdb/complaints.exp (test_initial_complaints): Simplify. + +2018-05-23 Tom Tromey <tom@tromey.com> + * gdb.gdb/complaints.exp (test_initial_complaints): Don't mention symfile_complaints. (test_short_complaints): Likewise. 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!\")" \ |