Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stan@codesourcery.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: Stan Shebs <stan@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: tracing broken if target doesn't do disconnected tracing
Date: Thu, 08 Apr 2010 18:19:00 -0000	[thread overview]
Message-ID: <4BBE1E00.3070306@codesourcery.com> (raw)
In-Reply-To: <201004081825.15900.pedro@codesourcery.com>

Pedro Alves wrote:
> On Wednesday 07 April 2010 23:04:38, Stan Shebs wrote:
>   
>> Pedro Alves wrote:
>>
>>     
>>> I suggest we change that to simply:
>>>
>>>   /* If running interactively, warn the user a trace run is ongoing.
>>>      She may want to cancel detaching instead.  */
>>>     if (current_trace_status ()->running && from_tty)
>>>       {
>>>         if (current_trace_status ()->disconnected_tracing)
>>>           {
>>>             if (!query (_("Trace is running and will continue after detach; detach anyway? ")))
>>>               error (_("Not confirmed."));
>>>           }
>>>         else
>>>           {
>>>             if (!query (_("Trace is running but will stop on detach; detach anyway? ")))
>>>              error (_("Not confirmed."));
>>>           }
>>>       }
>>>
>>>   - simpler, more coherent, less explaining, less confusing.
>>>   
>>>       
>> The downside of this design is that if you did want to shut tracing 
>> down, you have to cancel the detach, do a tstop, then redo the detach.  
>> It's not crucial perhaps, but it seems a bit pedantic for GDB to have 
>> the power to choose whether to keep the trace running, but not to 
>> exercise it, and to insist that you have cancel and type the command 
>> yourself.  Perhaps the crux of the confusion is that this is really a 
>> three-way choice - trace/detach, tstop/detach, cancel - and a pair of 
>> yes/no questions is not a good way to model it.
>>     
>
> That's just begging for:
>
> The downside of your current design is that if you did want to detach
> and leave tracing running, you have to cancel the detach, do a "set
> disconnected-tracing on", then redo the detach.
> It's not crucial perhaps, but it seems a bit pedantic for GDB to have 
> the power to choose whether to keep the trace running, but not to 
> exercise it, and to insist that you have cancel and type the command 
> yourself.
>
> :-)
>   

Um, I must be missing the joke, it looks like you cut-n-pasted verbatim?

> I'd say that this use case would be much more common, and if
> gdb gave you the option of turning disconnected tracing _on_
> would be more helpful than the other way around (having trace
> running and wanting it to stop on detach).  After having used
> tracing for a while (granted, not really in the field), I believe
> that this "do you want to stop tracing" query will get old soon.  But,
> I can see that I can't manage to convince you of anything, so
> please, let's not get stuck on this issue, and let's move forward
> with whatever you think is right.
>   

My mental model is that users will tend to have disconnected tracing on 
by default if possible, because it ensures that the tracing run isn't 
prematurely terminated by GDB crash or loss of network connection.  But 
yeah, without much user feedback yet, we are just speculating on what 
users will prefer.  So I'll check in my version, and if people complain 
about it, then you'll get that delicious feeling of vindication. :-)

Stan


  reply	other threads:[~2010-04-08 18:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05  0:01 Pedro Alves
2010-04-05  1:08 ` Stan Shebs
2010-04-05 11:04   ` Pedro Alves
2010-04-07  1:34     ` Stan Shebs
2010-04-07 11:40       ` Pedro Alves
2010-04-07 13:33         ` Stan Shebs
2010-04-07 13:47           ` Pedro Alves
2010-04-07 14:07           ` Pedro Alves
2010-04-07 20:21             ` Stan Shebs
2010-04-07 22:06               ` Pedro Alves
2010-04-07 13:35         ` Pedro Alves
2010-04-07 22:04           ` Stan Shebs
2010-04-08 17:25             ` Pedro Alves
2010-04-08 18:19               ` Stan Shebs [this message]
2010-04-08 18:32                 ` Pedro Alves
2010-04-08 19:10                   ` Stan Shebs
2010-04-09  3:10                     ` Stan Shebs

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=4BBE1E00.3070306@codesourcery.com \
    --to=stan@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /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