Use memmove to copy overlap memory.
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index e2235db2de0ff7babf170e35b2eee61f6444fb3c..db2232d4668e6a22de4e8400f7cf283e940b2bca 100644 (file)
@@ -155,7 +155,7 @@ int breakpoint_proceeded;
 
 /* Nonzero if stopped due to completion of a stack dummy routine.  */
 
-int stop_stack_dummy;
+enum stop_stack_kind stop_stack_dummy;
 
 /* Nonzero if stopped due to a random (unexpected) signal in inferior
    process.  */
@@ -1439,7 +1439,19 @@ finish_command_continuation (void *arg)
                        _("finish_command: function has no target type"));
 
       if (TYPE_CODE (value_type) != TYPE_CODE_VOID)
-       print_return_value (SYMBOL_TYPE (a->function), value_type);
+       {
+         volatile struct gdb_exception ex;
+
+         TRY_CATCH (ex, RETURN_MASK_ALL)
+           {
+             /* print_return_value can throw an exception in some
+                circumstances.  We need to catch this so that we still
+                delete the breakpoint.  */
+             print_return_value (SYMBOL_TYPE (a->function), value_type);
+           }
+         if (ex.reason < 0)
+           exception_print (gdb_stdout, ex);
+       }
     }
 
   /* We suppress normal call of normal_stop observer and do it here so
This page took 0.024162 seconds and 4 git commands to generate.