Commit 8d686df2 by Ian Lance Taylor Committed by Ian Lance Taylor

cp-demangle.c (d_demangle): If DMGL_PARAMS is not set, don't expect that we've…

cp-demangle.c (d_demangle): If DMGL_PARAMS is not set, don't expect that we've read the entire string.

	* cp-demangle.c (d_demangle): If DMGL_PARAMS is not set, don't
	expect that we've read the entire string.
	(is_ctor_or_dtor): Don't expect that we've read the entire
	string--reverse patch of 2003-11-29.

From-SVN: r74651
parent b95cc51a
2003-12-15 Ian Lance Taylor <ian@wasabisystems.com>
* cp-demangle.c (d_demangle): If DMGL_PARAMS is not set, don't
expect that we've read the entire string.
(is_ctor_or_dtor): Don't expect that we've read the entire
string--reverse patch of 2003-11-29.
2003-12-15 Brendan Kehoe <brendan@zen.org> 2003-12-15 Brendan Kehoe <brendan@zen.org>
* libiberty/Makefile.in (floatformat.o): Add dependency on * libiberty/Makefile.in (floatformat.o): Add dependency on
......
...@@ -3622,9 +3622,11 @@ d_demangle (mangled, options, palc) ...@@ -3622,9 +3622,11 @@ d_demangle (mangled, options, palc)
else else
dc = d_type (&di); dc = d_type (&di);
/* If we didn't consume the entire mangled string, then we didn't /* If DMGL_PARAMS is set, then if we didn't consume the entire
successfully demangle it. */ mangled string, then we didn't successfully demangle it. If
if (d_peek_char (&di) != '\0') DMGL_PARAMS is not set, we didn't look at the trailing
parameters. */
if (((options & DMGL_PARAMS) != 0) && d_peek_char (&di) != '\0')
dc = NULL; dc = NULL;
#ifdef CP_DEMANGLE_DEBUG #ifdef CP_DEMANGLE_DEBUG
...@@ -3829,9 +3831,10 @@ is_ctor_or_dtor (mangled, ctor_kind, dtor_kind) ...@@ -3829,9 +3831,10 @@ is_ctor_or_dtor (mangled, ctor_kind, dtor_kind)
dc = d_mangled_name (&di, 1); dc = d_mangled_name (&di, 1);
/* Note that because we did not pass DMGL_PARAMS, we don't expect to
demangle the entire string. */
ret = 0; ret = 0;
if (d_peek_char (&di) == '\0')
{
while (dc != NULL) while (dc != NULL)
{ {
switch (dc->type) switch (dc->type)
...@@ -3861,7 +3864,6 @@ is_ctor_or_dtor (mangled, ctor_kind, dtor_kind) ...@@ -3861,7 +3864,6 @@ is_ctor_or_dtor (mangled, ctor_kind, dtor_kind)
break; break;
} }
} }
}
free (di.subs); free (di.subs);
free (di.comps); free (di.comps);
......
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