This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/17866] incremental read missing header files
- From: "xdje42 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 26 Jan 2015 01:11:04 +0000
- Subject: [Bug symtab/17866] incremental read missing header files
- Auto-submitted: auto-generated
- References: <bug-17866-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17866
Doug Evans <xdje42 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xdje42 at gmail dot com
--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
The reason this happens is that gdb avoids create psymtabs for headers not
referenced in the line number program in dwarf.
grep for included_p below.
There's some discussion as to why in this thread:
https://sourceware.org/ml/gdb-patches/2004-04/msg00267.html
with the original message here:
https://www.sourceware.org/ml/gdb-patches/2004-01/msg00015.html
gdb has changed a bit since then, it may now be reasonable to
create psymtabs for all headers, whether or not they are referenced
by the line number program.
static void
dwarf_decode_lines (struct line_header *lh, const char *comp_dir,
struct dwarf2_cu *cu, struct partial_symtab *pst,
CORE_ADDR lowpc, int decode_mapping)
{
struct objfile *objfile = cu->objfile;
const int decode_for_pst_p = (pst != NULL);
if (decode_mapping)
dwarf_decode_lines_1 (lh, cu, decode_for_pst_p, lowpc);
if (decode_for_pst_p)
{
int file_index;
/* Now that we're done scanning the Line Header Program, we can
create the psymtab of each included file. */
for (file_index = 0; file_index < lh->num_file_names; file_index++)
if (lh->file_names[file_index].included_p == 1)
{
const char *include_name =
psymtab_include_file_name (lh, file_index, pst, comp_dir);
if (include_name != NULL)
dwarf2_create_include_psymtab (include_name, pst, objfile);
}
}
--
You are receiving this mail because:
You are on the CC list for the bug.