CARP:
authorAndrew Cagney <cagney@redhat.com>
Sat, 28 Nov 1998 22:53:04 +0000 (22:53 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 28 Nov 1998 22:53:04 +0000 (22:53 +0000)
Rewrite INNER_THAN so that it takes parameters.

31 files changed:
gdb/ChangeLog
gdb/blockframe.c
gdb/carp-tdep.c
gdb/config/a29k/tm-a29k.h
gdb/config/arc/tm-arc.h
gdb/config/arm/tm-arm.h
gdb/config/d10v/tm-d10v.h
gdb/config/d30v/tm-d30v.h
gdb/config/h8300/tm-h8300.h
gdb/config/h8500/tm-h8500.h
gdb/config/i386/tm-i386.h
gdb/config/i960/tm-i960.h
gdb/config/m32r/tm-m32r.h
gdb/config/m68k/tm-m68k.h
gdb/config/m88k/tm-m88k.h
gdb/config/mips/tm-mips.h
gdb/config/mn10200/tm-mn10200.h
gdb/config/mn10300/tm-mn10300.h
gdb/config/none/tm-none.h
gdb/config/ns32k/tm-merlin.h
gdb/config/ns32k/tm-umax.h
gdb/config/pa/tm-hppa.h
gdb/config/sh/tm-sh.h
gdb/config/sparc/tm-sparc.h
gdb/config/tic80/tm-tic80.h
gdb/config/v850/tm-v850.h
gdb/config/vax/tm-vax.h
gdb/config/w65/tm-w65.h
gdb/config/z8k/tm-z8k.h
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo

index 3ff3f85..289eb6e 100644 (file)
@@ -1,3 +1,27 @@
+Sat Nov 28 12:24:31 1998  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/vax/tm-vax.h,
+       config/v850/tm-v850.h, config/tahoe/tm-tahoe.h,
+       config/sparc/tm-sparc.h, config/sh/tm-sh.h,
+       config/rs6000/tm-rs6000.h, config/pyr/tm-pyr.h,
+       config/pa/tm-hppa.h, config/ns32k/tm-umax.h,
+       config/ns32k/tm-merlin.h, config/none/tm-none.h,
+       config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
+       config/mips/tm-mips.h, config/m88k/tm-m88k.h,
+       config/m68k/tm-m68k.h, config/m32r/tm-m32r.h,
+       config/i960/tm-i960.h, config/i386/tm-i386.h,
+       config/h8500/tm-h8500.h, config/h8300/tm-h8300.h,
+       config/gould/tm-pn.h, config/gould/tm-np1.h, config/arm/tm-arm.h,
+       config/convex/tm-convex.h, config/d10v/tm-d10v.h,
+       config/alpha/tm-alpha.h, config/a29k/tm-a29k.h: Add parameters to
+       macro INNER_THAN.
+
+       * valops.c (push_word, value_push, call_function_by_hand),
+       breakpoint.c (bpstat_stop_status), blockframe.c
+       (generic_push_dummy_frame, generic_frame_chain_valid), inferior.h
+       (PC_IN_CALL_DUMMY), infrun.c (wait_for_inferior): Update use of
+       INNER_THAN.
+
 Fri Nov 27 11:00:25 1998  Andrew Cagney  <cagney@chook>
 
        * target.h (one_stepped): Move global from here.
index 9e042de..3cb00c8 100644 (file)
@@ -31,6 +31,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "inferior.h"          /* for read_pc */
 #include "annotate.h"
 
+/* Prototypes for exported functions. */
+
+void _initialize_blockframe PARAMS ((void));
+
 /* Is ADDR inside the startup file?  Note that if your machine
    has a way to detect the bottom of the stack, there is no need
    to call this function from FRAME_CHAIN_VALID; the reason for
@@ -1049,7 +1053,7 @@ generic_push_dummy_frame ()
 
   dummy_frame = dummy_frame_stack;
   while (dummy_frame)
-    if (dummy_frame->fp INNER_THAN fp) /* stale -- destroy! */
+    if (INNER_THAN (dummy_frame->fp, fp))      /* stale -- destroy! */
       {
        dummy_frame_stack = dummy_frame->next;
        free (dummy_frame);
@@ -1114,7 +1118,7 @@ generic_frame_chain_valid (fp, fi)
     return 1;   /* don't prune CALL_DUMMY frames */
   else          /* fall back to default algorithm (see frame.h) */
     return (fp != 0
-           && (fi->frame INNER_THAN fp || fi->frame == fp)
+           && (INNER_THAN (fi->frame, fp) || fi->frame == fp)
            && !inside_entry_file (FRAME_SAVED_PC(fi)));
 }
  
index 9d7392d..ffddab5 100644 (file)
@@ -514,6 +514,8 @@ Define this to be either @code{<} if the targets stack grows downward
 in memory, or @code{>} is the stack grows upwards.
 #endif
 /* #define INNER_THAN < */
+extern int carp_inner_than (int, int);
+#define INNER_THAN(x,y) carp_inner_than(x,y)
 
 
 #if 0
index 66f54bf..8d451d8 100644 (file)
@@ -58,7 +58,7 @@ CORE_ADDR skip_prologue ();
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Stack must be aligned on 32-bit boundaries when synthesizing
    function calls. */
index 69a3a6f..043ead6 100644 (file)
@@ -83,7 +83,7 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
 
 /* Stack grows upward */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* 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
index 907773f..7185712 100644 (file)
@@ -77,7 +77,7 @@ extern CORE_ADDR arm_saved_pc_after_call PARAMS ((struct frame_info *));
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* !!!! if we're using RDP, then we're inserting breakpoints and storing
    their handles instread of what was in memory.  It is nice that
index 2062a68..1fc5052 100644 (file)
@@ -53,7 +53,7 @@ extern CORE_ADDR d10v_skip_prologue ();
 
 
 /* Stack grows downward.  */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* for a breakpoint, use "dbt || nop" */
 #define BREAKPOINT {0x2f, 0x90, 0x5e, 0x00} 
index 3455ed1..a9f6059 100644 (file)
@@ -52,7 +52,7 @@ extern CORE_ADDR d30v_skip_prologue ();
 
 
 /* Stack grows downward.  */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* for a breakpoint, use "dbt || nop" */
 #define BREAKPOINT {0x00, 0xb0, 0x00, 0x00,\
index dac5acb..bcdbb43 100644 (file)
@@ -82,7 +82,7 @@ extern CORE_ADDR h8300_skip_prologue ();
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /*#define BREAKPOINT {0x7A, 0xFF}*/
 #define BREAKPOINT {0x01, 0x80}  /* Sleep */
index 51b2d4c..22e5061 100644 (file)
@@ -56,7 +56,7 @@ extern CORE_ADDR saved_pc_after_call PARAMS ((void));
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Illegal instruction - used by the simulator for breakpoint
    detection */
index 7e92ac1..e2039e5 100644 (file)
@@ -59,7 +59,7 @@ extern int i386_skip_prologue PARAMS ((int));
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction.  */
 
index c80f7f3..a6d93b0 100644 (file)
@@ -62,7 +62,7 @@ extern CORE_ADDR saved_pc_after_call ();
 
 /* Stack grows upward */
 
-#define INNER_THAN >
+#define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
 
 /* 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
index 231a4ad..8273b4e 100644 (file)
@@ -83,7 +83,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define DECR_PC_AFTER_BREAK 0
 
 /* mvs_check  INNER_THAN */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* mvs_check  SAVED_PC_AFTER_CALL */
 #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
index 74d4eea..a04e9e4 100644 (file)
@@ -55,7 +55,7 @@ extern void m68k_find_saved_regs PARAMS ((struct frame_info *, struct frame_save
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Stack must be kept short aligned when doing function calls.  */
 
index b6776dc..f5c6dc5 100644 (file)
@@ -75,7 +75,7 @@ extern CORE_ADDR skip_prologue ();
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction.  */
 
index e16a498..8b80f96 100644 (file)
@@ -120,7 +120,7 @@ extern int in_sigtramp PARAMS ((CORE_ADDR, char *));
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 #define BIG_ENDIAN 4321
 
index e4c71fd..671b534 100644 (file)
@@ -86,7 +86,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define DECR_PC_AFTER_BREAK 0
 
 /* Stacks grow the normal way.  */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 #define SAVED_PC_AFTER_CALL(frame) \
   (read_memory_integer (read_register (SP_REGNUM), REGISTER_SIZE) & 0xffffff)
index a2bc298..6108f2a 100644 (file)
@@ -69,7 +69,7 @@ extern breakpoint_from_pc_fn mn10300_breakpoint_from_pc;
 
 #define DECR_PC_AFTER_BREAK 0
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 #define SAVED_PC_AFTER_CALL(frame) \
   read_memory_integer (read_register (SP_REGNUM), 4)
index 7f7e7d8..4b16b3b 100644 (file)
@@ -20,4 +20,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* This define is needed so that "gcc -MM" doesn't get errors and fail on
    source files that use the value of INNER_THAN in preprocessor lines. */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
index 4c9cedf..f90c5e7 100644 (file)
@@ -50,7 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction.  */
 
index fdb3cfe..1fdfb2f 100644 (file)
@@ -58,7 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction.  */
 
index 5c4566e..5a187fb 100644 (file)
@@ -103,7 +103,7 @@ extern CORE_ADDR saved_pc_after_call PARAMS ((struct frame_info *));
 
 /* Stack grows upward */
 
-#define INNER_THAN >
+#define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
 
 /* Sequence of bytes for breakpoint instruction.  */
 
index cc39ed3..a65461c 100644 (file)
@@ -59,7 +59,7 @@ extern CORE_ADDR sh_skip_prologue ();
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Illegal instruction - used by the simulator for breakpoint
    detection */
index d5eb576..e3165ce 100644 (file)
@@ -110,7 +110,7 @@ extern CORE_ADDR sparc_pc_adjust PARAMS ((CORE_ADDR));
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Stack must be aligned on 64-bit boundaries when synthesizing
    function calls. */
index e0de8e8..18f0b5c 100644 (file)
@@ -110,7 +110,7 @@ struct frame_saved_regs;
 
 /* Stack grows downward.  */
 
-#define INNER_THAN             <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction.
    This is padded out to the size of a machine word. */
index e57b5fe..faac00f 100644 (file)
@@ -78,7 +78,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #define DECR_PC_AFTER_BREAK 0
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
 
index c36f527..ad10fb7 100644 (file)
@@ -68,7 +68,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction.  */
 
index 458bfab..6809f93 100644 (file)
@@ -55,7 +55,7 @@ extern CORE_ADDR w65_skip_prologue ();
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Illegal instruction - used by the simulator for breakpoint
    detection */
index 3ef38ca..8800a9c 100644 (file)
@@ -53,7 +53,7 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip));
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction. */
 
index 9fc1708..ebc0663 100644 (file)
@@ -1,3 +1,7 @@
+Sat Nov 28 13:45:53 1998  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * gdbint.texinfo (INNER_THAN): Update, now takes parameters.
+
 Fri Nov 27 12:39:45 1998  Andrew Cagney  <cagney@chook>
 
        * gdbint.texinfo (NO_SINGLE_STEP): Replace with
index 1f9623b..1c5da1b 100644 (file)
@@ -1346,9 +1346,11 @@ If defined, this should be a C expression or statement that fills in the
 This is a C statement that sets the pc of the frame pointed to by
 @var{prev}.  [By default...]
 
-@item INNER_THAN
-Define this to be either @code{<} if the target's stack grows downward
-in memory, or @code{>} is the stack grows upwards.
+@item INNER_THAN (lhs,rhs)
+Returns non-zero if stack address @var{lhs} is inner than (nearer to the
+stack top) stack address @var{rhs}. Define this as @code{lhs < rhs} if
+the target's stack grows downward in memory, or @code{lhs > rsh} if the
+stack grows upward.
 
 @item IN_SIGTRAMP (pc, name)
 Define this to return true if the given @var{pc} and/or @var{name}