This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Circular trace buffers


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.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]