This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/17789] New: SYMBOL_DEMANGLED_NAME can return NULL
- From: "xdje42 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 04 Jan 2015 23:44:00 +0000
- Subject: [Bug symtab/17789] New: SYMBOL_DEMANGLED_NAME can return NULL
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17789
Bug ID: 17789
Summary: SYMBOL_DEMANGLED_NAME can return NULL
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 working on cleaning up some of gdb's mangled/demangled name handling I
noticed this:
symtab.h:
/* Return the demangled name for a symbol based on the language for
that symbol. If no demangled name exists, return NULL. */
#define SYMBOL_DEMANGLED_NAME(symbol) \
(symbol_demangled_name (&(symbol)->ginfo))
extern const char *symbol_demangled_name
(const struct general_symbol_info *symbol);
valops.c:
fprintf_filtered (gdb_stderr,
"Overloaded function instance "
"%s # of parms %d\n",
SYMBOL_DEMANGLED_NAME (oload_syms[ix]),
nparms);
[there's no check for NULL]
Perhaps it "can't happen", but it's not easy enough to tell.
Filing this so I don't forget about it.
--
You are receiving this mail because:
You are on the CC list for the bug.