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/17788] New: symtab_natural_name (et.al.) don't handle language_auto


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

            Bug ID: 17788
           Summary: symtab_natural_name (et.al.) don't handle
                    language_auto
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: xdje42 at gmail dot com

While single-stepping through "info vtbl e" in gdb.cp/virtfunc I noticed that
symbol_natural_name was being called on a minsym, and the language of the
minsym was set to language_auto. However, symbol_natural_name (and related)
don't handle language_auto.

const char *
symbol_natural_name (const struct general_symbol_info *gsymbol)
{
  switch (gsymbol->language)
    {
    case language_cplus:
    case language_d:
    case language_go:
    case language_java:
    case language_objc:
    case language_fortran:
      if (symbol_get_demangled_name (gsymbol) != NULL)
        return symbol_get_demangled_name (gsymbol);
      break;
    case language_ada:
      return ada_decode_symbol (gsymbol);
    default:
      break;
    }
  return gsymbol->name;
}

I'm not sure where the problem is (should minsyms never be assigned
language_auto?) but something is not right somewhere.

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