summaryrefslogtreecommitdiff
path: root/gdb/ns32k-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-28 21:26:07 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-28 21:26:07 +0000
commit76cbd54ce4ce2683b451f5a8027974d60cc220f0 (patch)
tree78e6f9d2cf81c30b28c01c59c4ef8429916fbf1b /gdb/ns32k-tdep.c
parent5fcbe4e985ce1a65c607a7b39af195723c4b24a7 (diff)
downloadgdb-76cbd54ce4ce2683b451f5a8027974d60cc220f0.tar.gz
Fix -Werror probs for ns32k.
Diffstat (limited to 'gdb/ns32k-tdep.c')
-rw-r--r--gdb/ns32k-tdep.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index c4cab621551..57efe0771bf 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -21,6 +21,9 @@
#include "defs.h"
#include "frame.h"
+#include "gdbcore.h"
+
+static int sign_extend (int value, int bits);
void
_initialize_ns32k_tdep (void)
@@ -90,6 +93,8 @@ merlin_frame_num_args (struct frame_info *fi)
width = 2;
else if (insn == 0x57f) /* adjspd */
width = 4;
+ else
+ internal_error (__FILE__, __LINE__, "bad else");
numargs = read_memory_integer (pc + 2, width);
if (width > 1)
flip_bytes (&numargs, width);
@@ -135,6 +140,8 @@ umax_frame_num_args (struct frame_info *fi)
width = 2;
else if (insn == 0x57f) /* adjspd */
width = 4;
+ else
+ internal_error (__FILE__, __LINE__, "bad else");
numargs = read_memory_integer (pc + 2, width);
if (width > 1)
flip_bytes (&numargs, width);
@@ -145,6 +152,7 @@ umax_frame_num_args (struct frame_info *fi)
}
+static int
sign_extend (int value, int bits)
{
value = value & ((1 << bits) - 1);
@@ -154,9 +162,10 @@ sign_extend (int value, int bits)
}
void
-flip_bytes (char *ptr, int count)
+flip_bytes (void *p, int count)
{
char tmp;
+ char *ptr = 0;
while (count > 0)
{