From: Andrew Cagney <ac131313@ges.redhat.com>
To: Richard.Earnshaw@arm.com
Cc: Mark Kettenis <kettenis@chello.nl>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Remove bogosities from dwarf2cfi.c:cfi_pop_frame()
Date: Wed, 10 Jul 2002 09:43:00 -0000 [thread overview]
Message-ID: <3D2C5E32.3040308@ges.redhat.com> (raw)
In-Reply-To: <200207100924.KAA09464@cam-mail2.cambridge.arm.com>
> Mark
>> >
>> > Index: ChangeLog
>> > from Mark Kettenis <kettenis@gnu.org>
>> >
>> > * dwarf2cfi.c (cfi_pop_frame): Use alloca() for regbuf.
>> > Don't call get_current_frame().
>> >
>
>>
>> Heads up,
>>
>> I think the write_register_bytes() call should be replaced by
>> regcache_register_write(current_regcache, ). This is new code so it
>> doesn't need to go through any of that nasty write_register_bytes() stuff.
>>
>> Andrew
>>
>>
>
>
> Why is this code trying to poke directly into the regcache at all? AFAICT
> it should be operating on the pseudo registers not the cache.
[cooked]
Hmm, yes, good point. It should at least use regcache_cpy() so that it
is ``bug compatible'' with generic_pop_dummy_frame()(1).
At present GDB saves/restores registers in a confused sort of way.
Firstly, the save/restore operation (see regcache_cpy):
- for old targets it iterates over 0..NUM_REGS (the full raw register
space) using write_register_bytes() to restore the registers.
- for new targets it iterates over 0..NUM_REGS (the full raw register
space) using regcache_write() to directly transfer the raw registers.
It then uses this single mechanism(2) to handle two orthogonal
situtations, and that is the problem:
- saving / restoring a raw register cache before / after an inferior
function call. Here, a select list of raw registers should be transfered.
- unwinding a stack frame, storing those unwound register values, and
hence having the effect of poping one or more frames. Here, a select
list of cooked registers should be stored.
Andrew
(1) I also suspect that some cleanups would let the function in question
be eliminated from dwarf2cfi but that is another story.
(2) I believe the regcache changes were ``bug compatible''.
prev parent reply other threads:[~2002-07-10 16:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-08 5:24 Mark Kettenis
2002-07-08 11:37 ` Andrew Cagney
2002-07-10 5:22 ` Richard Earnshaw
2002-07-10 9:43 ` Andrew Cagney [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=3D2C5E32.3040308@ges.redhat.com \
--to=ac131313@ges.redhat.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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