aboutsummaryrefslogtreecommitdiff
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
commit381bab78db8ce8d9a17929364bdc7901ac17e4f0 (patch)
tree42b339c65229fabf75c6833795fc7261c2bc2ead /gdb/ns32k-tdep.c
parent1c6fb4fe1f8b61d0acb229526ebd89dff051734f (diff)
downloadgdb-381bab78db8ce8d9a17929364bdc7901ac17e4f0.zip
gdb-381bab78db8ce8d9a17929364bdc7901ac17e4f0.tar.gz
gdb-381bab78db8ce8d9a17929364bdc7901ac17e4f0.tar.bz2
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 c4cab62..57efe07 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)
{