This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/rfc] Assume generic dummy frames (breaks ns32k)
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 30 Apr 2004 12:03:18 -0400
- Subject: [patch/rfc] Assume generic dummy frames (breaks ns32k)
Hello,
This tweaks gdbarch.sh to hardwire DEPRECATED_USE_GENERIC_DUMMY_FRAMES
to one.
Since the ns32k does not yet use generic dummy frames, the patch will
break the ns32k's inferior function call support (that's assuming it is
working - that isn't clear). It won't affect other aspects of the ns32k
support.
See: http://sources.redhat.com/ml/gdb/2004-03/msg00203.html
for the original proposal. As it notes, this change has been pending
for _9_ years.
With this in place, removing huge hunks of code become possible.
comments?
I'll give this a week.
Andrew
2004-04-30 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Replace with
macro defined to 1.
* gdbarch.h, gdbarch.c: Re-generate.
* ns32k-tdep.c (ns32k_gdbarch_init): Do not set
deprecated_use_generic_dummy_frames.
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.307
diff -p -u -r1.307 gdbarch.sh
--- gdbarch.sh 2 Apr 2004 23:20:48 -0000 1.307
+++ gdbarch.sh 30 Apr 2004 15:52:19 -0000
@@ -517,8 +517,6 @@ F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:d
M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
# PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS.
F:2:DEPRECATED_PUSH_ARGUMENTS:CORE_ADDR:deprecated_push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr
-# DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true.
-v::DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
# Implement PUSH_RETURN_ADDRESS, and then merge in
# DEPRECATED_PUSH_RETURN_ADDRESS.
F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp
@@ -874,6 +872,8 @@ struct obstack;
extern struct gdbarch *current_gdbarch;
+/* Always one, being eliminated. */
+#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1
/* If any of the following are defined, the target wasn't correctly
converted. */
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.68
diff -p -u -r1.68 ns32k-tdep.c
--- ns32k-tdep.c 16 Feb 2004 21:49:22 -0000 1.68
+++ ns32k-tdep.c 30 Apr 2004 15:52:19 -0000
@@ -582,7 +582,6 @@ ns32k_gdbarch_init (struct gdbarch_info
set_gdbarch_deprecated_fix_call_dummy (gdbarch, ns32k_fix_call_dummy);
set_gdbarch_deprecated_call_dummy_start_offset (gdbarch, 3);
set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 15);
- set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
/* Breakpoint info */