Bug 15547 - info types searches msymbols
Summary: info types searches msymbols
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 22:20 UTC by dje
Modified: 2024-05-24 14:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2013-05-28 22:20:14 UTC
(gdb) info types b
...
Non-debugging symbols:
__bss_start


Absent some old debug format (stabs?) is there a reason to search minsyms for types?  If not, and we still have to support old debug formats that do this,
can we record some information somewhere to make the output of "info types"
more useful?
Comment 1 Tom Tromey 2023-12-11 00:23:53 UTC
"info types bss" on a running gdb doesn't show this for me.

I didn't look to see if it really still can happen.
Anyway enum minimal_symbol_type doesn't include anything
type-related, and IMO it shouldn't.  We should just declare
this to be impossible.  If some future format needs something
like this, for some reason, it can install a new 'quick'
handler.
Comment 2 Tom Tromey 2024-05-24 14:27:23 UTC
global_symbol_searcher::search has this code:

  /* If there are no debug symbols, then add matching minsyms.  But if the
     user wants to see symbols matching a type regexp, then never give a
     minimal symbol, as we assume that a minimal symbol does not have a
     type.  */
  if ((found_msymbol
       || (filenames.empty () && (m_kind & SEARCH_VAR_DOMAIN) != 0))
      && !m_exclude_minsyms
      && !treg.has_value ())
    {
      gdb_assert ((m_kind & (SEARCH_VAR_DOMAIN | SEARCH_FUNCTION_DOMAIN))
		  != 0);

So I think the minsym searching can't be reached for info types.