PATCH: Circular trace buffers

Stan Shebs stan@codesourcery.com
Thu Mar 18 23:34:00 GMT 2010


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



More information about the Gdb-patches mailing list