From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [commit] Simplify CONVERT_REGISTER_P
Date: Wed, 09 Jun 2004 21:28:00 -0000 [thread overview]
Message-ID: <40C78110.7060506@gnu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
Hello,
Fallout from the removal of REGISTER_CONVERTIBLE. This simplifies the
default definition of CONVERT_REGISTER_P, REGISTER_TO_VALUE, and
VALUE_TO_REGISTER.
committed,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 6197 bytes --]
2004-06-09 Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (:REGISTER_TO_VALUE, VALUE_TO_REGISTER): Do not
provide a default value.
(CONVERT_REGISTER_P): Default to generic_convert_register_p.
* gdbarch.h, gdbarch.c: Re-generate.
* arch-utils.c (generic_convert_register_p): Rename
legacy_convert_register_p
(legacy_register_to_value, legacy_value_to_register): Delete
functions.
* arch-utils.h (generic_convert_register_p): Rename
legacy_convert_register_p.
(legacy_register_to_value, legacy_value_to_register): Delete
declarations.
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.117
diff -p -u -r1.117 arch-utils.c
--- arch-utils.c 9 Jun 2004 20:42:28 -0000 1.117
+++ arch-utils.c 9 Jun 2004 21:00:57 -0000
@@ -299,25 +299,11 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, cha
}
int
-legacy_convert_register_p (int regnum, struct type *type)
+generic_convert_register_p (int regnum, struct type *type)
{
return 0;
}
-void
-legacy_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to)
-{
- internal_error (__FILE__, __LINE__, "legacy_register_to_value called");
-}
-
-void
-legacy_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *tmp)
-{
- internal_error (__FILE__, __LINE__, "legacy_value_to_register called");
-}
-
int
default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
{
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.70
diff -p -u -r1.70 arch-utils.h
--- arch-utils.h 8 May 2004 21:27:02 -0000 1.70
+++ arch-utils.h 9 Jun 2004 21:00:57 -0000
@@ -113,16 +113,8 @@ extern int generic_register_byte (int re
/* Prop up old targets that use various sigtramp macros. */
extern int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name);
-/* The orginal register_convert*() functions were overloaded. They
- were used to both: convert between virtual and raw register formats
- (something that is discouraged); and to convert a register to the
- type of a corresponding variable. These legacy functions preserve
- that overloaded behavour in existing targets. */
-extern int legacy_convert_register_p (int regnum, struct type *type);
-extern void legacy_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to);
-extern void legacy_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *from);
+/* By default, registers are not convertible. */
+extern int generic_convert_register_p (int regnum, struct type *type);
extern int default_stabs_argument_has_addr (struct gdbarch *gdbarch,
struct type *type);
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.292
diff -p -u -r1.292 gdbarch.c
--- gdbarch.c 9 Jun 2004 20:42:28 -0000 1.292
+++ gdbarch.c 9 Jun 2004 21:00:57 -0000
@@ -463,9 +463,7 @@ gdbarch_alloc (const struct gdbarch_info
current_gdbarch->cannot_fetch_register = cannot_register_not;
current_gdbarch->cannot_store_register = cannot_register_not;
current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
- current_gdbarch->convert_register_p = legacy_convert_register_p;
- current_gdbarch->register_to_value = legacy_register_to_value;
- current_gdbarch->value_to_register = legacy_value_to_register;
+ current_gdbarch->convert_register_p = generic_convert_register_p;
current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
@@ -611,8 +609,6 @@ verify_gdbarch (struct gdbarch *current_
/* Skip verify of deprecated_init_frame_pc, has predicate */
/* Skip verify of deprecated_get_saved_register, has predicate */
/* Skip verify of convert_register_p, invalid_p == 0 */
- /* Skip verify of register_to_value, invalid_p == 0 */
- /* Skip verify of value_to_register, invalid_p == 0 */
/* Skip verify of pointer_to_address, invalid_p == 0 */
/* Skip verify of address_to_pointer, invalid_p == 0 */
/* Skip verify of integer_to_address, has predicate */
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.319
diff -p -u -r1.319 gdbarch.sh
--- gdbarch.sh 9 Jun 2004 20:42:29 -0000 1.319
+++ gdbarch.sh 9 Jun 2004 21:00:57 -0000
@@ -550,9 +550,9 @@ F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:d
v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
#
-f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum, struct type *type:regnum, type::0:legacy_convert_register_p::0
-f:1:REGISTER_TO_VALUE:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf::0:legacy_register_to_value::0
-f:1:VALUE_TO_REGISTER:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf::0:legacy_value_to_register::0
+f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum, struct type *type:regnum, type::0:generic_convert_register_p::0
+f:1:REGISTER_TO_VALUE:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf::0
+f:1:VALUE_TO_REGISTER:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf::0
#
f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf:::unsigned_pointer_to_address::0
f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0
reply other threads:[~2004-06-09 21:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=40C78110.7060506@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.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