diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-03-28 21:26:07 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-03-28 21:26:07 +0000 |
commit | 381bab78db8ce8d9a17929364bdc7901ac17e4f0 (patch) | |
tree | 42b339c65229fabf75c6833795fc7261c2bc2ead | |
parent | 1c6fb4fe1f8b61d0acb229526ebd89dff051734f (diff) | |
download | gdb-381bab78db8ce8d9a17929364bdc7901ac17e4f0.zip gdb-381bab78db8ce8d9a17929364bdc7901ac17e4f0.tar.gz gdb-381bab78db8ce8d9a17929364bdc7901ac17e4f0.tar.bz2 |
Fix -Werror probs for ns32k.
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/MAINTAINERS | 2 | ||||
-rw-r--r-- | gdb/config/ns32k/tm-umax.h | 4 | ||||
-rw-r--r-- | gdb/ns32k-tdep.c | 11 |
4 files changed, 28 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bfd7594..88c0604 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2001-03-28 Andrew Cagney <ac131313@redhat.com> + + * MAINTAINERS: Change ns32k target to ,-Werror. + + * ns32k-tdep.c: Include "gdbcore.h" + (flip_bytes): Change first argument to void*. Add forward + declaration. + (sign_extend): Add declaration. + (merlin_frame_num_args): Add final else clause to if-else chain. + (umax_frame_num_args): Ditto. + * config/ns32k/tm-umax.h (ns32k_localcount): Declare. + (flip_bytes): Ditto. + 2001-03-28 Mark Kettenis <kettenis@gnu.org> * i386-linux-tdep.c (FRAMELESS_SIGNAL): Moved here from diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index d7aef74..3f91204 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -114,7 +114,7 @@ maintainer works with the native maintainer when resolving API issues. mn10300 --target=mn10300-elf ,-Werror Andrew Cagney cagney@cygnus.com - ns32k --target=ns32k-netbsd ,Werror + ns32k --target=ns32k-netbsd ,-Werror Maintenance only pa (--target=hppa1.1-hp-proelf broken) diff --git a/gdb/config/ns32k/tm-umax.h b/gdb/config/ns32k/tm-umax.h index a004123..5f9d2b9 100644 --- a/gdb/config/ns32k/tm-umax.h +++ b/gdb/config/ns32k/tm-umax.h @@ -241,6 +241,8 @@ extern int umax_frame_num_args (struct frame_info *fi); ways in the stack frame. sp is even more special: the address we return for it IS the sp for the next frame. */ +extern int ns32k_localcount (CORE_ADDR enter_pc); + #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ { \ register int regmask, regnum; \ @@ -322,6 +324,8 @@ extern int umax_frame_num_args (struct frame_info *fi); /* Insert the specified number of args and function address into a call sequence of the above form stored at DUMMYNAME. */ +void flip_bytes (void *ptr, int count); + #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ { \ int flipped; \ 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) { |