From: Stan Shebs <stan@codesourcery.com>
To: Stan Shebs <stan@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Dwarf location expressions, tracing and printing
Date: Tue, 20 Apr 2010 19:26:00 -0000 [thread overview]
Message-ID: <4BCDFFBF.6030403@codesourcery.com> (raw)
In-Reply-To: <4BC7B823.6040406@codesourcery.com>
Stan Shebs wrote:
> This patch solves a number of problems related to variables with
> Dwarf2 location expressions - which these days, means just about every
> local in optimized code. :-) Perhaps the most interesting part is
> that I finally got tired of working blind and filled out description
> location functions, so now both "info scope" and "info address" have
> quite a lot of say about variables. Try things like "info scope
> handle_inferior_event" to get some truly awesome verbiage. :-)
>
> Since there's a lot of new code here, I'll leave it up for a couple
> days before committing.
>
Just as a heads-up, this patch exposes a major hole in our tracepoint
machinery when running testsuite with gdbserver - namely that agent
expressions don't have a way to deal with registers that are larger than
64 bits. This crops up in gdb.trace/collection.exp:reglocal_test_func
on x86, in which the local floats are assigned to $stX registers, which
are 10 bytes long. gdbserver properly chokes on any attempt to push
these on the expression stack (although one might argue that it should
be a tracing rather than internal error). Previously, the registers
were incorrectly numbered to 4-byte registers, which resulted in four
FAILs when printing collected floats, but nothing worse.
I went ahead and committed the patch anyway, because the fix/workaround
isn't obvious, and it's a design problem elsewhere.
Alternatives include:
1) Make the expression stack wider. The existing target-side
implementations are designed around the 64-bit assumption, so there
would be some messy fixing-up with sign extensions and the like.
2) Generate bytecodes to handle larger registers as multiple pieces.
3) Disallow larger registers in expressions.
4) Stub out that part of the testsuite. :-)
Stan
prev parent reply other threads:[~2010-04-20 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 1:07 Stan Shebs
2010-04-20 18:01 ` Tom Tromey
2010-04-20 19:03 ` Stan Shebs
2010-04-20 19:26 ` 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=4BCDFFBF.6030403@codesourcery.com \
--to=stan@codesourcery.com \
--cc=gdb-patches@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