public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 5/7] Clean up "Reading symbols" output
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
                   ` (3 preceding siblings ...)
  2018-09-23 15:10 ` [PATCH 2/7] Fix off-by-one error in complaint_internal Tom Tromey
@ 2018-09-23 15:10 ` Tom Tromey
  2018-09-23 15:10 ` [PATCH 3/7] Use filtered printing when reading symbols Tom Tromey
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This patch is another attempt to fix PR cli/19551.  Unlike my previous
attempt, it doesn't print progress.  Instead, it just changes some
messages and adds newliness to make the output a bit nicer.

It also removes the "done." text that was previously emitted.  The
idea here is that it is obvious when gdb is done reading debug info,
as it starts then doing something else; and that while this message
did not provide much benefit to users, it did make it harder to make
the output clean.

After this change the output from "./gdb -iex 'set complaint 1' -nx ./gdb"
reads:

    Reading symbols from ./gdb...
    .debug_ranges entry has start address of zero [in module /home/tromey/gdb/build/gdb/gdb]
    DW_AT_low_pc 0x0 is zero for DIE at 0x17116c1 [in module /home/tromey/gdb/build/gdb/gdb]
    .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.

gdb/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	PR cli/19551:
	* symfile.c (symbol_file_add_with_addrs): Update output.
	* psymtab.c (require_partial_symbols): Update output.

gdb/testsuite/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	PR cli/19551:
	* lib/mi-support.exp (mi_gdb_file_cmd): Update.
	* lib/gdb.exp (gdb_file_cmd): Update.
	* gdb.stabs/weird.exp (print_weird_var): Update.
	* gdb.server/solib-list.exp: Update.
	* gdb.multi/remove-inferiors.exp (test_remove_inferiors): Update.
	* gdb.mi/mi-cli.exp: Update.
	* gdb.linespec/linespec.exp: Update.
	* gdb.dwarf2/dw2-stack-boundary.exp: Update.
	* gdb.dwarf2/dw2-objfile-overlap.exp: Update.
	* gdb.cp/cp-relocate.exp: Update.
	* gdb.base/sym-file.exp: Update.
	* gdb.base/relocate.exp: Update.
	* gdb.base/readnever.exp: Update.
	* gdb.base/print-symbol-loading.exp (test_load_core): Update.
	* gdb.base/kill-detach-inferiors-cmd.exp: Update.
	* gdb.base/dbx.exp (gdb_file_cmd): Update.
	* gdb.base/code_elim.exp: Update.
	* gdb.base/break-unload-file.exp (test_break): Update.
	* gdb.base/break-interp.exp (test_attach_gdb): Update.
	* gdb.base/break-idempotent.exp (force_breakpoint_re_set):
	Update.
	* gdb.base/attach.exp (do_attach_tests): Update.
	* gdb.base/sepdebug.exp: Update.
	* gdb.python/py-section-script.exp: Update.
---
 gdb/ChangeLog                                 |  6 ++++
 gdb/psymtab.c                                 | 21 ++++----------
 gdb/symfile.c                                 | 20 ++-----------
 gdb/testsuite/ChangeLog                       | 28 +++++++++++++++++++
 gdb/testsuite/gdb.base/attach.exp             | 10 +++----
 gdb/testsuite/gdb.base/break-idempotent.exp   |  2 +-
 gdb/testsuite/gdb.base/break-interp.exp       |  2 +-
 gdb/testsuite/gdb.base/break-unload-file.exp  |  2 +-
 gdb/testsuite/gdb.base/code_elim.exp          | 10 +++----
 gdb/testsuite/gdb.base/dbx.exp                |  2 +-
 .../gdb.base/kill-detach-inferiors-cmd.exp    |  2 +-
 .../gdb.base/print-symbol-loading.exp         |  2 +-
 gdb/testsuite/gdb.base/readnever.exp          |  2 +-
 gdb/testsuite/gdb.base/relocate.exp           | 18 ++++++------
 gdb/testsuite/gdb.base/sepdebug.exp           |  2 +-
 gdb/testsuite/gdb.base/sym-file.exp           |  4 +--
 gdb/testsuite/gdb.cp/cp-relocate.exp          |  2 +-
 .../gdb.dwarf2/dw2-objfile-overlap.exp        |  2 +-
 .../gdb.dwarf2/dw2-stack-boundary.exp         |  2 +-
 gdb/testsuite/gdb.linespec/linespec.exp       |  2 +-
 gdb/testsuite/gdb.mi/mi-cli.exp               |  2 +-
 gdb/testsuite/gdb.multi/remove-inferiors.exp  |  2 +-
 .../gdb.python/py-section-script.exp          |  2 +-
 gdb/testsuite/gdb.server/solib-list.exp       |  2 +-
 gdb/testsuite/gdb.stabs/weird.exp             |  2 +-
 gdb/testsuite/lib/gdb.exp                     |  8 +++---
 gdb/testsuite/lib/mi-support.exp              |  4 +--
 27 files changed, 86 insertions(+), 77 deletions(-)

diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 219357e586..274d56734c 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -78,11 +78,8 @@ require_partial_symbols (struct objfile *objfile, int verbose)
       if (objfile->sf->sym_read_psymbols)
 	{
 	  if (verbose)
-	    {
-	      printf_filtered (_("Reading symbols from %s..."),
-			       objfile_name (objfile));
-	      gdb_flush (gdb_stdout);
-	    }
+	    printf_filtered (_("Reading symbols from %s...\n"),
+			     objfile_name (objfile));
 	  (*objfile->sf->sym_read_psymbols) (objfile);
 
 	  /* Partial symbols list are not expected to changed after this
@@ -90,17 +87,9 @@ require_partial_symbols (struct objfile *objfile, int verbose)
 	  objfile->global_psymbols.shrink_to_fit ();
 	  objfile->static_psymbols.shrink_to_fit ();
 
-	  if (verbose)
-	    {
-	      if (!objfile_has_symbols (objfile))
-		{
-		  wrap_here ("");
-		  printf_filtered (_("(no debugging symbols found)..."));
-		  wrap_here ("");
-		}
-
-	      printf_filtered (_("done.\n"));
-	    }
+	  if (verbose && !objfile_has_symbols (objfile))
+	    printf_filtered (_("(No debugging symbols found in %s)\n"),
+			     objfile_name (objfile));
 	}
     }
 
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 0767562d5c..ed41b5b70f 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1110,11 +1110,7 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
       if (deprecated_pre_add_symbol_hook)
 	deprecated_pre_add_symbol_hook (name);
       else
-	{
-	  printf_filtered (_("Reading symbols from %s..."), name);
-	  wrap_here ("");
-	  gdb_flush (gdb_stdout);
-	}
+	printf_filtered (_("Reading symbols from %s...\n"), name);
     }
   syms_from_objfile (objfile, addrs, add_flags);
 
@@ -1126,29 +1122,19 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
   if ((flags & OBJF_READNOW))
     {
       if (should_print)
-	{
-	  printf_filtered (_("expanding to full symbols..."));
-	  wrap_here ("");
-	  gdb_flush (gdb_stdout);
-	}
+	printf_filtered (_("Expanding full symbols from %s...\n"), name);
 
       if (objfile->sf)
 	objfile->sf->qf->expand_all_symtabs (objfile);
     }
 
   if (should_print && !objfile_has_symbols (objfile))
-    {
-      wrap_here ("");
-      printf_filtered (_("(no debugging symbols found)..."));
-      wrap_here ("");
-    }
+    printf_filtered (_("(No debugging symbols found in %s)\n"), name);
 
   if (should_print)
     {
       if (deprecated_post_add_symbol_hook)
 	deprecated_post_add_symbol_hook ();
-      else
-	printf_filtered (_("done.\n"));
     }
 
   /* We print some messages regardless of whether 'from_tty ||
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index 8199a80c6b..6519738b42 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -165,10 +165,10 @@ proc do_attach_tests {} {
     set test "set file, before attach1"
     gdb_test_multiple "file $binfile" "$test" {
 	-re "Load new symbol table from.*y or n. $" {
-	    gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
+	    gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*" \
 		"$test (re-read)"
 	}
-	-re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
+	-re "Reading symbols from $escapedbinfile\.\.\.*$gdb_prompt $" {
 	    pass "$test"
 	}
     }
@@ -224,7 +224,7 @@ proc do_attach_tests {} {
 	    # executable's symbol table.  This in turn always results in
 	    # asking the user for actually loading the symbol table of the
 	    # executable.
-	    gdb_test "y" "Reading symbols from $sysroot$escapedbinfile\.\.\.*done." \
+	    gdb_test "y" "Reading symbols from $sysroot$escapedbinfile\.\.\.*" \
 		"$test (reset file)"
 
 	    set found_exec_file 1
@@ -239,10 +239,10 @@ proc do_attach_tests {} {
 	set test "load file manually, after attach2"
 	gdb_test_multiple "file $binfile" "$test" {
 	    -re "A program is being debugged already..*Are you sure you want to change the file.*y or n. $" {
-		gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
+		gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*" \
 		    "$test (re-read)"
 	    }
-	    -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
+	    -re "Reading symbols from $escapedbinfile\.\.\.*$gdb_prompt $" {
 		pass "$test"
 	    }
 	}
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 300f95d81a..0b1e5db67a 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -69,7 +69,7 @@ proc force_breakpoint_re_set {} {
 	    send_gdb "y\n"
 	    exp_continue
 	}
-	-re "Reading symbols from.*done.*$gdb_prompt $" {
+	-re "Reading symbols from.*$gdb_prompt $" {
 	    pass $test
 	}
     }
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 72117cb4a6..50d0c23a27 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -258,7 +258,7 @@ proc test_attach_gdb {file pid displacement prefix} {
 	# Print the "PIE (Position Independent Executable) displacement" message.
 	gdb_test_no_output "set verbose on"
 
-	gdb_test "file $file" "Reading symbols from .*done\\." "file"
+	gdb_test "file $file" "Reading symbols from .*" "file"
 
 	set test "attach"
 	gdb_test_multiple "attach $pid" $test {
diff --git a/gdb/testsuite/gdb.base/break-unload-file.exp b/gdb/testsuite/gdb.base/break-unload-file.exp
index bb8027930c..4ede688d04 100644
--- a/gdb/testsuite/gdb.base/break-unload-file.exp
+++ b/gdb/testsuite/gdb.base/break-unload-file.exp
@@ -132,7 +132,7 @@ proc test_break { initial_load always_inserted break_command } {
 		send_gdb "y\n"
 		exp_continue
 	    }
-	    -re "Reading symbols from.*done.*$gdb_prompt $" {
+	    -re "Reading symbols from.*$gdb_prompt $" {
 		pass $test
 	    }
 	}
diff --git a/gdb/testsuite/gdb.base/code_elim.exp b/gdb/testsuite/gdb.base/code_elim.exp
index 5ebcffece8..962df4d773 100644
--- a/gdb/testsuite/gdb.base/code_elim.exp
+++ b/gdb/testsuite/gdb.base/code_elim.exp
@@ -75,7 +75,7 @@ gdb_exit
 gdb_start
 
 gdb_test "symbol-file ${binfile1}" \
-	"Reading symbols from .*${testfile1}\\.\\.\\.done\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
+	"Reading symbols from .*${testfile1}\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
 	"symbol-file ${testfile1}"
 
 with_test_prefix "single psymtabs" {
@@ -109,13 +109,13 @@ gdb_start
 
 with_test_prefix "order1" {
     gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \
-	    "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
+	    "Reading symbols from .*${testfile1}\\.\\.\\." \
 	    "add-symbol-file ${testfile1} 0x100000" \
 	    "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \
 	    "y"
 
     gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \
-	    "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
+	    "Reading symbols from .*${testfile2}\\.\\.\\." \
 	    "add-symbol-file ${testfile2} 0x200000" \
 	    "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \
 	    "y"
@@ -133,13 +133,13 @@ gdb_start
 
 with_test_prefix "order2" {
     gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \
-	    "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
+	    "Reading symbols from .*${testfile2}\\.\\.\\." \
 	    "add-symbol-file ${testfile2} 0x200000" \
 	    "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \
 	    "y"
 
     gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \
-	    "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
+	    "Reading symbols from .*${testfile1}\\.\\.\\." \
 	    "add-symbol-file ${testfile1} 0x100000" \
 	    "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \
 	    "y"
diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp
index 688fcbed13..2744115a7e 100644
--- a/gdb/testsuite/gdb.base/dbx.exp
+++ b/gdb/testsuite/gdb.base/dbx.exp
@@ -174,7 +174,7 @@ proc gdb_file_cmd {arg} {
 
     send_gdb "symbol-file $arg\n"
     gdb_expect {
-        -re "Reading symbols from.*done.*$gdb_prompt $" {
+        -re "Reading symbols from.*$gdb_prompt $" {
             verbose "\t\tLoaded $arg into the $GDB"
             send_gdb "exec-file $arg\n" 
             gdb_expect {
diff --git a/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp b/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp
index b138246983..85856f76bf 100644
--- a/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp
+++ b/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp
@@ -34,7 +34,7 @@ runto_main
 # Add another forked inferior process.
 gdb_test "add-inferior" "Added inferior 2" "add inferior 2"
 gdb_test "inferior 2" "Switching to inferior 2.*"
-gdb_test "file $binfile" "Reading symbols from .*done.*" "load binary"
+gdb_test "file $binfile" "Reading symbols from .*" "load binary"
 gdb_test "start" "Temporary breakpoint.*Starting program.*"
 
 # Add an attached inferior process.
diff --git a/gdb/testsuite/gdb.base/print-symbol-loading.exp b/gdb/testsuite/gdb.base/print-symbol-loading.exp
index 6d3005b50e..119a26e863 100644
--- a/gdb/testsuite/gdb.base/print-symbol-loading.exp
+++ b/gdb/testsuite/gdb.base/print-symbol-loading.exp
@@ -56,7 +56,7 @@ proc test_load_core { print_symbol_loading } {
 	gdb_reinitialize_dir $srcdir/$subdir
 	gdb_test_no_output "set print symbol-loading $print_symbol_loading"
 	if { ${print_symbol_loading} != "off" } {
-	    gdb_test "file $binfile" "Reading symbols from.*done\\." "file"
+	    gdb_test "file $binfile" "Reading symbols from.*" "file"
 	} else {
 	    gdb_test_no_output "file $binfile" "file"
 	}
diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp
index bf70201d40..805ecd218a 100644
--- a/gdb/testsuite/gdb.base/readnever.exp
+++ b/gdb/testsuite/gdb.base/readnever.exp
@@ -74,7 +74,7 @@ save_vars { GDBFLAGS } {
 gdb_exit
 gdb_start
 gdb_test "symbol-file ${binfile}0.o -readnever" \
-    "Reading symbols from ${binfile}0\.o\.\.\.\\\(no debugging symbols found\\\)\.\.\.done\." \
+    "Reading symbols from ${binfile}0\.o\.\.\.\r\n\\\(No debugging symbols found in .*\\\)" \
     "use symbol-file -readnever"
 
 gdb_test_no_output "maint info symtabs" \
diff --git a/gdb/testsuite/gdb.base/relocate.exp b/gdb/testsuite/gdb.base/relocate.exp
index b6f18d9c69..4c1696a8ca 100644
--- a/gdb/testsuite/gdb.base/relocate.exp
+++ b/gdb/testsuite/gdb.base/relocate.exp
@@ -116,11 +116,11 @@ gdb_test_multiple "add-symbol-file -s -section-name 0x200 $binfile 0x100" $test
 # Since we're here, might as well test the 'symbol-file' command and
 # if its arguments can also be passed at any position.
 gdb_test "symbol-file -readnow $binfile" \
-    "Reading symbols from ${binfile}\.\.\.expanding to full symbols\.\.\.done\." \
+    "Reading symbols from ${binfile}\.\.\.\r\nExpanding full symbols from ${binfile}\.\.\." \
     "symbol-file with -readnow first"
 clean_restart
 gdb_test "symbol-file $binfile -readnow" \
-    "Reading symbols from ${binfile}\.\.\.expanding to full symbols\.\.\.done\." \
+    "Reading symbols from ${binfile}\.\.\.\r\nExpanding full symbols from ${binfile}\.\.\." \
     "symbol-file with -readnow second"
 gdb_test "symbol-file -readnow" \
     "no symbol file name was specified" \
@@ -130,7 +130,7 @@ gdb_test "symbol-file -- -non-existent-file" \
     "symbol-file with -- disables option processing"
 clean_restart
 gdb_test "symbol-file -readnow -- $binfile" \
-    "Reading symbols from ${binfile}\.\.\.expanding to full symbols\.\.\.done\." \
+    "Reading symbols from ${binfile}\.\.\.\r\nExpanding full symbols from ${binfile}\.\.\." \
     "symbol-file with -- and -readnow"
 gdb_test "symbol-file -- $binfile -readnow" \
     "Unrecognized argument \"-readnow\"" \
@@ -147,7 +147,7 @@ gdb_test "add-symbol-file ${binfile} 0 -s .whatever" \
 
 # Load the object file.
 gdb_test "add-symbol-file ${binfile} 0" \
-	"Reading symbols from .*${testfile}\\.o\\.\\.\\.done\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
+	"Reading symbols from .*${testfile}\\.o\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
 	"add-symbol-file ${testfile}.o 0" \
 	"add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.text_addr = 0x0\[\r\n\]+\\(y or n\\) " \
 	"y"
@@ -196,7 +196,7 @@ gdb_test_no_output "set \$offset = 0x10000"
 
 # Load the object file.
 gdb_test "add-symbol-file ${binfile} \$offset" \
-	"Reading symbols from .*${testfile}\\.o\\.\\.\\.done\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
+	"Reading symbols from .*${testfile}\\.o\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
 	"add-symbol-file ${testfile}.o \$offset" \
 	"add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.text_addr = 0x10000\[\r\n\]+\\(y or n\\) " \
 	"y"
@@ -217,7 +217,7 @@ if { "${function_foo_addr}" == "${new_function_foo_addr}" } {
 set offset 0x10000
 clean_restart
 gdb_test "symbol-file -o $offset $binfile" \
-    "Reading symbols from ${binfile}\.\.\.done\." \
+    "Reading symbols from ${binfile}\.\.\." \
     "symbol-file with offset"
 
 # Make sure the address of a static variable is moved by offset.
@@ -241,7 +241,7 @@ gdb_assert {${new_function_foo_addr} == ${function_foo_addr} + $offset} \
 set offset 0x10000
 clean_restart
 gdb_test "add-symbol-file -o $offset $binfile" \
-    "Reading symbols from ${binfile}\.\.\.done\." \
+    "Reading symbols from ${binfile}\.\.\." \
     "add-symbol-file with offset" \
     "add symbol table from file \".*${testfile}\\.o\" with all sections offset by $offset\[\r\n\]+\\(y or n\\) " \
     "y"
@@ -266,7 +266,7 @@ gdb_assert { ${new_function_foo_addr} == ${function_foo_addr} + $offset } \
 set text [ format "0x%x" [expr ${function_foo_addr} + 0x20000] ]
 clean_restart
 gdb_test "add-symbol-file $binfile -o $offset $text" \
-    "Reading symbols from ${binfile}\.\.\.done\." \
+    "Reading symbols from ${binfile}\.\.\." \
     "add-symbol-file with offset, text address given" \
     "add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.text_addr = ${text}\[\r\n\]+with other sections offset by ${offset}\[\r\n\]+\\(y or n\\) " \
     "y"
@@ -281,7 +281,7 @@ gdb_assert { ${function_foo_addr} != ${new_function_foo_addr} } \
 set data [ format "0x%x" [expr ${global_foo_addr} + 0x20000] ]
 clean_restart
 gdb_test "add-symbol-file $binfile -o $offset -s .data $data" \
-    "Reading symbols from ${binfile}\.\.\.done\." \
+    "Reading symbols from ${binfile}\.\.\." \
     "add-symbol-file with offset, data address given" \
     "add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.data_addr = ${data}\[\r\n\]+with other sections offset by ${offset}\[\r\n\]+\\(y or n\\) " \
     "y"
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp
index 5baf151789..8c790d0d91 100644
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -660,7 +660,7 @@ if {[build_executable sepdebug.exp sepdebug2 sepdebug2.c debug] != -1
 
     set escapedobjdirsubdir [string_to_regexp [standard_output_file {}]]
 
-    gdb_test "file [standard_output_file sepdebug2]" "warning: the debug information found in \"${escapedobjdirsubdir}/sepdebug2\\.debug\" does not match \"${escapedobjdirsubdir}/sepdebug2\" \\(CRC mismatch\\)\\..*\\(no debugging symbols found\\).*" "CRC mismatch is reported"
+    gdb_test "file [standard_output_file sepdebug2]" "warning: the debug information found in \"${escapedobjdirsubdir}/sepdebug2\\.debug\" does not match \"${escapedobjdirsubdir}/sepdebug2\" \\(CRC mismatch\\)\\..*\\(No debugging symbols found in .*\\).*" "CRC mismatch is reported"
 }
 
 
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index 6b12026acc..4add7a4f17 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -93,7 +93,7 @@ if {!$result} then {
 
 # 3) Add the library's symbols using 'add-symbol-file'.
 set result [gdb_test "add-symbol-file ${lib_syms} addr" \
-		     "Reading symbols from .*${lib_syms}\\.\\.\\.done\\." \
+		     "Reading symbols from .*${lib_syms}\\.\\.\\." \
 		     "add-symbol-file ${lib_basename}.so addr" \
 		     "add symbol table from file \".*${lib_basename}\\.so\"\
  at.*\\(y or n\\) " \
@@ -177,7 +177,7 @@ with_test_prefix "stale bkpts" {
 
     # Load the library's symbols.
     gdb_test "add-symbol-file ${lib_syms} addr" \
-	"Reading symbols from .*${lib_syms}\\.\\.\\.done\\." \
+	"Reading symbols from .*${lib_syms}\\.\\.\\." \
 	"add-symbol-file ${lib_basename}.so addr" \
 	"add symbol table from file \".*${lib_syms}\"\
 at.*\\(y or n\\) " \
diff --git a/gdb/testsuite/gdb.cp/cp-relocate.exp b/gdb/testsuite/gdb.cp/cp-relocate.exp
index 63d2ad476d..d07fd9e158 100644
--- a/gdb/testsuite/gdb.cp/cp-relocate.exp
+++ b/gdb/testsuite/gdb.cp/cp-relocate.exp
@@ -123,7 +123,7 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
 gdb_test "add-symbol-file ${binfile} 0 -s ${func1_sec} 0x10000 -s ${func2_sec} 0x20000" \
-	"Reading symbols from .*${testfile}\\.o\\.\\.\\.done\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
+	"Reading symbols from .*${testfile}\\.o\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
 	"add-symbol-file ${testfile}.o" \
 	"add symbol table from file \".*${testfile}\\.o\" at.*\\(y or n\\) " \
 	"y"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
index 54da2b4c03..e8474ad0a3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
@@ -37,7 +37,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile_outer}" "${binfile_outer}" \
 clean_restart $executable_outer
 
 gdb_test "add-symbol-file $binfile_inner outer_inner" \
-         {Reading symbols from .*\.\.\.done\.} "add-symbol-file" \
+         {Reading symbols from .*\.\.\.} "add-symbol-file" \
 	 "\r\n\t\\.text_addr = 0x\[0-9a-f\]+\r\n\\(y or n\\) \$" "y"
 
 # Expand symtab for ${binfile_outer}.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index 5be51f4356..cce8b4dd11 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -38,7 +38,7 @@ if [is_remote host] {
     }
 }
 gdb_test_no_output "set complaints 100"
-gdb_test "file $binfile" {Reading symbols from .*\.\.\.location description stack underflow\r\nlocation description stack overflow\r\ndone\.} "check partial symtab errors"
+gdb_test "file $binfile" {Reading symbols from .*\.\.\.\r\nlocation description stack underflow\r\nlocation description stack overflow} "check partial symtab errors"
 
 gdb_test "p underflow" {Asked for position 0 of stack, stack only has 0 elements on it\.}
 gdb_test "p overflow" " = 2"
diff --git a/gdb/testsuite/gdb.linespec/linespec.exp b/gdb/testsuite/gdb.linespec/linespec.exp
index 6dba93ee3c..f1de642f23 100644
--- a/gdb/testsuite/gdb.linespec/linespec.exp
+++ b/gdb/testsuite/gdb.linespec/linespec.exp
@@ -210,7 +210,7 @@ gdb_test "inferior 2" "Switching to inferior 2 .*" \
 # Note that in particular this should not cause errors when re-setting
 # breakpoints.
 gdb_test "file $binfile" \
-    "Reading symbols from .*done." \
+    "Reading symbols from .*" \
     "set the new inferior file for linespec tests"
 
 gdb_test "break main" \
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
index 6ce6439eb7..8ef2a45403 100644
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -56,7 +56,7 @@ mi_gdb_test "-interpreter-exec console bogus" \
 #   {(=.*)+\^done} \
 #   "-interpreter-exec console \"file \$binfile\""
 mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
-  {~"Reading symbols from .*mi-cli...".*\^done} \
+  {~"Reading symbols from .*mi-cli...\\n".*} \
   "-interpreter-exec console \"file \$binfile\""
 
 mi_run_to_main
diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.exp b/gdb/testsuite/gdb.multi/remove-inferiors.exp
index a336c6de4e..16de2d6232 100644
--- a/gdb/testsuite/gdb.multi/remove-inferiors.exp
+++ b/gdb/testsuite/gdb.multi/remove-inferiors.exp
@@ -49,7 +49,7 @@ proc test_remove_inferiors { } {
     # Load binfile and start the inferior.
     set binfile_re [string_to_regexp ${binfile}]
     gdb_test "file ${binfile}" \
-	     "Reading symbols from ${binfile_re}...done." \
+	     "Reading symbols from ${binfile_re}..." \
 	     "load binary"
 
     if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index bf75ef578a..b0e37ed4a2 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -140,7 +140,7 @@ with_test_prefix "sepdebug" {
 	-re "\r\nwarning: Invalid entry in \\.debug_gdb_scripts section.*\r\n$gdb_prompt $" {
 	    fail $test
 	}
-	-re "done\\.\r\n$gdb_prompt $" {
+	-re "\r\n$gdb_prompt $" {
 	    pass $test
 	}
     }
diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp
index 53b3c6749a..6fbaa834e2 100644
--- a/gdb/testsuite/gdb.server/solib-list.exp
+++ b/gdb/testsuite/gdb.server/solib-list.exp
@@ -88,7 +88,7 @@ foreach nonstop { 0 1 } { with_test_prefix "non-stop $nonstop" {
     # but before "target remote" below so that qSymbol data get already
     # initialized from BINFILE (and not from ld.so first needing a change to
     # BINFILE later).
-    gdb_test "file ${binfile}" {Reading symbols from .*\.\.\.done\..*} "file binfile" \
+    gdb_test "file ${binfile}" {Reading symbols from .*\.\.\..*} "file binfile" \
 	     {(Are you sure you want to change the file|Load new symbol table from ".*")\? \(y or n\) } "y"
 
     set test "target $gdbserver_protocol"
diff --git a/gdb/testsuite/gdb.stabs/weird.exp b/gdb/testsuite/gdb.stabs/weird.exp
index 2806dfd882..595b0c8299 100644
--- a/gdb/testsuite/gdb.stabs/weird.exp
+++ b/gdb/testsuite/gdb.stabs/weird.exp
@@ -301,7 +301,7 @@ gdb_expect 60 {
 	send_gdb "y\n"
 	exp_continue
     }
-    -re "^Reading symbols from .*$binfile_re\\.\\.\\.done\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
+    -re "^Reading symbols from .*$binfile_re\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
 	pass "weirdx.o read without error"
     }
     -re ".*$gdb_prompt $" {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index f32abfedd5..b329c0ac3e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1523,17 +1523,17 @@ proc gdb_file_cmd { arg } {
 
     send_gdb "file $arg\n"
     gdb_expect 120 {
-	-re "Reading symbols from.*LZMA support was disabled.*done.*$gdb_prompt $" {
+	-re "Reading symbols from.*LZMA support was disabled.*$gdb_prompt $" {
 	    verbose "\t\tLoaded $arg into $GDB; .gnu_debugdata found but no LZMA available"
 	    set gdb_file_cmd_debug_info "lzma"
 	    return 0
 	}
-	-re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" {
+	-re "Reading symbols from.*no debugging symbols found.*$gdb_prompt $" {
 	    verbose "\t\tLoaded $arg into $GDB with no debugging symbols"
 	    set gdb_file_cmd_debug_info "nodebug"
 	    return 0
 	}
-        -re "Reading symbols from.*done.*$gdb_prompt $" {
+        -re "Reading symbols from.*$gdb_prompt $" {
             verbose "\t\tLoaded $arg into $GDB"
 	    set gdb_file_cmd_debug_info "debug"
 	    return 0
@@ -1541,7 +1541,7 @@ proc gdb_file_cmd { arg } {
         -re "Load new symbol table from \".*\".*y or n. $" {
             send_gdb "y\n"
             gdb_expect 120 {
-                -re "Reading symbols from.*done.*$gdb_prompt $" {
+                -re "Reading symbols from.*$gdb_prompt $" {
                     verbose "\t\tLoaded $arg with new symbol table into $GDB"
 		    set gdb_file_cmd_debug_info "debug"
 		    return 0
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index bf9f613985..235d03e902 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -504,7 +504,7 @@ proc mi_gdb_file_cmd { arg } {
 # output.  Queries are an error for mi.
     send_gdb "105-file-exec-and-symbols $arg\n"
     gdb_expect 120 {
-	-re "Reading symbols from.*done.*$mi_gdb_prompt$" {
+	-re "Reading symbols from.*$mi_gdb_prompt$" {
 	    verbose "\t\tLoaded $arg into the $GDB"
 	    return 0
 	}
@@ -515,7 +515,7 @@ proc mi_gdb_file_cmd { arg } {
 	-re "Load new symbol table from \".*\".*y or n. $" {
 	    send_gdb "y\n"
 	    gdb_expect 120 {
-		-re "Reading symbols from.*done.*$mi_gdb_prompt$" {
+		-re "Reading symbols from.*$mi_gdb_prompt$" {
 		    verbose "\t\tLoaded $arg with new symbol table into $GDB"
 		    # All OK
 		}
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 6/7] Only print "no debugging symbols" message once
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
                   ` (5 preceding siblings ...)
  2018-09-23 15:10 ` [PATCH 3/7] Use filtered printing when reading symbols Tom Tromey
@ 2018-09-23 15:10 ` Tom Tromey
  2018-10-03 22:28 ` [PATCH 0/7] Simplify complaints and symbol-reading output Joel Brobecker
  7 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

The "no debugging symbols" message can be confusing in some cases, for
example when gdb finds separate debug info for an objfile, but the
separate debug info does not contain symbols.

For example:

    (gdb) file /bin/ls
    Reading symbols from /bin/ls...
    Reading symbols from .gnu_debugdata for /usr/bin/ls...
    (No debugging symbols found in .gnu_debugdata for /usr/bin/ls)
    (No debugging symbols found in /bin/ls)

Here, I think the second "no debugging symbols" message is redundant
and confusing.

This patch changes gdb to only emit this message when the objfile in
question does not have a separate debug file.  So, in the example
above, the output would now read:

    (gdb) file /bin/ls
    Reading symbols from /bin/ls...
    Reading symbols from .gnu_debugdata for /usr/bin/ls...
    (No debugging symbols found in .gnu_debugdata for /usr/bin/ls)

gdb/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	* symfile.c (symbol_file_add_with_addrs): Do not print "no
	debugging symbols" message if there is a separate debug objfile.
---
 gdb/ChangeLog | 5 +++++
 gdb/symfile.c | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/gdb/symfile.c b/gdb/symfile.c
index ed41b5b70f..981bf336ce 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1128,7 +1128,12 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
 	objfile->sf->qf->expand_all_symtabs (objfile);
     }
 
-  if (should_print && !objfile_has_symbols (objfile))
+  /* Note that we only print a message if we have no symbols and have
+     no separate debug file.  If there is a separate debug file which
+     does not have symbols, we'll have emitted this message for that
+     file, and so printing it twice is just redundant.  */
+  if (should_print && !objfile_has_symbols (objfile)
+      && objfile->separate_debug_objfile == nullptr)
     printf_filtered (_("(No debugging symbols found in %s)\n"), name);
 
   if (should_print)
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 4/7] Make complaint output prettier
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
  2018-09-23 15:10 ` [PATCH 7/7] Simplify complaints even more Tom Tromey
  2018-09-23 15:10 ` [PATCH 1/7] Remove some leftovers from complaints Tom Tromey
@ 2018-09-23 15:10 ` Tom Tromey
  2018-09-23 15:10 ` [PATCH 2/7] Fix off-by-one error in complaint_internal Tom Tromey
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Currently complaints are not always printed with a newline.  For
example, when I run gdb on itself, I see output like:

    (gdb) set complaints 5
    (gdb) file ./gdb/gdb
    Reading symbols from ./gdb/gdb...DW_AT_low_pc 0x0 is zero for DIE at 0x437dd4 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0x21bf9 is 0 [in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc 0x0 is zero for DIE at 0x5a85dd [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0x2dc2d is 0 [in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc 0x0 is zero for DIE at 0xab6033 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0x4f683 is 0 [in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc 0x0 is zero for DIE at 0x10028f0 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0x75edf is 0 [in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc 0x0 is zero for DIE at 0x1021364 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0x76f62 is 0 [in module /home/tromey/gdb/build/gdb/gdb]...done.

That's one very long line.  I find it quite difficult to read that,
and I thought it would be better with some newlines, which is what
this patch does.  Now the output looks like:

    (gdb) file ./gdb
    Reading symbols from ./gdb...
    DW_AT_low_pc 0x0 is zero for DIE at 0x437dd4 [in module /home/tromey/gdb/build/gdb/gdb]
    .debug_line address at offset 0x21bf9 is 0 [in module /home/tromey/gdb/build/gdb/gdb]
    DW_AT_low_pc 0x0 is zero for DIE at 0x5a85dd [in module /home/tromey/gdb/build/gdb/gdb]
    .debug_line address at offset 0x2dc2d is 0 [in module /home/tromey/gdb/build/gdb/gdb]
    done.

gdb/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	PR cli/22234:
	* complaints.c: Emit \n.

gdb/testsuite/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	PR cli/22234:
	* gdb.dwarf2/dw2-stack-boundary.exp: Update expected output.
	* gdb.gdb/complaints.exp (test_short_complaints): Update expected
	output.
---
 gdb/ChangeLog                                   | 5 +++++
 gdb/complaints.c                                | 2 +-
 gdb/testsuite/ChangeLog                         | 7 +++++++
 gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp | 2 +-
 gdb/testsuite/gdb.gdb/complaints.exp            | 4 ++--
 5 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gdb/complaints.c b/gdb/complaints.c
index 43ea7a18a7..ab61980b62 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -72,7 +72,7 @@ complaint_internal (const char *fmt, ...)
 	fprintf_filtered (gdb_stderr, "During symbol reading, %s.\n",
 			  msg.c_str ());
       else
-	fprintf_filtered (gdb_stderr, "%s...", msg.c_str ());
+	fprintf_filtered (gdb_stderr, "%s\n", msg.c_str ());
     }
 
   /* If GDB dumps core, we'd like to see the complaints first.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index b38a579fe5..5be51f4356 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -38,7 +38,7 @@ if [is_remote host] {
     }
 }
 gdb_test_no_output "set complaints 100"
-gdb_test "file $binfile" {Reading symbols from .*\.\.\.location description stack underflow\.\.\.location description stack overflow\.\.\..*done\.} "check partial symtab errors"
+gdb_test "file $binfile" {Reading symbols from .*\.\.\.location description stack underflow\r\nlocation description stack overflow\r\ndone\.} "check partial symtab errors"
 
 gdb_test "p underflow" {Asked for position 0 of stack, stack only has 0 elements on it\.}
 gdb_test "p overflow" " = 2"
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index 65b6bdc281..33ec268949 100644
--- a/gdb/testsuite/gdb.gdb/complaints.exp
+++ b/gdb/testsuite/gdb.gdb/complaints.exp
@@ -85,13 +85,13 @@ proc test_short_complaints { } {
     # Prime the system
     test_complaint \
 	"call complaint_internal (\"short line 1\")" \
-	"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" \
 	"short line 2"
 
     return 0
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 7/7] Simplify complaints even more
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
@ 2018-09-23 15:10 ` Tom Tromey
  2018-09-23 15:10 ` [PATCH 1/7] Remove some leftovers from complaints Tom Tromey
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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).

gdb/ChangeLog
2018-09-23  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-09-23  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.
---
 gdb/ChangeLog                                 | 10 +++++
 gdb/complaints.c                              | 45 +++----------------
 gdb/complaints.h                              | 11 ++---
 gdb/symfile.c                                 |  8 ++--
 gdb/testsuite/ChangeLog                       |  7 +++
 gdb/testsuite/gdb.cp/maint.exp                |  2 +-
 .../gdb.dwarf2/dw2-stack-boundary.exp         |  2 +-
 gdb/testsuite/gdb.gdb/complaints.exp          | 33 +++-----------
 8 files changed, 36 insertions(+), 82 deletions(-)

diff --git a/gdb/complaints.c b/gdb/complaints.c
index ab61980b62..3184c25c9c 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -23,26 +23,10 @@
 #include "gdbcmd.h"
 #include <unordered_map>
 
-/* Should each complaint message be self explanatory, or should we
-   assume that a series of complaints is being produced?  */
-
-enum complaint_series {
-  /* Isolated self explanatory message.  */
-  ISOLATED_MESSAGE,
-
-  /* First message of a series, but does not need to include any sort
-     of explanation.  */
-  SHORT_FIRST_MESSAGE,
-};
-
 /* Map format strings to counters.  */
 
 static std::unordered_map<const char *, int> counters;
 
-/* How to print the next complaint.  */
-
-static complaint_series series;
-
 /* How many complaints about a particular thing should be printed
    before we stop whining about it?  Default is no whining at all,
    since so many systems have ill-constructed symbol files.  */
@@ -65,39 +49,20 @@ complaint_internal (const char *fmt, ...)
     (*deprecated_warning_hook) (fmt, args);
   else
     {
-      std::string msg = string_vprintf (fmt, args);
-      wrap_here ("");
-      begin_line ();
-      if (series == ISOLATED_MESSAGE)
-	fprintf_filtered (gdb_stderr, "During symbol reading, %s.\n",
-			  msg.c_str ());
-      else
-	fprintf_filtered (gdb_stderr, "%s\n", msg.c_str ());
+      fputs_filtered (_("During symbol reading: "), gdb_stderr);
+      vfprintf_filtered (gdb_stderr, fmt, args);
+      fputs_filtered ("\n", gdb_stderr);
     }
 
-  /* If GDB dumps core, we'd like to see the complaints first.
-     Presumably GDB will not be sending so many complaints that this
-     becomes a performance hog.  */
-
-  gdb_flush (gdb_stderr);
   va_end (args);
 }
 
-/* Clear out / initialize all complaint counters that have ever been
-   incremented.  If LESS_VERBOSE is 1, be less verbose about
-   successive complaints, since the messages are appearing all
-   together during a command that is reporting a contiguous block of
-   complaints (rather than being interleaved with other messages).  */
+/* See complaints.h.  */
 
 void
-clear_complaints (int less_verbose)
+clear_complaints ()
 {
   counters.clear ();
-
-  if (!less_verbose)
-    series = ISOLATED_MESSAGE;
-  else
-    series = SHORT_FIRST_MESSAGE;
 }
 
 static void
diff --git a/gdb/complaints.h b/gdb/complaints.h
index 243eaed93c..edb007fb97 100644
--- a/gdb/complaints.h
+++ b/gdb/complaints.h
@@ -40,14 +40,9 @@ extern void complaint_internal (const char *fmt, ...)
   while (0)
 
 /* Clear out / initialize all complaint counters that have ever been
-   incremented.  If LESS_VERBOSE is 1, be less verbose about
-   successive complaints, since the messages are appearing all
-   together during a command that is reporting a contiguous block of
-   complaints (rather than being interleaved with other messages).  If
-   noisy is 1, we are in a noisy command, and our caller will print
-   enough context for the user to figure it out.  */
-
-extern void clear_complaints (int less_verbose);
+   incremented.  */
+
+extern void clear_complaints ();
 
 
 #endif /* !defined (COMPLAINTS_H) */
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 981bf336ce..6a1140edbc 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -989,7 +989,7 @@ syms_from_objfile_1 (struct objfile *objfile,
      initial symbol reading for this file.  */
 
   (*objfile->sf->sym_init) (objfile);
-  clear_complaints (1);
+  clear_complaints ();
 
   (*objfile->sf->sym_offsets) (objfile, *addrs);
 
@@ -1036,7 +1036,7 @@ finish_new_objfile (struct objfile *objfile, symfile_add_flags add_flags)
     }
 
   /* We're done reading the symbol file; finish off complaints.  */
-  clear_complaints (0);
+  clear_complaints ();
 }
 
 /* Process a symbol file, as either the main file or as a dynamically
@@ -2540,7 +2540,7 @@ reread_symbols (void)
 	    }
 
 	  (*objfile->sf->sym_init) (objfile);
-	  clear_complaints (1);
+	  clear_complaints ();
 
 	  objfile->flags &= ~OBJF_PSYMTABS_READ;
 
@@ -2570,7 +2570,7 @@ reread_symbols (void)
 	    }
 
 	  /* We're done reading the symbol file; finish off complaints.  */
-	  clear_complaints (0);
+	  clear_complaints ();
 
 	  /* Getting new symbols may change our opinion about what is
 	     frameless.  */
diff --git a/gdb/testsuite/gdb.cp/maint.exp b/gdb/testsuite/gdb.cp/maint.exp
index 72a752487f..af5b5be938 100644
--- a/gdb/testsuite/gdb.cp/maint.exp
+++ b/gdb/testsuite/gdb.cp/maint.exp
@@ -51,7 +51,7 @@ proc test_single_component {name} {
 proc test_invalid_name {name} {
     set matchname [string_to_regexp "$name"]
     gdb_test "maint cp first_component $name" \
-	"During symbol reading, unexpected demangled name '$matchname'.\r\n$matchname"
+	"During symbol reading: unexpected demangled name '$matchname'\r\n$matchname"
 }
 
 proc test_first_component {} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index cce8b4dd11..e63f9c1e8c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -38,7 +38,7 @@ if [is_remote host] {
     }
 }
 gdb_test_no_output "set complaints 100"
-gdb_test "file $binfile" {Reading symbols from .*\.\.\.\r\nlocation description stack underflow\r\nlocation description stack overflow} "check partial symtab errors"
+gdb_test "file $binfile" {Reading symbols from .*\.\.\.\r\nDuring symbol reading: location description stack underflow\r\nDuring symbol reading: location description stack overflow} "check partial symtab errors"
 
 gdb_test "p underflow" {Asked for position 0 of stack, stack only has 0 elements on it\.}
 gdb_test "p overflow" " = 2"
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index 33ec268949..8f573bed3e 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
 }
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 0/7] Simplify complaints and symbol-reading output
@ 2018-09-23 15:10 Tom Tromey
  2018-09-23 15:10 ` [PATCH 7/7] Simplify complaints even more Tom Tromey
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches

This series cleans up symbol-reading output and simplifies complaints
a bit more.  I've long thought the current output was difficult to
read, and in some cases actively confusing; this series is another
attempt to fix this up.  (The previous attempt involved adding
progress metering.)

This was regression tested by running it through a couple of the
buildbot builders.

Tom


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/7] Use filtered printing when reading symbols
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
                   ` (4 preceding siblings ...)
  2018-09-23 15:10 ` [PATCH 5/7] Clean up "Reading symbols" output Tom Tromey
@ 2018-09-23 15:10 ` Tom Tromey
  2018-09-23 15:10 ` [PATCH 6/7] Only print "no debugging symbols" message once Tom Tromey
  2018-10-03 22:28 ` [PATCH 0/7] Simplify complaints and symbol-reading output Joel Brobecker
  7 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

While working on this series, I found some unfiltered prints that
didn't make sense -- many things, like complaints, are filtered, while
their context (in this case the "Reading symbols ..."  messages) may
not be.

This patch changes some spots in symbol reading to use filtered
prints.  I think this is preferable overall; in fact I'd go farther
and say that unfiltered printing should just be removed.

One of these spots was not strictly related (the change to
dump_psymtab), but I left it in partly because it makes psymtab.c
"unfiltered-clean", and partly because it is an example of filtered
and unfiltered printing being mixed in the same function.

gdb/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	* symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
	(separate_debug_file_exists, find_separate_debug_file)
	(add_symbol_file_command, reread_symbols, allocate_symtab)
	(allocate_compunit_symtab): Use filtered printing, not
	unfiltered.
	* psymtab.c (require_partial_symbols, dump_psymtab)
	(allocate_psymtab): Use filtered printing, not unfiltered.
---
 gdb/ChangeLog | 10 ++++++++++
 gdb/psymtab.c | 26 +++++++++++++-------------
 gdb/symfile.c | 50 +++++++++++++++++++++++++-------------------------
 3 files changed, 48 insertions(+), 38 deletions(-)

diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index dc35ca8df2..219357e586 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -79,8 +79,8 @@ require_partial_symbols (struct objfile *objfile, int verbose)
 	{
 	  if (verbose)
 	    {
-	      printf_unfiltered (_("Reading symbols from %s..."),
-				 objfile_name (objfile));
+	      printf_filtered (_("Reading symbols from %s..."),
+			       objfile_name (objfile));
 	      gdb_flush (gdb_stdout);
 	    }
 	  (*objfile->sf->sym_read_psymbols) (objfile);
@@ -95,11 +95,11 @@ require_partial_symbols (struct objfile *objfile, int verbose)
 	      if (!objfile_has_symbols (objfile))
 		{
 		  wrap_here ("");
-		  printf_unfiltered (_("(no debugging symbols found)..."));
+		  printf_filtered (_("(no debugging symbols found)..."));
 		  wrap_here ("");
 		}
 
-	      printf_unfiltered (_("done.\n"));
+	      printf_filtered (_("done.\n"));
 	    }
 	}
     }
@@ -931,10 +931,10 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
   fprintf_filtered (outfile, "(object ");
   gdb_print_host_address (psymtab, outfile);
   fprintf_filtered (outfile, ")\n\n");
-  fprintf_unfiltered (outfile, "  Read from object file %s (",
-		      objfile_name (objfile));
+  fprintf_filtered (outfile, "  Read from object file %s (",
+		    objfile_name (objfile));
   gdb_print_host_address (objfile, outfile);
-  fprintf_unfiltered (outfile, ")\n");
+  fprintf_filtered (outfile, ")\n");
 
   if (psymtab->readin)
     {
@@ -1766,13 +1766,13 @@ allocate_psymtab (const char *filename, struct objfile *objfile)
 	{
 	  xfree (last_objfile_name);
 	  last_objfile_name = xstrdup (objfile_name (objfile));
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Creating one or more psymtabs for objfile %s ...\n",
-			      last_objfile_name);
+	  fprintf_filtered (gdb_stdlog,
+			    "Creating one or more psymtabs for objfile %s ...\n",
+			    last_objfile_name);
 	}
-      fprintf_unfiltered (gdb_stdlog,
-			  "Created psymtab %s for module %s.\n",
-			  host_address_to_string (psymtab), filename);
+      fprintf_filtered (gdb_stdlog,
+			"Created psymtab %s for module %s.\n",
+			host_address_to_string (psymtab), filename);
     }
 
   return psymtab;
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 20697d9dca..0767562d5c 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1111,7 +1111,7 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
 	deprecated_pre_add_symbol_hook (name);
       else
 	{
-	  printf_unfiltered (_("Reading symbols from %s..."), name);
+	  printf_filtered (_("Reading symbols from %s..."), name);
 	  wrap_here ("");
 	  gdb_flush (gdb_stdout);
 	}
@@ -1127,7 +1127,7 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
     {
       if (should_print)
 	{
-	  printf_unfiltered (_("expanding to full symbols..."));
+	  printf_filtered (_("expanding to full symbols..."));
 	  wrap_here ("");
 	  gdb_flush (gdb_stdout);
 	}
@@ -1139,7 +1139,7 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
   if (should_print && !objfile_has_symbols (objfile))
     {
       wrap_here ("");
-      printf_unfiltered (_("(no debugging symbols found)..."));
+      printf_filtered (_("(no debugging symbols found)..."));
       wrap_here ("");
     }
 
@@ -1148,7 +1148,7 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
       if (deprecated_post_add_symbol_hook)
 	deprecated_post_add_symbol_hook ();
       else
-	printf_unfiltered (_("done.\n"));
+	printf_filtered (_("done.\n"));
     }
 
   /* We print some messages regardless of whether 'from_tty ||
@@ -1268,7 +1268,7 @@ symbol_file_clear (int from_tty)
 
   gdb_assert (symfile_objfile == NULL);
   if (from_tty)
-    printf_unfiltered (_("No symbol file now.\n"));
+    printf_filtered (_("No symbol file now.\n"));
 }
 
 /* See symfile.h.  */
@@ -1294,7 +1294,7 @@ separate_debug_file_exists (const std::string &name, unsigned long crc,
     return 0;
 
   if (separate_debug_file_debug)
-    printf_unfiltered (_("  Trying %s\n"), name.c_str ());
+    printf_filtered (_("  Trying %s\n"), name.c_str ());
 
   gdb_bfd_ref_ptr abfd (gdb_bfd_open (name.c_str (), gnutarget, -1));
 
@@ -1384,8 +1384,8 @@ find_separate_debug_file (const char *dir,
 			  unsigned long crc32, struct objfile *objfile)
 {
   if (separate_debug_file_debug)
-    printf_unfiltered (_("\nLooking for separate debug info (debug link) for "
-		         "%s\n"), objfile_name (objfile));
+    printf_filtered (_("\nLooking for separate debug info (debug link) for "
+		       "%s\n"), objfile_name (objfile));
 
   /* First try in the same directory as the original file.  */
   std::string debugfile = dir;
@@ -2259,8 +2259,8 @@ add_symbol_file_command (const char *args, int from_tty)
          index is not used for any other purpose.
       */
       section_addrs.emplace_back (addr, sec, section_addrs.size ());
-      printf_unfiltered ("\t%s_addr = %s\n", sec,
-			 paddress (gdbarch, addr));
+      printf_filtered ("\t%s_addr = %s\n", sec,
+		       paddress (gdbarch, addr));
 
       /* The object's sections are initialized when a
 	 call is made to build_objfile_section_table (objfile).
@@ -2398,8 +2398,8 @@ reread_symbols (void)
       if (res != 0)
 	{
 	  /* FIXME, should use print_sys_errmsg but it's not filtered.  */
-	  printf_unfiltered (_("`%s' has disappeared; keeping its symbols.\n"),
-			     objfile_name (objfile));
+	  printf_filtered (_("`%s' has disappeared; keeping its symbols.\n"),
+			   objfile_name (objfile));
 	  continue;
 	}
       new_modtime = new_statbuf.st_mtime;
@@ -2409,8 +2409,8 @@ reread_symbols (void)
 	  struct section_offsets *offsets;
 	  int num_offsets;
 
-	  printf_unfiltered (_("`%s' has changed; re-reading symbols.\n"),
-			     objfile_name (objfile));
+	  printf_filtered (_("`%s' has changed; re-reading symbols.\n"),
+			   objfile_name (objfile));
 
 	  /* There are various functions like symbol_file_add,
 	     symfile_bfd_open, syms_from_objfile, etc., which might
@@ -2574,7 +2574,7 @@ reread_symbols (void)
 	  if (!objfile_has_symbols (objfile))
 	    {
 	      wrap_here ("");
-	      printf_unfiltered (_("(no debugging symbols found)\n"));
+	      printf_filtered (_("(no debugging symbols found)\n"));
 	      wrap_here ("");
 	    }
 
@@ -2762,13 +2762,13 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename)
 	{
 	  xfree (last_objfile_name);
 	  last_objfile_name = xstrdup (objfile_name (objfile));
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Creating one or more symtabs for objfile %s ...\n",
-			      last_objfile_name);
+	  fprintf_filtered (gdb_stdlog,
+			    "Creating one or more symtabs for objfile %s ...\n",
+			    last_objfile_name);
 	}
-      fprintf_unfiltered (gdb_stdlog,
-			  "Created symtab %s for module %s.\n",
-			  host_address_to_string (symtab), filename);
+      fprintf_filtered (gdb_stdlog,
+			"Created symtab %s for module %s.\n",
+			host_address_to_string (symtab), filename);
     }
 
   /* Add it to CUST's list of symtabs.  */
@@ -2814,10 +2814,10 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name)
 
   if (symtab_create_debug)
     {
-      fprintf_unfiltered (gdb_stdlog,
-			  "Created compunit symtab %s for %s.\n",
-			  host_address_to_string (cu),
-			  cu->name);
+      fprintf_filtered (gdb_stdlog,
+			"Created compunit symtab %s for %s.\n",
+			host_address_to_string (cu),
+			cu->name);
     }
 
   return cu;
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/7] Fix off-by-one error in complaint_internal
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
                   ` (2 preceding siblings ...)
  2018-09-23 15:10 ` [PATCH 4/7] Make complaint output prettier Tom Tromey
@ 2018-09-23 15:10 ` Tom Tromey
  2018-09-23 15:10 ` [PATCH 5/7] Clean up "Reading symbols" output Tom Tromey
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

complaint_internal had an off-by-one error, where it would allow one
extra complaint to be issued.

gdb/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	* complaints.c (complaint_internal): Correctly check complaint
	count.
---
 gdb/ChangeLog    | 5 +++++
 gdb/complaints.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/complaints.c b/gdb/complaints.c
index 03102f13ab..43ea7a18a7 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -56,7 +56,7 @@ complaint_internal (const char *fmt, ...)
 {
   va_list args;
 
-  if (counters[fmt]++ > stop_whining)
+  if (++counters[fmt] > stop_whining)
     return;
 
   va_start (args, fmt);
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/7] Remove some leftovers from complaints
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
  2018-09-23 15:10 ` [PATCH 7/7] Simplify complaints even more Tom Tromey
@ 2018-09-23 15:10 ` Tom Tromey
  2018-09-23 15:10 ` [PATCH 4/7] Make complaint output prettier Tom Tromey
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-09-23 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

There were a couple of leftovers from earlier patches in
complaints.[ch].  This removes them.

gdb/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

	* complaints.h (struct complaints): Remove declaration.
	* complaints.c (clear_complaints): Remove an unused variable.
---
 gdb/ChangeLog    | 5 +++++
 gdb/complaints.h | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gdb/complaints.h b/gdb/complaints.h
index 90f58061eb..243eaed93c 100644
--- a/gdb/complaints.h
+++ b/gdb/complaints.h
@@ -21,10 +21,6 @@
 #if !defined (COMPLAINTS_H)
 #define COMPLAINTS_H
 
-/* Opaque object used to track the number of complaints of a
-   particular category.  */
-struct complaints;
-
 /* Helper for complaint.  */
 extern void complaint_internal (const char *fmt, ...)
   ATTRIBUTE_PRINTF (1, 2);
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/7] Simplify complaints and symbol-reading output
  2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
                   ` (6 preceding siblings ...)
  2018-09-23 15:10 ` [PATCH 6/7] Only print "no debugging symbols" message once Tom Tromey
@ 2018-10-03 22:28 ` Joel Brobecker
  2018-10-04  0:38   ` Simon Marchi
  7 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2018-10-03 22:28 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

Hi Tom,

On Sun, Sep 23, 2018 at 09:09:50AM -0600, Tom Tromey wrote:
> This series cleans up symbol-reading output and simplifies complaints
> a bit more.  I've long thought the current output was difficult to
> read, and in some cases actively confusing; this series is another
> attempt to fix this up.  (The previous attempt involved adding
> progress metering.)

I read through the series; I don't really have a strong opinion,
but overall, the updated code and output both look better to me
(simplified code, clearer output). The patch looks good to me.

-- 
Joel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/7] Simplify complaints and symbol-reading output
  2018-10-03 22:28 ` [PATCH 0/7] Simplify complaints and symbol-reading output Joel Brobecker
@ 2018-10-04  0:38   ` Simon Marchi
  2018-10-04 19:43     ` Tom Tromey
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Marchi @ 2018-10-04  0:38 UTC (permalink / raw)
  To: Joel Brobecker, Tom Tromey; +Cc: gdb-patches

On 2018-10-03 06:28 PM, Joel Brobecker wrote:
> Hi Tom,
> 
> On Sun, Sep 23, 2018 at 09:09:50AM -0600, Tom Tromey wrote:
>> This series cleans up symbol-reading output and simplifies complaints
>> a bit more.  I've long thought the current output was difficult to
>> read, and in some cases actively confusing; this series is another
>> attempt to fix this up.  (The previous attempt involved adding
>> progress metering.)
> 
> I read through the series; I don't really have a strong opinion,
> but overall, the updated code and output both look better to me
> (simplified code, clearer output). The patch looks good to me.
> 

Same for me.

Simon

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/7] Simplify complaints and symbol-reading output
  2018-10-04  0:38   ` Simon Marchi
@ 2018-10-04 19:43     ` Tom Tromey
  0 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2018-10-04 19:43 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Joel Brobecker, Tom Tromey, gdb-patches

>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:

Joel> I read through the series; I don't really have a strong opinion,
Joel> but overall, the updated code and output both look better to me
Joel> (simplified code, clearer output). The patch looks good to me.

Simon> Same for me.

Thanks.  I am going to check this in now.

Tom

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-10-04 19:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-23 15:10 [PATCH 0/7] Simplify complaints and symbol-reading output Tom Tromey
2018-09-23 15:10 ` [PATCH 7/7] Simplify complaints even more Tom Tromey
2018-09-23 15:10 ` [PATCH 1/7] Remove some leftovers from complaints Tom Tromey
2018-09-23 15:10 ` [PATCH 4/7] Make complaint output prettier Tom Tromey
2018-09-23 15:10 ` [PATCH 2/7] Fix off-by-one error in complaint_internal Tom Tromey
2018-09-23 15:10 ` [PATCH 5/7] Clean up "Reading symbols" output Tom Tromey
2018-09-23 15:10 ` [PATCH 3/7] Use filtered printing when reading symbols Tom Tromey
2018-09-23 15:10 ` [PATCH 6/7] Only print "no debugging symbols" message once Tom Tromey
2018-10-03 22:28 ` [PATCH 0/7] Simplify complaints and symbol-reading output Joel Brobecker
2018-10-04  0:38   ` Simon Marchi
2018-10-04 19:43     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).