Bug 19009 - unnecessary lookup of minsym within search_symbols
Summary: unnecessary lookup of minsym within search_symbols
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2015-09-25 18:09 UTC by dje
Modified: 2015-09-25 18:10 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2015-09-25 18:09:44 UTC
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?