aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1993-03-17 19:32:42 +0000
committerSteve Chamberlain <sac@cygnus>1993-03-17 19:32:42 +0000
commit2d8d693ab7f2089f39ae3aa18ac587e3f33e2597 (patch)
treed876dfdcce0cfa97abb736bf55b59a69ad9c7e4a /gdb
parent898e13c8b98a449d5d2a4968dc9572ef355493f6 (diff)
downloadgdb-2d8d693ab7f2089f39ae3aa18ac587e3f33e2597.zip
gdb-2d8d693ab7f2089f39ae3aa18ac587e3f33e2597.tar.gz
gdb-2d8d693ab7f2089f39ae3aa18ac587e3f33e2597.tar.bz2
New functions from macros in tm-z8k.h.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/z8k-tdep.c44
2 files changed, 47 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 89ee8ef..a206ca0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 17 11:28:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * z8k-tdep.c (extract_return_value, write_return_value,
+ store_struct_return): New functions from macros in tm-z8k.h.
+
Wed Mar 17 11:23:06 1993 Fred Fish (fnf@cygnus.com)
* valops.c (value_arg_coerce): Apply temporary patch to
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index 3daf7e4..73d4b55 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -305,10 +305,50 @@ addr_bits_set ()
int
saved_pc_after_call ()
{
- return addr_bits_remove (read_memory_integer (read_register (SP_REGNUM), PTR_SIZE));
+ return addr_bits_remove
+ (read_memory_integer (read_register (SP_REGNUM), PTR_SIZE));
+}
+
+
+extract_return_value(type, regbuf, valbuf)
+struct type *type;
+char *regbuf;
+char *valbuf;
+{
+ int b;
+ int len = TYPE_LENGTH(type);
+
+ for (b = 0; b < len; b += 2) {
+ int todo = len - b;
+ if (todo > 2)
+ todo = 2;
+ memcpy(valbuf + b, regbuf + b, todo);
+ }
}
void
+write_return_value(type, valbuf)
+struct type *type;
+char *valbuf;
+{
+ int reg;
+ int len;
+ for (len = 0; len < TYPE_LENGTH(type); len += 2)
+ {
+ write_register_bytes(REGISTER_BYTE(len /2 + 2), valbuf + len, 2);
+ }
+}
+
+void
+store_struct_return(addr, sp)
+CORE_ADDR addr;
+CORE_ADDR sp;
+{
+ write_register(2, addr);
+}
+
+
+void
print_register_hook (regno)
int regno;
{
@@ -406,7 +446,7 @@ segmented_command (args, from_tty)
char *args;
int from_tty;
{
- z8k_set_pointer_size (16);
+ z8k_set_pointer_size (32);
}
static void