This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] delete deprecated pc in call dummy on stack
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 08 May 2004 14:36:19 -0400
- Subject: [commit] delete deprecated pc in call dummy on stack
Hello,
The function deprecated_pc_in_call_dummy_on_stack only applies to
non-generic dummy frames. Since dummy frames are assumed, this deletes it.
Committed,
Andrew
2004-05-08 Andrew Cagney <cagney@redhat.com>
* ns32k-tdep.c (ns32k_gdbarch_init): Do not set deprecated
pc_in_call_dummy.
* inferior.h (deprecated_pc_in_call_dummy_on_stack): Delete.
* blockframe.c (deprecated_pc_in_call_dummy_on_stack): Delete.
Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.98
diff -p -u -r1.98 blockframe.c
--- blockframe.c 30 Apr 2004 20:58:32 -0000 1.98
+++ blockframe.c 8 May 2004 18:33:03 -0000
@@ -519,33 +519,6 @@ block_innermost_frame (struct block *blo
below is for infrun.c, which may give the macro a pc without that
subtracted out. */
-/* Is the PC in a call dummy? SP and FRAME_ADDRESS are the bottom and
- top of the stack frame which we are checking, where "bottom" and
- "top" refer to some section of memory which contains the code for
- the call dummy. Calls to this macro assume that the contents of
- SP_REGNUM and DEPRECATED_FP_REGNUM (or the saved values thereof),
- respectively, are the things to pass.
-
- This won't work on the 29k, where SP_REGNUM and
- DEPRECATED_FP_REGNUM don't 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 DEPRECATED_PC_IN_CALL_DUMMY.
-
- Something simpler, like checking for the stack segment, doesn't work,
- since various programs (threads implementations, gcc nested function
- stubs, etc) may either allocate stack frames in another segment, or
- allocate other kinds of code on the stack. */
-
-int
-deprecated_pc_in_call_dummy_on_stack (CORE_ADDR pc, CORE_ADDR sp,
- CORE_ADDR frame_address)
-{
- return (INNER_THAN ((sp), (pc))
- && (frame_address != 0)
- && INNER_THAN ((pc), (frame_address)));
-}
-
/* Returns true for a user frame or a call_function_by_hand dummy
frame, and false for the CRT0 start-up frame. Purpose is to
terminate backtrace. */
Index: inferior.h
===================================================================
RCS file: /cvs/src/src/gdb/inferior.h,v
retrieving revision 1.62
diff -p -u -r1.62 inferior.h
--- inferior.h 22 Mar 2004 15:36:47 -0000 1.62
+++ inferior.h 8 May 2004 18:33:06 -0000
@@ -452,17 +452,6 @@ extern int attach_flag;
#endif
-/* Are we in a call dummy? */
-
-/* NOTE: cagney/2002-11-24 cagney/2004-03-22: Targets need to both
- switch to generic dummy frames. The generic version should be able
- to handle all cases since that code works by saving the address of
- the dummy's breakpoint (where ever it is). */
-
-extern int deprecated_pc_in_call_dummy_on_stack (CORE_ADDR pc,
- CORE_ADDR sp,
- CORE_ADDR frame_address);
-
/* If STARTUP_WITH_SHELL is set, GDB's "run"
will attempts to start up the debugee under a shell.
This is in order for argument-expansion to occur. E.g.,
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.69
diff -p -u -r1.69 ns32k-tdep.c
--- ns32k-tdep.c 7 May 2004 14:55:59 -0000 1.69
+++ ns32k-tdep.c 8 May 2004 18:33:07 -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_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
/* Breakpoint info */
set_gdbarch_breakpoint_from_pc (gdbarch, ns32k_breakpoint_from_pc);