This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] testsuite/gdb.base/bang.exp: Allow trailing text after "Program exited normally"
On Mon, Sep 08, 2003 at 10:52:13AM -0400, Daniel Jacobowitz wrote:
> I was thinking of this patch.
Looks good. Do you check this in?
Corinna
> 2003-09-08 Daniel Jacobowitz <drow@mvista.com>
>
> * infrun.c (normal_stop): Don't print a message if the inferior
> has exited.
>
> Index: infrun.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infrun.c,v
> retrieving revision 1.111
> diff -u -p -r1.111 infrun.c
> --- infrun.c 7 Sep 2003 15:15:01 -0000 1.111
> +++ infrun.c 8 Sep 2003 14:50:59 -0000
> @@ -3054,14 +3054,21 @@ print_stop_reason (enum inferior_stop_re
> void
> normal_stop (void)
> {
> + struct target_waitstatus last;
> + ptid_t last_ptid;
> +
> + get_last_target_status (&last_ptid, &last);
> +
> /* As with the notification of thread events, we want to delay
> notifying the user that we've switched thread context until
> the inferior actually stops.
>
> (Note that there's no point in saying anything if the inferior
> - has exited!) */
> + has exited!) */
> if (!ptid_equal (previous_inferior_ptid, inferior_ptid)
> - && target_has_execution)
> + && target_has_execution
> + && last.kind != TARGET_WAITKIND_SIGNALLED
> + && last.kind != TARGET_WAITKIND_EXITED)
> {
> target_terminal_ours_for_output ();
> printf_filtered ("[Switching to %s]\n",
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.