Commit 9161aa96 by Richard Stallman

(dbxout_type_methods): Fix minimal_debug so that it skips a redundant class name…

(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
parent c7ef4a16
...@@ -676,6 +676,7 @@ dbxout_type_methods (type) ...@@ -676,6 +676,7 @@ dbxout_type_methods (type)
tree type_encoding; tree type_encoding;
register tree fndecl; register tree fndecl;
register tree last; register tree last;
char formatted_type_identifier_length[16];
register int type_identifier_length; register int type_identifier_length;
if (methods == NULL_TREE) if (methods == NULL_TREE)
...@@ -704,6 +705,8 @@ dbxout_type_methods (type) ...@@ -704,6 +705,8 @@ dbxout_type_methods (type)
type_identifier_length = IDENTIFIER_LENGTH (type_encoding); type_identifier_length = IDENTIFIER_LENGTH (type_encoding);
sprintf(formatted_type_identifier_length, "%d", type_identifier_length);
if (TREE_CODE (methods) == FUNCTION_DECL) if (TREE_CODE (methods) == FUNCTION_DECL)
fndecl = methods; fndecl = methods;
else if (TREE_VEC_ELT (methods, 0) != NULL_TREE) else if (TREE_VEC_ELT (methods, 0) != NULL_TREE)
...@@ -748,9 +751,13 @@ dbxout_type_methods (type) ...@@ -748,9 +751,13 @@ dbxout_type_methods (type)
if (debug_name[0] == '_' && debug_name[1] == '_') if (debug_name[0] == '_' && debug_name[1] == '_')
{ {
char *method_name = debug_name + 2; char *method_name = debug_name + 2;
char *length_ptr = formatted_type_identifier_length;
/* Get past const and volatile qualifiers. */ /* Get past const and volatile qualifiers. */
while (*method_name == 'C' || *method_name == 'V') while (*method_name == 'C' || *method_name == 'V')
method_name++; method_name++;
/* Skip digits for length of type_encoding. */
while (*method_name == *length_ptr && *length_ptr)
length_ptr++, method_name++;
if (! strncmp (method_name, if (! strncmp (method_name,
IDENTIFIER_POINTER (type_encoding), IDENTIFIER_POINTER (type_encoding),
type_identifier_length)) type_identifier_length))
...@@ -762,8 +769,12 @@ dbxout_type_methods (type) ...@@ -762,8 +769,12 @@ dbxout_type_methods (type)
else if (debug_name[0] == '_' && debug_name[1] == '_') else if (debug_name[0] == '_' && debug_name[1] == '_')
{ {
char *ctor_name = debug_name + 2; char *ctor_name = debug_name + 2;
char *length_ptr = formatted_type_identifier_length;
while (*ctor_name == 'C' || *ctor_name == 'V') while (*ctor_name == 'C' || *ctor_name == 'V')
ctor_name++; 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, if (!strncmp (IDENTIFIER_POINTER (type_encoding), ctor_name,
type_identifier_length)) type_identifier_length))
debug_name = ctor_name + type_identifier_length; debug_name = ctor_name + type_identifier_length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment