* gdbarch.sh (deprecated_extract_return_value)
(deprecated_store_return_value): Remove. (extract_return_value, store_return_value): Remove default values. * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.c, arch-utils.h (legacy_extract_return_value) (legacy_store_return_value): Remove. * regcache.c, regcache.h (deprecated_grub_regcache_for_registers): Remove.
This commit is contained in:
parent
08f9ce9edc
commit
5e66aab290
8 changed files with 11 additions and 132 deletions
|
@ -1,5 +1,14 @@
|
|||
2007-01-13 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* gdbarch.sh (deprecated_extract_return_value)
|
||||
(deprecated_store_return_value): Remove.
|
||||
(extract_return_value, store_return_value): Remove default values.
|
||||
* gdbarch.c, gdbarch.h: Regenerate.
|
||||
* arch-utils.c, arch-utils.h (legacy_extract_return_value)
|
||||
(legacy_store_return_value): Remove.
|
||||
* regcache.c, regcache.h (deprecated_grub_regcache_for_registers):
|
||||
Remove.
|
||||
|
||||
* mi/mi-main.c: Remove obsolete comment.
|
||||
|
||||
* regcache.c, regcache.h (deprecated_register_bytes)
|
||||
|
|
|
@ -38,29 +38,6 @@
|
|||
|
||||
#include "floatformat.h"
|
||||
|
||||
/* Implementation of extract return value that grubs around in the
|
||||
register cache. */
|
||||
void
|
||||
legacy_extract_return_value (struct type *type, struct regcache *regcache,
|
||||
gdb_byte *valbuf)
|
||||
{
|
||||
gdb_byte *registers = deprecated_grub_regcache_for_registers (regcache);
|
||||
gdb_byte *buf = valbuf;
|
||||
DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf); /* OK */
|
||||
}
|
||||
|
||||
/* Implementation of store return value that grubs the register cache.
|
||||
Takes a local copy of the buffer to avoid const problems. */
|
||||
void
|
||||
legacy_store_return_value (struct type *type, struct regcache *regcache,
|
||||
const gdb_byte *buf)
|
||||
{
|
||||
gdb_byte *b = alloca (TYPE_LENGTH (type));
|
||||
gdb_assert (regcache == current_regcache);
|
||||
memcpy (b, buf, TYPE_LENGTH (type));
|
||||
DEPRECATED_STORE_RETURN_VALUE (type, b);
|
||||
}
|
||||
|
||||
int
|
||||
always_use_struct_convention (int gcc_p, struct type *value_type)
|
||||
{
|
||||
|
@ -312,17 +289,6 @@ generic_convert_register_p (int regnum, struct type *type)
|
|||
int
|
||||
default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
|
||||
{
|
||||
if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
|
||||
&& DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation, type))
|
||||
{
|
||||
CHECK_TYPEDEF (type);
|
||||
|
||||
return (TYPE_CODE (type) == TYPE_CODE_STRUCT
|
||||
|| TYPE_CODE (type) == TYPE_CODE_UNION
|
||||
|| TYPE_CODE (type) == TYPE_CODE_SET
|
||||
|| TYPE_CODE (type) == TYPE_CODE_BITSTRING);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,13 +41,6 @@ enum return_value_convention legacy_return_value (struct gdbarch *gdbarch,
|
|||
gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf);
|
||||
|
||||
/* Implementation of extract return value that grubs around in the
|
||||
register cache. */
|
||||
extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
|
||||
|
||||
/* Implementation of store return value that grubs the register cache. */
|
||||
extern gdbarch_store_return_value_ftype legacy_store_return_value;
|
||||
|
||||
/* To return any structure or union type by value, store it at the
|
||||
address passed as an invisible first argument to the function. */
|
||||
extern gdbarch_deprecated_use_struct_convention_ftype always_use_struct_convention;
|
||||
|
|
|
@ -191,8 +191,6 @@ struct gdbarch
|
|||
gdbarch_return_value_ftype *return_value;
|
||||
gdbarch_extract_return_value_ftype *extract_return_value;
|
||||
gdbarch_store_return_value_ftype *store_return_value;
|
||||
gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
|
||||
gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
|
||||
gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
|
||||
gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
|
||||
gdbarch_skip_prologue_ftype *skip_prologue;
|
||||
|
@ -320,8 +318,6 @@ struct gdbarch startup_gdbarch =
|
|||
0, /* return_value */
|
||||
0, /* extract_return_value */
|
||||
0, /* store_return_value */
|
||||
0, /* deprecated_extract_return_value */
|
||||
0, /* deprecated_store_return_value */
|
||||
0, /* deprecated_use_struct_convention */
|
||||
0, /* deprecated_extract_struct_value_address */
|
||||
0, /* skip_prologue */
|
||||
|
@ -439,8 +435,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
|
|||
current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
|
||||
current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
|
||||
current_gdbarch->return_value = legacy_return_value;
|
||||
current_gdbarch->extract_return_value = legacy_extract_return_value;
|
||||
current_gdbarch->store_return_value = legacy_store_return_value;
|
||||
current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
|
||||
current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
|
||||
current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
|
||||
|
@ -575,8 +569,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
|
|||
/* Skip verify of integer_to_address, has predicate */
|
||||
/* Skip verify of deprecated_store_struct_return, has predicate */
|
||||
/* Skip verify of return_value, has predicate */
|
||||
/* Skip verify of extract_return_value, invalid_p == 0 */
|
||||
/* Skip verify of store_return_value, invalid_p == 0 */
|
||||
/* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
|
||||
/* Skip verify of deprecated_extract_struct_value_address, has predicate */
|
||||
if (current_gdbarch->skip_prologue == 0)
|
||||
|
@ -844,15 +836,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
|
|||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: decr_pc_after_break = 0x%s\n",
|
||||
paddr_nz (current_gdbarch->decr_pc_after_break));
|
||||
#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
"DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
|
||||
XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
|
||||
#endif
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
|
||||
(long) current_gdbarch->deprecated_extract_return_value);
|
||||
#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
|
@ -949,15 +932,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
|
|||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
|
||||
(long) current_gdbarch->deprecated_stack_align);
|
||||
#ifdef DEPRECATED_STORE_RETURN_VALUE
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
"DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
|
||||
XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
|
||||
#endif
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
|
||||
(long) current_gdbarch->deprecated_store_return_value);
|
||||
#ifdef DEPRECATED_STORE_STRUCT_RETURN_P
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
|
@ -2813,40 +2787,6 @@ set_gdbarch_store_return_value (struct gdbarch *gdbarch,
|
|||
gdbarch->store_return_value = store_return_value;
|
||||
}
|
||||
|
||||
void
|
||||
gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
|
||||
gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
|
||||
gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
|
||||
{
|
||||
gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
|
||||
}
|
||||
|
||||
void
|
||||
gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
gdb_assert (gdbarch->deprecated_store_return_value != NULL);
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
|
||||
gdbarch->deprecated_store_return_value (type, valbuf);
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
|
||||
gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
|
||||
{
|
||||
gdbarch->deprecated_store_return_value = deprecated_store_return_value;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
|
||||
{
|
||||
|
|
|
@ -804,26 +804,6 @@ extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_sto
|
|||
#define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
|
||||
#endif
|
||||
|
||||
typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, gdb_byte *regbuf, gdb_byte *valbuf);
|
||||
extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf);
|
||||
extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
|
||||
#if !defined (GDB_TM_FILE) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
|
||||
#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
|
||||
#endif
|
||||
#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
|
||||
#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
|
||||
#endif
|
||||
|
||||
typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, gdb_byte *valbuf);
|
||||
extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf);
|
||||
extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
|
||||
#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_RETURN_VALUE)
|
||||
#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
|
||||
#endif
|
||||
#if !defined (DEPRECATED_STORE_RETURN_VALUE)
|
||||
#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
|
||||
#endif
|
||||
|
||||
typedef int (gdbarch_deprecated_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
|
||||
extern int gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
|
||||
extern void set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention);
|
||||
|
|
|
@ -524,10 +524,8 @@ M::enum return_value_convention:return_value:struct type *valtype, struct regcac
|
|||
# DEPRECATED_USE_STRUCT_CONVENTION have all been folded into
|
||||
# RETURN_VALUE.
|
||||
|
||||
f:=:void:extract_return_value:struct type *type, struct regcache *regcache, gdb_byte *valbuf:type, regcache, valbuf::legacy_extract_return_value::0
|
||||
f:=:void:store_return_value:struct type *type, struct regcache *regcache, const gdb_byte *valbuf:type, regcache, valbuf::legacy_store_return_value::0
|
||||
f:=:void:deprecated_extract_return_value:struct type *type, gdb_byte *regbuf, gdb_byte *valbuf:type, regbuf, valbuf
|
||||
f:=:void:deprecated_store_return_value:struct type *type, gdb_byte *valbuf:type, valbuf
|
||||
f:=:void:extract_return_value:struct type *type, struct regcache *regcache, gdb_byte *valbuf:type, regcache, valbuf:0
|
||||
f:=:void:store_return_value:struct type *type, struct regcache *regcache, const gdb_byte *valbuf:type, regcache, valbuf:0
|
||||
f:=:int:deprecated_use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type::generic_use_struct_convention::0
|
||||
|
||||
# As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an
|
||||
|
|
|
@ -388,12 +388,6 @@ regcache_valid_p (struct regcache *regcache, int regnum)
|
|||
return regcache->register_valid_p[regnum];
|
||||
}
|
||||
|
||||
gdb_byte *
|
||||
deprecated_grub_regcache_for_registers (struct regcache *regcache)
|
||||
{
|
||||
return regcache->registers;
|
||||
}
|
||||
|
||||
/* Global structure containing the current regcache. */
|
||||
/* FIXME: cagney/2002-05-11: The two global arrays registers[] and
|
||||
deprecated_register_valid[] currently point into this structure. */
|
||||
|
|
|
@ -171,7 +171,6 @@ extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache
|
|||
method, there should already be a non-deprecated variant that is
|
||||
parameterized with FRAME or REGCACHE. */
|
||||
|
||||
extern gdb_byte *deprecated_grub_regcache_for_registers (struct regcache *);
|
||||
extern void deprecated_read_register_gen (int regnum, gdb_byte *myaddr);
|
||||
extern void deprecated_write_register_gen (int regnum, gdb_byte *myaddr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue