[Bug symtab/25256] New: maint check-psymtab: Inline function only found in psymtab

vries at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Sun Dec 8 11:39:00 GMT 2019


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

            Bug ID: 25256
           Summary: maint check-psymtab: Inline function only found in
                    psymtab
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: minor
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider test-case inline.c:
...
static inline int
foo (void)
{
  return 0;
}

int
main (void)
{
  return foo ();
}
...

Compiled at -O2, with debug info:
...
$ gcc -O2 inline.c -g
...

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

Expanding all symtabs does not help:
...
(gdb) maint expand-symtabs
(gdb) maint check-psymtab
Static symbol `foo' only found in inline.c psymtab
...

The docs for 'maint check-psymtabs' state:
...
maint check-psymtabs

    Check the consistency of currently expanded psymtabs versus symtabs.
    Use this to check, for example, whether a symbol is in one but not
    the other.
...

This suggests that there is a consistency problem between symtabs and psymtabs
that needs to be fixed.

Otherwise, if this is expected behaviour, 'maint check-psymtabs' either:
- shouldn't be reporting it as an inconsistency, or,
- it should be reporting the reason for the inconsistency.

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


More information about the Gdb-prs mailing list