public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org,  Simon Marchi <simon.marchi@ericsson.com>
Subject: Re: [RFC PATCH] Read pseudo registers from frame instead of regcache
Date: Sun, 27 May 2018 05:14:00 -0000	[thread overview]
Message-ID: <87r2lxzrvx.fsf@tromey.com> (raw)
In-Reply-To: <20180526002406.18166-1-simon.marchi@polymtl.ca> (Simon Marchi's	message of "Fri, 25 May 2018 20:24:06 -0400")

>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> The problem: Reading pseudo registers from an upper stack frame does not
Simon> work.  The raw registers needed to compose the pseudo registers are
Simon> always read from the current thread's regcache, which is effectively
Simon> frame #0's registers.
[...]
Simon> The gdbarch hooks

Simon>   - pseudo_register_read
Simon>   - pseudo_register_read_value
Simon>   - pseudo_register_write

Simon> receive a regcache as a parameter, as a way to get the values of the raw
Simon> registers required to compute the pseudo register value.  However, the
Simon> regcache object always contains the current register values, not the
Simon> values unwound to the frame we're interested in.

I don't know this area very well, so apologies if this is really off
target; but I am wondering why not just make a regcache for the desired
frame and pass that to the gdbarch hooks?

Another thing I am curious about is how far back this bug goes.  Like,
if it were introduced in one of the last few releases, then it might be
worth bisecting to find out what happened.

Tom

  reply	other threads:[~2018-05-27  3:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26  1:14 Simon Marchi
2018-05-27  5:14 ` Tom Tromey [this message]
2018-05-28 16:10   ` Simon Marchi
2018-05-28 19:13 ` Ulrich Weigand
2018-05-28 22:06   ` Simon Marchi
2018-05-29  2:52     ` Simon Marchi
2018-05-29 14:53       ` Ulrich Weigand

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=87r2lxzrvx.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.com \
    --cc=simon.marchi@polymtl.ca \
    /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).