From: Stan Shebs <stan@codesourcery.com>
To: tromey@redhat.com
Cc: Stan Shebs <stan@codesourcery.com>,
gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Handle LOC_COMPUTED variables in tracepoint actions
Date: Wed, 23 Dec 2009 23:16:00 -0000 [thread overview]
Message-ID: <4B32A4C2.4000806@codesourcery.com> (raw)
In-Reply-To: <m3eimsf2yu.fsf@fleche.redhat.com>
Tom Tromey wrote:
>>>>>> "Stan" == Stan Shebs <stan@codesourcery.com> writes:
>>>>>>
>
> Stan> The last time that anybody used tracepoints much, stabs was still
> Stan> the norm and Dwarf 2 the newbie, and so nobody thought much about
> Stan> handling variables with computed locations.
>
> Stan> This patch doesn't handle every possible computed location, that's
> Stan> a big project of its own (basically translating arbitrary dwarf2
> Stan> bytecode sequences into equivalent agent expression bytecodes)
>
> Fun project :-). Let me suggest a feature request for this in
> bugzilla...
>
> Stan> Even the simplified version is a little arcane, so I'll leave it
> Stan> up for comments for a few days before committing.
>
> This patch looks pretty good to me.
>
> Does this handle DW_OP_call_frame_cfa? I didn't see any explicit
> support for it, but I could be missing something. IIUC, recent versions
> of gcc tend to emit this for all local variables.
>
I don't think so - it's probably an accident waiting to happen. :-)
> Stan> + /* We don't know what to do with the frame base expression,
> Stan> + so we can't trace this variable; give up. */
> Stan> + error (_("Cannot generate expression to collect symbol \"%s\"."),
> Stan> + SYMBOL_PRINT_NAME (symbol));
>
> As a user I would appreciate it if this error told me more about what
> was wrong. Like, maybe it could mention that the DWARF expression is
> too complicated, or maybe ask me to file a bug report.
>
I tinkered with the wording a bit, but it's difficult to explain. In
general the compiler is producing output that the bytecode compiler
doesn't know how to handle, and there's not much the user can do about
it. It's severe enough that we should give up on the tracing run, so we
need it to be an error rather than a warning, but internal_error is a
bit excessive, since regular debugging still works, and the debugger
state hasn't been corrupted in any way.
Stan
prev parent reply other threads:[~2009-12-23 23:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 19:46 Stan Shebs
2009-12-18 20:21 ` Tom Tromey
2009-12-23 23:16 ` 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=4B32A4C2.4000806@codesourcery.com \
--to=stan@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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