public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "xdje42 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/17866] incremental read missing header files
Date: Mon, 26 Jan 2015 01:12:00 -0000	[thread overview]
Message-ID: <bug-17866-4717-ak8PFhKcVp@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17866-4717@http.sourceware.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.


  reply	other threads:[~2015-01-26  1:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 21:16 [Bug symtab/17866] New: " dtaylor at emc dot com
2015-01-26  1:12 ` xdje42 at gmail dot com [this message]
2015-01-26 17:43 ` [Bug symtab/17866] " dtaylor at usendtaylorx2l dot lss.emc.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-17866-4717-ak8PFhKcVp@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).