diff options
31 files changed, 67 insertions, 31 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3ff3f85..289eb6e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 9e042de..3cb00c8 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -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))); } diff --git a/gdb/carp-tdep.c b/gdb/carp-tdep.c index 9d7392d..ffddab5 100644 --- a/gdb/carp-tdep.c +++ b/gdb/carp-tdep.c @@ -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 diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h index 66f54bf..8d451d8 100644 --- a/gdb/config/a29k/tm-a29k.h +++ b/gdb/config/a29k/tm-a29k.h @@ -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. */ diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h index 69a3a6f..043ead6 100644 --- a/gdb/config/arc/tm-arc.h +++ b/gdb/config/arc/tm-arc.h @@ -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 diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h index 907773f..7185712 100644 --- a/gdb/config/arm/tm-arm.h +++ b/gdb/config/arm/tm-arm.h @@ -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 diff --git a/gdb/config/d10v/tm-d10v.h b/gdb/config/d10v/tm-d10v.h index 2062a68..1fc5052 100644 --- a/gdb/config/d10v/tm-d10v.h +++ b/gdb/config/d10v/tm-d10v.h @@ -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} diff --git a/gdb/config/d30v/tm-d30v.h b/gdb/config/d30v/tm-d30v.h index 3455ed1..a9f6059 100644 --- a/gdb/config/d30v/tm-d30v.h +++ b/gdb/config/d30v/tm-d30v.h @@ -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,\ diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h index dac5acb..bcdbb43 100644 --- a/gdb/config/h8300/tm-h8300.h +++ b/gdb/config/h8300/tm-h8300.h @@ -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 */ diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h index 51b2d4c..22e5061 100644 --- a/gdb/config/h8500/tm-h8500.h +++ b/gdb/config/h8500/tm-h8500.h @@ -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 */ diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h index 7e92ac1..e2039e5 100644 --- a/gdb/config/i386/tm-i386.h +++ b/gdb/config/i386/tm-i386.h @@ -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. */ diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h index c80f7f3..a6d93b0 100644 --- a/gdb/config/i960/tm-i960.h +++ b/gdb/config/i960/tm-i960.h @@ -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 diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h index 231a4ad..8273b4e 100644 --- a/gdb/config/m32r/tm-m32r.h +++ b/gdb/config/m32r/tm-m32r.h @@ -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) diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h index 74d4eea..a04e9e4 100644 --- a/gdb/config/m68k/tm-m68k.h +++ b/gdb/config/m68k/tm-m68k.h @@ -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. */ diff --git a/gdb/config/m88k/tm-m88k.h b/gdb/config/m88k/tm-m88k.h index b6776dc..f5c6dc5 100644 --- a/gdb/config/m88k/tm-m88k.h +++ b/gdb/config/m88k/tm-m88k.h @@ -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. */ diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index e16a498..8b80f96 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -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 diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h index e4c71fd..671b534 100644 --- a/gdb/config/mn10200/tm-mn10200.h +++ b/gdb/config/mn10200/tm-mn10200.h @@ -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) diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h index a2bc298..6108f2a 100644 --- a/gdb/config/mn10300/tm-mn10300.h +++ b/gdb/config/mn10300/tm-mn10300.h @@ -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) diff --git a/gdb/config/none/tm-none.h b/gdb/config/none/tm-none.h index 7f7e7d8..4b16b3b 100644 --- a/gdb/config/none/tm-none.h +++ b/gdb/config/none/tm-none.h @@ -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)) diff --git a/gdb/config/ns32k/tm-merlin.h b/gdb/config/ns32k/tm-merlin.h index 4c9cedf..f90c5e7 100644 --- a/gdb/config/ns32k/tm-merlin.h +++ b/gdb/config/ns32k/tm-merlin.h @@ -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. */ diff --git a/gdb/config/ns32k/tm-umax.h b/gdb/config/ns32k/tm-umax.h index fdb3cfe..1fdfb2f 100644 --- a/gdb/config/ns32k/tm-umax.h +++ b/gdb/config/ns32k/tm-umax.h @@ -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. */ diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 5c4566e..5a187fb 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -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. */ diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h index cc39ed3..a65461c 100644 --- a/gdb/config/sh/tm-sh.h +++ b/gdb/config/sh/tm-sh.h @@ -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 */ diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index d5eb576..e3165ce 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -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. */ diff --git a/gdb/config/tic80/tm-tic80.h b/gdb/config/tic80/tm-tic80.h index e0de8e8..18f0b5c 100644 --- a/gdb/config/tic80/tm-tic80.h +++ b/gdb/config/tic80/tm-tic80.h @@ -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. */ diff --git a/gdb/config/v850/tm-v850.h b/gdb/config/v850/tm-v850.h index e57b5fe..faac00f 100644 --- a/gdb/config/v850/tm-v850.h +++ b/gdb/config/v850/tm-v850.h @@ -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) diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h index c36f527..ad10fb7 100644 --- a/gdb/config/vax/tm-vax.h +++ b/gdb/config/vax/tm-vax.h @@ -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. */ diff --git a/gdb/config/w65/tm-w65.h b/gdb/config/w65/tm-w65.h index 458bfab..6809f93 100644 --- a/gdb/config/w65/tm-w65.h +++ b/gdb/config/w65/tm-w65.h @@ -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 */ diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h index 3ef38ca..8800a9c 100644 --- a/gdb/config/z8k/tm-z8k.h +++ b/gdb/config/z8k/tm-z8k.h @@ -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. */ diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 9fc1708..ebc0663 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -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 diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 1f9623b..1c5da1b 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -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} |