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/19009] New: unnecessary lookup of minsym within search_symbols


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

            Bug ID: 19009
           Summary: unnecessary lookup of minsym within search_symbols
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: dje at google dot com
  Target Milestone: ---

Can't remember if I've filed this, and can't find an existing bug, so filing
this so I don't drop it.

search_symbols has this:

                if (kind == FUNCTIONS_DOMAIN
=>                  ? (find_pc_compunit_symtab
                       (MSYMBOL_VALUE_ADDRESS (objfile, msymbol)) == NULL)
                    : (lookup_symbol_in_objfile_from_linkage_name
                       (objfile, MSYMBOL_LINKAGE_NAME (msymbol), VAR_DOMAIN)
                       == NULL))

and find_pc_compunit_symtab calls find_pc_sect_compunit_symtab which does this:

  msymbol = lookup_minimal_symbol_by_pc_section (pc, section);

We already have the minsym, why look it up again?

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