1 Jun 2012 06:41
[PATCH/obvious] Little optimization on symbol_demangled_name
Sergio Durigan Junior <sergiodj <at> redhat.com>
2012-06-01 04:41:49 GMT
2012-06-01 04:41:49 GMT
Hi,
While working on something else, I noticed this little spot for
optimization. Regtested on Fedora 16 x86_64, no regressions. I believe
it's pretty obvious, but decided to check. OK?
--
Sergio
2012-06-01 Sergio Durigan Junior <sergiodj <at> redhat.com>
* symtab.c (symbol_demangled_name): New variable `dem_name'. Use
it to optimize resolution of demangled name.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 85ddd1d..6313372 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
<at> <at> -850,6 +850,8 <at> <at> symbol_natural_name (const struct general_symbol_info *gsymbol)
const char *
symbol_demangled_name (const struct general_symbol_info *gsymbol)
{
+ const char *dem_name = NULL;
+
switch (gsymbol->language)
{
case language_cplus:
<at> <at> -858,19 +860,19 <at> <at> symbol_demangled_name (const struct general_symbol_info *gsymbol)
case language_java:
case language_objc:
(Continue reading)
RSS Feed