Rewrite INNER_THAN so that it takes parameters.
+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.
#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
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);
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)));
}
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
/* 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. */
/* 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
/* 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
/* 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}
/* 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,\
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/*#define BREAKPOINT {0x7A, 0xFF}*/
#define BREAKPOINT {0x01, 0x80} /* Sleep */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Illegal instruction - used by the simulator for breakpoint
detection */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. */
/* 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
#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)
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Stack must be kept short aligned when doing function calls. */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
#define BIG_ENDIAN 4321
#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)
#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)
/* 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))
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. */
/* Stack grows upward */
-#define INNER_THAN >
+#define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
/* Sequence of bytes for breakpoint instruction. */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Illegal instruction - used by the simulator for breakpoint
detection */
/* 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. */
/* 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. */
#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)
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Illegal instruction - used by the simulator for breakpoint
detection */
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. */
+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
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}