aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-11-25 22:13:53 +0000
committerAndrew Cagney <cagney@redhat.com>1998-11-25 22:13:53 +0000
commitc8623080cb217735f4f7460186e9a1ad910b4a3b (patch)
tree595d432ebb57f79ae1d3f69802ea5236beb77b29
parenta6a5d3492796f75b03b92f86226b2741ee468f0d (diff)
downloadgdb-c8623080cb217735f4f7460186e9a1ad910b4a3b.zip
gdb-c8623080cb217735f4f7460186e9a1ad910b4a3b.tar.gz
gdb-c8623080cb217735f4f7460186e9a1ad910b4a3b.tar.bz2
CARP: --enable-build-warnings=-Werror: Fix problems stopping GDB being
canadian-crossed to host i386-cygwin.
-rw-r--r--gdb/ChangeLog29
-rw-r--r--gdb/a29k-tdep.c6
-rw-r--r--gdb/alpha-tdep.c2
-rw-r--r--gdb/c-exp.y17
-rw-r--r--gdb/config/a29k/tm-a29k.h8
-rw-r--r--gdb/config/i960/tm-i960.h4
-rwxr-xr-xgdb/configure60
-rw-r--r--gdb/configure.in11
-rw-r--r--gdb/configure.tgt24
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/monitor.c104
-rw-r--r--gdb/remote-mips.c2
-rw-r--r--gdb/remote-sim.c4
-rw-r--r--gdb/remote-udi.c4
-rw-r--r--gdb/sparcl-tdep.c4
-rw-r--r--gdb/vx-share/xdr_ld.c2
-rw-r--r--gdb/xcoffread.c6
17 files changed, 157 insertions, 132 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 97fece8..c54824f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,32 @@
+Wed Nov 25 00:13:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * vx-share/xdr_ld.c (xdr_ldtabl): Cast second arg to char**
+ instead of char*.
+
+ * configure.tgt (v850): Only build v850ice when cygwin and gui.
+ * configure.in: Add parameter to --enable-build-warnings.
+ * configure: Re-build.
+
+ * c-exp.y (parse_number): Rewrite shift to pacify GCC.
+
+ * config/i960/tm-i960.h (BREAKPOINT): Delete definition - simply
+ wrong.
+
+ * monitor.c (compile_pattern): Make val const char*.
+ (monitor_wait_cleanup): Make old_timeout void*, pointing at
+ old_timeout.
+ (monitor_wait): Update.
+
+ * remote-udi.c, remote-sim.c, remote-e7000.c, hppa-tdep.c,
+ remote-mips.c, sparcl-tdep.c, xcoffread.c: Cast parameters passed
+ to make_cleanup to use the new make_cleanup_func typedef.
+
+ * alpha-tdep.c (MASK): Use LONGEST to avoid arithmetic overflow.
+
+ * config/a29k/tm-a29k.h (TRANSPARENT): Rename macro to
+ TRANSPARENT_FRAME. Avoid name-space clash.
+ * a29k-tdep.c (init_frame_info): Update.
+
Wed Nov 25 20:37:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
* mem-break.c (memory_insert_breakpoint,
diff --git a/gdb/a29k-tdep.c b/gdb/a29k-tdep.c
index d51d915..b3c0567 100644
--- a/gdb/a29k-tdep.c
+++ b/gdb/a29k-tdep.c
@@ -427,7 +427,7 @@ init_frame_info (innermost_frame, frame)
/* Dummy frames always use a memory frame pointer. */
frame->saved_msp =
read_register_stack_integer (frame->frame + DUMMY_FRAME_RSIZE - 4, 4);
- frame->flags |= (TRANSPARENT|MFP_USED);
+ frame->flags |= (TRANSPARENT_FRAME|MFP_USED);
return;
}
@@ -460,7 +460,7 @@ init_frame_info (innermost_frame, frame)
frame->saved_msp = 0;
frame->rsize = 0;
frame->msize = 0;
- frame->flags = TRANSPARENT;
+ frame->flags = TRANSPARENT_FRAME;
return;
}
else
@@ -486,7 +486,7 @@ init_frame_info (innermost_frame, frame)
if (mfp_used)
frame->flags |= MFP_USED;
if (trans)
- frame->flags |= TRANSPARENT;
+ frame->flags |= TRANSPARENT_FRAME;
if (innermost_frame)
{
frame->saved_msp = read_register (MSP_REGNUM) + msize;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 0296306..d64ab49 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1008,7 +1008,7 @@ alpha_push_dummy_frame()
*/
/* MASK(i,j) == (1<<i) + (1<<(i+1)) + ... + (1<<j)). Assume i<=j<31. */
-#define MASK(i,j) (((1L << ((j)+1)) - 1) ^ ((1L << (i)) - 1))
+#define MASK(i,j) ((((LONGEST)1 << ((j)+1)) - 1) ^ (((LONGEST)1 << (i)) - 1))
#define GEN_REG_SAVE_MASK (MASK(0,8) | MASK(16,29))
#define GEN_REG_SAVE_COUNT 24
#define FLOAT_REG_SAVE_MASK (MASK(0,1) | MASK(10,30))
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 38279f3..4b40eb0 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1085,18 +1085,13 @@ parse_number (p, len, parsed_float, putithere)
}
else
{
- /* Avoid negative shift. */
- if (TARGET_LONG_LONG_BIT <= 32)
- high_bit = ((ULONGEST)1 << TARGET_LONG_LONG_BIT - 1);
- else
- high_bit = (((ULONGEST)1)
- << (TARGET_LONG_LONG_BIT - 32 - 1)
- << 16
- << 16);
- if (high_bit == 0)
+ int shift;
+ if (sizeof (ULONGEST) * HOST_CHAR_BIT < TARGET_LONG_LONG_BIT)
/* A long long does not fit in a LONGEST. */
- high_bit =
- (ULONGEST)1 << (sizeof (LONGEST) * HOST_CHAR_BIT - 1);
+ shift = (sizeof (ULONGEST) * HOST_CHAR_BIT - 1);
+ else
+ shift = (TARGET_LONG_LONG_BIT - 1);
+ high_bit = (ULONGEST) 1 << shift;
unsigned_type = builtin_type_unsigned_long_long;
signed_type = builtin_type_long_long;
}
diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h
index e71081f..f999134 100644
--- a/gdb/config/a29k/tm-a29k.h
+++ b/gdb/config/a29k/tm-a29k.h
@@ -52,7 +52,7 @@ CORE_ADDR skip_prologue ();
the new frame is not set up until the new function executes
some instructions. */
-#define SAVED_PC_AFTER_CALL(frame) ((frame->flags & TRANSPARENT) \
+#define SAVED_PC_AFTER_CALL(frame) ((frame->flags & TRANSPARENT_FRAME) \
? read_register (TPC_REGNUM) \
: read_register (LR0_REGNUM))
@@ -428,8 +428,8 @@ long read_register_stack_integer ();
unsigned char flags;
/* Bits for flags in EXTRA_FRAME_INFO */
-#define TRANSPARENT 0x1 /* This is a transparent frame */
-#define MFP_USED 0x2 /* A memory frame pointer is used */
+#define TRANSPARENT_FRAME 0x1 /* This is a transparent frame */
+#define MFP_USED 0x2 /* A memory frame pointer is used */
/* Because INIT_FRAME_PC gets passed fromleaf, that's where we init
not only ->pc and ->frame, but all the extra stuff, when called from
@@ -466,7 +466,7 @@ void init_frame_pc ();
: (thisframe)->frame + (thisframe)->rsize)
/* Determine if the frame has a 'previous' and back-traceable frame. */
-#define FRAME_IS_UNCHAINED(frame) ((frame)->flags & TRANSPARENT)
+#define FRAME_IS_UNCHAINED(frame) ((frame)->flags & TRANSPARENT_FRAME)
/* Find the previous frame of a transparent routine.
* For now lets not try and trace through a transparent routine (we might
diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h
index 39707b9..11ae4a4 100644
--- a/gdb/config/i960/tm-i960.h
+++ b/gdb/config/i960/tm-i960.h
@@ -68,10 +68,6 @@ extern CORE_ADDR saved_pc_after_call ();
#define ABOUT_TO_RETURN(ip) (read_memory_integer(ip,4) == 0x0a000000)
-/* Use the fmark instruction for software breakpoints. */
-
-#define BREAKPOINT { 0xcf, 0x66 }
-
/* Say how long (ordinary) registers are. This is a piece of bogosity
used in push_word and a few other places; REGISTER_RAW_SIZE is the
real way to know how big a register is. */
diff --git a/gdb/configure b/gdb/configure
index e7d2484..3843e38 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -4623,7 +4623,11 @@ if test "${enable_build_warnings+set}" = set; then
case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
- *) ;;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
else
build_warnings=""
@@ -4893,12 +4897,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:4897: checking for cygwin" >&5
+echo "configure:4901: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4902 "configure"
+#line 4906 "configure"
#include "confdefs.h"
#ifdef __CYGWIN32__
@@ -4957,7 +4961,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:4961: checking for Tcl configuration" >&5
+echo "configure:4965: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5065,7 +5069,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:5069: checking for Tk configuration" >&5
+echo "configure:5073: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5161,7 +5165,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:5165: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:5169: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -5227,17 +5231,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:5231: checking for tclInt.h" >&5
+echo "configure:5235: checking for tclInt.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5236 "configure"
+#line 5240 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5297,7 +5301,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:5301: checking for Tk private headers" >&5
+echo "configure:5305: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -5363,17 +5367,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:5367: checking for tk.h" >&5
+echo "configure:5371: checking for tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5372 "configure"
+#line 5376 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5419,7 +5423,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:5423: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:5427: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
if test -f $i/src/itcl.h ; then
@@ -5442,7 +5446,7 @@ fi
echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:5446: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:5450: checking for Tix private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
if test -f $i/generic/tix.h ; then
@@ -5536,7 +5540,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5540: checking for X" >&5
+echo "configure:5544: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -5598,12 +5602,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 5602 "configure"
+#line 5606 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5672,14 +5676,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5676 "configure"
+#line 5680 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -5942,7 +5946,7 @@ links="${links} nm.h"
fi
# start-sanitize-gdbtk
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:5946: checking whether ln -s works" >&5
+echo "configure:5950: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5977,19 +5981,19 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:5981: checking for Cygwin environment" >&5
+echo "configure:5985: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'am_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5986 "configure"
+#line 5990 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN32__;
; return 0; }
EOF
-if { (eval echo configure:5993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_cygwin=yes
else
@@ -6006,19 +6010,19 @@ echo "$ac_t""$am_cv_cygwin" 1>&6
CYGWIN=
test "$am_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:6010: checking for Mingw32 environment" >&5
+echo "configure:6014: checking for Mingw32 environment" >&5
if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6015 "configure"
+#line 6019 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_mingw32=yes
else
@@ -6037,7 +6041,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:6041: checking for executable suffix" >&5
+echo "configure:6045: checking for executable suffix" >&5
if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
diff --git a/gdb/configure.in b/gdb/configure.in
index 767e0da..b3b9298 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -300,12 +300,11 @@ AC_ARG_ENABLE(build-warnings,
case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
-dnl ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
-dnl build_warnings="${build_warnings} ${t}";;
-dnl *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
-dnl build_warnings="${t} ${build_warnings}";;
-dnl *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
- *) ;;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac],[build_warnings=""])dnl
if test "x${build_warnings}" != x -a "x$GCC" = xyes
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 06dda6c..6d82d52 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -295,33 +295,27 @@ tic80-*-*) gdb_target=tic80
vax-*-*) gdb_target=vax ;;
v850-*-*) gdb_target=v850
- case $gdb_host in
- windows)
- CONFIG_OBS="${CONFIG_OBS} v850ice.o"
- LIBS="${LIBS} necmsg.lib" ;;
- cygwin*)
+ case ${gdb_host}-${enable_gdbtk-no} in
+ cygwin*-yes )
CONFIG_OBS="${CONFIG_OBS} v850ice.o" ;;
+ * ) ;;
esac
;;
# start-sanitize-v850e
v850e-*-*) gdb_target=v850
gdb_target_cpu=v850
- case $gdb_host in
- windows)
- CONFIG_OBS="${CONFIG_OBS} v850ice.o"
- LIBS="${LIBS} v850.lib" ;;
- cygwin*)
+ case "${gdb_host}-${enable_gdbtk-no}" in
+ cygwin*-yes )
CONFIG_OBS="${CONFIG_OBS} v850ice.o" ;;
+ * ) ;;
esac
;;
v850ea-*-*) gdb_target=v850
gdb_target_cpu=v850
- case $gdb_host in
- windows)
- CONFIG_OBS="${CONFIG_OBS} v850ice.o"
- LIBS="${LIBS} v850.lib" ;;
- cygwin*)
+ case "${gdb_host}-${enable_gdbtk-no}" in
+ cygwin*-yes )
CONFIG_OBS="${CONFIG_OBS} v850ice.o" ;;
+ * ) ;;
esac
;;
# end-sanitize-v850e
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index ff0318a..2b11f91 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1433,7 +1433,7 @@ hppa_pop_frame ()
breakpoint->silent = 1;
/* So we can clean things up. */
- old_chain = make_cleanup (delete_breakpoint, breakpoint);
+ old_chain = make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
/* Start up the inferior. */
clear_proceed_status ();
diff --git a/gdb/monitor.c b/gdb/monitor.c
index bd07a2a..3e0a488 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -76,7 +76,7 @@ static void monitor_resume PARAMS ((int pid, int step, enum target_signal sig));
static void monitor_interrupt PARAMS ((int signo));
static void monitor_interrupt_twice PARAMS ((int signo));
static void monitor_interrupt_query PARAMS ((void));
-static void monitor_wait_cleanup PARAMS ((int old_timeout));
+static void monitor_wait_cleanup PARAMS ((void *old_timeout));
static int monitor_wait PARAMS ((int pid, struct target_waitstatus *status));
static void monitor_fetch_registers PARAMS ((int regno));
@@ -120,7 +120,7 @@ static void (*ofunc)(); /* Old SIGINT signal handler */
/* Extra remote debugging for developing a new rom monitor variation */
#if ! defined(EXTRA_RDEBUG)
-#define EXTRA_RDEBUG 1
+#define EXTRA_RDEBUG 0
#endif
#if EXTRA_RDEBUG
#define RDEBUG(stuff) { if (remote_debug) printf stuff ; }
@@ -175,6 +175,8 @@ fromhex (a)
Only format specifiers of the form "[0-9]*[a-z]" are recognized.
If it is a '%s' format, the argument is a string; otherwise the
argument is assumed to be a long integer.
+
+ %% is also turned into a single %.
*/
static void
@@ -206,6 +208,9 @@ monitor_vsprintf (sndbuf, pattern, args)
/* Fetch the next argument and print it. */
switch (fmt)
{
+ case '%':
+ strcpy (sndbuf, "%");
+ break;
case 'A':
arg_addr = va_arg (args, CORE_ADDR);
strcpy (sndbuf, paddr_nz (arg_addr));
@@ -600,7 +605,7 @@ compile_pattern (pattern, compiled_pattern, fastmap)
char *fastmap;
{
int tmp;
- char *val;
+ const char *val;
compiled_pattern->fastmap = fastmap;
@@ -902,9 +907,9 @@ Give up (and stop debugging it)? "))
static void
monitor_wait_cleanup (old_timeout)
- int old_timeout;
+ void *old_timeout;
{
- timeout = old_timeout;
+ timeout = *(int*)old_timeout;
signal (SIGINT, ofunc);
in_monitor_wait = 0;
}
@@ -959,7 +964,7 @@ monitor_wait (pid, status)
status->kind = TARGET_WAITKIND_EXITED;
status->value.integer = 0;
- old_chain = make_cleanup (monitor_wait_cleanup, old_timeout);
+ old_chain = make_cleanup (monitor_wait_cleanup, &old_timeout);
RDEBUG(("MON wait\n"))
#if 0 /* MAINTENANCE_CMDS */
@@ -2100,49 +2105,51 @@ monitor_get_dev_name ()
return dev_name;
}
-static struct target_ops monitor_ops =
+static struct target_ops monitor_ops ;
+
+static void init_base_monitor_ops(void)
{
- NULL, /* to_shortname */
- NULL, /* to_longname */
- NULL, /* to_doc */
- NULL, /* to_open */
- monitor_close, /* to_close */
- NULL, /* to_attach */
- monitor_detach, /* to_detach */
- monitor_resume, /* to_resume */
- monitor_wait, /* to_wait */
- monitor_fetch_registers, /* to_fetch_registers */
- monitor_store_registers, /* to_store_registers */
- monitor_prepare_to_store, /* to_prepare_to_store */
- monitor_xfer_memory, /* to_xfer_memory */
- monitor_files_info, /* to_files_info */
- monitor_insert_breakpoint, /* to_insert_breakpoint */
- monitor_remove_breakpoint, /* to_remove_breakpoint */
- 0, /* to_terminal_init */
- 0, /* to_terminal_inferior */
- 0, /* to_terminal_ours_for_output */
- 0, /* to_terminal_ours */
- 0, /* to_terminal_info */
- monitor_kill, /* to_kill */
- monitor_load, /* to_load */
- 0, /* to_lookup_symbol */
- monitor_create_inferior, /* to_create_inferior */
- monitor_mourn_inferior, /* to_mourn_inferior */
- 0, /* to_can_run */
- 0, /* to_notice_signals */
- 0, /* to_thread_alive */
- monitor_stop, /* to_stop */
- process_stratum, /* to_stratum */
- 0, /* to_next */
- 1, /* to_has_all_memory */
- 1, /* to_has_memory */
- 1, /* to_has_stack */
- 1, /* to_has_registers */
- 1, /* to_has_execution */
- 0, /* sections */
- 0, /* sections_end */
- OPS_MAGIC /* to_magic */
-};
+ monitor_ops.to_shortname = NULL;
+ monitor_ops.to_longname = NULL;
+ monitor_ops.to_doc = NULL;
+ monitor_ops.to_open = NULL;
+ monitor_ops.to_close = monitor_close;
+ monitor_ops.to_attach = NULL;
+ monitor_ops.to_detach = monitor_detach;
+ monitor_ops.to_resume = monitor_resume;
+ monitor_ops.to_wait = monitor_wait;
+ monitor_ops.to_fetch_registers = monitor_fetch_registers;
+ monitor_ops.to_store_registers = monitor_store_registers;
+ monitor_ops.to_prepare_to_store = monitor_prepare_to_store;
+ monitor_ops.to_xfer_memory = monitor_xfer_memory;
+ monitor_ops.to_files_info = monitor_files_info;
+ monitor_ops.to_insert_breakpoint = monitor_insert_breakpoint;
+ monitor_ops.to_remove_breakpoint = monitor_remove_breakpoint;
+ monitor_ops.to_terminal_init = 0;
+ monitor_ops.to_terminal_inferior = 0;
+ monitor_ops.to_terminal_ours_for_output = 0;
+ monitor_ops.to_terminal_ours = 0;
+ monitor_ops.to_terminal_info = 0;
+ monitor_ops.to_kill = monitor_kill;
+ monitor_ops.to_load = monitor_load;
+ monitor_ops.to_lookup_symbol = 0;
+ monitor_ops.to_create_inferior = monitor_create_inferior;
+ monitor_ops.to_mourn_inferior = monitor_mourn_inferior;
+ monitor_ops.to_can_run = 0;
+ monitor_ops.to_notice_signals = 0;
+ monitor_ops.to_thread_alive = 0;
+ monitor_ops.to_stop = monitor_stop;
+ monitor_ops.to_stratum = process_stratum;
+ monitor_ops.DONT_USE = 0;
+ monitor_ops.to_has_all_memory = 1;
+ monitor_ops.to_has_memory = 1;
+ monitor_ops.to_has_stack = 1;
+ monitor_ops.to_has_registers = 1;
+ monitor_ops.to_has_execution = 1;
+ monitor_ops.to_sections = 0;
+ monitor_ops.to_sections_end = 0;
+ monitor_ops.to_magic = OPS_MAGIC ;
+} /* init_monitor_ops */
/* Init the target_ops structure pointed at by OPS */
@@ -2158,6 +2165,7 @@ init_monitor_ops (ops)
void
_initialize_remote_monitors ()
{
+ init_base_monitor_ops() ;
add_show_from_set (add_set_cmd ("hash", no_class, var_boolean,
(char *)&hashmark,
"Set display of activity while downloading a file.\n\
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 75db2ee..8b2299e 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1560,7 +1560,7 @@ device is attached to the target board (e.g., /dev/ttya).\n"
optional local TFTP name. */
if ((argv = buildargv (name)) == NULL)
nomem(0);
- make_cleanup (freeargv, (char *) argv);
+ make_cleanup ((make_cleanup_func) freeargv, argv);
serial_port_name = strsave (argv[0]);
if (argv[1]) /* remote TFTP name specified? */
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index ccc1bdb..f763753 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -478,7 +478,7 @@ gdbsim_create_inferior (exec_file, args, env)
strcat (arg_buf, " ");
strcat (arg_buf, args);
argv = buildargv (arg_buf);
- make_cleanup (freeargv, (char *) argv);
+ make_cleanup ((make_cleanup_func) freeargv, argv);
}
else
argv = NULL;
@@ -560,7 +560,7 @@ gdbsim_open (args, from_tty)
argv = buildargv (arg_buf);
if (argv == NULL)
error ("Insufficient memory available to allocate simulator arg list.");
- make_cleanup (freeargv, (char *) argv);
+ make_cleanup ((make_cleanup_func) freeargv, argv);
init_callbacks ();
gdbsim_desc = sim_open (SIM_OPEN_DEBUG, &gdb_callback, exec_bfd, argv);
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c
index dfc9f6b..324a7df 100644
--- a/gdb/remote-udi.c
+++ b/gdb/remote-udi.c
@@ -1092,7 +1092,7 @@ download(load_arg_string, from_tty)
error ("Must specify at least a file name with the load command");
filename = tilde_expand (filename);
- make_cleanup (free, filename);
+ make_cleanup ((make_cleanup_func) free, filename);
while (token = strtok (NULL, " \t"))
{
@@ -1146,7 +1146,7 @@ download(load_arg_string, from_tty)
/* FIXME: should be checking for errors from bfd_close (for one thing,
on error it does not free all the storage associated with the
bfd). */
- make_cleanup (bfd_close, pbfd);
+ make_cleanup ((make_cleanup_func) bfd_close, pbfd);
QUIT;
immediate_quit++;
diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c
index 6c34938..413901d 100644
--- a/gdb/sparcl-tdep.c
+++ b/gdb/sparcl-tdep.c
@@ -480,7 +480,7 @@ or: target sparclite udp host");
{
remote_desc = open_tty (p);
- old_chain = make_cleanup (close_tty, 0);
+ old_chain = make_cleanup ((make_cleanup_func) close_tty, 0);
c = send_resp (remote_desc, 0x00);
@@ -613,7 +613,7 @@ download (target_name, args, from_tty, write_routine, start_routine)
perror_with_name (filename);
return;
}
- old_chain = make_cleanup (bfd_close, pbfd);
+ old_chain = make_cleanup ((make_cleanup_func) bfd_close, pbfd);
if (!bfd_check_format (pbfd, bfd_object))
error ("\"%s\" is not an object file: %s", filename,
diff --git a/gdb/vx-share/xdr_ld.c b/gdb/vx-share/xdr_ld.c
index f849505..3678c35 100644
--- a/gdb/vx-share/xdr_ld.c
+++ b/gdb/vx-share/xdr_ld.c
@@ -79,6 +79,6 @@ bool_t xdr_ldtabl (xdrs,objp)
ldtabl *objp;
{
- return (xdr_array (xdrs, (char *) &objp->tbl_ent, (UINT *) &objp->tbl_size,
+ return (xdr_array (xdrs, (char **) &objp->tbl_ent, (UINT *) &objp->tbl_size,
MAXTBLSZ, sizeof(ldfile), xdr_ldfile));
}
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index dc34f32..0cf9371 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1809,7 +1809,7 @@ xcoff_psymtab_to_symtab_1 (pst)
/* Init stuff necessary for reading in symbols. */
stabsread_init ();
buildsym_init ();
- old_chain = make_cleanup (really_free_pendings, 0);
+ old_chain = make_cleanup ((make_cleanup_func) really_free_pendings, 0);
read_xcoff_symtab (pst);
sort_symtab_syms (pst->symtab);
@@ -2725,10 +2725,10 @@ xcoff_initial_scan (objfile, section_offsets, mainline)
init_psymbol_list (objfile, num_symbols);
free_pending_blocks ();
- back_to = make_cleanup (really_free_pendings, 0);
+ back_to = make_cleanup ((make_cleanup_func) really_free_pendings, 0);
init_minimal_symbol_collection ();
- make_cleanup (discard_minimal_symbols, 0);
+ make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */