2004-05-08 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_PUSH_DUMMY_FRAME): Delete. * gdbarch.h, gdbarch.c: Re-generate. * inferior.h (PUSH_DUMMY_FRAME): Delete macro. * infcall.c (call_function_by_hand): Eliminate call to DEPRECATED_PUSH_DUMMY_FRAME. * ns32k-tdep.c (ns32k_gdbarch_init): Do not set deprecated push_dummy_frame. (ns32k_push_dummy_frame): Delete function.
This commit is contained in:
parent
e4a2df64e7
commit
58d28df87e
9 changed files with 27 additions and 126 deletions
|
@ -1,5 +1,14 @@
|
|||
2004-05-08 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* gdbarch.sh (DEPRECATED_PUSH_DUMMY_FRAME): Delete.
|
||||
* gdbarch.h, gdbarch.c: Re-generate.
|
||||
* inferior.h (PUSH_DUMMY_FRAME): Delete macro.
|
||||
* infcall.c (call_function_by_hand): Eliminate call to
|
||||
DEPRECATED_PUSH_DUMMY_FRAME.
|
||||
* ns32k-tdep.c (ns32k_gdbarch_init): Do not set deprecated
|
||||
push_dummy_frame.
|
||||
(ns32k_push_dummy_frame): Delete function.
|
||||
|
||||
* ns32k-tdep.c (ns32k_gdbarch_init): Do not set
|
||||
deprecated_call_dummy_breakpoint_offset or
|
||||
deprecated_call_dummy_start_offset.
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2004-05-08 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* gdbint.texinfo (Target Architecture Definition): Delete
|
||||
description of DEPRECATED_PUSH_DUMMY_FRAME.
|
||||
|
||||
* gdbint.texinfo (Target Architecture Definition): Delete
|
||||
reference to DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET.
|
||||
|
||||
|
|
|
@ -3705,10 +3705,6 @@ This method replaces @code{DEPRECATED_CALL_DUMMY_WORDS},
|
|||
@code{CALL_DUMMY_LOCATION}, @code{DEPRECATED_REGISTER_SIZE}, and
|
||||
@code{DEPRECATED_FIX_CALL_DUMMY}.
|
||||
|
||||
@item DEPRECATED_PUSH_DUMMY_FRAME
|
||||
@findex DEPRECATED_PUSH_DUMMY_FRAME
|
||||
Used in @samp{call_function_by_hand} to create an artificial stack frame.
|
||||
|
||||
@item DEPRECATED_REGISTER_BYTES
|
||||
@findex DEPRECATED_REGISTER_BYTES
|
||||
The total amount of space needed to store @value{GDBN}'s copy of the
|
||||
|
|
|
@ -166,7 +166,6 @@ struct gdbarch
|
|||
int deprecated_sizeof_call_dummy_words;
|
||||
gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
|
||||
gdbarch_push_dummy_code_ftype *push_dummy_code;
|
||||
gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
|
||||
gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
|
||||
gdbarch_print_registers_info_ftype *print_registers_info;
|
||||
gdbarch_print_float_info_ftype *print_float_info;
|
||||
|
@ -323,7 +322,6 @@ struct gdbarch startup_gdbarch =
|
|||
0, /* deprecated_sizeof_call_dummy_words */
|
||||
0, /* deprecated_fix_call_dummy */
|
||||
0, /* push_dummy_code */
|
||||
0, /* deprecated_push_dummy_frame */
|
||||
0, /* deprecated_do_registers_info */
|
||||
default_print_registers_info, /* print_registers_info */
|
||||
0, /* print_float_info */
|
||||
|
@ -617,7 +615,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
|
|||
/* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
|
||||
/* Skip verify of deprecated_fix_call_dummy, has predicate */
|
||||
/* Skip verify of push_dummy_code, has predicate */
|
||||
/* Skip verify of deprecated_push_dummy_frame, has predicate */
|
||||
/* Skip verify of deprecated_do_registers_info, has predicate */
|
||||
/* Skip verify of print_registers_info, invalid_p == 0 */
|
||||
/* Skip verify of print_float_info, has predicate */
|
||||
|
@ -1300,25 +1297,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
|
|||
(long) current_gdbarch->deprecated_push_arguments
|
||||
/*DEPRECATED_PUSH_ARGUMENTS ()*/);
|
||||
#endif
|
||||
#ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
"DEPRECATED_PUSH_DUMMY_FRAME_P()",
|
||||
XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
|
||||
DEPRECATED_PUSH_DUMMY_FRAME_P ());
|
||||
#endif
|
||||
#ifdef DEPRECATED_PUSH_DUMMY_FRAME
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
"DEPRECATED_PUSH_DUMMY_FRAME(-)",
|
||||
XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
|
||||
(long) current_gdbarch->deprecated_push_dummy_frame
|
||||
/*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
|
||||
#endif
|
||||
#ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
|
@ -3344,30 +3322,6 @@ set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
|
|||
gdbarch->push_dummy_code = push_dummy_code;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
return gdbarch->deprecated_push_dummy_frame != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
|
||||
gdbarch->deprecated_push_dummy_frame ();
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
|
||||
gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
|
||||
{
|
||||
gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
|
||||
{
|
||||
|
|
|
@ -885,33 +885,6 @@ typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE
|
|||
extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr);
|
||||
extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
|
||||
|
||||
/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME. */
|
||||
|
||||
#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
|
||||
/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
|
||||
#if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
|
||||
#define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
|
||||
#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
|
||||
#endif
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
|
||||
#define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
|
||||
#endif
|
||||
|
||||
typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
|
||||
extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
|
||||
extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
|
||||
#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
|
||||
#endif
|
||||
#if !defined (DEPRECATED_PUSH_DUMMY_FRAME)
|
||||
#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
|
||||
#endif
|
||||
|
||||
#if defined (DEPRECATED_DO_REGISTERS_INFO)
|
||||
/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
|
||||
#if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
|
||||
|
|
|
@ -534,8 +534,6 @@ v::DEPRECATED_SIZEOF_CALL_DUMMY_WORDS:int:deprecated_sizeof_call_dummy_words::::
|
|||
F::DEPRECATED_FIX_CALL_DUMMY:void:deprecated_fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p
|
||||
# This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al.
|
||||
M::PUSH_DUMMY_CODE:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
|
||||
# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME.
|
||||
F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-
|
||||
|
||||
F:2:DEPRECATED_DO_REGISTERS_INFO:void:deprecated_do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
|
||||
m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0
|
||||
|
|
|
@ -324,34 +324,23 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
|
|||
inf_status = save_inferior_status (1);
|
||||
inf_status_cleanup = make_cleanup_restore_inferior_status (inf_status);
|
||||
|
||||
if (DEPRECATED_PUSH_DUMMY_FRAME_P ())
|
||||
{
|
||||
/* DEPRECATED_PUSH_DUMMY_FRAME is responsible for saving the
|
||||
inferior registers (and frame_pop() for restoring them). (At
|
||||
least on most machines) they are saved on the stack in the
|
||||
inferior. */
|
||||
DEPRECATED_PUSH_DUMMY_FRAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: cagney/2003-02-26: Step zero of this little tinker is
|
||||
to extract the generic dummy frame code from the architecture
|
||||
vector. Hence this direct call.
|
||||
/* FIXME: cagney/2003-02-26: Step zero of this little tinker is to
|
||||
extract the generic dummy frame code from the architecture
|
||||
vector. Hence this direct call.
|
||||
|
||||
A follow-on change is to modify this interface so that it takes
|
||||
thread OR frame OR ptid as a parameter, and returns a dummy
|
||||
frame handle. The handle can then be used further down as a
|
||||
parameter to generic_save_dummy_frame_tos(). Hmm, thinking
|
||||
about it, since everything is ment to be using generic dummy
|
||||
frames, why not even use some of the dummy frame code to here -
|
||||
do a regcache dup and then pass the duped regcache, along with
|
||||
all the other stuff, at one single point.
|
||||
A follow-on change is to modify this interface so that it takes
|
||||
thread OR frame OR ptid as a parameter, and returns a dummy frame
|
||||
handle. The handle can then be used further down as a parameter
|
||||
to generic_save_dummy_frame_tos(). Hmm, thinking about it, since
|
||||
everything is ment to be using generic dummy frames, why not even
|
||||
use some of the dummy frame code to here - do a regcache dup and
|
||||
then pass the duped regcache, along with all the other stuff, at
|
||||
one single point.
|
||||
|
||||
In fact, you can even save the structure's return address in the
|
||||
dummy frame and fix one of those nasty lost struct return edge
|
||||
conditions. */
|
||||
generic_push_dummy_frame ();
|
||||
}
|
||||
In fact, you can even save the structure's return address in the
|
||||
dummy frame and fix one of those nasty lost struct return edge
|
||||
conditions. */
|
||||
generic_push_dummy_frame ();
|
||||
|
||||
/* Ensure that the initial SP is correctly aligned. */
|
||||
{
|
||||
|
|
|
@ -443,10 +443,6 @@ extern int attach_flag;
|
|||
/* FIXME: cagney/2000-04-17: gdbarch should manage this. The default
|
||||
shouldn't be necessary. */
|
||||
|
||||
#if !defined PUSH_DUMMY_FRAME
|
||||
#define PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "PUSH_DUMMY_FRAME"), 0)
|
||||
#endif
|
||||
|
||||
#if !defined STORE_STRUCT_RETURN
|
||||
#define STORE_STRUCT_RETURN(a1,a2) (internal_error (__FILE__, __LINE__, "STORE_STRUCT_RETURN"), 0)
|
||||
#endif
|
||||
|
|
|
@ -398,22 +398,6 @@ ns32k_frame_init_saved_regs (struct frame_info *frame)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ns32k_push_dummy_frame (void)
|
||||
{
|
||||
CORE_ADDR sp = read_register (SP_REGNUM);
|
||||
int regnum;
|
||||
|
||||
sp = push_word (sp, read_register (PC_REGNUM));
|
||||
sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM));
|
||||
write_register (DEPRECATED_FP_REGNUM, sp);
|
||||
|
||||
for (regnum = 0; regnum < 8; regnum++)
|
||||
sp = push_word (sp, read_register (regnum));
|
||||
|
||||
write_register (SP_REGNUM, sp);
|
||||
}
|
||||
|
||||
static void
|
||||
ns32k_pop_frame (void)
|
||||
{
|
||||
|
@ -574,7 +558,6 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
set_gdbarch_deprecated_store_return_value (gdbarch, ns32k_store_return_value);
|
||||
|
||||
/* Call dummy info */
|
||||
set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);
|
||||
set_gdbarch_deprecated_pop_frame (gdbarch, ns32k_pop_frame);
|
||||
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
|
||||
set_gdbarch_deprecated_call_dummy_words (gdbarch, ns32k_call_dummy_words);
|
||||
|
|
Loading…
Add table
Reference in a new issue