This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[obish] Delete DEPRECATED_CALL_DUMMY_LENGTH, never set
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 02 Apr 2004 18:21:40 -0500
- Subject: [obish] Delete DEPRECATED_CALL_DUMMY_LENGTH, never set
Nothing sets this, deleted (or inlined as zero).
committed,
Andrew
2004-04-02 Andrew Cagney <cagney@redhat.com>
* sh64-tdep.c (sh64_init_extra_frame_info): Replace
DEPRECATED_CALL_DUMMY_LENGTH with 0, simplify.
* dummy-frame.h: Delete out-of-date comments.
* gdbarch.sh (DEPRECATED_CALL_DUMMY_LENGTH): Delete.
* gdbarch.h, gdbarch.c: Re-generate.
Index: dummy-frame.h
===================================================================
RCS file: /cvs/src/src/gdb/dummy-frame.h,v
retrieving revision 1.13
diff -u -r1.13 dummy-frame.h
--- dummy-frame.h 22 Mar 2004 15:36:45 -0000 1.13
+++ dummy-frame.h 2 Apr 2004 23:17:26 -0000
@@ -27,24 +27,6 @@
struct frame_unwind;
struct frame_id;
-/* GENERIC DUMMY FRAMES
-
- The following code serves to maintain the dummy stack frames for
- inferior function calls (ie. when gdb calls into the inferior via
- call_function_by_hand). This code saves the machine state before
- the call in host memory, so we must maintain an independent stack
- and keep it consistant etc. I am attempting to make this code
- generic enough to be used by many targets.
-
- The cheapest and most generic way to do CALL_DUMMY on a new target
- is probably to define CALL_DUMMY to be empty,
- DEPRECATED_CALL_DUMMY_LENGTH to zero, and CALL_DUMMY_LOCATION to
- AT_ENTRY. Then you must remember to define PUSH_RETURN_ADDRESS,
- because no call instruction will be being executed by the target.
- Also DEPRECATED_FRAME_CHAIN_VALID as
- generic_{file,func}_frame_chain_valid and do not set
- DEPRECATED_FIX_CALL_DUMMY. */
-
/* If the PC falls in a dummy frame, return a dummy frame
unwinder. */
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.280
diff -u -r1.280 gdbarch.c
--- gdbarch.c 2 Apr 2004 22:58:56 -0000 1.280
+++ gdbarch.c 2 Apr 2004 23:17:26 -0000
@@ -165,7 +165,6 @@
int call_dummy_location;
CORE_ADDR deprecated_call_dummy_start_offset;
CORE_ADDR deprecated_call_dummy_breakpoint_offset;
- int deprecated_call_dummy_length;
LONGEST * deprecated_call_dummy_words;
int deprecated_sizeof_call_dummy_words;
gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
@@ -331,7 +330,6 @@
0, /* call_dummy_location */
0, /* deprecated_call_dummy_start_offset */
0, /* deprecated_call_dummy_breakpoint_offset */
- 0, /* deprecated_call_dummy_length */
0, /* deprecated_call_dummy_words */
0, /* deprecated_sizeof_call_dummy_words */
0, /* deprecated_fix_call_dummy */
@@ -957,14 +955,6 @@
"gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
(long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
#endif
-#ifdef DEPRECATED_CALL_DUMMY_LENGTH
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
- XSTRING (DEPRECATED_CALL_DUMMY_LENGTH));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
- DEPRECATED_CALL_DUMMY_LENGTH);
-#endif
#ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
@@ -3438,22 +3428,6 @@
CORE_ADDR deprecated_call_dummy_breakpoint_offset)
{
gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
-}
-
-int
-gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n");
- return gdbarch->deprecated_call_dummy_length;
-}
-
-void
-set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
- int deprecated_call_dummy_length)
-{
- gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
}
LONGEST *
Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.242
diff -u -r1.242 gdbarch.h
--- gdbarch.h 2 Apr 2004 22:58:57 -0000 1.242
+++ gdbarch.h 2 Apr 2004 23:17:27 -0000
@@ -861,17 +861,6 @@
#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
#endif
-/* DEPRECATED_CALL_DUMMY_LENGTH can be deleted. */
-
-extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_LENGTH)
-#define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
-#endif
-
/* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */
extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.306
diff -u -r1.306 gdbarch.sh
--- gdbarch.sh 2 Apr 2004 22:58:57 -0000 1.306
+++ gdbarch.sh 2 Apr 2004 23:17:27 -0000
@@ -531,8 +531,6 @@
v::DEPRECATED_CALL_DUMMY_START_OFFSET:CORE_ADDR:deprecated_call_dummy_start_offset
# DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted.
v::DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:deprecated_call_dummy_breakpoint_offset
-# DEPRECATED_CALL_DUMMY_LENGTH can be deleted.
-v::DEPRECATED_CALL_DUMMY_LENGTH:int:deprecated_call_dummy_length
# DEPRECATED_CALL_DUMMY_WORDS can be deleted.
v::DEPRECATED_CALL_DUMMY_WORDS:LONGEST *:deprecated_call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS.
Index: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.24
diff -u -r1.24 sh64-tdep.c
--- sh64-tdep.c 22 Mar 2004 16:58:08 -0000 1.24
+++ sh64-tdep.c 2 Apr 2004 23:17:28 -0000
@@ -1224,7 +1224,7 @@
get_frame_extra_info (fi)->return_pc =
deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), PC_REGNUM);
- get_frame_extra_info (fi)->f_offset = -(DEPRECATED_CALL_DUMMY_LENGTH + 4);
+ get_frame_extra_info (fi)->f_offset = -4;
get_frame_extra_info (fi)->leaf_function = 0;
return;
}
Index: doc/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/doc/ChangeLog,v
retrieving revision 1.402
diff -u -r1.402 ChangeLog
--- doc/ChangeLog 28 Mar 2004 12:22:55 -0000 1.402
+++ doc/ChangeLog 2 Apr 2004 23:17:28 -0000
@@ -1,3 +1,8 @@
+2004-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ reference to DEPRECATED_CALL_DUMMY_LENGTH.
+
2004-03-28 Stephane Carrez <stcarrez@nerim.fr>
* gdb.texinfo (TUI Commands): Document tui reg commands.
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.194
diff -u -r1.194 gdbint.texinfo
--- doc/gdbint.texinfo 23 Mar 2004 15:16:47 -0000 1.194
+++ doc/gdbint.texinfo 2 Apr 2004 23:17:32 -0000
@@ -3057,7 +3057,7 @@
@item DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
@findex DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
The size of @code{DEPRECATED_CALL_DUMMY_WORDS}. This must return a
-positive value. See also @code{DEPRECATED_CALL_DUMMY_LENGTH}.
+positive value.
This method has been replaced by @code{push_dummy_code}
(@pxref{push_dummy_code}).