aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-27 21:31:14 -0600
committerTom Tromey <tom@tromey.com>2018-10-04 13:40:10 -0600
commit5ca8c39f059b30991b7090e7a662e4eb35d11133 (patch)
treedbbce58d49054e2ccc981fae5f2cdc66a4fab0ea /gdb/testsuite/gdb.gdb
parente79497a160f38368688107520d7d1bd0aeafc1c7 (diff)
downloadgdb-5ca8c39f059b30991b7090e7a662e4eb35d11133.zip
gdb-5ca8c39f059b30991b7090e7a662e4eb35d11133.tar.gz
gdb-5ca8c39f059b30991b7090e7a662e4eb35d11133.tar.bz2
Simplify complaints even more
This removes the SHORT_FIRST_MESSAGE case from complaints, leaving only a single case. This allows for the removal of the last argument to clear_complaints, and also simplifies complaint_internal, removing an extra allocation in the process. After this, the "./gdb -iex 'set complaint 1' -nx ./gdb" example will show: Reading symbols from ./gdb... During symbol reading: .debug_ranges entry has start address of zero [in module /home/tromey/gdb/build/gdb/gdb] During symbol reading: DW_AT_low_pc 0x0 is zero for DIE at 0x17116c1 [in module /home/tromey/gdb/build/gdb/gdb] During symbol reading: .debug_line address at offset 0xa22f5 is 0 [in module /home/tromey/gdb/build/gdb/gdb] During symbol reading: unsupported tag: 'DW_TAG_unspecified_type' During symbol reading: const value length mismatch for 'std::ratio<1, 1000000000>::num', got 8, expected 0 This is a bit wordier but, I think, a bit more clear, as the form of the message no longer depends on precisely when it was emitted. In particular if you compare to the output from the 'Clean up "Reading symbols" output' patch, you can see that earlier gdb would switch from the prefix-less form to the "During symbol reading" form at a point that is meaningless to the user (specifically, after psymtab reading is done and gdb tries to expand a CU). 2018-10-04 Tom Tromey <tom@tromey.com> * symfile.c (syms_from_objfile_1, finish_new_objfile) (reread_symbols): Update. * complaints.h (clear_complaints): Remove argument. * complaints.c (enum complaint_series): Remove. (series): Remove global. (complaint_internal): Update. (clear_complaints): Remove argument. gdb/testsuite/ChangeLog 2018-10-04 Tom Tromey <tom@tromey.com> * gdb.cp/maint.exp (test_invalid_name): Update expected output. * gdb.gdb/complaints.exp (test_short_complaints): Remove. (test_initial_complaints, test_empty_complaints): Update. * gdb.dwarf2/dw2-stack-boundary.exp: Update.
Diffstat (limited to 'gdb/testsuite/gdb.gdb')
-rw-r--r--gdb/testsuite/gdb.gdb/complaints.exp33
1 files changed, 5 insertions, 28 deletions
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index 33ec268..8f573be 100644
--- a/gdb/testsuite/gdb.gdb/complaints.exp
+++ b/gdb/testsuite/gdb.gdb/complaints.exp
@@ -62,37 +62,17 @@ proc test_initial_complaints { } {
# Prime the system
gdb_test_stdio \
"call complaint_internal (\$cstr)" \
- "During symbol reading, Register a complaint."
+ "During symbol reading: Register a complaint"
# Re-issue the first message #1
gdb_test_stdio \
"call complaint_internal (\$cstr)" \
- "During symbol reading, Register a complaint."
+ "During symbol reading: Register a complaint"
# Add a second complaint, expect it
gdb_test_stdio \
"call complaint_internal (\"Testing! Testing! Testing!\")" \
- "During symbol reading, Testing. Testing. Testing.."
-
- return 0
-}
-
-# For short complaints, all are the same
-
-proc test_short_complaints { } {
- gdb_test_exact "call clear_complaints (1)" "" "short start"
-
- # Prime the system
- test_complaint \
- "call complaint_internal (\"short line 1\")" \
- "short line 1" \
- "short line 1"
-
- # Add a second complaint, expect it
- test_complaint \
- "call complaint_internal (\"short line 2\")" \
- "short line 2" \
- "short line 2"
+ "During symbol reading: Testing. Testing. Testing."
return 0
}
@@ -123,16 +103,13 @@ proc test_empty_complaint { cmd msg } {
proc test_empty_complaints { } {
- test_empty_complaint "call clear_complaints(0)" \
- "empty non-verbose clear"
- test_empty_complaint "call clear_complaints(1)" \
- "empty verbose clear"
+ test_empty_complaint "call clear_complaints()" \
+ "clear complaints"
return 0
}
do_self_tests captured_command_loop {
test_initial_complaints
- test_short_complaints
test_empty_complaints
}