This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/17684] New: lookup of builtin types: correctness and performance issues


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

            Bug ID: 17684
           Summary: lookup of builtin types: correctness and performance
                    issues
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: xdje42 at gmail dot com

This bug is to address the correctness and performance issues of gdb's current
handling of the lookup of builtin types, as discussed in PR 16994.

correctness: Though rare, we should still properly handle it,
which is if we're in a file where the STATIC_BLOCK doesn't provide a definition
for "double" (basetypes live in STATIC_BLOCK) and the fallback that gdb uses
(search all static blocks of all objfiles) happens to find a find a definition
of "double" in a file that was compiled with -fshort-double.

performance: We search in all static blocks of all objfiles.
The definition of "void" is typically not specified in debug info and yet gdb
can look up "void" a lot.  Thus every time gdb goes to search "void" it will
look in all static blocks of all objfiles, find nothing, and only *then* does
c-exp.y:classify_name, for example, call
language_lookup_primitive_type_by_name.

Fixing this will require giving lookup_symbol (et.al.) the ability to return
builtin types as symbols.  Patch to follow.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]