* [review] Consolidate psymtab "Reading" messages
@ 2019-10-28 2:03 Tom Tromey (Code Review)
2020-01-26 23:41 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2020-01-26 23:41 ` Sourceware to Gerrit sync (Code Review)
0 siblings, 2 replies; 3+ messages in thread
From: Tom Tromey (Code Review) @ 2019-10-28 2:03 UTC (permalink / raw)
To: gdb-patches
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/380
......................................................................
Consolidate psymtab "Reading" messages
Each symbol reader implemented its own "Reading..." messages, and most
of them double-checked that a previously-expanded psymtab could not be
re-read.
This patch consolidates the message-printing, and changes these checks
into asserts.
gdb/ChangeLog
2019-10-27 Tom Tromey <tom@tromey.com>
* xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
* psymtab.c (psymtab_to_symtab): Print verbose "Reading"
messages.
* mdebugread.c (mdebug_read_symtab): Remove prints.
* dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
assert.
* dbxread.c (dbx_read_symtab): Remove prints. Add assert.
Change-Id: I795be9710d42708299bb7b44972cffd27aec9413
---
M gdb/ChangeLog
M gdb/dbxread.c
M gdb/dwarf2read.c
M gdb/mdebugread.c
M gdb/psymtab.c
M gdb/xcoffread.c
6 files changed, 36 insertions(+), 78 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 39585f0..0aca3d3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2019-10-27 Tom Tromey <tom@tromey.com>
+ * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
+ * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
+ messages.
+ * mdebugread.c (mdebug_read_symtab): Remove prints.
+ * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
+ assert.
+ * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
+
+2019-10-27 Tom Tromey <tom@tromey.com>
+
* xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
(xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
(xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index ce04951..a288071 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2119,24 +2119,10 @@
static void
dbx_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (self->readin)
- {
- fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
- "Shouldn't happen.\n",
- self->filename);
- return;
- }
+ gdb_assert (!self->readin);
if (LDSYMLEN (self) || self->number_of_dependencies)
{
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = dbx_next_symbol_text;
{
@@ -2157,10 +2143,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
}
}
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2408098..9209a4d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -9472,41 +9472,23 @@
struct dwarf2_per_objfile *dwarf2_per_objfile
= get_dwarf2_per_objfile (objfile);
- if (readin)
+ gdb_assert (!readin);
+ /* If this psymtab is constructed from a debug-only objfile, the
+ has_section_at_zero flag will not necessarily be correct. We
+ can get the correct value for this flag by looking at the data
+ associated with the (presumably stripped) associated objfile. */
+ if (objfile->separate_debug_objfile_backlink)
{
- warning (_("bug: psymtab for %s is already read in."),
- filename);
+ struct dwarf2_per_objfile *dpo_backlink
+ = get_dwarf2_per_objfile (objfile->separate_debug_objfile_backlink);
+
+ dwarf2_per_objfile->has_section_at_zero
+ = dpo_backlink->has_section_at_zero;
}
- else
- {
- if (info_verbose)
- {
- printf_filtered (_("Reading in symbols for %s..."),
- filename);
- gdb_flush (gdb_stdout);
- }
- /* If this psymtab is constructed from a debug-only objfile, the
- has_section_at_zero flag will not necessarily be correct. We
- can get the correct value for this flag by looking at the data
- associated with the (presumably stripped) associated objfile. */
- if (objfile->separate_debug_objfile_backlink)
- {
- struct dwarf2_per_objfile *dpo_backlink
- = get_dwarf2_per_objfile (objfile->separate_debug_objfile_backlink);
+ dwarf2_per_objfile->reading_partial_symbols = 0;
- dwarf2_per_objfile->has_section_at_zero
- = dpo_backlink->has_section_at_zero;
- }
-
- dwarf2_per_objfile->reading_partial_symbols = 0;
-
- psymtab_to_symtab_1 (this);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered (_("done.\n"));
- }
+ psymtab_to_symtab_1 (this);
process_cu_includes (dwarf2_per_objfile);
}
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index cf10a25..6fde729 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -277,12 +277,6 @@
static void
mdebug_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (info_verbose)
- {
- printf_filtered (_("Reading in symbols for %s..."), self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = mdebug_next_symbol_text;
psymtab_to_symtab_1 (objfile, self, self->filename);
@@ -290,9 +284,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- if (info_verbose)
- printf_filtered (_("done.\n"));
}
\f
/* File-level interface functions. */
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index f0d1237..ee7f9dc 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -759,7 +759,18 @@
{
scoped_restore decrementer = increment_reading_symtab ();
+ if (info_verbose)
+ {
+ printf_filtered (_("Reading in symbols for %s..."),
+ pst->filename);
+ gdb_flush (gdb_stdout);
+ }
+
pst->read_symtab (objfile);
+
+ /* Finish up the debug error message. */
+ if (info_verbose)
+ printf_filtered (_("done.\n"));
}
return pst->compunit_symtab;
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index f35e74a..9a63af6 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1874,25 +1874,11 @@
static void
xcoff_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (self->readin)
- {
- fprintf_unfiltered
- (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
- self->filename);
- return;
- }
+ gdb_assert (!self->readin);
if (((struct symloc *) self->read_symtab_private)->numsyms != 0
|| self->number_of_dependencies)
{
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = xcoff_next_symbol_text;
xcoff_psymtab_to_symtab_1 (objfile, self);
@@ -1900,10 +1886,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
}
}
\f
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I795be9710d42708299bb7b44972cffd27aec9413
Gerrit-Change-Number: 380
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pushed] Consolidate psymtab "Reading" messages
2019-10-28 2:03 [review] Consolidate psymtab "Reading" messages Tom Tromey (Code Review)
2020-01-26 23:41 ` [pushed] " Sourceware to Gerrit sync (Code Review)
@ 2020-01-26 23:41 ` Sourceware to Gerrit sync (Code Review)
1 sibling, 0 replies; 3+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2020-01-26 23:41 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/380
......................................................................
Consolidate psymtab "Reading" messages
Each symbol reader implemented its own "Reading..." messages, and most
of them double-checked that a previously-expanded psymtab could not be
re-read.
This patch consolidates the message-printing, and changes these checks
into asserts.
gdb/ChangeLog
2020-01-26 Tom Tromey <tom@tromey.com>
* xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
* psymtab.c (psymtab_to_symtab): Print verbose "Reading"
messages.
* mdebugread.c (mdebug_read_symtab): Remove prints.
* dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
assert.
* dbxread.c (dbx_read_symtab): Remove prints. Add assert.
Change-Id: I795be9710d42708299bb7b44972cffd27aec9413
---
M gdb/ChangeLog
M gdb/dbxread.c
M gdb/dwarf2read.c
M gdb/mdebugread.c
M gdb/psymtab.c
M gdb/xcoffread.c
6 files changed, 36 insertions(+), 78 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8fcb24e..ed3b97b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2020-01-26 Tom Tromey <tom@tromey.com>
+ * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
+ * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
+ messages.
+ * mdebugread.c (mdebug_read_symtab): Remove prints.
+ * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
+ assert.
+ * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
+
+2020-01-26 Tom Tromey <tom@tromey.com>
+
* xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
(xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
(xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 64387c6..9d8d938 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2117,24 +2117,10 @@
static void
dbx_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (self->readin)
- {
- fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
- "Shouldn't happen.\n",
- self->filename);
- return;
- }
+ gdb_assert (!self->readin);
if (LDSYMLEN (self) || self->number_of_dependencies)
{
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = dbx_next_symbol_text;
{
@@ -2155,10 +2141,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
}
}
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8bde265..9942270 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -9494,41 +9494,23 @@
struct dwarf2_per_objfile *dwarf2_per_objfile
= get_dwarf2_per_objfile (objfile);
- if (readin)
+ gdb_assert (!readin);
+ /* If this psymtab is constructed from a debug-only objfile, the
+ has_section_at_zero flag will not necessarily be correct. We
+ can get the correct value for this flag by looking at the data
+ associated with the (presumably stripped) associated objfile. */
+ if (objfile->separate_debug_objfile_backlink)
{
- warning (_("bug: psymtab for %s is already read in."),
- filename);
+ struct dwarf2_per_objfile *dpo_backlink
+ = get_dwarf2_per_objfile (objfile->separate_debug_objfile_backlink);
+
+ dwarf2_per_objfile->has_section_at_zero
+ = dpo_backlink->has_section_at_zero;
}
- else
- {
- if (info_verbose)
- {
- printf_filtered (_("Reading in symbols for %s..."),
- filename);
- gdb_flush (gdb_stdout);
- }
- /* If this psymtab is constructed from a debug-only objfile, the
- has_section_at_zero flag will not necessarily be correct. We
- can get the correct value for this flag by looking at the data
- associated with the (presumably stripped) associated objfile. */
- if (objfile->separate_debug_objfile_backlink)
- {
- struct dwarf2_per_objfile *dpo_backlink
- = get_dwarf2_per_objfile (objfile->separate_debug_objfile_backlink);
+ dwarf2_per_objfile->reading_partial_symbols = 0;
- dwarf2_per_objfile->has_section_at_zero
- = dpo_backlink->has_section_at_zero;
- }
-
- dwarf2_per_objfile->reading_partial_symbols = 0;
-
- psymtab_to_symtab_1 (this);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered (_("done.\n"));
- }
+ psymtab_to_symtab_1 (this);
process_cu_includes (dwarf2_per_objfile);
}
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 621b314..4b32a5a 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -277,12 +277,6 @@
static void
mdebug_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (info_verbose)
- {
- printf_filtered (_("Reading in symbols for %s..."), self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = mdebug_next_symbol_text;
psymtab_to_symtab_1 (objfile, self, self->filename);
@@ -290,9 +284,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- if (info_verbose)
- printf_filtered (_("done.\n"));
}
\f
/* File-level interface functions. */
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 6a2f7f7..6abc829 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -758,7 +758,18 @@
{
scoped_restore decrementer = increment_reading_symtab ();
+ if (info_verbose)
+ {
+ printf_filtered (_("Reading in symbols for %s..."),
+ pst->filename);
+ gdb_flush (gdb_stdout);
+ }
+
pst->read_symtab (objfile);
+
+ /* Finish up the debug error message. */
+ if (info_verbose)
+ printf_filtered (_("done.\n"));
}
return pst->compunit_symtab;
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 69731a4..66d6b9a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1869,25 +1869,11 @@
static void
xcoff_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (self->readin)
- {
- fprintf_unfiltered
- (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
- self->filename);
- return;
- }
+ gdb_assert (!self->readin);
if (((struct symloc *) self->read_symtab_private)->numsyms != 0
|| self->number_of_dependencies)
{
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = xcoff_next_symbol_text;
xcoff_psymtab_to_symtab_1 (objfile, self);
@@ -1895,10 +1881,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
}
}
\f
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I795be9710d42708299bb7b44972cffd27aec9413
Gerrit-Change-Number: 380
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: merged
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pushed] Consolidate psymtab "Reading" messages
2019-10-28 2:03 [review] Consolidate psymtab "Reading" messages Tom Tromey (Code Review)
@ 2020-01-26 23:41 ` Sourceware to Gerrit sync (Code Review)
2020-01-26 23:41 ` Sourceware to Gerrit sync (Code Review)
1 sibling, 0 replies; 3+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2020-01-26 23:41 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
The original change was created by Tom Tromey.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/380
......................................................................
Consolidate psymtab "Reading" messages
Each symbol reader implemented its own "Reading..." messages, and most
of them double-checked that a previously-expanded psymtab could not be
re-read.
This patch consolidates the message-printing, and changes these checks
into asserts.
gdb/ChangeLog
2020-01-26 Tom Tromey <tom@tromey.com>
* xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
* psymtab.c (psymtab_to_symtab): Print verbose "Reading"
messages.
* mdebugread.c (mdebug_read_symtab): Remove prints.
* dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
assert.
* dbxread.c (dbx_read_symtab): Remove prints. Add assert.
Change-Id: I795be9710d42708299bb7b44972cffd27aec9413
---
M gdb/ChangeLog
M gdb/dbxread.c
M gdb/dwarf2read.c
M gdb/mdebugread.c
M gdb/psymtab.c
M gdb/xcoffread.c
6 files changed, 36 insertions(+), 78 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8fcb24e..ed3b97b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2020-01-26 Tom Tromey <tom@tromey.com>
+ * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
+ * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
+ messages.
+ * mdebugread.c (mdebug_read_symtab): Remove prints.
+ * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
+ assert.
+ * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
+
+2020-01-26 Tom Tromey <tom@tromey.com>
+
* xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
(xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
(xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 64387c6..9d8d938 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2117,24 +2117,10 @@
static void
dbx_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (self->readin)
- {
- fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
- "Shouldn't happen.\n",
- self->filename);
- return;
- }
+ gdb_assert (!self->readin);
if (LDSYMLEN (self) || self->number_of_dependencies)
{
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = dbx_next_symbol_text;
{
@@ -2155,10 +2141,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
}
}
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8bde265..9942270 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -9494,41 +9494,23 @@
struct dwarf2_per_objfile *dwarf2_per_objfile
= get_dwarf2_per_objfile (objfile);
- if (readin)
+ gdb_assert (!readin);
+ /* If this psymtab is constructed from a debug-only objfile, the
+ has_section_at_zero flag will not necessarily be correct. We
+ can get the correct value for this flag by looking at the data
+ associated with the (presumably stripped) associated objfile. */
+ if (objfile->separate_debug_objfile_backlink)
{
- warning (_("bug: psymtab for %s is already read in."),
- filename);
+ struct dwarf2_per_objfile *dpo_backlink
+ = get_dwarf2_per_objfile (objfile->separate_debug_objfile_backlink);
+
+ dwarf2_per_objfile->has_section_at_zero
+ = dpo_backlink->has_section_at_zero;
}
- else
- {
- if (info_verbose)
- {
- printf_filtered (_("Reading in symbols for %s..."),
- filename);
- gdb_flush (gdb_stdout);
- }
- /* If this psymtab is constructed from a debug-only objfile, the
- has_section_at_zero flag will not necessarily be correct. We
- can get the correct value for this flag by looking at the data
- associated with the (presumably stripped) associated objfile. */
- if (objfile->separate_debug_objfile_backlink)
- {
- struct dwarf2_per_objfile *dpo_backlink
- = get_dwarf2_per_objfile (objfile->separate_debug_objfile_backlink);
+ dwarf2_per_objfile->reading_partial_symbols = 0;
- dwarf2_per_objfile->has_section_at_zero
- = dpo_backlink->has_section_at_zero;
- }
-
- dwarf2_per_objfile->reading_partial_symbols = 0;
-
- psymtab_to_symtab_1 (this);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered (_("done.\n"));
- }
+ psymtab_to_symtab_1 (this);
process_cu_includes (dwarf2_per_objfile);
}
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 621b314..4b32a5a 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -277,12 +277,6 @@
static void
mdebug_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (info_verbose)
- {
- printf_filtered (_("Reading in symbols for %s..."), self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = mdebug_next_symbol_text;
psymtab_to_symtab_1 (objfile, self, self->filename);
@@ -290,9 +284,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- if (info_verbose)
- printf_filtered (_("done.\n"));
}
\f
/* File-level interface functions. */
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 6a2f7f7..6abc829 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -758,7 +758,18 @@
{
scoped_restore decrementer = increment_reading_symtab ();
+ if (info_verbose)
+ {
+ printf_filtered (_("Reading in symbols for %s..."),
+ pst->filename);
+ gdb_flush (gdb_stdout);
+ }
+
pst->read_symtab (objfile);
+
+ /* Finish up the debug error message. */
+ if (info_verbose)
+ printf_filtered (_("done.\n"));
}
return pst->compunit_symtab;
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 69731a4..66d6b9a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1869,25 +1869,11 @@
static void
xcoff_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
- if (self->readin)
- {
- fprintf_unfiltered
- (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
- self->filename);
- return;
- }
+ gdb_assert (!self->readin);
if (((struct symloc *) self->read_symtab_private)->numsyms != 0
|| self->number_of_dependencies)
{
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", self->filename);
- gdb_flush (gdb_stdout);
- }
-
next_symbol_text_func = xcoff_next_symbol_text;
xcoff_psymtab_to_symtab_1 (objfile, self);
@@ -1895,10 +1881,6 @@
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
}
}
\f
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I795be9710d42708299bb7b44972cffd27aec9413
Gerrit-Change-Number: 380
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-26 23:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 2:03 [review] Consolidate psymtab "Reading" messages Tom Tromey (Code Review)
2020-01-26 23:41 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2020-01-26 23:41 ` Sourceware to Gerrit sync (Code Review)
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).