diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-05-08 20:48:52 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-05-08 20:48:52 +0000 |
commit | 58d28df87ebbab754b83643ca128cb319366c935 (patch) | |
tree | a70678ab93370f189c5c07933724579c4e730877 /gdb | |
parent | e4a2df64e7997f29444053d0747f09e843e4a4e9 (diff) | |
download | gdb-58d28df87ebbab754b83643ca128cb319366c935.zip gdb-58d28df87ebbab754b83643ca128cb319366c935.tar.gz gdb-58d28df87ebbab754b83643ca128cb319366c935.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/doc/gdbint.texinfo | 4 | ||||
-rw-r--r-- | gdb/gdbarch.c | 46 | ||||
-rw-r--r-- | gdb/gdbarch.h | 27 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/infcall.c | 45 | ||||
-rw-r--r-- | gdb/inferior.h | 4 | ||||
-rw-r--r-- | gdb/ns32k-tdep.c | 17 |
9 files changed, 29 insertions, 128 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 06bb6f7..c0258bb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a505fa2..49a8485 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,6 +1,9 @@ 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. 2004-05-07 Andrew Cagney <cagney@redhat.com> diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index dc92c78..dc80183 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -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 diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 0dbbe29..140f332 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -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", @@ -3345,30 +3323,6 @@ set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, } 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) { gdb_assert (gdbarch != NULL); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index da1e9ec..7fa6c07 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -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) diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 4832432..c921426 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -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 diff --git a/gdb/infcall.c b/gdb/infcall.c index b11a12f..4d1f1c7 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -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. - - 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 (); - } + /* 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. + + 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. */ { diff --git a/gdb/inferior.h b/gdb/inferior.h index cd2ada8..951893f 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -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 diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index 1019b41..2bfeb3a 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -399,22 +399,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) { struct frame_info *frame = get_current_frame (); @@ -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); |