[12/17] Implement all-stop on top of a target running non-stop mode

Message ID 5523A8B6.9060602@redhat.com
State New, archived
Headers

Commit Message

Pedro Alves April 7, 2015, 9:51 a.m. UTC
  On 04/02/2015 03:58 PM, Eli Zaretskii wrote:
>> From: Pedro Alves <palves@redhat.com>
>> Date: Wed,  1 Apr 2015 23:14:09 +0100
>>
>> +@kindex maint set target-non-stop @var{mode} [on|off|auto]
>> +@kindex maint show target-non-stop
>> +@item maint set target-non-stop
>> +@itemx maint show target-non-stop
>> +This controls whether @value{GDBN} targets always operate in non-mode
>                                                                 ^^^^^^^^
> "non-stop mode", I guess.

Whoops.  Yes, fixed.

> 
>> +even if @code{set non-stop} is @code{off} (@pxref{Non-Stop Mode}).
>> +This default is @code{auto}, meaning this is enabled if available; but
>    ^^^^
> "The"

Fixed.

> 
>> +this can be changed to more easily debug problems.
> 
> I find the last part (after the semi-colon) confusing and not really
> adding any important information.  Perhaps consider dropping it.

Dropped.

> 
> What about NEWS?

How about this?

gdb/ChangeLog:
2015-04-07  Pedro Alves  <palves@redhat.com>

	* NEWS: Mention "maint set/show target-non-stop".
	(...)

gdb/doc/ChangeLog:
2015-04-07  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Maintenance Commands): Document "maint set/show
	target-non-stop".
  

Comments

Eli Zaretskii April 7, 2015, 10:01 a.m. UTC | #1
> Date: Tue, 07 Apr 2015 10:51:50 +0100
> From: Pedro Alves <palves@redhat.com>
> CC: gdb-patches@sourceware.org
> 
> > What about NEWS?
> 
> How about this?
> 
> gdb/ChangeLog:
> 2015-04-07  Pedro Alves  <palves@redhat.com>
> 
> 	* NEWS: Mention "maint set/show target-non-stop".
> 	(...)
> 
> gdb/doc/ChangeLog:
> 2015-04-07  Pedro Alves  <palves@redhat.com>
> 
> 	* gdb.texinfo (Maintenance Commands): Document "maint set/show
> 	target-non-stop".
> 
> diff --git c/gdb/NEWS w/gdb/NEWS
> index cd7c2b3..1526528 100644
> --- c/gdb/NEWS
> +++ w/gdb/NEWS
> @@ -41,6 +41,12 @@ maint print symbol-cache-statistics
>  maint flush-symbol-cache
>    Flush the contents of the symbol cache.
>  
> +maint set target-non-stop (on|off|auto)
> +maint show target-non-stop
> +  Control whether GDB targets always operate in non-stop mode even if
> +  "set non-stop" is "off".  The default is "auto", meaning this is
> +  enabled if supported by the target.
> +

LGTM, except that maybe replace "this" by "non-stop mode", to be more
clear.

Thanks.
  
Pedro Alves April 7, 2015, 10:11 a.m. UTC | #2
On 04/07/2015 11:01 AM, Eli Zaretskii wrote:
>> Date: Tue, 07 Apr 2015 10:51:50 +0100
>> From: Pedro Alves <palves@redhat.com>
>> CC: gdb-patches@sourceware.org
>>
>>> What about NEWS?
>>
>> How about this?
>>
>> gdb/ChangeLog:
>> 2015-04-07  Pedro Alves  <palves@redhat.com>
>>
>> 	* NEWS: Mention "maint set/show target-non-stop".
>> 	(...)
>>
>> gdb/doc/ChangeLog:
>> 2015-04-07  Pedro Alves  <palves@redhat.com>
>>
>> 	* gdb.texinfo (Maintenance Commands): Document "maint set/show
>> 	target-non-stop".
>>
>> diff --git c/gdb/NEWS w/gdb/NEWS
>> index cd7c2b3..1526528 100644
>> --- c/gdb/NEWS
>> +++ w/gdb/NEWS
>> @@ -41,6 +41,12 @@ maint print symbol-cache-statistics
>>  maint flush-symbol-cache
>>    Flush the contents of the symbol cache.
>>  
>> +maint set target-non-stop (on|off|auto)
>> +maint show target-non-stop
>> +  Control whether GDB targets always operate in non-stop mode even if
>> +  "set non-stop" is "off".  The default is "auto", meaning this is
>> +  enabled if supported by the target.
>> +
> 
> LGTM, except that maybe replace "this" by "non-stop mode", to be more
> clear.
> 

Done, thanks.

I'll be sending a v2 series soon, and will include that change (and
equivalent to gdb.texinfo).

Thanks,
Pedro Alves
  

Patch

diff --git c/gdb/NEWS w/gdb/NEWS
index cd7c2b3..1526528 100644
--- c/gdb/NEWS
+++ w/gdb/NEWS
@@ -41,6 +41,12 @@  maint print symbol-cache-statistics
 maint flush-symbol-cache
   Flush the contents of the symbol cache.
 
+maint set target-non-stop (on|off|auto)
+maint show target-non-stop
+  Control whether GDB targets always operate in non-stop mode even if
+  "set non-stop" is "off".  The default is "auto", meaning this is
+  enabled if supported by the target.
+
 record btrace bts
 record bts
   Start branch trace recording using Branch Trace Store (BTS) format.
diff --git c/gdb/doc/gdb.texinfo w/gdb/doc/gdb.texinfo
index c6e9b9b..6b7ba98 100644
--- c/gdb/doc/gdb.texinfo
+++ w/gdb/doc/gdb.texinfo
@@ -34103,6 +34103,29 @@  asynchronous mode (@pxref{Background Execution}).  Normally the
 default is asynchronous, if it is available; but this can be changed
 to more easily debug problems occurring only in synchronous mode.
 
+@kindex maint set target-non-stop @var{mode} [on|off|auto]
+@kindex maint show target-non-stop
+@item maint set target-non-stop
+@itemx maint show target-non-stop
+This controls whether @value{GDBN} targets always operate in non-stop
+mode even if @code{set non-stop} is @code{off} (@pxref{Non-Stop
+Mode}).  The default is @code{auto}, meaning this is enabled if
+supported by the target.
+
+@table @code
+@item maint set target-non-stop auto
+This is the default mode.  @value{GDBN} controls the target in
+non-stop mode if the target supports it.
+
+@item maint set target-non-stop on
+@value{GDBN} controls the target in non-stop mode even if the target
+does not indicate support.
+
+@item maint set target-non-stop off
+@value{GDBN} does not control the target in non-stop mode even if the
+target supports it.
+@end table
+
 @kindex maint set per-command
 @kindex maint show per-command
 @item maint set per-command