public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/17789] New: SYMBOL_DEMANGLED_NAME can return NULL
@ 2015-01-04 23:44 xdje42 at gmail dot com
2015-01-04 23:46 ` [Bug symtab/17789] " xdje42 at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: xdje42 at gmail dot com @ 2015-01-04 23:44 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug symtab/17789] SYMBOL_DEMANGLED_NAME can return NULL
2015-01-04 23:44 [Bug symtab/17789] New: SYMBOL_DEMANGLED_NAME can return NULL xdje42 at gmail dot com
@ 2015-01-04 23:46 ` xdje42 at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: xdje42 at gmail dot com @ 2015-01-04 23:46 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17789
--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
Another question that arises is: Why don't we use SYMBOL_PRINT_NAME or
SYMBOL_NATURAL_NAME here instead?
[And maybe elsewhere? Is an audit in order?]
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-04 23:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-04 23:44 [Bug symtab/17789] New: SYMBOL_DEMANGLED_NAME can return NULL xdje42 at gmail dot com
2015-01-04 23:46 ` [Bug symtab/17789] " xdje42 at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).