Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [reverse RFA] Remove process record warning code
@ 2008-10-17  7:57 teawater
  2008-10-17 10:58 ` Eli Zaretskii
  2008-10-17 17:28 ` Michael Snyder
  0 siblings, 2 replies; 7+ messages in thread
From: teawater @ 2008-10-17  7:57 UTC (permalink / raw)
  To: Michael Snyder, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 145 bytes --]

Hi Michael,

2008-10-17  Hui Zhu  <teawater@gmail.com>

	* infcmd.c (kill_if_already_running): Remove process record
	warning code.

Thanks,
Hui

[-- Attachment #2: remove_infcmd_record_warning.txt --]
[-- Type: text/plain, Size: 1097 bytes --]

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-17  Hui Zhu  <teawater@gmail.com>
+
+	* infcmd.c (kill_if_already_running): Remove process record
+	warning code.
+
 2008-10-15  Hui Zhu  <teawater@gmail.com>
 
 	Change "record-auto-delete" to "record-stop-at-limit".
--- a/infcmd.c
+++ b/infcmd.c
@@ -51,7 +51,6 @@
 #include "exceptions.h"
 #include "cli/cli-decode.h"
 #include "gdbthread.h"
-#include "record.h"
 
 /* Functions exported for general use, in inferior.h: */
 
@@ -427,12 +426,8 @@ kill_if_already_running (int from_tty)
 	 restart it.  */
       target_require_runnable ();
 
-      if (from_tty)
-	if (!query (RECORD_IS_USED ?
-		    "The program being debugged has been started already,\n\
-and is running in record/replay mode.  Do you want to abandon\n\
-the recording and start the program from the beginning? " :
-		    "The program being debugged has been started already.\n\
+      if (from_tty
+	  && !query ("The program being debugged has been started already.\n\
 Start it from the beginning? "))
 	  error (_("Program not restarted."));
       target_kill ();

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

* Re: [reverse RFA] Remove process record warning code
  2008-10-17  7:57 [reverse RFA] Remove process record warning code teawater
@ 2008-10-17 10:58 ` Eli Zaretskii
  2008-10-17 15:01   ` teawater
  2008-10-17 17:28 ` Michael Snyder
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2008-10-17 10:58 UTC (permalink / raw)
  To: teawater; +Cc: msnyder, gdb-patches

> Date: Fri, 17 Oct 2008 15:57:03 +0800
> From: teawater <teawater@gmail.com>
> 
> @@ -427,12 +426,8 @@ kill_if_already_running (int from_tty)
>  	 restart it.  */
>        target_require_runnable ();
>  
> -      if (from_tty)
> -	if (!query (RECORD_IS_USED ?
> -		    "The program being debugged has been started already,\n\
> -and is running in record/replay mode.  Do you want to abandon\n\
> -the recording and start the program from the beginning? " :
> -		    "The program being debugged has been started already.\n\
> +      if (from_tty
> +	  && !query ("The program being debugged has been started already.\n\
>  Start it from the beginning? "))
>  	  error (_("Program not restarted."));
>        target_kill ();

Should the string in the call to `query' be in _() ?  (Yes, I know you
just copied existing code, but why not fix it while at that?)


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

* Re: [reverse RFA] Remove process record warning code
  2008-10-17 10:58 ` Eli Zaretskii
@ 2008-10-17 15:01   ` teawater
  0 siblings, 0 replies; 7+ messages in thread
From: teawater @ 2008-10-17 15:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: msnyder, gdb-patches

It just for the reverse-20080930-branch. This remove just mean that we
don't need this code.

BTW There are a lot query don't have _(. Maybe you can make a patch for them.

On Fri, Oct 17, 2008 at 18:57, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Fri, 17 Oct 2008 15:57:03 +0800
>> From: teawater <teawater@gmail.com>
>>
>> @@ -427,12 +426,8 @@ kill_if_already_running (int from_tty)
>>        restart it.  */
>>        target_require_runnable ();
>>
>> -      if (from_tty)
>> -     if (!query (RECORD_IS_USED ?
>> -                 "The program being debugged has been started already,\n\
>> -and is running in record/replay mode.  Do you want to abandon\n\
>> -the recording and start the program from the beginning? " :
>> -                 "The program being debugged has been started already.\n\
>> +      if (from_tty
>> +       && !query ("The program being debugged has been started already.\n\
>>  Start it from the beginning? "))
>>         error (_("Program not restarted."));
>>        target_kill ();
>
> Should the string in the call to `query' be in _() ?  (Yes, I know you
> just copied existing code, but why not fix it while at that?)
>


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

* Re: [reverse RFA] Remove process record warning code
  2008-10-17  7:57 [reverse RFA] Remove process record warning code teawater
  2008-10-17 10:58 ` Eli Zaretskii
@ 2008-10-17 17:28 ` Michael Snyder
  2008-10-18  1:35   ` teawater
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2008-10-17 17:28 UTC (permalink / raw)
  To: teawater; +Cc: gdb-patches


You don't think you need this special warning?

teawater wrote:
> Hi Michael,
> 
> 2008-10-17  Hui Zhu  <teawater@gmail.com>
> 
>         * infcmd.c (kill_if_already_running): Remove process record
>         warning code.
> 
> Thanks,
> Hui
> 
> 
> ------------------------------------------------------------------------
> 
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2008-10-17  Hui Zhu  <teawater@gmail.com>
> +
> +	* infcmd.c (kill_if_already_running): Remove process record
> +	warning code.
> +
>  2008-10-15  Hui Zhu  <teawater@gmail.com>
>  
>  	Change "record-auto-delete" to "record-stop-at-limit".
> --- a/infcmd.c
> +++ b/infcmd.c
> @@ -51,7 +51,6 @@
>  #include "exceptions.h"
>  #include "cli/cli-decode.h"
>  #include "gdbthread.h"
> -#include "record.h"
>  
>  /* Functions exported for general use, in inferior.h: */
>  
> @@ -427,12 +426,8 @@ kill_if_already_running (int from_tty)
>  	 restart it.  */
>        target_require_runnable ();
>  
> -      if (from_tty)
> -	if (!query (RECORD_IS_USED ?
> -		    "The program being debugged has been started already,\n\
> -and is running in record/replay mode.  Do you want to abandon\n\
> -the recording and start the program from the beginning? " :
> -		    "The program being debugged has been started already.\n\
> +      if (from_tty
> +	  && !query ("The program being debugged has been started already.\n\
>  Start it from the beginning? "))
>  	  error (_("Program not restarted."));
>        target_kill ();


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

* Re: [reverse RFA] Remove process record warning code
  2008-10-17 17:28 ` Michael Snyder
@ 2008-10-18  1:35   ` teawater
  2008-10-18  1:58     ` Michael Snyder
  0 siblings, 1 reply; 7+ messages in thread
From: teawater @ 2008-10-18  1:35 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

I think user already know P record will stop when inferior exit. So...

How do you think about it?


On Sat, Oct 18, 2008 at 01:23, Michael Snyder <msnyder@vmware.com> wrote:
>
> You don't think you need this special warning?
>
> teawater wrote:
>>
>> Hi Michael,
>>
>> 2008-10-17  Hui Zhu  <teawater@gmail.com>
>>
>>        * infcmd.c (kill_if_already_running): Remove process record
>>        warning code.
>>
>> Thanks,
>> Hui
>>
>>
>> ------------------------------------------------------------------------
>>
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2008-10-17  Hui Zhu  <teawater@gmail.com>
>> +
>> +       * infcmd.c (kill_if_already_running): Remove process record
>> +       warning code.
>> +
>>  2008-10-15  Hui Zhu  <teawater@gmail.com>
>>          Change "record-auto-delete" to "record-stop-at-limit".
>> --- a/infcmd.c
>> +++ b/infcmd.c
>> @@ -51,7 +51,6 @@
>>  #include "exceptions.h"
>>  #include "cli/cli-decode.h"
>>  #include "gdbthread.h"
>> -#include "record.h"
>>   /* Functions exported for general use, in inferior.h: */
>>  @@ -427,12 +426,8 @@ kill_if_already_running (int from_tty)
>>         restart it.  */
>>       target_require_runnable ();
>>  -      if (from_tty)
>> -       if (!query (RECORD_IS_USED ?
>> -                   "The program being debugged has been started
>> already,\n\
>> -and is running in record/replay mode.  Do you want to abandon\n\
>> -the recording and start the program from the beginning? " :
>> -                   "The program being debugged has been started
>> already.\n\
>> +      if (from_tty
>> +         && !query ("The program being debugged has been started
>> already.\n\
>>  Start it from the beginning? "))
>>          error (_("Program not restarted."));
>>       target_kill ();
>
>


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

* Re: [reverse RFA] Remove process record warning code
  2008-10-18  1:35   ` teawater
@ 2008-10-18  1:58     ` Michael Snyder
  2008-10-18  2:20       ` teawater
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2008-10-18  1:58 UTC (permalink / raw)
  To: teawater; +Cc: gdb-patches

I'm worried that the naive user might think that he can
extend a recording session across several runs.

Might seem counter-intuitive, but I think the SID reverse
execution implementation will allow you to do that.  If you
run the inferior multiple times, you can actually "back up"
into a previous execution.

I know Process Record won't let you do that, I'm just
saying, a user's intuition is not necessarily the same
as yours or mine...

teawater wrote:
> I think user already know P record will stop when inferior exit. So...
> 
> How do you think about it?
> 
> 
> On Sat, Oct 18, 2008 at 01:23, Michael Snyder <msnyder@vmware.com> wrote:
>> You don't think you need this special warning?
>>
>> teawater wrote:
>>> Hi Michael,
>>>
>>> 2008-10-17  Hui Zhu  <teawater@gmail.com>
>>>
>>>        * infcmd.c (kill_if_already_running): Remove process record
>>>        warning code.
>>>
>>> Thanks,
>>> Hui
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> --- a/ChangeLog
>>> +++ b/ChangeLog
>>> @@ -1,3 +1,8 @@
>>> +2008-10-17  Hui Zhu  <teawater@gmail.com>
>>> +
>>> +       * infcmd.c (kill_if_already_running): Remove process record
>>> +       warning code.
>>> +
>>>  2008-10-15  Hui Zhu  <teawater@gmail.com>
>>>          Change "record-auto-delete" to "record-stop-at-limit".
>>> --- a/infcmd.c
>>> +++ b/infcmd.c
>>> @@ -51,7 +51,6 @@
>>>  #include "exceptions.h"
>>>  #include "cli/cli-decode.h"
>>>  #include "gdbthread.h"
>>> -#include "record.h"
>>>   /* Functions exported for general use, in inferior.h: */
>>>  @@ -427,12 +426,8 @@ kill_if_already_running (int from_tty)
>>>         restart it.  */
>>>       target_require_runnable ();
>>>  -      if (from_tty)
>>> -       if (!query (RECORD_IS_USED ?
>>> -                   "The program being debugged has been started
>>> already,\n\
>>> -and is running in record/replay mode.  Do you want to abandon\n\
>>> -the recording and start the program from the beginning? " :
>>> -                   "The program being debugged has been started
>>> already.\n\
>>> +      if (from_tty
>>> +         && !query ("The program being debugged has been started
>>> already.\n\
>>>  Start it from the beginning? "))
>>>          error (_("Program not restarted."));
>>>       target_kill ();
>>


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

* Re: [reverse RFA] Remove process record warning code
  2008-10-18  1:58     ` Michael Snyder
@ 2008-10-18  2:20       ` teawater
  0 siblings, 0 replies; 7+ messages in thread
From: teawater @ 2008-10-18  2:20 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

Add it in current time maybe make code not very clear.
Maybe I can add it back in the future.


On Sat, Oct 18, 2008 at 09:54, Michael Snyder <msnyder@vmware.com> wrote:
> I'm worried that the naive user might think that he can
> extend a recording session across several runs.
>
> Might seem counter-intuitive, but I think the SID reverse
> execution implementation will allow you to do that.  If you
> run the inferior multiple times, you can actually "back up"
> into a previous execution.
>
> I know Process Record won't let you do that, I'm just
> saying, a user's intuition is not necessarily the same
> as yours or mine...
>
> teawater wrote:
>>
>> I think user already know P record will stop when inferior exit. So...
>>
>> How do you think about it?
>>
>>
>> On Sat, Oct 18, 2008 at 01:23, Michael Snyder <msnyder@vmware.com> wrote:
>>>
>>> You don't think you need this special warning?
>>>
>>> teawater wrote:
>>>>
>>>> Hi Michael,
>>>>
>>>> 2008-10-17  Hui Zhu  <teawater@gmail.com>
>>>>
>>>>       * infcmd.c (kill_if_already_running): Remove process record
>>>>       warning code.
>>>>
>>>> Thanks,
>>>> Hui
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> --- a/ChangeLog
>>>> +++ b/ChangeLog
>>>> @@ -1,3 +1,8 @@
>>>> +2008-10-17  Hui Zhu  <teawater@gmail.com>
>>>> +
>>>> +       * infcmd.c (kill_if_already_running): Remove process record
>>>> +       warning code.
>>>> +
>>>>  2008-10-15  Hui Zhu  <teawater@gmail.com>
>>>>         Change "record-auto-delete" to "record-stop-at-limit".
>>>> --- a/infcmd.c
>>>> +++ b/infcmd.c
>>>> @@ -51,7 +51,6 @@
>>>>  #include "exceptions.h"
>>>>  #include "cli/cli-decode.h"
>>>>  #include "gdbthread.h"
>>>> -#include "record.h"
>>>>  /* Functions exported for general use, in inferior.h: */
>>>>  @@ -427,12 +426,8 @@ kill_if_already_running (int from_tty)
>>>>        restart it.  */
>>>>      target_require_runnable ();
>>>>  -      if (from_tty)
>>>> -       if (!query (RECORD_IS_USED ?
>>>> -                   "The program being debugged has been started
>>>> already,\n\
>>>> -and is running in record/replay mode.  Do you want to abandon\n\
>>>> -the recording and start the program from the beginning? " :
>>>> -                   "The program being debugged has been started
>>>> already.\n\
>>>> +      if (from_tty
>>>> +         && !query ("The program being debugged has been started
>>>> already.\n\
>>>>  Start it from the beginning? "))
>>>>         error (_("Program not restarted."));
>>>>      target_kill ();
>>>
>
>


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

end of thread, other threads:[~2008-10-18  2:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-17  7:57 [reverse RFA] Remove process record warning code teawater
2008-10-17 10:58 ` Eli Zaretskii
2008-10-17 15:01   ` teawater
2008-10-17 17:28 ` Michael Snyder
2008-10-18  1:35   ` teawater
2008-10-18  1:58     ` Michael Snyder
2008-10-18  2:20       ` teawater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox