From 9161aa964a6e5f61dd55e00f25b81593def16b2a Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Fri, 10 Jul 1992 08:50:35 +0000 Subject: [PATCH] (dbxout_type_methods): Fix minimal_debug so that it skips a redundant class name prefix, as intended. (dbxout_type_methods): Fix minimal_debug so that it skips a redundant class name prefix, as intended. It now expects the length digits that precede the class name. From-SVN: r1552 --- gcc/dbxout.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 3f8eb65..650ec62 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -676,6 +676,7 @@ dbxout_type_methods (type) tree type_encoding; register tree fndecl; register tree last; + char formatted_type_identifier_length[16]; register int type_identifier_length; if (methods == NULL_TREE) @@ -704,6 +705,8 @@ dbxout_type_methods (type) type_identifier_length = IDENTIFIER_LENGTH (type_encoding); + sprintf(formatted_type_identifier_length, "%d", type_identifier_length); + if (TREE_CODE (methods) == FUNCTION_DECL) fndecl = methods; else if (TREE_VEC_ELT (methods, 0) != NULL_TREE) @@ -748,9 +751,13 @@ dbxout_type_methods (type) if (debug_name[0] == '_' && debug_name[1] == '_') { char *method_name = debug_name + 2; + char *length_ptr = formatted_type_identifier_length; /* Get past const and volatile qualifiers. */ while (*method_name == 'C' || *method_name == 'V') method_name++; + /* Skip digits for length of type_encoding. */ + while (*method_name == *length_ptr && *length_ptr) + length_ptr++, method_name++; if (! strncmp (method_name, IDENTIFIER_POINTER (type_encoding), type_identifier_length)) @@ -762,8 +769,12 @@ dbxout_type_methods (type) else if (debug_name[0] == '_' && debug_name[1] == '_') { char *ctor_name = debug_name + 2; + char *length_ptr = formatted_type_identifier_length; while (*ctor_name == 'C' || *ctor_name == 'V') ctor_name++; + /* Skip digits for length of type_encoding. */ + while (*ctor_name == *length_ptr && *length_ptr) + length_ptr++, ctor_name++; if (!strncmp (IDENTIFIER_POINTER (type_encoding), ctor_name, type_identifier_length)) debug_name = ctor_name + type_identifier_length; -- 2.7.4