From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org, Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [RFA] fetch result of locdesc expressions as integer (not address)
Date: Tue, 04 Oct 2011 17:16:00 -0000 [thread overview]
Message-ID: <m3mxdgoezn.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1317676214-7683-1-git-send-email-brobecker@adacore.com> (Joel Brobecker's message of "Mon, 3 Oct 2011 14:10:14 -0700")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> The problem is that the debugger is treating the result of
Joel> the DWARF location expressions as addresses, whereas this is
Joel> just an offset in this case. I think that this was an unintentional
Joel> side-effect of simplifying the code that fetches the result
Joel> from the DWARF expression computation stack. We had a bit of
Joel> code that used to fetch it, and turn it into a struct value.
Joel> And we replaced it by one call to a function that seemed to
Joel> be doing the same: dwarf_expr_fetch_address. The problem is
Joel> that dwarf_expr_fetch_address treats the result as an address,
Joel> and thus applies the integer_to_address gdbarch method. We do
Joel> not want that for struct field offsets...
dwarf_expr_fetch_address also calls dwarf_require_integral, which seems
like a good defensive thing to do in the replacement code.
I think the patch makes sense, but I'd like Jan to weigh in.
Tom
next prev parent reply other threads:[~2011-10-04 17:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-03 21:10 Joel Brobecker
2011-10-04 17:16 ` Tom Tromey [this message]
2011-10-04 19:32 ` Ulrich Weigand
2011-10-04 19:38 ` Joel Brobecker
2011-10-04 23:06 ` Ulrich Weigand
2011-10-05 1:09 ` Joel Brobecker
2011-10-05 12:30 ` Ulrich Weigand
2011-10-09 16:35 ` [patch#2] " Jan Kratochvil
2011-10-17 1:56 ` Joel Brobecker
2011-10-17 7:59 ` Tristan Gingold
2011-10-17 13:22 ` [commit] " Jan Kratochvil
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=m3mxdgoezn.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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