Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: Re: RFC: Warn at quit that we will kill the program
Date: Fri, 21 Mar 2008 14:40:00 -0000	[thread overview]
Message-ID: <20080321143946.GA25307@caradoc.them.org> (raw)
In-Reply-To: <20080220153700.GA13158@caradoc.them.org>

On Wed, Feb 20, 2008 at 10:37:00AM -0500, Daniel Jacobowitz wrote:
> Sandra noticed that GDB's exit message does not say we're about to
> kill the running program.  In native debugging this is somewhat
> apparent (though not completely), but not in remote debugging.
> 
> What do you think of this patch?
>
> (Not tested yet; I see that the message appears in the testsuite, so
> it will require a testsuite update.)

Testsuite updated, tested x86_64-linux, checked in.

-- 
Daniel Jacobowitz
CodeSourcery

2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>

	* top.c (quit_confirm): Warn that we will kill the program.

2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.threads/killed.exp, gdb.threads/manythreads.exp,
	gdb.threads/staticthreads.exp: Update exit query.

Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.134
diff -u -p -r1.134 top.c
--- top.c	17 Mar 2008 14:06:11 -0000	1.134
+++ top.c	21 Mar 2008 14:32:14 -0000
@@ -1253,7 +1253,7 @@ quit_confirm (void)
       else if (attach_flag)
 	s = "The program is running.  Quit anyway (and detach it)? ";
       else
-	s = "The program is running.  Exit anyway? ";
+	s = "The program is running.  Quit anyway (and kill it)? ";
 
       if (!query ("%s", s))
 	return 0;
Index: testsuite/gdb.threads/killed.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/killed.exp,v
retrieving revision 1.10
diff -u -p -r1.10 killed.exp
--- testsuite/gdb.threads/killed.exp	1 Jan 2008 22:53:22 -0000	1.10
+++ testsuite/gdb.threads/killed.exp	21 Mar 2008 14:32:14 -0000
@@ -87,7 +87,7 @@ gdb_expect {
 # Try to quit.
 send_gdb "quit\n"
 gdb_expect {
-    -re "The program is running.  Exit anyway\\? \\(y or n\\) $" {
+    -re "The program is running.  Quit anyway \\(and kill it\\)\\? \\(y or n\\) $" {
         send_gdb "y\n"
         exp_continue
     }
Index: testsuite/gdb.threads/manythreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.exp,v
retrieving revision 1.8
diff -u -p -r1.8 manythreads.exp
--- testsuite/gdb.threads/manythreads.exp	1 Jan 2008 22:53:22 -0000	1.8
+++ testsuite/gdb.threads/manythreads.exp	21 Mar 2008 14:32:14 -0000
@@ -133,7 +133,7 @@ gdb_test_multiple "" "stop threads 2" {
 } 
 
 gdb_test_multiple "quit" "GDB exits after stopping multithreaded program" {
-    -re "The program is running.  Exit anyway\\? \\(y or n\\) $" {
+    -re "The program is running.  Quit anyway \\(and kill it\\)\\? \\(y or n\\) $" {
 	send_gdb "y\n"
 	exp_continue
     }
Index: testsuite/gdb.threads/staticthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/staticthreads.exp,v
retrieving revision 1.6
diff -u -p -r1.6 staticthreads.exp
--- testsuite/gdb.threads/staticthreads.exp	1 Jan 2008 22:53:22 -0000	1.6
+++ testsuite/gdb.threads/staticthreads.exp	21 Mar 2008 14:32:14 -0000
@@ -91,7 +91,7 @@ gdb_test_multiple "info threads" "$test"
 
 set test "GDB exits with static thread program"
 gdb_test_multiple "quit" "$test" {
-    -re "The program is running.  Exit anyway\\? \\(y or n\\) $" {
+    -re "The program is running.  Quit anyway \\(and kill it\\)\\? \\(y or n\\) $" {
 	send_gdb "y\n"
 	exp_continue
     }


      parent reply	other threads:[~2008-03-21 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 15:37 Daniel Jacobowitz
2008-02-20 17:18 ` Joel Brobecker
2008-02-20 20:19 ` Michael Snyder
2008-02-21  1:50   ` Daniel Jacobowitz
2008-02-21 22:11     ` Michael Snyder
2008-03-21 14:40 ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080321143946.GA25307@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox