From 615b3f6299d95db8507b2a68dda2704d08bcd1d0 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Fri, 18 Sep 2015 22:30:22 -0700 Subject: [PATCH] symtab.h (general_symbol_info) : delete and move up only member. gdb/ChangeLog: * symtab.h (general_symbol_info) : Delete struct, move only member demangled_name up. All uses updated. --- gdb/ChangeLog | 5 +++++ gdb/ada-lang.c | 2 +- gdb/symtab.c | 6 +++--- gdb/symtab.h | 6 +----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d0d35b0581b..027a10f7565 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-09-18 Doug Evans + + * symtab.h (general_symbol_info) : Delete struct, + move only member demangled_name up. All uses updated. + 2015-09-18 Doug Evans * findvar.c (default_read_var_value) : Include the diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 49f3d9a1326..6ec2e9dfdb6 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -1414,7 +1414,7 @@ ada_decode_symbol (const struct general_symbol_info *arg) { struct general_symbol_info *gsymbol = (struct general_symbol_info *) arg; const char **resultp = - &gsymbol->language_specific.mangled_lang.demangled_name; + &gsymbol->language_specific.demangled_name; if (!gsymbol->ada_mangled) { diff --git a/gdb/symtab.c b/gdb/symtab.c index f65e809cb28..90204cd1953 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -596,11 +596,11 @@ symbol_set_demangled_name (struct general_symbol_info *gsymbol, else { gsymbol->ada_mangled = 1; - gsymbol->language_specific.mangled_lang.demangled_name = name; + gsymbol->language_specific.demangled_name = name; } } else - gsymbol->language_specific.mangled_lang.demangled_name = name; + gsymbol->language_specific.demangled_name = name; } /* Return the demangled name of GSYMBOL. */ @@ -615,7 +615,7 @@ symbol_get_demangled_name (const struct general_symbol_info *gsymbol) /* Fall through. */ } - return gsymbol->language_specific.mangled_lang.demangled_name; + return gsymbol->language_specific.demangled_name; } diff --git a/gdb/symtab.h b/gdb/symtab.h index e6fc174abfe..d3f6370666b 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -137,11 +137,7 @@ struct general_symbol_info /* This is used by languages which wish to store a demangled name. currently used by Ada, C++, Java, and Objective C. */ - struct mangled_lang - { - const char *demangled_name; - } - mangled_lang; + const char *demangled_name; } language_specific; -- 2.30.2