aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/coffread.c4
-rw-r--r--gdb/dwarf2/public.h3
-rw-r--r--gdb/dwarf2/read.c15
-rw-r--r--gdb/machoread.c2
-rw-r--r--gdb/xcoffread.c4
5 files changed, 8 insertions, 20 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index f5ef128..da871d5 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -702,11 +702,9 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
if (dwarf2_has_info (objfile, NULL))
{
/* DWARF2 sections. */
- dwarf2_build_psymtabs (objfile);
+ dwarf2_initialize_objfile (objfile);
}
- dwarf2_build_frame_info (objfile);
-
/* Try to add separate debug file if no symbols table found. */
if (!objfile->has_partial_symbols ())
{
diff --git a/gdb/dwarf2/public.h b/gdb/dwarf2/public.h
index f002ab2..a9d4682 100644
--- a/gdb/dwarf2/public.h
+++ b/gdb/dwarf2/public.h
@@ -38,9 +38,6 @@ enum class dw_index_kind
entry on the objfile's "qf" list. */
extern void dwarf2_initialize_objfile (struct objfile *objfile);
-struct psymbol_functions;
-extern void dwarf2_build_psymtabs (struct objfile *,
- bool already_attached = false);
extern void dwarf2_build_frame_info (struct objfile *);
#endif /* DWARF2_PUBLIC_H */
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 8586463..d6fccf8 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -5340,18 +5340,13 @@ dwarf2_initialize_objfile (struct objfile *objfile)
/* Build a partial symbol table. */
-void
-dwarf2_build_psymtabs (struct objfile *objfile, bool already_attached)
+static void
+dwarf2_build_psymtabs (struct objfile *objfile)
{
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
- if (already_attached)
- {
- if (per_objfile->per_bfd->index_table != nullptr)
- return;
- }
- else
- objfile->qf.push_front (make_cooked_index_funcs ());
+ if (per_objfile->per_bfd->index_table != nullptr)
+ return;
try
{
@@ -18457,7 +18452,7 @@ struct cooked_index_functions : public dwarf2_base_index_functions
void read_partial_symbols (struct objfile *objfile) override
{
if (dwarf2_has_info (objfile, nullptr))
- dwarf2_build_psymtabs (objfile, true);
+ dwarf2_build_psymtabs (objfile);
}
};
diff --git a/gdb/machoread.c b/gdb/machoread.c
index 90f25b3..8c4b08f 100644
--- a/gdb/machoread.c
+++ b/gdb/machoread.c
@@ -860,7 +860,7 @@ macho_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
if (dwarf2_has_info (objfile, NULL))
{
/* DWARF 2 sections */
- dwarf2_build_psymtabs (objfile);
+ dwarf2_initialize_objfile (objfile);
}
/* Then the oso. */
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 566c082..d8735d2 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2872,9 +2872,7 @@ xcoff_initial_scan (struct objfile *objfile, symfile_add_flags symfile_flags)
/* DWARF2 sections. */
if (dwarf2_has_info (objfile, &dwarf2_xcoff_names))
- dwarf2_build_psymtabs (objfile);
-
- dwarf2_build_frame_info (objfile);
+ dwarf2_initialize_objfile (objfile);
}
static void