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: gdb-patches@sourceware.org, Stan Shebs <stan@codesourcery.com>
Subject: Re: PATCH: Circular trace buffers
Date: Thu, 18 Mar 2010 23:34:00 -0000	[thread overview]
Message-ID: <4BA2B875.2080308@codesourcery.com> (raw)
In-Reply-To: <201003182214.28867.pedro@codesourcery.com>

Pedro Alves wrote:
> I see the patch went in, but how were the issues raised below addressed?
> I don't understand why we'd want to have a "show circular-trace-buffer"
> command that doesn't work correctly half the times, and hence can't
> be trusted.  This means a frontend can not rely
> on "-gdb-show circular-trace-buffer" to draw a toggle button, for
> example (this is what I mean by calling it useless...).  I find
> the disconnected-tracing example below quite alarming.
>   
I did pump up the doc details a bit... I'm also thinking that an 
additional tstatus field would inform the user nicely in both the tfile 
and the disconnected tracing cases, plus frontends can use it, while 
leaving the setshow itself under the control of the user.  I didn't want 
to put that in this checkin though, need to think about it a little more 
first - the "target does not support" messages should probably be 
handled differently.

Stan
> On Wednesday 17 March 2010 18:51:37, Pedro Alves wrote:
>   
>> On Wednesday 17 March 2010 18:04:52, Stan Shebs wrote:
>>     
>>>> - this shows that "show circular-trace-buffer" is useless.
>>>> - this requires users know that fact.
>>>> - this doesn't sound user friendly.
>>>>   
>>>>         
>>> I'm just not seeing a problem myself - it seems obvious that circularity 
>>> of trace buffer only matters for future tracepoint hits, and doesn't 
>>> matter for completed trace runs, trace files, etc.  But I can rephrase 
>>> the docs to make that clearer.
>>>       
>> (Yes, please.  Okay, let's go with that then.)
>>
>> Let me show you examples: hopefully it is easy to see with
>> these how "show circular-trace-buffer" is broken as is.
>>
>>
>> Please can we have the following inconsistencies resolved?:
>>
>> Target supports circular:
>>
>>  (gdb) tar rem :9999
>>  (gdb) set circular-trace-buffer on
>>  (gdb) show circular-trace-buffer
>>  ... on.
>>
>> Fine.
>>
>>
>> Again, a target that supports circular, target wasn't
>> tracing on initial connection (disconnect-tracing off):
>>
>>  <not connected yet>
>>  (gdb) set circular-trace-buffer on
>>  (gdb) show circular-trace-buffer
>>  ... on.
>>  (gdb) tar rem :9999
>>  (gdb) show circular-trace-buffer
>>  ... on.
>>  (gdb) set disconnected-tracing on
>>  <set tracepoints>
>>  (gdb) tstart
>>  (gdb) detach
>>  <end remote debug session>
>>  (gdb) set circular-trace-buffer off
>>  (gdb) tar rem :9999
>>  (gdb) show circular-trace-buffer
>>   ... off
>>
>> Really "off"?  Ouch!  See?  QTstatus doesn't report the
>> circularity-ness, but the circularity is logically part of
>> the status of the current run.
>>
>> Now against a target that _doesn't_ support QTBuffer (in circular mode):
>>
>>  <not connected yet>
>>  (gdb) set circular-trace-buffer on
>>  (gdb) show circular-trace-buffer
>>  ... on.
>>  (gdb) tar rem :9999
>>  <note, no complain, no warning>
>>  (gdb) show circular-trace-buffer
>>  Target's use of circular trace buffer is on.
>>
>> Really?
>>
>>  (gdb) set circular-trace-buffer off
>>  Target does not support this command.
>>  (gdb) set circular-trace-buffer on
>>  Target does not support this command.
>>  (gdb)
>>
>> Ouch!
>>
>> You can't easily try the latter case, because a new
>> "set remote circular...-packet command is missing.
>>     
>
>   


      reply	other threads:[~2010-03-18 23:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 21:42 Stan Shebs
2010-03-17  7:25 ` Eli Zaretskii
2010-03-17 16:00 ` Pedro Alves
2010-03-17 16:55   ` Stan Shebs
2010-03-17 17:19     ` Pedro Alves
2010-03-17 18:05       ` Stan Shebs
2010-03-17 18:51         ` Pedro Alves
2010-03-18 22:14           ` Pedro Alves
2010-03-18 23:34             ` Stan Shebs [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=4BA2B875.2080308@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