public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/25256] maint check-psymtab: Inline function only found in psymtab
       [not found] <bug-25256-4717@http.sourceware.org/bugzilla/>
@ 2020-03-09 12:43 ` vries at gcc dot gnu.org
  2020-03-09 14:53 ` vries at gcc dot gnu.org
  2020-04-09  2:15 ` vries at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2020-03-09 12:43 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25256

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> When calling maint check-psymtab in this executable, we get:
> ...
> $ gdb a.out
> Reading symbols from a.out...
> (gdb) maint check-psymtab
> Static symbol `foo' only found in inline.c psymtab
> ...

Using a bit more debugging, we get:
...
$ gdb -batch -iex "set complaints 100" a.out -ex "maint check-psymtab"
During symbol reading: cannot get low and high bounds for subprogram DIE at
0x114
Static symbol `foo' only found in inline.c psymtab
...

So, the reason the foo symbol is not in the full symtab, is here in
read_func_scope:
...
  /* Ignore functions with missing or invalid low and high pc attributes.  */
  if (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL)
      <= PC_BOUNDS_INVALID)
    {
      attr = dwarf2_attr (die, DW_AT_external, cu);
      if (!attr || !DW_UNSND (attr))
        complaint (_("cannot get low and high bounds "
                     "for subprogram DIE at %s"),
                   sect_offset_str (die->sect_off));
      return;
    }
...

Tentative patch that fixes the error message by making sure the corresponding
partial symbol is not created:
...
vries@delia:/data/gdb_versions/devel/src> git diff
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 1d4397dfab..299f532088 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -8445,7 +8445,7 @@ add_partial_subprogram (struct partial_die_info *pdi,
            }
         }

-      if (pdi->has_pc_info || (!pdi->is_external && pdi->may_be_inlined))
+      if (pdi->has_pc_info)
        {
           if (!pdi->is_declaration)
            /* Ignore subprogram DIEs that do not have a name, they are
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug symtab/25256] maint check-psymtab: Inline function only found in psymtab
       [not found] <bug-25256-4717@http.sourceware.org/bugzilla/>
  2020-03-09 12:43 ` [Bug symtab/25256] maint check-psymtab: Inline function only found in psymtab vries at gcc dot gnu.org
@ 2020-03-09 14:53 ` vries at gcc dot gnu.org
  2020-04-09  2:15 ` vries at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2020-03-09 14:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25256

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
patch submitted:
https://sourceware.org/pipermail/gdb-patches/2020-March/166491.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug symtab/25256] maint check-psymtab: Inline function only found in psymtab
       [not found] <bug-25256-4717@http.sourceware.org/bugzilla/>
  2020-03-09 12:43 ` [Bug symtab/25256] maint check-psymtab: Inline function only found in psymtab vries at gcc dot gnu.org
  2020-03-09 14:53 ` vries at gcc dot gnu.org
@ 2020-04-09  2:15 ` vries at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-09  2:15 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25256

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Patch with test-case committed at
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5707e24baa2f557d54e09641d69843111834cb9b
, marking resolved-fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-09  2:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25256-4717@http.sourceware.org/bugzilla/>
2020-03-09 12:43 ` [Bug symtab/25256] maint check-psymtab: Inline function only found in psymtab vries at gcc dot gnu.org
2020-03-09 14:53 ` vries at gcc dot gnu.org
2020-04-09  2:15 ` vries at gcc dot gnu.org

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).