This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] -Werror and ns32k
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [patch] -Werror and ns32k
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 28 Mar 2001 16:25:40 -0500
FYI,
These tweeks get the NS32k target to compile with -Werror.
Andrew
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.
Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.85
diff -p -r1.85 MAINTAINERS
*** MAINTAINERS 2001/03/26 18:06:43 1.85
--- MAINTAINERS 2001/03/28 21:21:32
*************** maintainer works with the native maintai
*** 114,120 ****
mn10300 --target=mn10300-elf ,-Werror
Andrew Cagney cagney@cygnus.com
! ns32k --target=ns32k-netbsd ,Werror
Maintenance only
pa (--target=hppa1.1-hp-proelf broken)
--- 114,120 ----
mn10300 --target=mn10300-elf ,-Werror
Andrew Cagney cagney@cygnus.com
! ns32k --target=ns32k-netbsd ,-Werror
Maintenance only
pa (--target=hppa1.1-hp-proelf broken)
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.4
diff -p -r1.4 ns32k-tdep.c
*** ns32k-tdep.c 2001/03/06 08:21:11 1.4
--- ns32k-tdep.c 2001/03/28 21:21:32
***************
*** 21,27 ****
--- 21,30 ----
#include "defs.h"
#include "frame.h"
+ #include "gdbcore.h"
+ static int sign_extend (int value, int bits);
+
void
_initialize_ns32k_tdep (void)
{
*************** merlin_frame_num_args (struct frame_info
*** 90,95 ****
--- 93,100 ----
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);
*************** umax_frame_num_args (struct frame_info *
*** 135,140 ****
--- 140,147 ----
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);
*************** umax_frame_num_args (struct frame_info *
*** 145,150 ****
--- 152,158 ----
}
+ static int
sign_extend (int value, int bits)
{
value = value & ((1 << bits) - 1);
*************** sign_extend (int value, int bits)
*** 154,162 ****
}
void
! flip_bytes (char *ptr, int count)
{
char tmp;
while (count > 0)
{
--- 162,171 ----
}
void
! flip_bytes (void *p, int count)
{
char tmp;
+ char *ptr = 0;
while (count > 0)
{
Index: config/ns32k/tm-umax.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ns32k/tm-umax.h,v
retrieving revision 1.5
diff -p -r1.5 tm-umax.h
*** tm-umax.h 2001/03/14 23:23:14 1.5
--- tm-umax.h 2001/03/28 21:21:32
*************** extern int umax_frame_num_args (struct f
*** 241,246 ****
--- 241,248 ----
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; \
*************** extern int umax_frame_num_args (struct f
*** 321,326 ****
--- 323,330 ----
/* 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) \
{ \