2002-12-01 Andrew Cagney <ac131313@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sun, 1 Dec 2002 19:07:16 +0000 (19:07 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 1 Dec 2002 19:07:16 +0000 (19:07 +0000)
* 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.

Index: doc/ChangeLog
2002-12-01  Andrew Cagney  <ac131313@redhat.com>

* gdbint.texinfo (Target Architecture Definition): Delete
PC_IN_CALL_DUMMY.

44 files changed:
gdb/ChangeLog
gdb/alpha-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/blockframe.c
gdb/breakpoint.c
gdb/config/h8500/tm-h8500.h
gdb/config/m32r/tm-m32r.h
gdb/config/mn10200/tm-mn10200.h
gdb/config/pa/tm-hppa.h
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sparc.h
gdb/config/z8k/tm-z8k.h
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/frame.c
gdb/frame.h
gdb/frv-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/h8300-tdep.c
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/inferior.h
gdb/infrun.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/mcore-tdep.c
gdb/mips-tdep.c
gdb/mn10200-tdep.c
gdb/mn10300-tdep.c
gdb/ns32k-tdep.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sparc-tdep.c
gdb/v850-tdep.c
gdb/vax-tdep.c
gdb/x86-64-tdep.c
gdb/xstormy16-tdep.c

index d27c6260c0a6bcf1306b3b4898bed19ba86ee702..7479c44d0abd16e454bbe01b05e71b7aac31e762 100644 (file)
@@ -1,3 +1,19 @@
+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.
index ead1d935afda60daa7ab13f4642138e0a4f3ceb0..1f38f682360d3d4c6a3497b8e88438d0125caf18 100644 (file)
@@ -822,7 +822,7 @@ find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame)
      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);
@@ -1891,7 +1891,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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);
index 742b0d2693449f11427fbd8d348969bb36a8b057..386ab9163bf39027e076cb1eb2731c3e87adfa26 100644 (file)
@@ -215,7 +215,7 @@ arm_pc_is_thumb_dummy (CORE_ADDR memaddr)
      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;
@@ -410,7 +410,7 @@ arm_skip_prologue (CORE_ADDR pc)
   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.  */
@@ -536,7 +536,7 @@ thumb_scan_prologue (struct frame_info *fi)
 
   /* 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))
@@ -990,7 +990,7 @@ arm_find_callers_reg (struct frame_info *fi, int regnum)
      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);
        }
@@ -1019,7 +1019,7 @@ arm_frame_chain (struct frame_info *fi)
   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;
 
@@ -1102,7 +1102,7 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
      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,
@@ -1150,7 +1150,7 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
       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;
@@ -1191,10 +1191,10 @@ static CORE_ADDR
 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],
@@ -1520,7 +1520,7 @@ arm_pop_frame (void)
   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 ();
index 688e8c72ca905d3836b02f9f3776676a9b5e340b..45a4f20922133363491d4b667917cc2fa3c6e225 100644 (file)
@@ -750,7 +750,7 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 
   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.  */
@@ -833,7 +833,7 @@ avr_pop_frame (void)
   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 ();
     }
@@ -866,7 +866,7 @@ avr_pop_frame (void)
 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
@@ -1030,7 +1030,7 @@ avr_frame_address (struct frame_info *fi)
 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
index 318d5d4195af276a933f61d9d2685b0c1741c0b2..84b8cc48a16794e001889bf437f52ecc5f248b04 100644 (file)
@@ -92,7 +92,7 @@ inside_entry_file (CORE_ADDR addr)
       /* 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 &&
@@ -157,7 +157,7 @@ inside_entry_func (CORE_ADDR 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 (pc, 0, 0))
+      if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
        return 0;
     }
   return (symfile_objfile->ei.entry_func_lowpc <= pc &&
@@ -665,7 +665,7 @@ deprecated_pc_in_call_dummy_after_text_end (CORE_ADDR pc, CORE_ADDR sp,
    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
@@ -697,7 +697,7 @@ deprecated_pc_in_call_dummy_at_entry_point (CORE_ADDR pc, CORE_ADDR sp,
 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
@@ -709,7 +709,7 @@ int
 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
index dfe9851162d5018e714fa41148202af32532a9cf..eda76c2504d394cc6f172055625dd4c8e9948bad 100644 (file)
@@ -1683,9 +1683,9 @@ breakpoint_inserted_here_p (CORE_ADDR pc)
 }
 
 /* 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
index ded1165eef800252cbec6abe0bd99adafa2f7e0c..4f8f3479d4adeb96eab3229ee028270987400fa9 100644 (file)
@@ -25,7 +25,7 @@
 /* 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 */
 
index 72e4bce69f31fb9de7da452da31b1f5f62503b1d..51c8f7212dbafca745f1f8e0a8cccc070bfe60f5 100644 (file)
@@ -191,7 +191,7 @@ extern use_struct_convention_fn m32r_use_struct_convention;
 /* 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 */
index a47947046984be44d6b9e8f195401943ecde0a5f..f7760926e4fa41bcc72e08691cdfbe07c91c6865 100644 (file)
@@ -189,7 +189,7 @@ extern void mn10200_pop_frame (struct frame_info *);
 #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 ()
 
@@ -203,7 +203,7 @@ extern CORE_ADDR mn10200_push_arguments (int, struct value **, CORE_ADDR,
 #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)
index 835140f9bc8a34fd6d43850b564ae103eca567d6..5cf60fffcbdf8b09c962d2a78a09130c4f092ca1 100644 (file)
@@ -29,7 +29,7 @@
 /* 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 */
 
@@ -516,7 +516,7 @@ extern void hppa_pop_frame (void);
    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))
 
 /*
index 54329f5053e15d79ce20fbc5acffc62936e802e6..0c3731f3065b798cc1ebc4ab41490ed5dd053b09 100644 (file)
 #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
@@ -170,8 +170,8 @@ sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
 /* 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
index 0b61761ec3bc9494e769ed02b15d87f2fd0d1800..7cced22cfb8fcb1db61998f1d7f55ef6d5b25cb4 100644 (file)
@@ -657,11 +657,11 @@ extern void sparc_print_extra_frame_info (struct frame_info *);
 /* 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 */
index 1a3ff4590aae2b6521acd7b3aef554f8c660dd25..1c11d53505b93405e814e6ac1176baa243a884cb 100644 (file)
@@ -23,7 +23,7 @@
 /* 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
index 6cc88ae75ef312d6ff1b43ebda68c70672735fca..35ba291213039cd0f92c91ccd70e349ce5093962 100644 (file)
@@ -1213,7 +1213,7 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
   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.  */
@@ -1254,7 +1254,7 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 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;
     }
@@ -1512,7 +1512,7 @@ cris_pop_frame (void)
   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.  */
@@ -4259,7 +4259,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   
   /* 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.  */
index 09492ca08dd3e1a0b2ab132c16df998f5773eb0a..d1fcafc261ec6dc7de33b53bb58feb66af6252b9 100644 (file)
@@ -114,7 +114,7 @@ d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
 {
   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));
@@ -512,7 +512,7 @@ d10v_extract_struct_value_address (char *regbuf)
 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));
@@ -688,7 +688,7 @@ d10v_frame_chain (struct frame_info *fi)
   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);
@@ -699,7 +699,7 @@ d10v_frame_chain (struct frame_info *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;
     }
 
@@ -911,13 +911,13 @@ d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 
   /* 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;
     }
index eb815c2e20b557cd5453d20e628aa3acac270749..a85398e5f782b5420b217ed3815a86522fca631a 100644 (file)
@@ -1,3 +1,8 @@
+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
index c6936b884c67d7a36b783874775b3cd0ff72ca48..5aba24ddda8b31cff298a7c640627c8e81a2eac1 100644 (file)
@@ -3675,10 +3675,6 @@ them.
 @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
index 1ece65b2318d9d42609a331dfc797374e4b7e508..3fd5bb3f50240d8185b24013326bb84a3a7bce0c 100644 (file)
@@ -718,11 +718,9 @@ set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
       *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;
@@ -760,11 +758,10 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
      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
@@ -1045,12 +1042,10 @@ get_prev_frame (struct frame_info *next_frame)
      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
     {
index 419511c6a402044b1a35e114daf18cf04eac8a10..ab123b322622142c77ed45ba8d0ecbd8ed6440f9 100644 (file)
@@ -135,13 +135,13 @@ extern void find_frame_sal (struct frame_info *frame,
    *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
@@ -156,12 +156,13 @@ extern void find_frame_sal (struct frame_info *frame,
    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
@@ -201,13 +202,14 @@ extern enum frame_type get_frame_type (struct frame_info *);
 
 /* 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);
 
index 54ca01212b3417fd893095c7eeeb317dc90dfe0b..b6f0b79a7d76647f666b1315a8fde13524cbfbe7 100644 (file)
@@ -1117,7 +1117,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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);
index 8027249df1a7b3be4b4d9e1b5b46d43adfeb10d7..c68a78fb3780d7629021da81a2ff3a55bc73d0a6 100644 (file)
@@ -188,7 +188,7 @@ struct gdbarch
   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;
@@ -352,7 +352,7 @@ struct gdbarch startup_gdbarch =
   0,
   0,
   0,
-  0,
+  generic_pc_in_call_dummy,
   0,
   0,
   0,
@@ -528,7 +528,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
   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;
@@ -697,7 +697,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   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");
@@ -1146,6 +1146,17 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (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 */
@@ -1596,17 +1607,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "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",
@@ -3450,22 +3450,30 @@ set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
 }
 
 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
index 56b4f6bd5c80e8dcab8cf842e431bc666e3bef26..f472e578599bb590f1a6712484f030b416101d60 100644 (file)
@@ -1058,20 +1058,46 @@ extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dum
 #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
 
index 7c23c84bd194221ffd987dcf938fd491d4568d49..cb879da38673c8c9ca8d59b89ae752f9cea32b48 100755 (executable)
@@ -115,19 +115,25 @@ EOF
            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
@@ -495,7 +501,12 @@ v:2:CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset::::0:-1:::0x%08lx
 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
@@ -686,9 +697,6 @@ EOF
     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
@@ -1650,11 +1658,11 @@ do
        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
@@ -1673,6 +1681,11 @@ do
         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" ]
index e89a24e5d920d1efcc594056efba4a86c7b95cc5..34cd1fbc8325ef445be6efa6059e619f9739f44c 100644 (file)
@@ -492,7 +492,7 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
 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,
@@ -510,7 +510,7 @@ h8300_frame_chain (struct frame_info *thisframe)
 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
@@ -540,7 +540,7 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 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;
 }
@@ -551,7 +551,7 @@ h8300_frame_locals_address (struct frame_info *fi)
 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;
 }
@@ -746,7 +746,7 @@ h8300_pop_frame (void)
   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 ();
     }
index 5f3ea7d4429e336fe3df2c16dc542ae488e9807e..d1230f12f7d18c5891a6ffd1a77ff989886d49b0 100644 (file)
@@ -509,7 +509,7 @@ i386_frameless_signal_p (struct frame_info *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
@@ -566,7 +566,7 @@ i386_sigtramp_saved_sp (struct frame_info *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;
 
@@ -1594,7 +1594,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
                                           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,
index c09f60dadde8195046e5854ea4b15b0ff930bdaf..0587f0b1f98d1c02723a75ab052f912687857ea2 100644 (file)
@@ -705,7 +705,7 @@ ia64_frame_chain (struct frame_info *frame)
 {
   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
     {
@@ -722,7 +722,7 @@ ia64_frame_saved_pc (struct frame_info *frame)
 {
   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
     {
@@ -1233,7 +1233,7 @@ ia64_get_saved_register (char *raw_buffer,
   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)
     {
@@ -1481,7 +1481,7 @@ ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
 {
   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 *)
@@ -1518,7 +1518,7 @@ ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
       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);
index 161f3b04fcacec9176504ef99a842a49aa3d3e95..5d40fa765113b2d716ad41b916f6bef1c0e18fd6 100644 (file)
@@ -533,7 +533,7 @@ extern int deprecated_pc_in_call_dummy_at_entry_point (CORE_ADDR pc,
  */
 #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"
index 73eed1f577a230b6656761d04fbd32270de0f28d..c6dda16d8696dc9fc2d895f760f4285e27ecb140 100644 (file)
@@ -2052,7 +2052,7 @@ handle_inferior_event (struct execution_control_state *ecs)
          = !(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));
 
@@ -2063,7 +2063,7 @@ handle_inferior_event (struct execution_control_state *ecs)
                                    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
                                                           ()))));
index b1bc3ed037b7dae2d123f526cd3995e34d821698..649d396545aafdf6c9e37494be7bc318d636b813 100644 (file)
@@ -386,7 +386,7 @@ m32r_init_extra_frame_info (struct frame_info *fi)
 
   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.  */
@@ -462,7 +462,7 @@ CORE_ADDR
 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],
@@ -482,13 +482,13 @@ m32r_frame_chain (struct frame_info *fi)
   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))
@@ -527,7 +527,7 @@ m32r_pop_frame (struct frame_info *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
     {
@@ -554,7 +554,7 @@ m32r_pop_frame (struct frame_info *frame)
 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);
index 711d0818a790ab84771fb23f3ad445f702a7e393..2e21abf01ff946240a067af483b7e6446cbc3e02 100644 (file)
@@ -434,7 +434,7 @@ m68hc11_pop_frame (void)
   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
     {
@@ -812,7 +812,7 @@ m68hc11_frame_chain (struct frame_info *frame)
 {
   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
index d50cd25a071150b891f26f3c0bb4a49f7858cfae..3f16e19cc74fed6cc6ba10c120358aed193e8d16 100644 (file)
@@ -1036,7 +1036,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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);
index 916397af291f33bad60029d6d44d7e157a3f7a72..f29b3a87c79d6fb5855375162f8a969b5ee21add 100644 (file)
@@ -756,7 +756,7 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum)
 {
   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],
@@ -772,7 +772,7 @@ CORE_ADDR
 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);
@@ -789,7 +789,7 @@ mcore_pop_frame (void)
   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
     {
@@ -1047,7 +1047,7 @@ mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
   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.  */
index dc80ff297c9f27b107ab36e9eebf25a035362927..7a13a22eb7ce9a0a682f98e8787aff8d7cd6598a 100644 (file)
@@ -1704,7 +1704,7 @@ mips_frame_saved_pc (struct frame_info *frame)
   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);
@@ -2187,7 +2187,7 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
   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);
@@ -2427,7 +2427,7 @@ mips_frame_chain (struct frame_info *frame)
   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
@@ -2452,7 +2452,7 @@ mips_frame_chain (struct frame_info *frame)
       && !(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);
@@ -2482,7 +2482,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
       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
@@ -3812,7 +3812,7 @@ mips_pop_frame (void)
   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 ();
index 3f56ab3bb78710be72f69b0ad08e8e9e86daa975..fdc0941fee7e2c3dc10c046c6db4d16519bff981 100644 (file)
@@ -685,7 +685,7 @@ mn10200_pop_frame (struct frame_info *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
     {
index 5a0a0d684189b645d45ef3ad0d508a49706e4117..f68664d19b6efb19e69fc69f1bcadc832454e79d 100644 (file)
@@ -1195,7 +1195,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
   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);
index fecd134e7b50a04cfeaacd0692308aa919f088ea..26e88cd3b14fbce80afecd00f004b7a31081e29b 100644 (file)
@@ -616,7 +616,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 */
index bb94e1a4e495746cbcfd2384a81300c7c5a9b8b4..b6e336bbb687247b4fe8ef27ba2eb33148e0c5b7 100644 (file)
@@ -958,7 +958,7 @@ rs6000_pop_frame (void)
   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 ();
@@ -1514,7 +1514,7 @@ rs6000_frame_saved_pc (struct frame_info *fi)
   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);
@@ -1531,7 +1531,7 @@ rs6000_frame_saved_pc (struct frame_info *fi)
       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.  */
@@ -1744,7 +1744,7 @@ rs6000_frame_chain (struct frame_info *thisframe)
   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);
index df202b4aa7b4ff295a6acce354c4ec0b3cba4a88..622f285073802204d2a921c47de92585337800ab 100644 (file)
@@ -1825,7 +1825,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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);
index 9a542ec4df7a50ed9b59c5de075abbd2e60a8752..b25ff5ab87c46ab263fe277c02327aae8fda2209 100644 (file)
@@ -927,7 +927,7 @@ gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info)
 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);
@@ -965,7 +965,7 @@ translate_insn_rn (int rn, int media_mode)
 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))
     {
@@ -990,7 +990,7 @@ static CORE_ADDR
 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);
@@ -1012,7 +1012,7 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_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);
@@ -1725,7 +1725,7 @@ sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
   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.  */
@@ -1757,7 +1757,7 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
   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.  */
@@ -1814,7 +1814,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
 
   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;
@@ -1908,7 +1908,7 @@ sh_pop_frame (void)
   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
     {
@@ -1938,7 +1938,7 @@ sh64_pop_frame (void)
 
   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
     {
index 149aa88a059a0a688ae26cc090b3bd26766409ca..1d07c03ce68fdcb8dfad163cd86f17112506b56b 100644 (file)
@@ -3197,7 +3197,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       /* 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);
@@ -3248,7 +3248,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       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);
@@ -3295,7 +3295,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     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);
@@ -3303,7 +3303,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       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);
index 419c7e8b84b11ffb1ce58d3f3b3194fb1de0eb34..6c5476910468498cd7a54256becfb08a989ccb8b 100644 (file)
@@ -800,7 +800,7 @@ CORE_ADDR
 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],
@@ -826,7 +826,7 @@ v850_frame_chain (struct frame_info *fi)
   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.
@@ -883,7 +883,7 @@ v850_pop_frame (void)
   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
     {
@@ -1009,7 +1009,7 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
 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);
@@ -1111,7 +1111,7 @@ v850_frame_init_saved_regs (struct frame_info *fi)
 
       /* 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
index 6a936837162ac2147dc4cce92d5e20e7251ff0bc..119f013083284f497c89a40f19ea0d5e0903a00e 100644 (file)
@@ -691,7 +691,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 */
index b182b79bef1caab0696695c168cc0170bf658dcf..8b76341567c8903f016f1dca004cbf7081eb4cd0 100644 (file)
@@ -1099,7 +1099,7 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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);
 
index e8bc422564f423a49a09eb4f29837e6777adc89e..7d59216146282bdf08b65b287a614dbfe5ed52fe 100644 (file)
@@ -333,7 +333,7 @@ xstormy16_pop_frame (void)
   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 ();
     }
@@ -466,7 +466,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
   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. 
@@ -756,7 +756,7 @@ xstormy16_frame_saved_pc (struct frame_info *fi)
 {
   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);
@@ -817,7 +817,7 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 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;