public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Stan Shebs <stan@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: PATCH: Circular trace buffers
Date: Wed, 17 Mar 2010 18:51:00 -0000	[thread overview]
Message-ID: <201003171851.37499.pedro@codesourcery.com> (raw)
In-Reply-To: <4BA119C4.9080307@codesourcery.com>

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

  reply	other threads:[~2010-03-17 18:51 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 [this message]
2010-03-18 22:14           ` Pedro Alves
2010-03-18 23:34             ` 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=201003171851.37499.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stan@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).