+2002-12-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Rename
+ PC_IN_CALL_DUMMY. Change to predicate. Always allow call.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * config/sparc/tm-sparc.h, config/sparc/tm-sp64.h: Update.
+ * config/mn10200/tm-mn10200.h, config/h8500/tm-h8500.h: Update.
+ * config/pa/tm-hppa.h, frame.h: Update.
+ * x86-64-tdep.c, vax-tdep.c, sparc-tdep.c: Update.
+ * s390-tdep.c, ns32k-tdep.c, mn10300-tdep.c: Update.
+ * m68k-tdep.c, i386-tdep.c, frv-tdep.c: Update.
+ * cris-tdep.c, alpha-tdep.c: Update.
+ * frame.c (set_unwind_by_pc, create_new_frame): Use either
+ DEPRECATED_PC_IN_CALL_DUMMY or pc_in_dummy_frame.
+ (get_prev_frame): Ditto.
+
2002-11-30 Andrew Cagney <cagney@redhat.com>
* exec.c (xfer_memory): Replace boolean with int.
So we have to find the proc_desc whose frame is closest to the current
stack pointer. */
- if (PC_IN_CALL_DUMMY (pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
{
struct linked_proc_info *link;
CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
set_gdbarch_fix_call_dummy (gdbarch, alpha_fix_call_dummy);
frame location (true if we have not pushed large data structures or
gone too many levels deep) and that our 1024 is not enough to consider
code regions as part of the stack (true for most practical purposes). */
- if (PC_IN_CALL_DUMMY (memaddr, sp, sp + 1024))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (memaddr, sp, sp + 1024))
return caller_is_thumb;
else
return 0;
struct symtab_and_line sal;
/* If we're in a dummy frame, don't even try to skip the prologue. */
- if (PC_IN_CALL_DUMMY (pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
return pc;
/* See what the symbol table says. */
/* Don't try to scan dummy frames. */
if (fi != NULL
- && PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+ && DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
return;
if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
function could be called directly. */
for (; fi; fi = fi->next)
{
- if (PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
{
return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
}
CORE_ADDR caller_pc;
int framereg = fi->extra_info->framereg;
- if (PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
/* A generic call dummy's frame is the same as caller's. */
return fi->frame;
the sigtramp and call dummy cases. */
if (!fi->next)
sp = read_sp();
- else if (PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
/* For generic dummy frames, pull the value direct from the frame.
Having an unwind function to do this would be nice. */
sp = deprecated_read_register_dummy (fi->next->pc, fi->next->frame,
if (!fi->next)
/* This is the innermost frame? */
fi->frame = read_register (fi->extra_info->framereg);
- else if (PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
/* Next inner most frame is a dummy, just grab its frame.
Dummy frames always have the same FP as their caller. */
fi->frame = fi->next->frame;
arm_frame_saved_pc (struct frame_info *fi)
{
/* If a dummy frame, pull the PC out of the frame's register buffer. */
- if (PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
return deprecated_read_register_dummy (fi->pc, fi->frame, ARM_PC_REGNUM);
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame - fi->extra_info->frameoffset,
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame - fi->extra_info->frameoffset,
fi->frame))
{
return read_memory_integer (fi->saved_regs[ARM_PC_REGNUM],
CORE_ADDR old_SP = (frame->frame - frame->extra_info->frameoffset
+ frame->extra_info->framesize);
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
{
generic_pop_dummy_frame ();
flush_cached_frames ();
avr_scan_prologue (fi);
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
CORE_ADDR saddr;
struct frame_info *frame = get_current_frame ();
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
{
generic_pop_dummy_frame ();
}
static CORE_ADDR
avr_frame_saved_pc (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return deprecated_read_register_dummy (frame->pc, frame->frame,
AVR_PC_REGNUM);
else
static CORE_ADDR
avr_frame_chain (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
{
/* initialize the return_pc now */
frame->extra_info->return_pc
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
- if (PC_IN_CALL_DUMMY (addr, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (addr, 0, 0))
return 0;
}
return (addr >= symfile_objfile->ei.entry_file_lowpc &&
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
- if (PC_IN_CALL_DUMMY (pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
return 0;
}
return (symfile_objfile->ei.entry_func_lowpc <= pc &&
have that meaning, but the 29k doesn't use ON_STACK. This could be
fixed by generalizing this scheme, perhaps by passing in a frame
and adding a few fields, at least on machines which need them for
- PC_IN_CALL_DUMMY.
+ DEPRECATED_PC_IN_CALL_DUMMY.
Something simpler, like checking for the stack segment, doesn't work,
since various programs (threads implementations, gcc nested function
int
generic_file_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY (frame_pc_unwind (fi), fp, fp))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame_pc_unwind (fi), fp, fp))
return 1; /* don't prune CALL_DUMMY frames */
else /* fall back to default algorithm (see frame.h) */
return (fp != 0
generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
{
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && PC_IN_CALL_DUMMY ((fi)->pc, 0, 0))
+ && DEPRECATED_PC_IN_CALL_DUMMY ((fi)->pc, 0, 0))
return 1; /* don't prune CALL_DUMMY frames */
else /* fall back to default algorithm (see frame.h) */
return (fp != 0
}
/* Return nonzero if FRAME is a dummy frame. We can't use
- PC_IN_CALL_DUMMY because figuring out the saved SP would take too
- much time, at least using get_saved_register on the 68k. This
- means that for this function to work right a port must use the
+ DEPRECATED_PC_IN_CALL_DUMMY because figuring out the saved SP would
+ take too much time, at least using get_saved_register on the 68k.
+ This means that for this function to work right a port must use the
bp_call_dummy breakpoint. */
int
/* NOTE: cagney/2002-11-24: This is a guess. */
#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
#define CALL_DUMMY_LOCATION ON_STACK
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Contributed by Steve Chamberlain sac@cygnus.com */
/* generic dummy frame stuff */
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
-#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
+#define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
/* target-specific dummy_frame stuff */
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
#define CALL_DUMMY_ADDRESS() entry_point_address ()
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
-#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
+#define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
(TYPE_LENGTH (TYPE) > 8)
/* NOTE: cagney/2002-11-24: This is a guess. */
#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
#define CALL_DUMMY_LOCATION ON_STACK
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Forward declarations of some types we use in prototypes */
we'll consider that to mean that we've reached the call dummy's
end after its successful completion. */
#define CALL_DUMMY_HAS_COMPLETED(pc, sp, frame_address) \
- (PC_IN_CALL_DUMMY((pc), (sp), (frame_address)) && \
+ (DEPRECATED_PC_IN_CALL_DUMMY((pc), (sp), (frame_address)) && \
(read_memory_integer((pc), 4) == BREAKPOINT32))
/*
#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1
#undef CALL_DUMMY_LOCATION
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
-#undef PC_IN_CALL_DUMMY
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
+#undef DEPRECATED_PC_IN_CALL_DUMMY
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
#undef CALL_DUMMY_STACK_ADJUST
#define CALL_DUMMY_STACK_ADJUST 128
#undef SIZEOF_CALL_DUMMY_WORDS
/* Call dummy will be located on the stack. */
#undef CALL_DUMMY_LOCATION
#define CALL_DUMMY_LOCATION ON_STACK
-#undef PC_IN_CALL_DUMMY
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
+#undef DEPRECATED_PC_IN_CALL_DUMMY
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Insert the function address into the call dummy. */
#undef FIX_CALL_DUMMY
/* Call dummy method (eg. on stack, at entry point, etc.) */
#define CALL_DUMMY_LOCATION ON_STACK
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Method for detecting dummy frames. */
-#define PC_IN_CALL_DUMMY(PC, SP, FRAME_ADDRESS) \
+#define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FRAME_ADDRESS) \
deprecated_pc_in_call_dummy_on_stack (PC, SP, FRAME_ADDRESS)
#endif /* GDB_MULTI_ARCH */
/* NOTE: cagney/2002-11-24: This is a guess. */
#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
#define CALL_DUMMY_LOCATION ON_STACK
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
#undef TARGET_INT_BIT
#undef TARGET_LONG_BIT
fi->extra_info->return_pc = 0;
fi->extra_info->leaf_function = 0;
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
CORE_ADDR
cris_frame_chain (struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
return fi->frame;
}
register int regno;
register int stack_offset = 0;
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* This happens when we hit a breakpoint set at the entry point,
when returning from a dummy frame. */
/* Read all about dummy frames in blockframe.c. */
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
/* Defined to 1 to indicate that the target supports inferior function
calls. */
{
if (chain != 0 && frame != NULL)
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return 1; /* Path back from a call dummy must be valid. */
return ((frame)->pc > IMEM_START
&& !inside_main_func (frame->pc));
static CORE_ADDR
d10v_frame_saved_pc (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return d10v_make_iaddr (deprecated_read_register_dummy (frame->pc,
frame->frame,
PC_REGNUM));
CORE_ADDR addr;
/* A generic call dummy's frame is the same as caller's. */
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return fi->frame;
d10v_frame_init_saved_regs (fi);
{
/* This is meant to halt the backtrace at "_start".
Make sure we don't halt it at a generic dummy frame. */
- if (!PC_IN_CALL_DUMMY (fi->extra_info->return_pc, 0, 0))
+ if (!DEPRECATED_PC_IN_CALL_DUMMY (fi->extra_info->return_pc, 0, 0))
return (CORE_ADDR) 0;
}
/* If fi->pc is zero, but this is not the outermost frame,
then let's snatch the return_pc from the callee, so that
- PC_IN_CALL_DUMMY will work. */
+ DEPRECATED_PC_IN_CALL_DUMMY will work. */
if (fi->pc == 0 && fi->level != 0 && fi->next != NULL)
fi->pc = d10v_frame_saved_pc (fi->next);
/* The call dummy doesn't save any registers on the stack, so we can
return now. */
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
return;
}
+2002-12-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ PC_IN_CALL_DUMMY.
+
2002-11-28 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Host Definition): Delete documentation on
@findex PCC_SOL_BROKEN
(Used only in the Convex target.)
-@item PC_IN_CALL_DUMMY
-@findex PC_IN_CALL_DUMMY
-See @file{inferior.h}.
-
@item PC_IN_SIGTRAMP (@var{pc}, @var{name})
@findex PC_IN_SIGTRAMP
@cindex sigtramp
*unwind_register = frame_saved_regs_register_unwind;
*unwind_pc = frame_saved_regs_pc_unwind;
}
- /* FIXME: cagney/2002-11-24: Can't yet directly call
- pc_in_dummy_frame() as some architectures don't set
- PC_IN_CALL_DUMMY() to generic_pc_in_call_dummy() (remember the
- latter is implemented by simply calling pc_in_dummy_frame). */
- else if (PC_IN_CALL_DUMMY (pc, 0, 0))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY_P ()
+ ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)
+ : pc_in_dummy_frame (pc))
{
*unwind_register = dummy_frame_register_unwind;
*unwind_pc = dummy_frame_pc_unwind;
has previously set it. This is really somewhat bogus. The
initialization, as seen in create_new_frame(), should occur
before the INIT function has been called. */
- /* FIXME: cagney/2002-11-24: Can't yet directly call
- pc_in_dummy_frame() as some architectures don't set
- PC_IN_CALL_DUMMY() to generic_pc_in_call_dummy() (remember the
- latter is implemented by simply calling pc_in_dummy_frame). */
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES && PC_IN_CALL_DUMMY (pc, 0, 0))
+ if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
+ && (DEPRECATED_PC_IN_CALL_DUMMY_P ()
+ ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)
+ : pc_in_dummy_frame (pc)))
/* NOTE: cagney/2002-11-11: Does this even occure? */
type = DUMMY_FRAME;
else
has previously set it. This is really somewhat bogus. The
initialization, as seen in create_new_frame(), should occur
before the INIT function has been called. */
- /* FIXME: cagney/2002-11-24: Can't yet directly call
- pc_in_dummy_frame() as some architectures don't set
- PC_IN_CALL_DUMMY() to generic_pc_in_call_dummy() (remember the
- latter is implemented by simply calling pc_in_dummy_frame). */
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && PC_IN_CALL_DUMMY (prev->pc, 0, 0))
+ && (DEPRECATED_PC_IN_CALL_DUMMY_P ()
+ ? DEPRECATED_PC_IN_CALL_DUMMY (prev->pc, 0, 0)
+ : pc_in_dummy_frame (prev->pc)))
prev->type = DUMMY_FRAME;
else
{
*FRAME* macros, a frame address has no defined meaning other than
as a magic cookie which identifies a frame over calls to the
inferior (um, SEE NOTE BELOW). The only known exception is
- inferior.h (PC_IN_CALL_DUMMY) [ON_STACK]; see comments there. You
- cannot assume that a frame address contains enough information to
- reconstruct the frame; if you want more than just to identify the
- frame (e.g. be able to fetch variables relative to that frame),
- then save the whole struct frame_info (and the next struct
- frame_info, since the latter is used for fetching variables on some
- machines) (um, again SEE NOTE BELOW).
+ inferior.h (DEPRECATED_PC_IN_CALL_DUMMY) [ON_STACK]; see comments
+ there. You cannot assume that a frame address contains enough
+ information to reconstruct the frame; if you want more than just to
+ identify the frame (e.g. be able to fetch variables relative to
+ that frame), then save the whole struct frame_info (and the next
+ struct frame_info, since the latter is used for fetching variables
+ on some machines) (um, again SEE NOTE BELOW).
NOTE: cagney/2002-11-18: Actually, the frame address isn't
sufficient for identifying a frame, and the counter examples are
comparing both the frame's base and the frame's enclosing function
(frame_find_by_id() is going to be modified to perform this test).
- The generic dummy frame version of PC_IN_CALL_DUMMY() is able to
- identify a dummy frame using only the PC value. So the frame
- address is not needed. In fact, most PC_IN_CALL_DUMMY() calls now
- pass zero as the frame/sp values as the caller knows that those
- values won't be used. Once all architectures are using generic
- dummy frames, PC_IN_CALL_DUMMY() can drop the sp/frame parameters.
+ The generic dummy frame version of DEPRECATED_PC_IN_CALL_DUMMY() is
+ able to identify a dummy frame using only the PC value. So the
+ frame address is not needed. In fact, most
+ DEPRECATED_PC_IN_CALL_DUMMY() calls now pass zero as the frame/sp
+ values as the caller knows that those values won't be used. Once
+ all architectures are using generic dummy frames,
+ DEPRECATED_PC_IN_CALL_DUMMY() can drop the sp/frame parameters.
When it comes to finding a dummy frame, the next frame's frame ID
(with out duing an unwind) can be used (ok, could if it wasn't for
the need to change the way the PPC defined frame base in a strange
/* FIXME: cagney/2002-11-10: Some targets want to directly mark a
frame as being of a specific type. This shouldn't be necessary.
- PC_IN_SIGTRAMP() indicates a SIGTRAMP_FRAME and PC_IN_CALL_DUMMY()
- indicates a DUMMY_FRAME. I suspect the real problem here is that
- get_prev_frame() only sets initialized after INIT_EXTRA_FRAME_INFO
- as been called. Consequently, some targets found that the frame's
- type was wrong and tried to fix it. The correct fix is to modify
- get_prev_frame() so that it initializes the frame's type before
- calling any other functions. */
+ PC_IN_SIGTRAMP() indicates a SIGTRAMP_FRAME and
+ DEPRECATED_PC_IN_CALL_DUMMY() indicates a DUMMY_FRAME. I suspect
+ the real problem here is that get_prev_frame() only sets
+ initialized after INIT_EXTRA_FRAME_INFO as been called.
+ Consequently, some targets found that the frame's type was wrong
+ and tried to fix it. The correct fix is to modify get_prev_frame()
+ so that it initializes the frame's type before calling any other
+ functions. */
extern void deprecated_set_frame_type (struct frame_info *,
enum frame_type type);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
CORE_ADDR call_dummy_breakpoint_offset;
int call_dummy_breakpoint_offset_p;
int call_dummy_length;
- gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
+ gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
int call_dummy_p;
LONGEST * call_dummy_words;
int sizeof_call_dummy_words;
0,
0,
0,
- 0,
+ generic_pc_in_call_dummy,
0,
0,
0,
current_gdbarch->call_dummy_breakpoint_offset = -1;
current_gdbarch->call_dummy_breakpoint_offset_p = -1;
current_gdbarch->call_dummy_length = -1;
- current_gdbarch->pc_in_call_dummy = generic_pc_in_call_dummy;
+ current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
current_gdbarch->call_dummy_p = -1;
current_gdbarch->call_dummy_words = legacy_call_dummy_words;
current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->call_dummy_length == -1))
fprintf_unfiltered (log, "\n\tcall_dummy_length");
- /* Skip verify of pc_in_call_dummy, invalid_p == 0 */
+ /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->call_dummy_p == -1))
fprintf_unfiltered (log, "\n\tcall_dummy_p");
(long) current_gdbarch->deprecated_extract_struct_value_address
/*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
#endif
+#ifdef DEPRECATED_PC_IN_CALL_DUMMY
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
+ XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = 0x%08lx\n",
+ (long) current_gdbarch->deprecated_pc_in_call_dummy
+ /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
+#endif
#ifdef DEPRECATED_STORE_RETURN_VALUE
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
"gdbarch_dump: PARM_BOUNDARY = %d\n",
PARM_BOUNDARY);
#endif
-#ifdef PC_IN_CALL_DUMMY
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
- XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
- (long) current_gdbarch->pc_in_call_dummy
- /*PC_IN_CALL_DUMMY ()*/);
-#endif
#ifdef PC_IN_SIGTRAMP
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
}
int
-gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
+gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
+}
+
+int
+gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->pc_in_call_dummy == 0)
+ if (gdbarch->deprecated_pc_in_call_dummy == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_pc_in_call_dummy invalid");
+ "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
+ /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
- return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
+ return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
}
void
-set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
- gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
+set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
+ gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
{
- gdbarch->pc_in_call_dummy = pc_in_call_dummy;
+ gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
}
int
#endif
#endif
+/* NOTE: cagney/2002-11-24: This function with predicate has a valid
+ (callable) initial value. As a consequence, even when the predicate
+ is false, the corresponding function works. This simplifies the
+ migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
+ doesn't need to be modified. */
+
+#if defined (DEPRECATED_PC_IN_CALL_DUMMY)
+/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
+#if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
+#endif
+
+extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
+#endif
+#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
+#endif
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (PC_IN_CALL_DUMMY)
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
#endif
-typedef int (gdbarch_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
-extern int gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
-extern void set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_CALL_DUMMY)
-#error "Non multi-arch definition of PC_IN_CALL_DUMMY"
+typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
+extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
+extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
+#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
+#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_CALL_DUMMY)
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
+#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
#endif
#endif
test "${fmt}" || fmt="%ld"
test "${print}" || print="(long) ${macro}"
- case "${invalid_p}" in
- 0 ) valid_p=1 ;;
+ case "${class}" in
+ F | V | M )
+ case "${invalid_p}" in
"" )
- if [ -n "${predefault}" ]
+ if test -n "${predefault}" -a "${predefault}" != "0"
then
#invalid_p="gdbarch->${function} == ${predefault}"
- valid_p="gdbarch->${function} != ${predefault}"
+ predicate="gdbarch->${function} != ${predefault}"
else
- #invalid_p="gdbarch->${function} == 0"
- valid_p="gdbarch->${function} != 0"
+ # filled in later
+ predicate=""
fi
;;
- * ) valid_p="!(${invalid_p})"
+ * )
+ echo "Predicate function ${function} with invalid_p."
+ kill $$
+ exit 1
+ ;;
+ esac
esac
# PREDEFAULT is a valid fallback definition of MEMBER when
v:2:CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset::::0:-1::gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1:0x%08lx::CALL_DUMMY_BREAKPOINT_OFFSET_P
v:1:CALL_DUMMY_BREAKPOINT_OFFSET_P:int:call_dummy_breakpoint_offset_p::::0:-1
v:2:CALL_DUMMY_LENGTH:int:call_dummy_length::::0:-1:::::CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END
-f:1:PC_IN_CALL_DUMMY:int:pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address:::generic_pc_in_call_dummy::0
+# NOTE: cagney/2002-11-24: This function with predicate has a valid
+# (callable) initial value. As a consequence, even when the predicate
+# is false, the corresponding function works. This simplifies the
+# migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
+# doesn't need to be modified.
+F:1:DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::generic_pc_in_call_dummy:generic_pc_in_call_dummy
v:1:CALL_DUMMY_P:int:call_dummy_p::::0:-1
v:2:CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
v:2:SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0:0x%08lx
do
eval echo \"\ \ \ \ ${r}=\${${r}}\"
done
-# #fallbackdefault=${fallbackdefault}
-# #valid_p=${valid_p}
-#EOF
if class_is_predicate_p && fallback_default_p
then
echo "Error: predicate function ${macro} can not have a non- multi-arch default" 1>&2
printf "gdbarch_${function}_p (struct gdbarch *gdbarch)\n"
printf "{\n"
printf " gdb_assert (gdbarch != NULL);\n"
- if [ -n "${valid_p}" ]
+ if [ -n "${predicate}" ]
then
- printf " return ${valid_p};\n"
+ printf " return ${predicate};\n"
else
- printf "#error \"gdbarch_${function}_p: not defined\"\n"
+ printf " return gdbarch->${function} != 0;\n"
fi
printf "}\n"
fi
printf " if (gdbarch->${function} == 0)\n"
printf " internal_error (__FILE__, __LINE__,\n"
printf " \"gdbarch: gdbarch_${function} invalid\");\n"
+ if class_is_predicate_p && test -n "${predicate}"
+ then
+ # Allow a call to a function with a predicate.
+ printf " /* Ignore predicate (${predicate}). */\n"
+ fi
printf " if (gdbarch_debug >= 2)\n"
printf " fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\\\\n\");\n"
if [ "x${actual}" = "x-" -o "x${actual}" = "x" ]
static CORE_ADDR
h8300_frame_chain (struct frame_info *thisframe)
{
- if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
{ /* initialize the from_pc now */
thisframe->extra_info->from_pc =
deprecated_read_register_dummy (thisframe->pc, thisframe->frame,
static CORE_ADDR
h8300_frame_saved_pc (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return deprecated_read_register_dummy (frame->pc, frame->frame,
E_PC_REGNUM);
else
static CORE_ADDR
h8300_frame_locals_address (struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return (CORE_ADDR) 0; /* Not sure what else to do... */
return fi->extra_info->locals_pointer;
}
static CORE_ADDR
h8300_frame_args_address (struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return (CORE_ADDR) 0; /* Not sure what else to do... */
return fi->extra_info->args_pointer;
}
unsigned regno;
struct frame_info *frame = get_current_frame ();
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
{
generic_pop_dummy_frame ();
}
static CORE_ADDR
i386_frame_chain (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
return frame->frame;
if (get_frame_type (frame) == SIGTRAMP_FRAME
static CORE_ADDR
i386_frame_saved_pc (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
{
ULONGEST pc;
i386_register_convert_to_virtual);
set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
/* "An argument's size is increased, if necessary, to make it a
multiple of [32-bit] words. This may require tail padding,
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
return read_sigcontext_register (frame, sp_regnum);
- else if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return frame->frame;
else
{
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
return read_sigcontext_register (frame, pc_regnum);
- else if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return deprecated_read_register_dummy (frame->pc, frame->frame, pc_regnum);
else
{
if (lval != NULL)
*lval = not_lval;
- is_dummy_frame = PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame);
+ is_dummy_frame = DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame);
if (regnum == SP_REGNUM && frame->next)
{
{
CORE_ADDR bsp, cfm;
int next_frame_is_call_dummy = ((frame->next != NULL)
- && PC_IN_CALL_DUMMY (frame->next->pc, frame->next->frame,
+ && DEPRECATED_PC_IN_CALL_DUMMY (frame->next->pc, frame->next->frame,
frame->next->frame));
frame->extra_info = (struct frame_extra_info *)
else if (frn->next && (get_frame_type (frn->next) == SIGTRAMP_FRAME))
cfm = read_sigcontext_register (frn->next, IA64_PFS_REGNUM);
else if (frn->next
- && PC_IN_CALL_DUMMY (frn->next->pc, frn->next->frame,
+ && DEPRECATED_PC_IN_CALL_DUMMY (frn->next->pc, frn->next->frame,
frn->next->frame))
cfm = deprecated_read_register_dummy (frn->next->pc, frn->next->frame,
IA64_PFS_REGNUM);
*/
#if !defined(CALL_DUMMY_HAS_COMPLETED)
#define CALL_DUMMY_HAS_COMPLETED(pc, sp, frame_address) \
- PC_IN_CALL_DUMMY((pc), (sp), (frame_address))
+ DEPRECATED_PC_IN_CALL_DUMMY((pc), (sp), (frame_address))
#endif
/* If STARTUP_WITH_SHELL is set, GDB's "run"
= !(bpstat_explains_signal (stop_bpstat)
|| trap_expected
|| (!CALL_DUMMY_BREAKPOINT_OFFSET_P
- && PC_IN_CALL_DUMMY (stop_pc, read_sp (),
+ && DEPRECATED_PC_IN_CALL_DUMMY (stop_pc, read_sp (),
get_frame_base (get_current_frame ())))
|| (step_range_end && step_resume_breakpoint == NULL));
news) give another signal besides SIGTRAP, so
check here as well as above. */
|| (!CALL_DUMMY_BREAKPOINT_OFFSET_P
- && PC_IN_CALL_DUMMY (stop_pc, read_sp (),
+ && DEPRECATED_PC_IN_CALL_DUMMY (stop_pc, read_sp (),
get_frame_base
(get_current_frame
()))));
memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
m32r_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi; fi = fi->next)
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
else if (fi->fsr.regs[regnum] != 0)
return read_memory_integer (fi->fsr.regs[regnum],
CORE_ADDR fn_start, callers_pc, fp;
/* is this a dummy frame? */
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return fi->frame; /* dummy frame same as caller's frame */
/* is caller-of-this a dummy frame? */
callers_pc = FRAME_SAVED_PC (fi); /* find out who called us: */
fp = m32r_find_callers_reg (fi, FP_REGNUM);
- if (PC_IN_CALL_DUMMY (callers_pc, fp, fp))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp))
return fp; /* dummy frame's frame may bear no relation to ours */
if (find_pc_partial_function (fi->pc, 0, &fn_start, 0))
{
int regnum;
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
generic_pop_dummy_frame ();
else
{
CORE_ADDR
m32r_frame_saved_pc (struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
else
return m32r_find_callers_reg (fi, RP_REGNUM);
register CORE_ADDR fp, sp;
register int regnum;
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
generic_pop_dummy_frame ();
else
{
{
CORE_ADDR addr;
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return frame->frame; /* dummy frame same as caller's frame */
if (frame->extra_info->return_pc == 0
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 24);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 28);
{
for (; fi != NULL; fi = fi->next)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
else if (fi->saved_regs[regnum] != 0)
return read_memory_integer (fi->saved_regs[regnum],
mcore_frame_saved_pc (struct frame_info * fi)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
else
return mcore_find_callers_reg (fi, PR_REGNUM);
int rn;
struct frame_info *fi = get_current_frame ();
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
generic_pop_dummy_frame ();
else
{
fi->extra_info->status = 0;
fi->extra_info->framesize = 0;
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
int pcreg = (get_frame_type (frame) == SIGTRAMP_FRAME) ? PC_REGNUM
: (proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM);
- if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
{
LONGEST tmp;
frame_unwind_signed_register (frame, PC_REGNUM, &tmp);
struct obj_section *sec;
struct mips_objfile_private *priv;
- if (PC_IN_CALL_DUMMY (pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
return NULL;
find_pc_partial_function (pc, NULL, &startaddr, NULL);
if ((tmp = SKIP_TRAMPOLINE_CODE (saved_pc)) != 0)
saved_pc = tmp;
- if (PC_IN_CALL_DUMMY (saved_pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (saved_pc, 0, 0))
{
/* A dummy frame, uses SP not FP. Get the old SP value. If all
is well, frame->frame the bottom of the current frame will
&& !(get_frame_type (frame) == SIGTRAMP_FRAME)
/* For a generic dummy frame, let get_frame_pointer() unwind a
register value saved as part of the dummy frame call. */
- && !(PC_IN_CALL_DUMMY (frame->pc, 0, 0)))
+ && !(DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0)))
return 0;
else
return get_frame_pointer (frame, proc_desc);
if (fci->pc == PROC_LOW_ADDR (proc_desc)
&& !PROC_DESC_IS_DUMMY (proc_desc))
fci->frame = read_next_frame_reg (fci->next, SP_REGNUM);
- else if (PC_IN_CALL_DUMMY (fci->pc, 0, 0))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (fci->pc, 0, 0))
/* Do not ``fix'' fci->frame. It will have the value of the
generic dummy frame's top-of-stack (since the draft
fci->frame is obtained by returning the unwound stack
CORE_ADDR new_sp = get_frame_base (frame);
mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
- if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
{
generic_pop_dummy_frame ();
flush_cached_frames ();
{
int regnum;
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
generic_pop_dummy_frame ();
else
{
set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_arguments (gdbarch, mn10300_push_arguments);
set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr);
set_gdbarch_call_dummy_start_offset (gdbarch, 3);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 0);
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
/* Breakpoint info */
pc = read_pc ();
sp = get_frame_base (frame);
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
{
generic_pop_dummy_frame ();
flush_cached_frames ();
if ((get_frame_type (fi) == SIGTRAMP_FRAME))
return read_memory_addr (fi->frame + SIG_FRAME_PC_OFFSET, wordsize);
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
func_start = get_pc_function_start (fi->pc);
if ((get_frame_type (fi->next) == SIGTRAMP_FRAME))
return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET,
wordsize);
- else if (PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0))
/* The link register wasn't saved by this frame and the next
(inner, newer) frame is a dummy. Get the link register
value by unwinding it from that [dummy] frame. */
CORE_ADDR fp, fpp, lr;
int wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
- if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
/* A dummy frame always correctly chains back to the previous
frame. */
return read_memory_addr ((thisframe)->frame, wordsize);
set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_arguments (gdbarch, s390_push_arguments);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
static CORE_ADDR
sh_frame_chain (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return frame->frame; /* dummy frame same as caller's frame */
if (frame->pc && !inside_entry_file (frame->pc))
return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, 4);
static CORE_ADDR
sh64_frame_chain (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return frame->frame; /* dummy frame same as caller's frame */
if (frame->pc && !inside_entry_file (frame->pc))
{
sh_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi; fi = fi->next)
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
/* When the caller requests PR from the dummy frame, we return PC because
that's where the previous routine appears to have done a call from. */
return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
int media_mode = 0;
for (; fi; fi = fi->next)
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
/* When the caller requests PR from the dummy frame, we return PC because
that's where the previous routine appears to have done a call from. */
return deprecated_read_register_dummy (fi->pc, fi->frame, pr_regnum);
if (fi->next)
fi->pc = FRAME_SAVED_PC (fi->next);
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
if (fi->next)
fi->pc = FRAME_SAVED_PC (fi->next);
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
while (frame && ((frame = frame->next) != NULL))
{
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
{
if (lval) /* found it in a CALL_DUMMY frame */
*lval = not_lval;
register CORE_ADDR fp;
register int regnum;
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
generic_pop_dummy_frame ();
else
{
int media_mode = pc_is_isa32 (frame->pc);
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
generic_pop_dummy_frame ();
else
{
/* 32-bit machine types: */
#ifdef SPARC32_CALL_DUMMY_ON_STACK
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
set_gdbarch_call_dummy_address (gdbarch, sparc_call_dummy_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0x30);
set_gdbarch_call_dummy_length (gdbarch, 0x38);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_32);
#else
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 0);
default: /* Any new machine type is likely to be 64-bit. */
#ifdef SPARC64_CALL_DUMMY_ON_STACK
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
set_gdbarch_call_dummy_address (gdbarch, sparc_call_dummy_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 8 * 4);
set_gdbarch_call_dummy_length (gdbarch, 192);
set_gdbarch_call_dummy_start_offset (gdbarch, 148);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_64);
#else
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 0);
v850_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi; fi = fi->next)
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
else if (fi->saved_regs[regnum] != 0)
return read_memory_unsigned_integer (fi->saved_regs[regnum],
callers_pc = FRAME_SAVED_PC (fi);
/* If caller is a call-dummy, then our FP bears no relation to his FP! */
fp = v850_find_callers_reg (fi, E_FP_RAW_REGNUM);
- if (PC_IN_CALL_DUMMY (callers_pc, fp, fp))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp))
return fp; /* caller is call-dummy: return oldest value of FP */
/* Caller is NOT a call-dummy, so everything else should just work.
struct frame_info *frame = get_current_frame ();
int regnum;
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
generic_pop_dummy_frame ();
else
{
CORE_ADDR
v850_frame_saved_pc (struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return deprecated_read_register_dummy (fi->pc, fi->frame, E_PC_REGNUM);
else
return v850_find_callers_reg (fi, E_RP_REGNUM);
/* The call dummy doesn't save any registers on the stack, so we
can return now. */
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return;
/* Find the beginning of this function, so we can analyze its
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 7);
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
/* Breakpoint info */
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
if (fi == NULL)
return; /* paranoia */
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
generic_pop_dummy_frame ();
}
if (fi)
{
/* In a call dummy, don't touch the frame. */
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return start_addr;
/* Grab the frame-relative values of SP and FP, needed below.
{
CORE_ADDR saved_pc;
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
saved_pc = deprecated_read_register_dummy (fi->pc, fi->frame,
E_PC_REGNUM);
static CORE_ADDR
xstormy16_frame_chain (struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
{
/* Call dummy's frame is the same as caller's. */
return fi->frame;