From: Michael Snyder Date: Tue, 11 Dec 2001 22:15:55 +0000 (+0000) Subject: 2001-12-10 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce29138a6e7cdb10675c83bd0d16a2ee5078717a;p=binutils-gdb.git 2001-12-10 Michael Snyder * arch-utils.c (generic_register_virtual_size): New function. * arch-utils.h: Export generic version of register_virtual_size. * gdbarch.sh (REGISTER_VIRTUAL_SIZE): Use new function as default. * gdbarch.c: Regenerate. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7a25a0dfc89..022766d0aae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -23,6 +23,13 @@ * symfile.c (simple_read_overlay_table): Ditto. (simple_read_overlay_region_table): Ditto. +2001-12-10 Michael Snyder + + * arch-utils.c (generic_register_virtual_size): New function. + * arch-utils.h: Export generic version of register_virtual_size. + * gdbarch.sh (REGISTER_VIRTUAL_SIZE): Use new function as default. + * gdbarch.c: Regenerate. + 2001-12-09 Fred Fish * gdbtypes.c (TYPE_FLAG_UNSIGNED, TYPE_FLAG_STUB): Use diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 60c83016011..6fac5ea7b48 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -387,6 +387,14 @@ generic_register_raw_size (int regnum) return TARGET_INT_BIT / HOST_CHAR_BIT; } +/* Assume the virtual size corresponds to the virtual type. */ + +int +generic_register_virtual_size (int regnum) +{ + return REGISTER_VIRTUAL_TYPE (regnum); +} + /* Functions to manipulate the endianness of the target. */ diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index d1b4226ee87..834d3f1a459 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -142,4 +142,8 @@ extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc of the integer type. */ extern int generic_register_raw_size (int regnum); +/* Assume the virtual size of registers corresponds to the virtual type. */ + +extern int generic_register_virtual_size (int regnum); + #endif diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 276d2e0ae20..64cecbad4cf 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -314,7 +314,7 @@ struct gdbarch startup_gdbarch = 0, generic_register_raw_size, 0, - 0, + generic_register_virtual_size, 0, 0, 0, diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 02369b1f1ce..28395a86477 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -429,7 +429,7 @@ v:2:REGISTER_BYTES:int:register_bytes::::0:-1 f:2:REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::0:0 f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_raw_size:0 v:2:MAX_REGISTER_RAW_SIZE:int:max_register_raw_size::::0:-1 -f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::0:0 +f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_register_virtual_size:0 v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1 f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0 f:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs:::do_registers_info::0