aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-07-10 08:50:35 +0000
committerRichard Stallman <rms@gnu.org>1992-07-10 08:50:35 +0000
commit9161aa964a6e5f61dd55e00f25b81593def16b2a (patch)
tree6bbb687c634323371f18089ca0d1770f2b9ed25f /gcc
parentc7ef4a16bb41005abe37f3cd9851d64fb9701270 (diff)
downloadgcc-9161aa964a6e5f61dd55e00f25b81593def16b2a.zip
gcc-9161aa964a6e5f61dd55e00f25b81593def16b2a.tar.gz
gcc-9161aa964a6e5f61dd55e00f25b81593def16b2a.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/dbxout.c11
1 files changed, 11 insertions, 0 deletions
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;