summaryrefslogtreecommitdiff
path: root/gdb/xstormy16-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xstormy16-tdep.c')
-rw-r--r--gdb/xstormy16-tdep.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index e4bebc875da..da875d3a702 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -151,16 +151,6 @@ xstormy16_register_raw_size (int regnum)
return xstormy16_reg_size;
}
-/* Function: xstormy16_register_virtual_size
- Returns the number of bytes occupied by the register as represented
- internally by gdb. */
-
-static int
-xstormy16_register_virtual_size (int regnum)
-{
- return xstormy16_register_raw_size (regnum);
-}
-
/* Function: xstormy16_reg_virtual_type
Returns the default type for register N. */
@@ -409,10 +399,14 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
*/
static CORE_ADDR
-xstormy16_extract_struct_value_address (char *regbuf)
+xstormy16_extract_struct_value_address (struct regcache *regcache)
{
- return extract_unsigned_integer (regbuf + xstormy16_register_byte (E_PTR_RET_REGNUM),
- xstormy16_reg_size);
+ /* FIXME: cagney/2004-01-17: Does the ABI guarantee that the return
+ address regster is preserved across function calls? Probably
+ not, making this function wrong. */
+ ULONGEST val;
+ regcache_raw_read_unsigned (regcache, E_PTR_RET_REGNUM, &val);
+ return val;
}
/* Function: xstormy16_use_struct_convention
@@ -1069,11 +1063,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
*/
/* Stack grows up. */
set_gdbarch_inner_than (gdbarch, core_addr_greaterthan);
- /* PC stops zero byte after a trap instruction
- (which means: exactly on trap instruction). */
- set_gdbarch_decr_pc_after_break (gdbarch, 0);
- /* This value is almost never non-zero... */
- set_gdbarch_function_start_offset (gdbarch, 0);
/* This value is almost never non-zero... */
set_gdbarch_frame_args_skip (gdbarch, 0);
@@ -1087,7 +1076,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, xstormy16_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, xstormy16_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, xstormy16_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
+ set_gdbarch_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch,
xstormy16_use_struct_convention);
set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);