* top.c (execute_command): Force cleanup of alloca areas.
authorJeff Law <law@redhat.com>
Fri, 25 Jul 1997 22:47:17 +0000 (22:47 +0000)
committerJeff Law <law@redhat.com>
Fri, 25 Jul 1997 22:47:17 +0000 (22:47 +0000)
        * findvar.c (registers_changed): Likewise.
Fixes memory "leak" reported by HP.  Call from execute_command is for general
alloca cleanup; call from registers_changed is to fix hp's specific problem.

gdb/ChangeLog
gdb/top.c

index aae5799bee3e8ec3131088cc0d558a1a846089ce..9029da9f9ad92d292b78b4e53400e8b8d5dfdd85 100644 (file)
@@ -1,8 +1,15 @@
+Fri Jul 25 16:48:18 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * top.c (execute_command): Force cleanup of alloca areas.
+       * findvar.c (registers_changed): Likewise.
+
+start-sanitize-v850
 Fri Jul 25 15:37:15 1997  Stu Grossman  <grossman@cygnus.com>
 
        * v850ice.c:  Include <windows.h>.  Support new v850 DLL interface.
        * Add defs for target status.
-       
+
+end-sanitize-v850
 start-sanitize-gdbtk
 Tue Jul 22 19:45:37 1997  Martin M. Hunt  <hunt@cygnus.com>
 
index 92e9e99233082518594fd3a65cd7e2307e81e975..dfa8f3d2c41ef06087b56f1f043d9a941c1fab9c 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1209,6 +1209,10 @@ execute_command (p, from_tty)
 
   free_all_values ();
 
+  /* Force cleanup of any alloca areas if using C alloca instead of
+     a builtin alloca.  */
+  alloca (0);
+
   /* This can happen when command_line_input hits end of file.  */
   if (p == NULL)
       return;