Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFC: Warn at quit that we will kill the program
@ 2008-02-20 15:37 Daniel Jacobowitz
  2008-02-20 17:18 ` Joel Brobecker
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2008-02-20 15:37 UTC (permalink / raw)
  To: gdb-patches

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.)

-- 
Daniel Jacobowitz
CodeSourcery

2008-02-20  Daniel Jacobowitz  <dan@codesourcery.com>

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

Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.129
diff -u -p -r1.129 top.c
--- top.c	1 Jan 2008 22:53:13 -0000	1.129
+++ top.c	20 Feb 2008 15:32:26 -0000
@@ -1212,7 +1212,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;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Warn at quit that we will kill the program
  2008-02-20 15:37 RFC: Warn at quit that we will kill the program Daniel Jacobowitz
@ 2008-02-20 17:18 ` Joel Brobecker
  2008-02-20 20:19 ` Michael Snyder
  2008-03-21 14:40 ` Daniel Jacobowitz
  2 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2008-02-20 17:18 UTC (permalink / raw)
  To: gdb-patches

> 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?

No problem on my end. I like the fact that we're more precise with
little effort, and that the message is now consistent with the case
when we attached to the process rather than starting it.

-- 
Joel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Warn at quit that we will kill the program
  2008-02-20 15:37 RFC: Warn at quit that we will kill the program Daniel Jacobowitz
  2008-02-20 17:18 ` Joel Brobecker
@ 2008-02-20 20:19 ` Michael Snyder
  2008-02-21  1:50   ` Daniel Jacobowitz
  2008-03-21 14:40 ` Daniel Jacobowitz
  2 siblings, 1 reply; 6+ messages in thread
From: Michael Snyder @ 2008-02-20 20:19 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

On Wed, 2008-02-20 at 10:37 -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.)

Actually, the new text of the message sounds familiar.
Did you cut and paste it from somewhere?  

This certainly seems like a "right thing to do"
type of thing.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Warn at quit that we will kill the program
  2008-02-20 20:19 ` Michael Snyder
@ 2008-02-21  1:50   ` Daniel Jacobowitz
  2008-02-21 22:11     ` Michael Snyder
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2008-02-21  1:50 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

On Wed, Feb 20, 2008 at 12:19:02PM -0800, Michael Snyder wrote:
> Actually, the new text of the message sounds familiar.
> Did you cut and paste it from somewhere?  

Nope.  I based it on the (and detach it) message, though.

One other advantage of the patch: the old version said "Exit now"
which has always bugged me since the GDB command is "quit" :-)

Undefined command: "exit".  Try "help".

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Warn at quit that we will kill the program
  2008-02-21  1:50   ` Daniel Jacobowitz
@ 2008-02-21 22:11     ` Michael Snyder
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Snyder @ 2008-02-21 22:11 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

On Wed, 2008-02-20 at 20:49 -0500, Daniel Jacobowitz wrote:
> On Wed, Feb 20, 2008 at 12:19:02PM -0800, Michael Snyder wrote:
> > Actually, the new text of the message sounds familiar.
> > Did you cut and paste it from somewhere?  
> 
> Nope.  I based it on the (and detach it) message, though.

That's why it was familiar, I guess.

> 
> One other advantage of the patch: the old version said "Exit now"
> which has always bugged me since the GDB command is "quit" :-)

I'm for it then.

> Undefined command: "exit".  Try "help".

Aside -- maybe we should define exit as an alias for quit?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Warn at quit that we will kill the program
  2008-02-20 15:37 RFC: Warn at quit that we will kill the program Daniel Jacobowitz
  2008-02-20 17:18 ` Joel Brobecker
  2008-02-20 20:19 ` Michael Snyder
@ 2008-03-21 14:40 ` Daniel Jacobowitz
  2 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2008-03-21 14:40 UTC (permalink / raw)
  To: gdb-patches

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
     }


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-21 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-20 15:37 RFC: Warn at quit that we will kill the program 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox