Rewrite INNER_THAN so that it takes parameters.
This commit is contained in:
Andrew Cagney 1998-11-28 22:53:04 +00:00
parent 0233186932
commit 3a0c96a996
31 changed files with 67 additions and 31 deletions

View 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.

View 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)));
}

View 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

View 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. */

View 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

View 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

View 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}

View 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,\

View 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 */

View 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 */

View 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. */

View 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

View 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)

View 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. */

View 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. */

View 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

View 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)

View 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)

View 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))

View 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. */

View 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. */

View 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. */

View 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 */

View 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. */

View 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. */

View 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)

View 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. */

View 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 */

View 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. */

View 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

View 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}