This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python and target-async


On Tue, 30 Aug 2011 15:13:38 +0200, Pedro Alves wrote:
> --- src.orig/gdb/inf-loop.c	2011-08-30 11:29:09.000000000 +0100
> +++ src/gdb/inf-loop.c	2011-08-30 13:46:43.375339554 +0100
[...]
> @@ -109,17 +110,22 @@ inferior_event_handler (enum inferior_ev
>        else
>  	do_all_continuations (0);
>  
> -      if (info_verbose
> -	  && current_language != expected_language
> -	  && language_mode == language_mode_auto)
> -	language_info (1);	/* Print what changed.  */
> -
> -      /* Don't propagate breakpoint commands errors.  Either we're
> -	 stopping or some command resumes the inferior.  The user will
> -	 be informed.  */
> -      TRY_CATCH (e, RETURN_MASK_ALL)
> +      /* When running a command list (from a user command, say), these
> +	 are only run when the command list is all done.  */
> +      if (interpreter_async)
>  	{
> -	  bpstat_do_actions ();
> +	  if (info_verbose
> +	      && current_language != expected_language
> +	      && language_mode == language_mode_auto)
> +	    language_info (1);	/* Print what changed.  */
> +
> +	  /* Don't propagate breakpoint commands errors.  Either we're
> +	     stopping or some command resumes the inferior.  The user will
> +	     be informed.  */
> +	  TRY_CATCH (e, RETURN_MASK_ALL)
> +	    {
> +	      bpstat_do_actions ();
> +	    }
>  	}
>        exception_print (gdb_stderr, e);
>  

It works great except for this mis-merged part of the recent change by me.


Thanks,
Jan


--- a/gdb/inf-loop.c
+++ b/gdb/inf-loop.c
@@ -126,8 +126,8 @@ inferior_event_handler (enum inferior_event_type event_type,
 	    {
 	      bpstat_do_actions ();
 	    }
+	  exception_print (gdb_stderr, e);
 	}
-      exception_print (gdb_stderr, e);
 
       if (!was_sync
 	  && exec_done_display_p


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]