diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-16 16:47:44 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-16 16:47:44 +0000 |
commit | 6f0185c1415937b00105bfd91ef41b87a4a405da (patch) | |
tree | ffb592dfd42e56d99850433d10ecffff7157575b /gdb | |
parent | e079a20fc02a8c5679f502e915b712099cf0bd5c (diff) | |
download | gdb-6f0185c1415937b00105bfd91ef41b87a4a405da.tar.gz |
2003-06-16 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (SAVE_DUMMY_FRAME_TOS): Deprecate.
* gdbarch.h, gdbarch.c: Re-generate.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
* s390-tdep.c (s390_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* mn10300-tdep.c (mn10300_gdbarch_init): Update.
* mips-tdep.c (mips_gdbarch_init): Update.
* mcore-tdep.c (mcore_gdbarch_init): Update.
* cris-tdep.c (cris_gdbarch_init): Update.
* infcall.c (call_function_by_hand): Update.
* ia64-tdep.c (ia64_push_arguments): Update comment.
* frame.c (legacy_get_prev_frame): Do not assume
SAVE_DUMMY_FRAME_TOS_P.
* dummy-frame.c (find_dummy_frame): Update comment.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 17 | ||||
-rw-r--r-- | gdb/cris-tdep.c | 2 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdbint.texinfo | 30 | ||||
-rw-r--r-- | gdb/dummy-frame.c | 2 | ||||
-rw-r--r-- | gdb/frame.c | 4 | ||||
-rw-r--r-- | gdb/gdbarch.c | 72 | ||||
-rw-r--r-- | gdb/gdbarch.h | 40 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 17 | ||||
-rw-r--r-- | gdb/infcall.c | 31 | ||||
-rw-r--r-- | gdb/mcore-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 2 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/xstormy16-tdep.c | 2 |
17 files changed, 129 insertions, 105 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5518789af23..7c3d9e2af32 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,22 @@ 2003-06-16 Andrew Cagney <cagney@redhat.com> + * gdbarch.sh (SAVE_DUMMY_FRAME_TOS): Deprecate. + * gdbarch.h, gdbarch.c: Re-generate. + * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * rs6000-tdep.c (rs6000_gdbarch_init): Update. + * mn10300-tdep.c (mn10300_gdbarch_init): Update. + * mips-tdep.c (mips_gdbarch_init): Update. + * mcore-tdep.c (mcore_gdbarch_init): Update. + * cris-tdep.c (cris_gdbarch_init): Update. + * infcall.c (call_function_by_hand): Update. + * ia64-tdep.c (ia64_push_arguments): Update comment. + * frame.c (legacy_get_prev_frame): Do not assume + SAVE_DUMMY_FRAME_TOS_P. + * dummy-frame.c (find_dummy_frame): Update comment. + +2003-06-16 Andrew Cagney <cagney@redhat.com> + * regcache.c (do_cooked_read): Do not use register_valid_p. 2003-06-15 Theodore A. Roth <troth@openavr.org> diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 0da68c0f33d..3c7bf60a96a 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -4295,7 +4295,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_saved_pc_after_call (gdbarch, cris_saved_pc_after_call); /* Helpful for backtracing and returning in a call dummy. */ - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); /* Should be using push_dummy_call. */ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 7dcda46c57a..b6eb66f24c4 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,6 +1,11 @@ 2003-06-13 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Deprecate + SAVE_DUMMY_FRAME_TOS. Update description of "unwind_dummy_id". + +2003-06-13 Andrew Cagney <cagney@redhat.com> + + * gdbint.texinfo (Target Architecture Definition): Deprecate REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT, and BIG_REMOTE_BREAKPOINT. Cross reference BREAKPOINT_FROM_PC. diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 9c651ed7797..dd59da23ac3 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -41,7 +41,7 @@ Software Foundation raise funds for GNU development.'' @page @tex \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ -\xdef\manvers{\$Revision: 1.151 $} % For use in headers, footers too +\xdef\manvers{\$Revision: 1.152 $} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Solutions\par \hfill \manvers\par @@ -3701,7 +3701,9 @@ the inferior function onto the stack. In addition to pushing @var{nargs}, the code should push @var{struct_addr} (when @var{struct_return}), and the return address (@var{bp_addr}). -Returns the updated top-of-stack pointer. +Returns the stack part of a frame ID that will be used to re-identify +the dummy-frame after the called function returns. The value must match +the value returned by @code{unwind_dummy_id} (@pxref{unwind_dummy_id}). This method replaces @code{DEPRECATED_PUSH_ARGUMENTS}. @@ -3753,13 +3755,14 @@ Deprecated in favor of @code{REGISTER_NAME}. Define this to return 1 if the given type will be passed by pointer rather than directly. -@item SAVE_DUMMY_FRAME_TOS (@var{sp}) -@findex SAVE_DUMMY_FRAME_TOS -@anchor{SAVE_DUMMY_FRAME_TOS} Used in @samp{call_function_by_hand} to -notify the target dependent code of the top-of-stack value that will be -passed to the the inferior code. This is the value of the @code{SP} -after both the dummy frame and space for parameters/results have been -allocated on the stack. @xref{unwind_dummy_id}. +@item DEPRECATED_SAVE_DUMMY_FRAME_TOS (@var{sp}) +@findex DEPRECATED_SAVE_DUMMY_FRAME_TOS +@anchor{DEPRECATED_SAVE_DUMMY_FRAME_TOS} Used in +@samp{call_function_by_hand} to notify the target dependent code of the +top-of-stack value that will be passed to the the inferior code. This +is the value of the @code{SP} after both the dummy frame and space for +parameters/results have been allocated on the stack. +@xref{unwind_dummy_id}. @item SDB_REG_TO_REGNUM @findex SDB_REG_TO_REGNUM @@ -3945,9 +3948,12 @@ decoding routine. @findex unwind_dummy_id @anchor{unwind_dummy_id} Given @var{frame} return a @code{struct frame_id} that uniquely identifies an inferior function call's dummy -frame. The value returned must match the dummy frame stack value -previously saved using @code{SAVE_DUMMY_FRAME_TOS}. -@xref{SAVE_DUMMY_FRAME_TOS}. +frame. + +The returned frame ID's stack address must match the address previously +returned by @code{push_dummy_call}, and the returned frame ID's code +address must match the address of the breakpoint instruction that the +called function returns to (@pxref{push_dummy_call}). @item USE_STRUCT_CONVENTION (@var{gcc_p}, @var{type}) @findex USE_STRUCT_CONVENTION diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index c395c936e70..9870433c3e1 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -99,7 +99,7 @@ find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp) FP against the saved SP and FP. NOTE: If you're trying to fix a problem with GDB not correctly finding a dummy frame, check the comments that go with FRAME_ALIGN() and - SAVE_DUMMY_FRAME_TOS(). */ + UNWIND_DUMMY_ID(). */ if (fp != dummyframe->fp && fp != dummyframe->sp) continue; } diff --git a/gdb/frame.c b/gdb/frame.c index 7c829418690..9a4af35cf78 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1403,10 +1403,6 @@ legacy_get_prev_frame (struct frame_info *this_frame) or some random address on the stack. Trying to use that PC to apply standard frame ID unwind techniques is just asking for trouble. */ - /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS, - previously saved the dummy frame's ID. Things only work - if the two return the same value. */ - gdb_assert (SAVE_DUMMY_FRAME_TOS_P ()); /* Use an architecture specific method to extract the prev's dummy ID from the next frame. Note that this method uses frame_register_unwind to obtain the register values diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 98afadea8e3..c1ce57adbfd 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -173,7 +173,7 @@ struct gdbarch int deprecated_max_register_raw_size; int deprecated_max_register_virtual_size; gdbarch_unwind_dummy_id_ftype *unwind_dummy_id; - gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos; + gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos; int deprecated_fp_regnum; gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp; gdbarch_push_dummy_call_ftype *push_dummy_call; @@ -341,7 +341,7 @@ struct gdbarch startup_gdbarch = 0, /* deprecated_max_register_raw_size */ 0, /* deprecated_max_register_virtual_size */ 0, /* unwind_dummy_id */ - 0, /* save_dummy_frame_tos */ + 0, /* deprecated_save_dummy_frame_tos */ -1, /* deprecated_fp_regnum */ 0, /* deprecated_target_read_fp */ 0, /* push_dummy_call */ @@ -649,7 +649,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of deprecated_max_register_raw_size, has predicate */ /* Skip verify of deprecated_max_register_virtual_size, has predicate */ /* Skip verify of unwind_dummy_id, has predicate */ - /* Skip verify of save_dummy_frame_tos, has predicate */ + /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */ /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ /* Skip verify of deprecated_target_read_fp, has predicate */ /* Skip verify of push_dummy_call, has predicate */ @@ -1557,6 +1557,29 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_saved_pc_after_call /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/); #endif +#ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()", + XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n", + DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()); +#endif +#ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS +#if GDB_MULTI_ARCH + /* Macro might contain `[{}]' when not multi-arch */ + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)", + XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp))); +#endif + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n", + (long) current_gdbarch->deprecated_save_dummy_frame_tos + /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/); +#endif #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n", @@ -2231,29 +2254,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->return_value_on_stack /*RETURN_VALUE_ON_STACK ()*/); #endif -#ifdef SAVE_DUMMY_FRAME_TOS_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SAVE_DUMMY_FRAME_TOS_P()", - XSTRING (SAVE_DUMMY_FRAME_TOS_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n", - SAVE_DUMMY_FRAME_TOS_P ()); -#endif -#ifdef SAVE_DUMMY_FRAME_TOS -#if GDB_MULTI_ARCH - /* Macro might contain `[{}]' when not multi-arch */ - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SAVE_DUMMY_FRAME_TOS(sp)", - XSTRING (SAVE_DUMMY_FRAME_TOS (sp))); -#endif - if (GDB_MULTI_ARCH) - fprintf_unfiltered (file, - "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n", - (long) current_gdbarch->save_dummy_frame_tos - /*SAVE_DUMMY_FRAME_TOS ()*/); -#endif #ifdef SDB_REG_TO_REGNUM fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -3493,29 +3493,29 @@ set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, } int -gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch) +gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - return gdbarch->save_dummy_frame_tos != 0; + return gdbarch->deprecated_save_dummy_frame_tos != 0; } void -gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) +gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) { gdb_assert (gdbarch != NULL); - if (gdbarch->save_dummy_frame_tos == 0) + if (gdbarch->deprecated_save_dummy_frame_tos == 0) internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_save_dummy_frame_tos invalid"); + "gdbarch: gdbarch_deprecated_save_dummy_frame_tos invalid"); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n"); - gdbarch->save_dummy_frame_tos (sp); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n"); + gdbarch->deprecated_save_dummy_frame_tos (sp); } void -set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, - gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos) +set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, + gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos) { - gdbarch->save_dummy_frame_tos = save_dummy_frame_tos; + gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos; } int diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 53f31817919..af6916df7b4 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -829,39 +829,39 @@ extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete SAVE_DUMMY_FRAME_TOS. */ -#if defined (SAVE_DUMMY_FRAME_TOS) -/* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */ -#if !defined (SAVE_DUMMY_FRAME_TOS_P) -#define SAVE_DUMMY_FRAME_TOS_P() (1) +#if defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) +/* Legacy for systems yet to multi-arch DEPRECATED_SAVE_DUMMY_FRAME_TOS */ +#if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) +#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (1) #endif #endif /* Default predicate for non- multi-arch targets. */ -#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P) -#define SAVE_DUMMY_FRAME_TOS_P() (0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) +#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (0) #endif -extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P) -#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" +extern int gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) +#error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS" #endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P) -#define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) +#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch)) #endif /* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS) -#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) +#define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVE_DUMMY_FRAME_TOS"), 0) #endif -typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp); -extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp); -extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS) -#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" +typedef void (gdbarch_deprecated_save_dummy_frame_tos_ftype) (CORE_ADDR sp); +extern void gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp); +extern void set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) +#error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS" #endif -#if !defined (SAVE_DUMMY_FRAME_TOS) -#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp)) +#if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) +#define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_deprecated_save_dummy_frame_tos (current_gdbarch, sp)) #endif /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 2e007a0c8a1..6f216de4ea1 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -503,7 +503,7 @@ V:2:DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE:int:deprecated_max_register_virtual_siz M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info::0:0 # Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete # SAVE_DUMMY_FRAME_TOS. -F:2:SAVE_DUMMY_FRAME_TOS:void:save_dummy_frame_tos:CORE_ADDR sp:sp::0:0 +F:2:DEPRECATED_SAVE_DUMMY_FRAME_TOS:void:deprecated_save_dummy_frame_tos:CORE_ADDR sp:sp # Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete # DEPRECATED_FP_REGNUM. v:2:DEPRECATED_FP_REGNUM:int:deprecated_fp_regnum::::-1:-1::0 diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 8dc786c3797..63ebbeb38d6 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -2002,14 +2002,15 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp, /* Sync gdb's idea of what the registers are with the target. */ target_store_registers (-1); - /* FIXME: This doesn't belong here! Instead, SAVE_DUMMY_FRAME_TOS needs - to be defined to call generic_save_dummy_frame_tos(). But at the - time of this writing, SAVE_DUMMY_FRAME_TOS wasn't gdbarch'd, so - I chose to put this call here instead of using the old mechanisms. - Once SAVE_DUMMY_FRAME_TOS is gdbarch'd, all we need to do is add the - line - - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); + /* FIXME: This doesn't belong here! Instead, + DEPRECATED_SAVE_DUMMY_FRAME_TOS needs to be defined to call + generic_save_dummy_frame_tos(). But at the time of this writing, + DEPRECATED_SAVE_DUMMY_FRAME_TOS wasn't gdbarch'd, so I chose to + put this call here instead of using the old mechanisms. Once + DEPRECATED_SAVE_DUMMY_FRAME_TOS is gdbarch'd, all we need to do + is add the line + + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); to ia64_gdbarch_init() and remove the line below. */ generic_save_dummy_frame_tos (sp); diff --git a/gdb/infcall.c b/gdb/infcall.c index 0a10c31b287..123fba067cf 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -423,11 +423,11 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) A follow-on change is to modify this interface so that it takes thread OR frame OR tpid as a parameter, and returns a dummy frame handle. The handle can then be used further down as a - parameter 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. + 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 @@ -474,15 +474,14 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) || (INNER_THAN (2, 1) && sp >= old_sp)); } else - /* FIXME: cagney/2002-09-18: Hey, you loose! Who knows how - badly aligned the SP is! Further, per comment above, if the - generic dummy frame ends up empty (because nothing is pushed) - GDB won't be able to correctly perform back traces. If a - target is having trouble with backtraces, first thing to do - is add FRAME_ALIGN() to its architecture vector. After that, - try adding SAVE_DUMMY_FRAME_TOS() and modifying - DEPRECATED_FRAME_CHAIN so that when the next outer frame is a - generic dummy, it returns the current frame's base. */ + /* FIXME: cagney/2002-09-18: Hey, you loose! + + Who knows how badly aligned the SP is! Further, per comment + above, if the generic dummy frame ends up empty (because + nothing is pushed) GDB won't be able to correctly perform + back traces. If a target is having trouble with backtraces, + first thing to do is add FRAME_ALIGN() to the architecture + vector. If that fails, try unwind_dummy_id(). */ sp = old_sp; } @@ -831,8 +830,8 @@ You must use a pointer to function type variable. Command ignored.", arg_name); gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES); generic_save_dummy_frame_tos (sp); } - else if (SAVE_DUMMY_FRAME_TOS_P ()) - SAVE_DUMMY_FRAME_TOS (sp); + else if (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()) + DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp); /* Now proceed, having reached the desired place. */ clear_proceed_status (); diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index 18d7600f89c..4b860e52d2b 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -1079,7 +1079,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words); set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call); set_gdbarch_function_start_offset (gdbarch, 0); set_gdbarch_decr_pc_after_break (gdbarch, 0); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 3561c5facbf..4ecb96894ec 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -5947,7 +5947,7 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address); set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame); set_gdbarch_frame_align (gdbarch, mips_frame_align); - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_deprecated_register_convertible (gdbarch, mips_register_convertible); set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, mips_register_convert_to_virtual); set_gdbarch_deprecated_register_convert_to_raw (gdbarch, mips_register_convert_to_raw); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 85b4a8ea0b2..3519495f5f9 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1201,7 +1201,7 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_deprecated_push_arguments (gdbarch, mn10300_push_arguments); set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr); set_gdbarch_deprecated_push_return_address (gdbarch, mn10300_push_return_address); - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_use_struct_convention (gdbarch, mn10300_use_struct_convention); tdep->am33_mode = am33_mode; diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 2e52ee52c7d..e12a6bea38a 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2940,7 +2940,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_fix_call_dummy (gdbarch, rs6000_fix_call_dummy); set_gdbarch_frame_align (gdbarch, rs6000_frame_align); - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_deprecated_push_return_address (gdbarch, ppc_push_return_address); set_gdbarch_believe_pcc_promotion (gdbarch, 1); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index e3bf67778b6..10df09501b3 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1860,7 +1860,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); set_gdbarch_frame_align (gdbarch, s390_frame_align); set_gdbarch_deprecated_push_arguments (gdbarch, s390_push_arguments); - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_deprecated_push_return_address (gdbarch, s390_push_return_address); set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (s390_call_dummy_words)); diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 9c0c70aeadc..076bd23464d 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1104,7 +1104,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_stack_align (gdbarch, xstormy16_stack_align); - set_gdbarch_save_dummy_frame_tos (gdbarch, xstormy16_save_dummy_frame_tos); + set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, xstormy16_save_dummy_frame_tos); set_gdbarch_skip_trampoline_code (gdbarch, xstormy16_skip_trampoline_code); |