patch for gdb 4.18
Robert Zimmermann
raz@cynapps.com
Tue Apr 4 14:58:00 GMT 2000
description:
when demanging gnu internal types, the function mop_up()ÃÂ is
called.ÃÂ when that happens, the typevec is cleared with forget_types().ÃÂ
Following that,
the vector itself is freed.ÃÂ Unfortunately, the vector size is
not reset.
changelog:
ÃÂ must reset typevec_size whenever typevec is free'd and
NULL'd
patch:
diff -up OLD/cplus-dem.c NEW/cplus-dem.c
--- OLD/cplus-dem.cÃÂ ÃÂ ÃÂ ÃÂ Tue AprÃÂ 4 15:10:22
2000
+++ NEW/cplus-dem.cÃÂ ÃÂ ÃÂ ÃÂ Tue AprÃÂ 4 15:09:57
2000
@@ -880,6 +880,7 @@ mop_up (work, declp, success)
ÃÂ ÃÂ ÃÂ ÃÂ {
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ free ((char *) work -> typevec);
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ work -> typevec = NULL;
+ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ work -> typevec_size = 0;ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
// raz
ÃÂ ÃÂ ÃÂ ÃÂ }
ÃÂ ÃÂ if (work->tmpl_argvec)
ÃÂ ÃÂ ÃÂ ÃÂ {
@@ -891,6 +892,7 @@ mop_up (work, declp, success)
ÃÂ
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ free ((char*) work->tmpl_argvec);
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ work->tmpl_argvec = NULL;
+ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ work->ntmpl_args = 0;ÃÂ ÃÂ ÃÂ
// raz
ÃÂ ÃÂ ÃÂ ÃÂ }
ÃÂ ÃÂ if (work->previous_argument)
ÃÂ ÃÂ ÃÂ ÃÂ {
ÃÂ
--ÃÂ
===============================================================================
Robert A Zimmermann
Member Technical Staff
412-321-4348
raz@cynapps.com
CynApps Inc., Suite 302, Cardello Bldg., 1501 Reedsdale St., Pittsburgh, PA 15233
ÃÂ
diff -up OLD/cplus-dem.c NEW/cplus-dem.c
--- OLD/cplus-dem.c Tue Apr 4 15:10:22 2000
+++ NEW/cplus-dem.c Tue Apr 4 15:09:57 2000
@@ -880,6 +880,7 @@ mop_up (work, declp, success)
{
free ((char *) work -> typevec);
work -> typevec = NULL;
+ work -> typevec_size = 0; // raz
}
if (work->tmpl_argvec)
{
@@ -891,6 +892,7 @@ mop_up (work, declp, success)
free ((char*) work->tmpl_argvec);
work->tmpl_argvec = NULL;
+ work->ntmpl_args = 0; // raz
}
if (work->previous_argument)
{
More information about the Gdb-patches
mailing list