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