2003-06-26 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Thu, 26 Jun 2003 17:18:43 +0000 (17:18 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 26 Jun 2003 17:18:43 +0000 (17:18 +0000)
* gdbarch.sh (FRAME_ARGS_ADDRESS): Add predicate.  Deprecate.
(FRAME_LOCALS_ADDRESS): Add predicate.  Deprecate.
* gdbarch.h, gdbarch.c: Re-generate.
* frame-base.c (default_frame_args_address): Update.  Use
default_frame_base_address when DEPRECATED_FRAME_ARGS_ADDRESS is
not available.
(default_frame_locals_address): Ditto for
DEPRECATED_FRAME_LOCALS_ADDRESS.
* vax-tdep.c (vax_sigtramp_saved_pc): Update.
(vax_frame_num_args): Update.
(vax_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* ns32k-tdep.c (ns32k_gdbarch_init): Update.
* mcore-tdep.c (mcore_gdbarch_init): Update.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
* ia64-tdep.c (ia64_gdbarch_init): Update.
* symtab.h (address_class): Update comments.
* ns32k-tdep.c (ns32k_sigtramp_saved_pc): Update.
* config/sparc/tm-sparc.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
(DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
* config/pa/tm-hppa64.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
(DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
(DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
* config/m68k/tm-delta68.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
* alpha-mdebug-tdep.c: Update.
* ada-lang.c (add_symbols_from_enclosing_procs): Update.

17 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/alpha-mdebug-tdep.c
gdb/config/m68k/tm-delta68.h
gdb/config/pa/tm-hppa64.h
gdb/config/sparc/tm-sparc.h
gdb/frame-base.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/ia64-tdep.c
gdb/m68hc11-tdep.c
gdb/mcore-tdep.c
gdb/ns32k-tdep.c
gdb/rs6000-tdep.c
gdb/symtab.h
gdb/vax-tdep.c

index faf1188341b6aff1ac14fd9aace454c92ca769d0..b936105c2015cd0f28e4b7b2ccb86ec49e20bf3b 100644 (file)
@@ -1,3 +1,32 @@
+2003-06-26  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh (FRAME_ARGS_ADDRESS): Add predicate.  Deprecate.
+       (FRAME_LOCALS_ADDRESS): Add predicate.  Deprecate.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * frame-base.c (default_frame_args_address): Update.  Use
+       default_frame_base_address when DEPRECATED_FRAME_ARGS_ADDRESS is
+       not available.
+       (default_frame_locals_address): Ditto for
+       DEPRECATED_FRAME_LOCALS_ADDRESS.
+       * vax-tdep.c (vax_sigtramp_saved_pc): Update.
+       (vax_frame_num_args): Update.
+       (vax_gdbarch_init): Update.
+       * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+       * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+       * mcore-tdep.c (mcore_gdbarch_init): Update.
+       * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+       * ia64-tdep.c (ia64_gdbarch_init): Update.
+       * symtab.h (address_class): Update comments.
+       * ns32k-tdep.c (ns32k_sigtramp_saved_pc): Update.
+       * config/sparc/tm-sparc.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+       (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+       * config/pa/tm-hppa64.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+       (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+       (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+       * config/m68k/tm-delta68.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+       * alpha-mdebug-tdep.c: Update.
+       * ada-lang.c (add_symbols_from_enclosing_procs): Update.
+
 2003-06-26  Andreas Jaeger  <aj@suse.de>
 
        * x86-64-tdep.c (x86_64_push_arguments): Always set %rax to number
index 26780e305f0afc2d53b44239c4ff1f72e3e87b76..cc204d6fefd1857eef3dc23ceb91cfb02b168bbe 100644 (file)
@@ -3559,7 +3559,7 @@ add_symbols_from_enclosing_procs (const char *name, domain_enum domain,
          QUIT;
          frame = get_prev_frame (frame);
        }
-      while (frame != NULL && FRAME_LOCALS_ADDRESS (frame) != target_link);
+      while (frame != NULL && DEPRECATED_FRAME_LOCALS_ADDRESS (frame) != target_link);
 
       if (frame == NULL)
        break;
index d481986b8c39a1ad3e3c1a80c77285d7f325a219..9eb9c62c7da7d7ac8331a13b32a36e30096516d9 100644 (file)
@@ -45,7 +45,7 @@
    |  |localoff        |  Copies of 1st .. 6th         |
    |  |  |  |  |  argument if necessary.       |
    |  |  |  v  |                               |
-   |  |  |  ---        |-------------------------------|<-- FRAME_LOCALS_ADDRESS
+   |  |  |  ---        |-------------------------------|<-- LOCALS_ADDRESS
    |  |  |      |                              |
    |  |  |      |  Locals and temporaries.     |
    |  |  |      |                              |
index 014fc6381e109754ab0acaa9c0c5e07ac6b0ec9c..25b747ec8eb29ac5d8b82c4871456759883f1952 100644 (file)
@@ -105,5 +105,5 @@ extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
 #define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
 
 extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
-#undef FRAME_ARGS_ADDRESS
-#define FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
+#undef DEPRECATED_FRAME_ARGS_ADDRESS
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
index a8d414e0551d5c6ed85fa4f591b2f5192221da69..2e5e039d7f35969cdd54f51c8824b1509a7b35c1 100644 (file)
@@ -283,12 +283,12 @@ extern CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
 
 #if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
-#define FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
 #endif
 
 #if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
-#define FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
 #endif
 
 #if !GDB_MULTI_ARCH
@@ -445,8 +445,8 @@ extern CORE_ADDR hppa_target_read_fp (void);
 /* We access locals from SP. This may not work for frames which call
    alloca; for those, we may need to consult unwind tables.
    jimb: FIXME.  */
-#undef FRAME_LOCALS_ADDRESS
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+#undef DEPRECATED_FRAME_LOCALS_ADDRESS
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
 
 /* For a number of horrible reasons we may have to adjust the location
    of variables on the stack.  Ugh.  jimb: why? */
index 4f8acaf4448b1ba440a9015dba75a5b2b38c6928..64ce5c72cbdf8fd7886ae7be65bbdbbaa3edae9b 100644 (file)
@@ -441,9 +441,9 @@ extern CORE_ADDR sparc_frame_chain (struct frame_info *);
 extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *);
 
 /* If the argument is on the stack, it will be here.  */
-#define FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
+#define DEPRECATED_FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
 
-#define FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
 
 /* Set VAL to the number of args passed to frame described by FI.
    Can set VAL to -1, meaning no way to tell.  */
index 6f666a77b592d00c475de7dbf8df94e146823214..0865a0ce6c9460d1a78e333afa46894a71aaec27 100644 (file)
@@ -24,9 +24,9 @@
 #include "frame.h"
 
 /* A default frame base implementations.  If it wasn't for the old
-   FRAME_LOCALS_ADDRESS and FRAME_ARGS_ADDRESS, these could be
-   combined into a single function.  All architectures really need to
-   override this.  */
+   DEPRECATED_FRAME_LOCALS_ADDRESS and DEPRECATED_FRAME_ARGS_ADDRESS,
+   these could be combined into a single function.  All architectures
+   really need to override this.  */
 
 static CORE_ADDR
 default_frame_base_address (struct frame_info *next_frame, void **this_cache)
@@ -38,15 +38,25 @@ default_frame_base_address (struct frame_info *next_frame, void **this_cache)
 static CORE_ADDR
 default_frame_locals_address (struct frame_info *next_frame, void **this_cache)
 {
-  struct frame_info *this_frame = get_prev_frame (next_frame);
-  return FRAME_LOCALS_ADDRESS (this_frame);
+  if (DEPRECATED_FRAME_LOCALS_ADDRESS_P ())
+    {
+      /* This is bad.  The computation of per-frame locals address
+        should use a per-frame frame-base.  */
+      struct frame_info *this_frame = get_prev_frame (next_frame);
+      return DEPRECATED_FRAME_LOCALS_ADDRESS (this_frame);
+    }
+  return default_frame_base_address (next_frame, this_cache);
 }
 
 static CORE_ADDR
 default_frame_args_address (struct frame_info *next_frame, void **this_cache)
 {
-  struct frame_info *this_frame = get_prev_frame (next_frame);
-  return FRAME_ARGS_ADDRESS (this_frame);
+  if (DEPRECATED_FRAME_ARGS_ADDRESS_P ())
+    {
+      struct frame_info *this_frame = get_prev_frame (next_frame);
+      return DEPRECATED_FRAME_ARGS_ADDRESS (this_frame);
+    }
+  return default_frame_base_address (next_frame, this_cache);
 }
 
 const struct frame_base default_frame_base = {
index 7918b0c2f60713611c09938c1995e906d6b5a3d9..87585dd42c66625af50b1194b37fb548fbf1ae4c 100644 (file)
@@ -246,8 +246,8 @@ struct gdbarch
   gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
   gdbarch_unwind_pc_ftype *unwind_pc;
   gdbarch_unwind_sp_ftype *unwind_sp;
-  gdbarch_frame_args_address_ftype *frame_args_address;
-  gdbarch_frame_locals_address_ftype *frame_locals_address;
+  gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
+  gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
   gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
   gdbarch_frame_num_args_ftype *frame_num_args;
   gdbarch_stack_align_ftype *stack_align;
@@ -413,8 +413,8 @@ struct gdbarch startup_gdbarch =
   0,  /* deprecated_frame_saved_pc */
   0,  /* unwind_pc */
   0,  /* unwind_sp */
-  0,  /* frame_args_address */
-  0,  /* frame_locals_address */
+  get_frame_base,  /* deprecated_frame_args_address */
+  get_frame_base,  /* deprecated_frame_locals_address */
   0,  /* deprecated_saved_pc_after_call */
   0,  /* frame_num_args */
   0,  /* stack_align */
@@ -547,8 +547,8 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
   current_gdbarch->frame_args_skip = -1;
   current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
-  current_gdbarch->frame_args_address = get_frame_base;
-  current_gdbarch->frame_locals_address = get_frame_base;
+  current_gdbarch->deprecated_frame_args_address = get_frame_base;
+  current_gdbarch->deprecated_frame_locals_address = get_frame_base;
   current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
   current_gdbarch->addr_bits_remove = core_addr_identity;
   current_gdbarch->smash_text_address = core_addr_identity;
@@ -723,8 +723,8 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of deprecated_frame_saved_pc, has predicate */
   /* Skip verify of unwind_pc, has predicate */
   /* Skip verify of unwind_sp, has predicate */
-  /* Skip verify of frame_args_address, invalid_p == 0 */
-  /* Skip verify of frame_locals_address, invalid_p == 0 */
+  /* Skip verify of deprecated_frame_args_address, has predicate */
+  /* Skip verify of deprecated_frame_locals_address, has predicate */
   /* Skip verify of deprecated_saved_pc_after_call, has predicate */
   /* Skip verify of frame_num_args, has predicate */
   /* Skip verify of stack_align, has predicate */
@@ -1169,6 +1169,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
                       DEPRECATED_FP_REGNUM);
 #endif
+#ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
+                      XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
+                      DEPRECATED_FRAME_ARGS_ADDRESS_P ());
+#endif
+#ifdef DEPRECATED_FRAME_ARGS_ADDRESS
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
+                      XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
+                        (long) current_gdbarch->deprecated_frame_args_address
+                        /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
+#endif
 #ifdef DEPRECATED_FRAME_CHAIN_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1232,6 +1252,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->deprecated_frame_init_saved_regs
                         /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
 #endif
+#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
+                      XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
+                      DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
+#endif
+#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
+                      XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
+                        (long) current_gdbarch->deprecated_frame_locals_address
+                        /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
+#endif
 #ifdef DEPRECATED_FRAME_SAVED_PC_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1792,17 +1832,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->frameless_function_invocation
                         /*FRAMELESS_FUNCTION_INVOCATION ()*/);
 #endif
-#ifdef FRAME_ARGS_ADDRESS
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "FRAME_ARGS_ADDRESS(fi)",
-                      XSTRING (FRAME_ARGS_ADDRESS (fi)));
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
-                        (long) current_gdbarch->frame_args_address
-                        /*FRAME_ARGS_ADDRESS ()*/);
-#endif
 #ifdef FRAME_ARGS_SKIP
   fprintf_unfiltered (file,
                       "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
@@ -1811,17 +1840,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
                       (long) FRAME_ARGS_SKIP);
 #endif
-#ifdef FRAME_LOCALS_ADDRESS
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "FRAME_LOCALS_ADDRESS(fi)",
-                      XSTRING (FRAME_LOCALS_ADDRESS (fi)));
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
-                        (long) current_gdbarch->frame_locals_address
-                        /*FRAME_LOCALS_ADDRESS ()*/);
-#endif
 #ifdef FRAME_NUM_ARGS_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -5049,42 +5067,58 @@ set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
   gdbarch->unwind_sp = unwind_sp;
 }
 
+int
+gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->deprecated_frame_args_address != get_frame_base;
+}
+
 CORE_ADDR
-gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
+gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->frame_args_address == 0)
+  if (gdbarch->deprecated_frame_args_address == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_frame_args_address invalid");
+                    "gdbarch: gdbarch_deprecated_frame_args_address invalid");
+  /* Ignore predicate (gdbarch->deprecated_frame_args_address != get_frame_base).  */
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
-  return gdbarch->frame_args_address (fi);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
+  return gdbarch->deprecated_frame_args_address (fi);
 }
 
 void
-set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
-                                gdbarch_frame_args_address_ftype frame_args_address)
+set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
+                                           gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
 {
-  gdbarch->frame_args_address = frame_args_address;
+  gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
+}
+
+int
+gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->deprecated_frame_locals_address != get_frame_base;
 }
 
 CORE_ADDR
-gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
+gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->frame_locals_address == 0)
+  if (gdbarch->deprecated_frame_locals_address == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_frame_locals_address invalid");
+                    "gdbarch: gdbarch_deprecated_frame_locals_address invalid");
+  /* Ignore predicate (gdbarch->deprecated_frame_locals_address != get_frame_base).  */
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
-  return gdbarch->frame_locals_address (fi);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
+  return gdbarch->deprecated_frame_locals_address (fi);
 }
 
 void
-set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
-                                  gdbarch_frame_locals_address_ftype frame_locals_address)
+set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
+                                             gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
 {
-  gdbarch->frame_locals_address = frame_locals_address;
+  gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
 }
 
 int
index a0e09b29fff9a8328222769e0e987690f0c2d376..4dd7cfa9d7fa255894dae05e1355b98d1c0f0d79 100644 (file)
@@ -2330,34 +2330,80 @@ typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct fra
 extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
 extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
 
+/* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
+   frame-base.  Enable frame-base before frame-unwind. */
+
+#if defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */
+#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (0)
+#endif
+
+extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch))
+#endif
+
 /* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
-#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
+#endif
+
+typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi);
+extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
+extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
+#endif
+#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi))
+#endif
+
+/* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
+   frame-base.  Enable frame-base before frame-unwind. */
+
+#if defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */
+#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (0)
 #endif
 
-typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
-#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
+extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
 #endif
-#if !defined (FRAME_ARGS_ADDRESS)
-#define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch))
 #endif
 
 /* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
-#define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
 #endif
 
-typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
-#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
+typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi);
+extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
+extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
 #endif
-#if !defined (FRAME_LOCALS_ADDRESS)
-#define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
+#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi))
 #endif
 
 #if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
index a5b2bf96ec19e25d26ea74ce2e2e98ca23457303..494b916ffe4ce5901ef42a2742e6ef19670fba08 100755 (executable)
@@ -631,8 +631,12 @@ F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chai
 F:2:DEPRECATED_FRAME_SAVED_PC:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi::0:0
 M::UNWIND_PC:CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame:
 M::UNWIND_SP:CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame:
-f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:get_frame_base::0
-f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:get_frame_base::0
+# DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
+# frame-base.  Enable frame-base before frame-unwind.
+F::DEPRECATED_FRAME_ARGS_ADDRESS:CORE_ADDR:deprecated_frame_args_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
+# DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
+# frame-base.  Enable frame-base before frame-unwind.
+F::DEPRECATED_FRAME_LOCALS_ADDRESS:CORE_ADDR:deprecated_frame_locals_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
 F::DEPRECATED_SAVED_PC_AFTER_CALL:CORE_ADDR:deprecated_saved_pc_after_call:struct frame_info *frame:frame
 F:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame
 #
index 63ebbeb38d6efb2c7c88c5e2756256287995841e..0bc4dea01828017477514a1a747980a8e5dc9e34 100644 (file)
@@ -2296,8 +2296,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_call_dummy_words (gdbarch, ia64_call_dummy_words);
   set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words));
   set_gdbarch_deprecated_init_extra_frame_info (gdbarch, ia64_init_extra_frame_info);
-  set_gdbarch_frame_args_address (gdbarch, ia64_frame_args_address);
-  set_gdbarch_frame_locals_address (gdbarch, ia64_frame_locals_address);
+  set_gdbarch_deprecated_frame_args_address (gdbarch, ia64_frame_args_address);
+  set_gdbarch_deprecated_frame_locals_address (gdbarch, ia64_frame_locals_address);
 
   /* We won't necessarily have a frame pointer and even if we do, it
      winds up being extraordinarly messy when attempting to find the
index 53a66b3398882bb4bd44748519a70d94a9791280..f0f4ea59666d4572999e7d107733a7aaa5ee0e3d 100644 (file)
@@ -1389,7 +1389,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
 
   set_gdbarch_deprecated_frame_chain (gdbarch, m68hc11_frame_chain);
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
-  set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address);
+  set_gdbarch_deprecated_frame_args_address (gdbarch, m68hc11_frame_args_address);
   set_gdbarch_deprecated_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
 
   set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
index 4b860e52d2b51d62d5c0a0dcacf6d60612048bf5..3c4e7e7d97ccd7ef0291d16811fd420c40a76db5 100644 (file)
@@ -1101,8 +1101,8 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
                                                       mcore_extract_struct_value_address);
   set_gdbarch_skip_prologue (gdbarch, mcore_skip_prologue);
   set_gdbarch_frame_args_skip (gdbarch, 0);
-  set_gdbarch_frame_args_address (gdbarch, mcore_frame_args_address);
-  set_gdbarch_frame_locals_address (gdbarch, mcore_frame_locals_address);
+  set_gdbarch_deprecated_frame_args_address (gdbarch, mcore_frame_args_address);
+  set_gdbarch_deprecated_frame_locals_address (gdbarch, mcore_frame_locals_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, mcore_pop_frame);
   set_gdbarch_virtual_frame_pointer (gdbarch, mcore_virtual_frame_pointer);
 
index a52f39f0833e965e9c12ccdb7008b7098de54470..7bad91dc3b030b0b96fdb7f965cf2af5508bbbc1 100644 (file)
@@ -327,7 +327,7 @@ ns32k_sigtramp_saved_pc (struct frame_info *frame)
   /* Get sigcontext address, it is the third parameter on the stack.  */
   if (get_next_frame (frame))
     sigcontext_addr = read_memory_typed_address
-      (FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
+      (DEPRECATED_FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
        builtin_type_void_data_ptr);
   else
     sigcontext_addr = read_memory_typed_address
@@ -569,7 +569,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_frame_chain (gdbarch, ns32k_frame_chain);
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
 
-  set_gdbarch_frame_args_address (gdbarch, ns32k_frame_args_address);
+  set_gdbarch_deprecated_frame_args_address (gdbarch, ns32k_frame_args_address);
 
   set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ns32k_frame_init_saved_regs);
 
index d384d42a820d9560390f8fdf0ff989d944d666cc..9f3e9ea66b3593d102e151e23e93190b3a96392a 100644 (file)
@@ -2999,8 +2999,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       set_gdbarch_convert_from_func_ptr_addr (gdbarch,
        rs6000_convert_from_func_ptr_addr);
     }
-  set_gdbarch_frame_args_address (gdbarch, rs6000_frame_args_address);
-  set_gdbarch_frame_locals_address (gdbarch, rs6000_frame_args_address);
+  set_gdbarch_deprecated_frame_args_address (gdbarch, rs6000_frame_args_address);
+  set_gdbarch_deprecated_frame_locals_address (gdbarch, rs6000_frame_args_address);
   set_gdbarch_deprecated_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call);
 
   /* Helpers for function argument information.  */
index 771675a7dc069e5cb1963000548f7ac67b807eba..642b96014e29255b3be506e183d4ef35dd37f614 100644 (file)
@@ -394,8 +394,9 @@ enum address_class
   /* Value is in register number SYMBOL_VALUE.  Just like LOC_REGISTER
      except this is an argument.  Probably the cleaner way to handle
      this would be to separate address_class (which would include
-     separate ARG and LOCAL to deal with FRAME_ARGS_ADDRESS versus
-     FRAME_LOCALS_ADDRESS), and an is_argument flag.
+     separate ARG and LOCAL to deal with the frame's arguments
+     (get_frame_args_address) versus the frame's locals
+     (get_frame_locals_address), and an is_argument flag.
 
      For some symbol formats (stabs, for some compilers at least),
      the compiler generates two symbols, an argument and a register.
@@ -439,9 +440,9 @@ enum address_class
 
   /* Value is arg at SYMBOL_VALUE offset in stack frame. Differs from
      LOC_LOCAL in that symbol is an argument; differs from LOC_ARG in
-     that we find it in the frame (FRAME_LOCALS_ADDRESS), not in the
-     arglist (FRAME_ARGS_ADDRESS).  Added for i960, which passes args
-     in regs then copies to frame.  */
+     that we find it in the frame (get_frame_locals_address), not in
+     the arglist (get_frame_args_address).  Added for i960, which
+     passes args in regs then copies to frame.  */
 
   LOC_LOCAL_ARG,
 
index 1b6f8cab9c3804af5f957a842051599c1c7971f0..c2a3fbb50336b41e1fe255f403cb21a75548526f 100644 (file)
@@ -38,8 +38,6 @@ static gdbarch_register_name_ftype vax_register_name;
 static gdbarch_skip_prologue_ftype vax_skip_prologue;
 static gdbarch_frame_num_args_ftype vax_frame_num_args;
 static gdbarch_deprecated_frame_chain_ftype vax_frame_chain;
-static gdbarch_frame_args_address_ftype vax_frame_args_address;
-static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
 
 static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
 static gdbarch_deprecated_extract_struct_value_address_ftype
@@ -136,7 +134,7 @@ vax_sigtramp_saved_pc (struct frame_info *frame)
   /* Get sigcontext address, it is the third parameter on the stack.  */
   if (get_next_frame (frame))
     sigcontext_addr = read_memory_typed_address
-      (FRAME_ARGS_ADDRESS (get_next_frame (frame))
+      (DEPRECATED_FRAME_ARGS_ADDRESS (get_next_frame (frame))
        + FRAME_ARGS_SKIP + sigcontext_offs,
        builtin_type_void_data_ptr);
   else
@@ -181,7 +179,7 @@ vax_frame_args_address (struct frame_info *frame)
 static int
 vax_frame_num_args (struct frame_info *fi)
 {
-  return (0xff & read_memory_integer (FRAME_ARGS_ADDRESS (fi), 1));
+  return (0xff & read_memory_integer (DEPRECATED_FRAME_ARGS_ADDRESS (fi), 1));
 }
 
 static CORE_ADDR
@@ -380,7 +378,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_frame_chain (gdbarch, vax_frame_chain);
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, vax_frame_saved_pc);
 
-  set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
+  set_gdbarch_deprecated_frame_args_address (gdbarch, vax_frame_args_address);
 
   set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);
 
This page took 0.040938 seconds and 4 git commands to generate.