gdb/
2013-01-14 Yao Qi <yao@codesourcery.com> * dbxread.c (dbx_psymtab_to_symtab_1): Don't check PST is NULL. (dbx_psymtab_to_symtab): Likewise. * dwarf2read.c (dwarf2_psymtab_to_symtab): Likewise. * mdebugread.c (mdebug_psymtab_to_symtab): Likewise. * xcoffread.c (xcoff_psymtab_to_symtab_1): Likewise.
This commit is contained in:
parent
7765a960b3
commit
442e4d9c87
5 changed files with 45 additions and 51 deletions
|
@ -1,3 +1,11 @@
|
|||
2013-01-14 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* dbxread.c (dbx_psymtab_to_symtab_1): Don't check PST is NULL.
|
||||
(dbx_psymtab_to_symtab): Likewise.
|
||||
* dwarf2read.c (dwarf2_psymtab_to_symtab): Likewise.
|
||||
* mdebugread.c (mdebug_psymtab_to_symtab): Likewise.
|
||||
* xcoffread.c (xcoff_psymtab_to_symtab_1): Likewise.
|
||||
|
||||
2013-01-13 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* parse.c (parse_exp_in_context): New variable inner_chain. Call
|
||||
|
|
|
@ -2406,9 +2406,6 @@ dbx_psymtab_to_symtab_1 (struct objfile *objfile, struct partial_symtab *pst)
|
|||
struct cleanup *old_chain;
|
||||
int i;
|
||||
|
||||
if (!pst)
|
||||
return;
|
||||
|
||||
if (pst->readin)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
|
||||
|
@ -2455,7 +2452,7 @@ dbx_psymtab_to_symtab_1 (struct objfile *objfile, struct partial_symtab *pst)
|
|||
}
|
||||
|
||||
/* Read in all of the symbols for a given psymtab for real.
|
||||
Be verbose about it if the user wants that. */
|
||||
Be verbose about it if the user wants that. PST is not NULL. */
|
||||
|
||||
static void
|
||||
dbx_psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
|
@ -2463,9 +2460,6 @@ dbx_psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
|||
bfd *sym_bfd;
|
||||
struct cleanup *back_to = NULL;
|
||||
|
||||
if (!pst)
|
||||
return;
|
||||
|
||||
if (pst->readin)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
|
||||
|
|
|
@ -6405,52 +6405,50 @@ locate_pdi_sibling (const struct die_reader_specs *reader,
|
|||
return skip_children (reader, info_ptr);
|
||||
}
|
||||
|
||||
/* Expand this partial symbol table into a full symbol table. */
|
||||
/* Expand this partial symbol table into a full symbol table. PST is
|
||||
not NULL. */
|
||||
|
||||
static void
|
||||
dwarf2_psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
{
|
||||
if (pst != NULL)
|
||||
if (pst->readin)
|
||||
{
|
||||
if (pst->readin)
|
||||
warning (_("bug: psymtab for %s is already read in."),
|
||||
pst->filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (info_verbose)
|
||||
{
|
||||
warning (_("bug: psymtab for %s is already read in."),
|
||||
pst->filename);
|
||||
printf_filtered (_("Reading in symbols for %s..."),
|
||||
pst->filename);
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
else
|
||||
|
||||
/* Restore our global data. */
|
||||
dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
|
||||
|
||||
/* 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)
|
||||
{
|
||||
if (info_verbose)
|
||||
{
|
||||
printf_filtered (_("Reading in symbols for %s..."),
|
||||
pst->filename);
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
struct dwarf2_per_objfile *dpo_backlink
|
||||
= objfile_data (objfile->separate_debug_objfile_backlink,
|
||||
dwarf2_objfile_data_key);
|
||||
|
||||
/* Restore our global data. */
|
||||
dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
|
||||
|
||||
/* 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
|
||||
= objfile_data (objfile->separate_debug_objfile_backlink,
|
||||
dwarf2_objfile_data_key);
|
||||
|
||||
dwarf2_per_objfile->has_section_at_zero
|
||||
= dpo_backlink->has_section_at_zero;
|
||||
}
|
||||
|
||||
dwarf2_per_objfile->reading_partial_symbols = 0;
|
||||
|
||||
psymtab_to_symtab_1 (pst);
|
||||
|
||||
/* Finish up the debug error message. */
|
||||
if (info_verbose)
|
||||
printf_filtered (_("done.\n"));
|
||||
dwarf2_per_objfile->has_section_at_zero
|
||||
= dpo_backlink->has_section_at_zero;
|
||||
}
|
||||
|
||||
dwarf2_per_objfile->reading_partial_symbols = 0;
|
||||
|
||||
psymtab_to_symtab_1 (pst);
|
||||
|
||||
/* Finish up the debug error message. */
|
||||
if (info_verbose)
|
||||
printf_filtered (_("done.\n"));
|
||||
}
|
||||
|
||||
process_cu_includes ();
|
||||
|
|
|
@ -273,14 +273,11 @@ static char *mdebug_next_symbol_text (struct objfile *);
|
|||
/* Exported procedure: Builds a symtab from the PST partial one.
|
||||
Restores the environment in effect when PST was created, delegates
|
||||
most of the work to an ancillary procedure, and sorts
|
||||
and reorders the symtab list at the end. */
|
||||
and reorders the symtab list at the end. PST is not NULL. */
|
||||
|
||||
static void
|
||||
mdebug_psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
{
|
||||
if (!pst)
|
||||
return;
|
||||
|
||||
if (info_verbose)
|
||||
{
|
||||
printf_filtered (_("Reading in symbols for %s..."), pst->filename);
|
||||
|
|
|
@ -1855,14 +1855,11 @@ xcoff_psymtab_to_symtab_1 (struct objfile *objfile, struct partial_symtab *pst)
|
|||
}
|
||||
|
||||
/* Read in all of the symbols for a given psymtab for real.
|
||||
Be verbose about it if the user wants that. */
|
||||
Be verbose about it if the user wants that. PST is not NULL. */
|
||||
|
||||
static void
|
||||
xcoff_psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
{
|
||||
if (!pst)
|
||||
return;
|
||||
|
||||
if (pst->readin)
|
||||
{
|
||||
fprintf_unfiltered
|
||||
|
|
Loading…
Add table
Reference in a new issue