Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: David Taylor <dtaylor@emc.com>
To: gdb@sourceware.org
Subject: tracepoints -- DWARF and tstart
Date: Mon, 16 May 2016 19:24:00 -0000	[thread overview]
Message-ID: <19272.1463426651@usendtaylorx2l> (raw)

When doing a trace experiment, GDB waits until you type 'tstart' to
generate the agent byte code expressions that it will send to the GDB
stub running on the remote target.

This might be okay if the conversion never produced an error.

Alas, it *CAN* produce an error *AND* GDB is rather stingy with the
information that it shares with the user when this happens.

Imagine a trace experiment where you have defined half a dozen
tracepoints, each with some collection actions.  You type

    tstart

and GDB responds with something like

    DWARF operator DW_OP_GNU_implicit_pointer cannot be translated to an
    agent expression.

and the trace experiment is *NOT* started.

You've got a problem to debug.  You are trying to run a trace experiment
to collect information to debug the problem.  And GDB is being rather,
shall we say, unhelpful.

Ideal would be to get the errors, if any, when you type the <return>
ending the particular 'collect' action.

Second best would be to get them, along with which collect was the
problem, when you type the 'end' ending the set of actions associated
with the tracepoint.

Getting it with 'tstart', while not ideal, would be a lot better if it
told you *WHICH* tracepoint and *WHICH* collect action are the cause of
the problem.

And, if they are going to occur at 'tstart' time, a warning would be
nicer.  That is, allow the experiment to run without that particular
variable / expression.  If the expression is '$locals', then warning
about whichever variable is the problem and collecting the rest would
be nice.

My current thinking is to do the last option above (it seems the easiest
/ quickest) and think about what would be required to give the error
earlier.

Thoughts?


             reply	other threads:[~2016-05-16 19:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 19:24 David Taylor [this message]
2016-05-17  0:31 ` Marc Khouzam

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=19272.1463426651@usendtaylorx2l \
    --to=dtaylor@emc.com \
    --cc=gdb@sourceware.org \
    /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