CARP: --enable-build-warnings=-Werror: Fix problems stopping GDB being
authorAndrew Cagney <cagney@redhat.com>
Wed, 25 Nov 1998 22:13:53 +0000 (22:13 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 25 Nov 1998 22:13:53 +0000 (22:13 +0000)
canadian-crossed to host i386-cygwin.

17 files changed:
gdb/ChangeLog
gdb/a29k-tdep.c
gdb/alpha-tdep.c
gdb/c-exp.y
gdb/config/a29k/tm-a29k.h
gdb/config/i960/tm-i960.h
gdb/configure
gdb/configure.in
gdb/configure.tgt
gdb/hppa-tdep.c
gdb/monitor.c
gdb/remote-mips.c
gdb/remote-sim.c
gdb/remote-udi.c
gdb/sparcl-tdep.c
gdb/vx-share/xdr_ld.c
gdb/xcoffread.c

index 97fece807e0e87bcc3ebec1c1ec7a6968c55e4f5..c54824f54f838285755b026af5d3f350b2c8b90c 100644 (file)
@@ -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,
index d51d9157680abec3c4cb7820e33bb43881c17c56..b3c056723ad635b7f248891b5b15722acfca2da0 100644 (file)
@@ -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;
index 0296306edacf8f56f8fbe6d7c8a1116323c1f671..d64ab49bf6ca02edd919b07d456f1495d8d36477 100644 (file)
@@ -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))
index 38279f3fc6ffff5e74fa8e227a2cfc4166647ea6..4b40eb04e05057cdf9d5fa657cfe0eea601bb81c 100644 (file)
@@ -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;
     }
index e71081f3d02d53c9e1535378982615c6cc8c2b0b..f999134359b9f97f0f04044f175e7c9a654de9a3 100644 (file)
@@ -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 
index 39707b94a2f5608ab81403db2cafb9766282b6cb..11ae4a4c107bfb4a2fb185d10298b8ff9f104928 100644 (file)
@@ -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.  */
index e7d24843b952913fc37af675222f77b8cba048fa..3843e38ce213c83a4c523b93a6bc4fd35785a3ef 100755 (executable)
@@ -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
index 767e0daf48d5d4354d9d5033990fd20e22205a8d..b3b9298592ae82423f6288c35a6097048ae270a0 100644 (file)
@@ -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
index 06dda6ce0daeb9b801790c76da554021a29db4d2..6d82d5249e03a30029dfc1e7925ba235752d8037 100644 (file)
@@ -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
index ff0318a05b3efa4f07138d51141325604a24c8a6..2b11f91818d5d8e4a156f07f7278be7d46df707a 100644 (file)
@@ -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 ();
index bd07a2af4d20a9277c654a4cb387124903bb5878..3e0a488dddccb8d11c2ec0c45a0ddafddee2331e 100644 (file)
@@ -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\
index 75db2eec3b705a82119798766b6c7224716432be..8b2299e5c051863098d395d129e68207b3721f36 100644 (file)
@@ -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? */
index ccc1bdb355dcde6830eb6b8f97812146a93a01e6..f76375335ace771ac74e153eef133f6477e1aa99 100644 (file)
@@ -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);
index dfc9f6bab9a646d1c13e17fc5e077dee14c09e09..324a7df4ab334a24d20aeecf4329641b24c58d5b 100644 (file)
@@ -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++;
index 6c349384d4d4705881ee0282108fd3de25ef0f75..413901db2fa5db60f275d1a43668d4b51d47bd67 100644 (file)
@@ -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,
index f849505969dd593fb8d5d6efbb78554d189aec39..3678c3501b821ac8a2c28fd6392f862584320b67 100644 (file)
@@ -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));
     }
index dc34f3285b88146b47866584ae3de4e58ea9279b..0cf93714821db9684c566f6e24c6e5cf8977364f 100644 (file)
@@ -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.  */
This page took 0.060037 seconds and 4 git commands to generate.