This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/rfc] Delete init_frame_pc_noop
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 20 Sep 2003 22:11:05 -0400
- Subject: [patch/rfc] Delete init_frame_pc_noop
Hello,
init_frame_pc_noop is a generic function that some older targets have
been supplying as a no-op method for DEPRECATED_INIT_FRAME_PC. Now that
DEPRECATED_INIT_FRAME_PC has a predicate, those targets no longer need
to supply a value for that method.
The attached follows this through by eliminating init_frame_pc_noop.
baring comments, I'll commit in a few days.
Andrew
2003-09-20 Andrew Cagney <cagney@redhat.com>
* arch-utils.h (init_frame_pc_noop): Delete declaration.
* arch-utils.c (init_frame_pc_noop): Delete function.
* mn10300-tdep.c (mn10300_gdbarch_init): Do not set
"init_frame_pc".
* mips-tdep.c (mips_gdbarch_init): Ditto.
* i386-interix-tdep.c (i386_interix_init_abi): Ditto.
* config/sparc/tm-sparc.h (init_frame_pc_noop): Delete
declaration.
(DEPRECATED_INIT_FRAME_PC): Delete macro.
* config/rs6000/tm-rs6000.h (init_frame_pc_noop): Delete
declaration.
(DEPRECATED_INIT_FRAME_PC): Delete macro.
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.93
diff -u -r1.93 arch-utils.c
--- arch-utils.c 17 Sep 2003 19:48:42 -0000 1.93
+++ arch-utils.c 21 Sep 2003 02:05:15 -0000
@@ -228,13 +228,6 @@
}
CORE_ADDR
-init_frame_pc_noop (int fromleaf, struct frame_info *prev)
-{
- /* Do nothing, implies return the same PC value. */
- return get_frame_pc (prev);
-}
-
-CORE_ADDR
init_frame_pc_default (int fromleaf, struct frame_info *prev)
{
if (fromleaf && DEPRECATED_SAVED_PC_AFTER_CALL_P ())
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.55
diff -u -r1.55 arch-utils.h
--- arch-utils.h 17 Sep 2003 19:48:42 -0000 1.55
+++ arch-utils.h 21 Sep 2003 02:05:15 -0000
@@ -85,8 +85,6 @@
/* Versions of init_frame_pc(). Do nothing; do the default. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-
extern CORE_ADDR init_frame_pc_default (int fromleaf, struct frame_info *prev);
/* Do nothing version of elf_make_msymbol_special. */
Index: i386-interix-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-interix-tdep.c,v
retrieving revision 1.11
diff -u -r1.11 i386-interix-tdep.c
--- i386-interix-tdep.c 12 Sep 2003 18:40:17 -0000 1.11
+++ i386-interix-tdep.c 21 Sep 2003 02:05:15 -0000
@@ -332,7 +332,6 @@
set_gdbarch_skip_trampoline_code (gdbarch,
i386_interix_skip_trampoline_code);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, i386_interix_back_one_frame);
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
set_gdbarch_deprecated_frame_chain_valid (gdbarch, i386_interix_frame_chain_valid);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, i386_interix_frame_saved_pc);
set_gdbarch_name_of_malloc (gdbarch, "_malloc");
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.235
diff -u -r1.235 mips-tdep.c
--- mips-tdep.c 19 Sep 2003 16:22:38 -0000 1.235
+++ mips-tdep.c 21 Sep 2003 02:05:17 -0000
@@ -6056,7 +6056,6 @@
/* There's a mess in stack frame creation. See comments in
blockframe.c near reference to DEPRECATED_INIT_FRAME_PC_FIRST. */
set_gdbarch_deprecated_init_frame_pc_first (gdbarch, mips_init_frame_pc_first);
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
/* Map debug register numbers onto internal register numbers. */
set_gdbarch_stab_reg_to_regnum (gdbarch, mips_stab_reg_to_regnum);
Index: mn10300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v
retrieving revision 1.89
diff -u -r1.89 mn10300-tdep.c
--- mn10300-tdep.c 17 Sep 2003 14:24:30 -0000 1.89
+++ mn10300-tdep.c 21 Sep 2003 02:05:17 -0000
@@ -1189,7 +1189,6 @@
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, mn10300_saved_pc_after_call);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, mn10300_init_extra_frame_info);
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, mn10300_frame_init_saved_regs);
set_gdbarch_deprecated_frame_chain (gdbarch, mn10300_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, mn10300_frame_saved_pc);
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.26
diff -u -r1.26 tm-rs6000.h
--- config/rs6000/tm-rs6000.h 3 Sep 2003 21:01:44 -0000 1.26
+++ config/rs6000/tm-rs6000.h 21 Sep 2003 02:05:17 -0000
@@ -83,12 +83,6 @@
#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) \
(fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) : \
prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ())
-/* NOTE: cagney/2002-12-08: Add local declaration of
- init_frame_pc_noop() because it isn't possible to include
- "arch-utils.h" here. Not too bad as this entire file is going away
- anyway. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
Index: config/sparc/tm-sparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v
retrieving revision 1.59
diff -u -r1.59 tm-sparc.h
--- config/sparc/tm-sparc.h 3 Sep 2003 15:02:50 -0000 1.59
+++ config/sparc/tm-sparc.h 21 Sep 2003 02:05:17 -0000
@@ -211,11 +211,6 @@
/* DEPRECATED_INIT_EXTRA_FRAME_INFO needs the PC to detect flat
frames. */
-/* NOTE: cagney/2002-12-08: Add local declaration of
- init_frame_pc_noop() because it isn't possible to include
- "arch-utils.h" here. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(FROMLEAF, PREV) (init_frame_pc_noop (FROMLEAF, PREV))
#define DEPRECATED_INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \
((FROMLEAF) ? DEPRECATED_SAVED_PC_AFTER_CALL ((PREV)->next) : \
(PREV)->next ? DEPRECATED_FRAME_SAVED_PC ((PREV)->next) : read_pc ())