From 1c92ca6f3b4681e5d8a782875a92c2ce54f89cef Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Mon, 15 Jun 1992 14:26:57 +0000 Subject: * dwarfread.c (decode_modified_type): Change type of first arg. Change 'modifier' to char from unsigned char. Cast single use that needs to be unsigned char. * symtab.h (SYMBOL_BASEREG_VALID): Explain disabling. * utils.c (strdup_demangled): Add function. * defs.h (strdup_demangled): Add prototype. * stack.c (return_command): Demangle C++ function names for query. * infcmd.c (jump_command): Demangle C++ function names for query. * cplus-dem.c (consume_count): New function and prototype. * cplus-dem.c (demangle_class, gnu_special, demangle_func_type, do_type): Replace conversion code with consume_count(). * cplus-dem.c (gnu_special): Fix demangled of static members. * source.c (list_command): Print demangled function names when appropriate. Fix supplied by Peter Schauer. --- gdb/dwarfread.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gdb/dwarfread.c') diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index 8a9cebd..32a9846 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -380,7 +380,7 @@ static struct type * decode_mod_u_d_type PARAMS ((char *)); static struct type * -decode_modified_type PARAMS ((unsigned char *, unsigned int, int)); +decode_modified_type PARAMS ((char *, unsigned int, int)); static struct type * decode_fund_type PARAMS ((unsigned int)); @@ -2711,7 +2711,7 @@ LOCAL FUNCTION SYNOPSIS - static struct type *decode_modified_type (unsigned char *modifiers, + static struct type *decode_modified_type (char *modifiers, unsigned short modcount, int mtype) DESCRIPTION @@ -2745,14 +2745,14 @@ BUGS static struct type * decode_modified_type (modifiers, modcount, mtype) - unsigned char *modifiers; + char *modifiers; unsigned int modcount; int mtype; { struct type *typep = NULL; unsigned short fundtype; DIE_REF die_ref; - unsigned char modifier; + char modifier; int nbytes; if (modcount == 0) @@ -2799,9 +2799,11 @@ decode_modified_type (modifiers, modcount, mtype) SQUAWK (("type modifier 'volatile' ignored")); /* FIXME */ break; default: - if (!(MOD_lo_user <= modifier && modifier <= MOD_hi_user)) + if (!(MOD_lo_user <= (unsigned char) modifier + && (unsigned char) modifier <= MOD_hi_user)) { - SQUAWK (("unknown type modifier %u", modifier)); + SQUAWK (("unknown type modifier %u", + (unsigned char) modifier)); } break; } -- cgit v1.1