From: Andrew Cagney <ac131313@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: Daniel Jacobowitz <drow@mvista.com>, gdb-patches@sources.redhat.com
Subject: Re: [patch rfc] Revamp REGISTER_TO_VALUE et.al.
Date: Sat, 14 Jun 2003 22:44:00 -0000 [thread overview]
Message-ID: <3EEBA42C.90603@redhat.com> (raw)
In-Reply-To: <86he6tzta9.fsf@elgar.kettenis.dyndns.org>
> Did anyone have better test cases?
>
>>
>> I haven't checked, but gdb/214 might do...
>
>
> I'm not sure whether the sample code in gdb/214 has anything to add to
> the stuff that's already tested by gdb.base/store.exp. It suffers
> from the same problem as those test in that it is highly dependent on
> the compiler you use whether a variable is stored in a register or
> not. The only really reliable test I can imagine is hand-coded
> assembler :-(.
Well, the assembler now has a CFI syntax so it is feasible.
However, it turns out that throwing a few more uses of the word
"register" at store.exp has pretty much the same effect :-)
I've committed the below.
Andrew
> 2003-06-13 Andrew Cagney <cagney@redhat.com>
> Mark Kettenis <kettenis@gnu.org>
>
> * gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
> (REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
> parameter with "frame".
> * gdbarch.h, gdbarch.c: Re-generate.
> * frame.h (put_frame_register): Declare.
> * frame.c (put_frame_register): New function.
> * arch-utils.c (legacy_convert_register_p): Add "type" parameter.
> (legacy_register_to_value): Rewrite, use "frame" to get the
> register value.
> (legacy_value_to_register): Rewrite, use "frame" to find the
> register's location before storing.
> * arch-utils.h (legacy_convert_register_p): Update.
> (legacy_register_to_value, legacy_value_to_register): Update.
> * findvar.c (value_from_register): Rewrite, eliminate use of
> REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
> "frame" to REGISTER_TO_VALUE.
> * valops.c (value_assign): Move the CONVERT_REGISTER code to the
> lval_reg_frame_relative + lval_register branch of the switch. Do
> not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
> * i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
> I386_EDI_REGNUM): New defines.
> (i386_next_regnum, i386_convert_register_p,
> i386_register_to_value, i386_value_to_register): New functions.
> (i386_register_convertible, i386_register_convert_to_virtual,
> i386_convert_to_raw): Remove functions.
> (i386_gdbarch_init): Set convert_register_p, register_to_value and
> value_to_register instead of register_convertible,
> register_convert_to_virtual and register_convert_to_raw.
> * mips-tdep.c (mips_convert_register_p): New function.
> (mips_value_to_register): Replace mips_register_convert_from_type.
> (mips_register_to_value): Replace mips_register_convert_to_type.
> (mips_gdbarch_init): Set conver_register_p, value_to_register and
> register_to_value.
> * alpha-tdep.c (alpha_convert_register_p): Update.
> (alpha_value_to_register): Update, store the register.
> (alpha_register_to_value): Update, fetch the register.
>
prev parent reply other threads:[~2003-06-14 22:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-13 16:03 Andrew Cagney
2003-06-13 16:10 ` Daniel Jacobowitz
2003-06-13 19:12 ` Mark Kettenis
2003-06-14 22:44 ` 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=3EEBA42C.90603@redhat.com \
--to=ac131313@redhat.com \
--cc=drow@mvista.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