This is the mail archive of the
archer-commits@sourceware.org
mailing list for the Archer project.
[SCM] archer-tromey-optional-psymtab: Correctly handle the cases where we must use psymtabs. This occurs when the objfile has mixed debuginfo types.
- From: tromey at sourceware dot org
- To: archer-commits at sourceware dot org
- Date: 26 Nov 2009 02:16:50 -0000
- Subject: [SCM] archer-tromey-optional-psymtab: Correctly handle the cases where we must use psymtabs. This occurs when the objfile has mixed debuginfo types.
The branch, archer-tromey-optional-psymtab has been updated
via 101ec16e9bd2503d9b7dba786a577020ac9e8df3 (commit)
from 0a1038098d6ae97da1873b80ba5b10899acccb72 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 101ec16e9bd2503d9b7dba786a577020ac9e8df3
Author: Tom Tromey <tromey@redhat.com>
Date: Wed Nov 25 19:15:59 2009 -0700
Correctly handle the cases where we must use psymtabs.
This occurs when the objfile has mixed debuginfo types.
-----------------------------------------------------------------------
Summary of changes:
gdb/dwarf2read.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
First 500 lines of diff:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index c403f40..39cbe2d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2647,11 +2647,15 @@ const struct quick_symbol_functions dwarf2_gnu_index_functions =
int
dwarf2_initialize_objfile (struct objfile *objfile)
{
+ int must_use_psyms = (objfile->global_psymbols.size != 0
+ || objfile->static_psymbols.size != 0);
+
dwarf2_read_section (objfile, &dwarf2_per_objfile->info);
/* If we're about to read full symbols, don't bother with the
indices. */
- if ((objfile->flags & OBJF_READNOW) || readnow_symbol_files)
+ if (((objfile->flags & OBJF_READNOW) || readnow_symbol_files)
+ && !must_use_psyms)
{
int i;
struct dwarf2_per_cu_data *cu;
@@ -2674,9 +2678,13 @@ dwarf2_initialize_objfile (struct objfile *objfile)
return 1;
}
+ /* We want to create the quick address map, if we can, regardless of
+ whether we want to build psymtabs. */
if (!dwarf2_create_quick_addrmap (objfile)
- || objfile->global_psymbols.size != 0
- || objfile->static_psymbols.size != 0
+ || must_use_psyms
+ /* We could actually read the dwarf and make the index the hard
+ way. FIXME. This would probably save memory over using
+ psymtabs. */
|| !dwarf2_per_objfile->gnu_index.asection)
/* We have to build psymtabs, so don't bother reading the GNU
index. */
hooks/post-receive
--
Repository for Project Archer.