This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
patch for gdb 4.18
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: patch for gdb 4.18
- From: Robert Zimmermann <raz at cynapps dot com>
- Date: Tue, 04 Apr 2000 15:11:57 -0400
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)
{