This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch rfc, rfa:doco] Working on-stack generic dummy frames


Hello,

This patch makes all the changes necessary to get breakpoint on-stack call dummys working. Until the ``set call breakpoint-location'' command is added, a target will need to explicitly set the call dummy location to on stack.

I've tested it with the d10v.

The actual change involves:

- burry all the old FIX_CALL_DUMMY code in a new function legacy_push_dummy_code (clearing the way for their deprecation)

- addition of the architecture vector method push_dummy_code that is responsible for allocating space for a breakpoint (and anything else) on the stack (there is a default)

- adding a d10v_push_dummy_code
This needed to handle an DADDR (the SP) vs IADDR (the BP_ADDR) problem

- pass the BP_ADDR to push_dummy_call (instead of dummy_addr)

I'll look to commit this in a few days.

Andrew

PS: Tasks, such as modifying "infrun.c" so that it will treat a SIGSEG on a breakpoint instruction as a breakpoint, and changing the SPARC to to this mechanism, are left as exercises for the reader :-)
Index: doc/ChangeLog
2003-05-01  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Document
	push_dummy_code.  Add cross references.

Index: ChangeLog
2003-05-01  Andrew Cagney  <cagney@redhat.com>

	* gdbarch.sh (PUSH_DUMMY_CODE): New architecture method, add
	comments noteing that it replaces the old FIX_CALL_DUMMY code.
	* gdbarch.h, gdbarch.c: Re-generate.
	* d10v-tdep.c (d10v_push_dummy_code): New function.
	(d10v_gdbarch_init): Set push_dummy_code.
	* infcall.c (legacy_push_dummy_code): New function.
	(generic_push_dummy_code): New function.
	(push_dummy_code): New function.
	(call_function_by_hand): Call push_dummy_code.  Pass bp_addr,
	instead of dummy_addr, to push_dummy_call.  Move call to
	generic_save_call_dummy_addr to outside of CALL_DUMMY_LOCATION
	switch.
	* sparc-tdep.c (sparc_gdbarch_init): Mention push_dummy_code.

Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.111
diff -u -r1.111 d10v-tdep.c
--- d10v-tdep.c	1 May 2003 15:37:45 -0000	1.111
+++ d10v-tdep.c	1 May 2003 21:06:23 -0000
@@ -955,6 +955,25 @@
 
 
 static CORE_ADDR
+d10v_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)
+{
+  /* Allocate space sufficient for a breakpoint.  */
+  sp = (sp - 4) & ~3;
+  /* Store the address of that breakpoint taking care to first convert
+     it into a code (IADDR) address from a stack (DADDR) address.
+     This of course assumes that the two virtual addresses map onto
+     the same real address.  */
+  (*bp_addr) = d10v_make_iaddr (d10v_convert_iaddr_to_raw (sp));
+  /* d10v always starts the call at the callee's entry point.  */
+  (*real_pc) = funaddr;
+  return sp;
+}
+
+static CORE_ADDR
 d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
 		      CORE_ADDR dummy_addr, int nargs, struct value **args,
 		      CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
@@ -1621,6 +1640,7 @@
     }
 
   set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
+  set_gdbarch_push_dummy_code (gdbarch, d10v_push_dummy_code);
   set_gdbarch_push_dummy_call (gdbarch, d10v_push_dummy_call);
   set_gdbarch_store_return_value (gdbarch, d10v_store_return_value);
   set_gdbarch_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.228
diff -u -r1.228 gdbarch.sh
--- gdbarch.sh	30 Apr 2003 22:01:37 -0000	1.228
+++ gdbarch.sh	1 May 2003 21:06:27 -0000
@@ -523,10 +523,15 @@
 # reqires that these methods be set up from the word go.  This also
 # avoids any potential problems with moving beyond multi-arch partial.
 v::DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
+# Replaced by push_dummy_code.
 v::CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0
+# Replaced by push_dummy_code.
 f::CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void::::entry_point_address::0
+# Replaced by push_dummy_code.
 v::CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset
+# Replaced by push_dummy_code.
 v::CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset
+# Replaced by push_dummy_code.
 v::CALL_DUMMY_LENGTH:int:call_dummy_length
 # NOTE: cagney/2002-11-24: This function with predicate has a valid
 # (callable) initial value.  As a consequence, even when the predicate
@@ -534,10 +539,16 @@
 # migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
 # doesn't need to be modified.
 F::DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::generic_pc_in_call_dummy:generic_pc_in_call_dummy
+# Replaced by push_dummy_code.
 v::CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
+# Replaced by push_dummy_code.
 v::SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0
+# Replaced by push_dummy_code.
 V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0
+# Replaced by push_dummy_code.
 F::FIX_CALL_DUMMY:void: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 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:
 F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev
 F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
 #
Index: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.9
diff -u -r1.9 infcall.c
--- infcall.c	30 Apr 2003 01:27:53 -0000	1.9
+++ infcall.c	1 May 2003 21:06:29 -0000
@@ -215,6 +215,140 @@
   breakpoint_auto_delete (*(bpstat *) arg);
 }
 
+static CORE_ADDR
+legacy_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)
+{
+  /* CALL_DUMMY is an array of words (REGISTER_SIZE), but each word is
+     in host byte order.  Before calling FIX_CALL_DUMMY, we byteswap
+     it and remove any extra bytes which might exist because ULONGEST
+     is bigger than REGISTER_SIZE.  */
+  /* NOTE: This is pretty wierd, as the call dummy is actually a
+     sequence of instructions.  But CISC machines will have to pack
+     the instructions into REGISTER_SIZE units (and so will RISC
+     machines for which INSTRUCTION_SIZE is not REGISTER_SIZE).  */
+  /* NOTE: This is pretty stupid.  CALL_DUMMY should be in strict
+     target byte order. */
+  CORE_ADDR start_sp;
+  ULONGEST *dummy = alloca (SIZEOF_CALL_DUMMY_WORDS);
+  int sizeof_dummy1 = (REGISTER_SIZE * SIZEOF_CALL_DUMMY_WORDS
+		       / sizeof (ULONGEST));
+  char *dummy1 = alloca (sizeof_dummy1);
+  memcpy (dummy, CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS);
+  if (INNER_THAN (1, 2))
+    {
+      /* Stack grows down */
+      sp -= sizeof_dummy1;
+      start_sp = sp;
+    }
+  else
+    {
+      /* Stack grows up */
+      start_sp = sp;
+      sp += sizeof_dummy1;
+    }
+  /* NOTE: cagney/2002-09-10: Don't bother re-adjusting the stack
+     after allocating space for the call dummy.  A target can specify
+     a SIZEOF_DUMMY1 (via SIZEOF_CALL_DUMMY_WORDS) such that all local
+     alignment requirements are met.  */
+  /* Create a call sequence customized for this function and the
+     number of arguments for it.  */
+  {
+    int i;
+    for (i = 0; i < (int) (SIZEOF_CALL_DUMMY_WORDS / sizeof (dummy[0]));
+	 i++)
+      store_unsigned_integer (&dummy1[i * REGISTER_SIZE],
+			      REGISTER_SIZE,
+			      (ULONGEST) dummy[i]);
+  }
+  /* NOTE: cagney/2003-04-22: This computation of REAL_PC, BP_ADDR and
+     DUMMY_ADDR is pretty messed up.  It comes from constant tinkering
+     with the values.  Instead a FIX_CALL_DUMMY replacement
+     (PUSH_DUMMY_BREAKPOINT?) should just do everything.  */
+#ifdef GDB_TARGET_IS_HPPA
+  real_pc = FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
+			    value_type, using_gcc);
+#else
+  if (FIX_CALL_DUMMY_P ())
+    {
+      /* gdb_assert (CALL_DUMMY_LOCATION == ON_STACK) true?  */
+      FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, value_type,
+		      using_gcc);
+    }
+  (*real_pc) = start_sp;
+#endif
+  /* Yes, the offset is applied to the real_pc and not the dummy addr.
+     Ulgh!  Blame the HP/UX target.  */
+  (*bp_addr) = (*real_pc) + CALL_DUMMY_BREAKPOINT_OFFSET;
+  /* Yes, the offset is applied to the real_pc and not the
+     dummy_addr.  Ulgh!  Blame the HP/UX target.  */
+  (*real_pc) += CALL_DUMMY_START_OFFSET;
+  write_memory (start_sp, (char *) dummy1, sizeof_dummy1);
+  if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
+    generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1);
+  return sp;
+}
+
+static CORE_ADDR
+generic_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)
+{
+  /* Something here to findout the size of a breakpoint and then
+     allocate space for it on the stack.  */
+  int bplen;
+  /* This code assumes frame align.  */
+  gdb_assert (gdbarch_frame_align_p (gdbarch));
+  /* Force the stack's alignment.  The intent is to ensure that the SP
+     is aligned to at least a breakpoint instruction's boundary.  */
+  sp = gdbarch_frame_align (gdbarch, sp);
+  /* Allocate space for, and then position the breakpoint on the
+     stack.  */
+  if (gdbarch_inner_than (gdbarch, 1, 2))
+    {
+      CORE_ADDR bppc = sp;
+      gdbarch_breakpoint_from_pc (gdbarch, &bppc, &bplen);
+      sp = gdbarch_frame_align (gdbarch, sp - bplen);
+      (*bp_addr) = sp;
+      /* Should the breakpoint size/location be re-computed here?  */
+    }      
+  else
+    {
+      (*bp_addr) = sp;
+      gdbarch_breakpoint_from_pc (gdbarch, bp_addr, &bplen);
+      sp = gdbarch_frame_align (gdbarch, sp + bplen);
+    }
+  /* Inferior resumes at the function entry point.  */
+  (*real_pc) = funaddr;
+  return sp;
+}
+
+/* Provide backward compatibility.  Once FIX_CALL_DUMMY is eliminated,
+   this can be simplified.  */
+
+static CORE_ADDR
+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)
+{
+  if (gdbarch_push_dummy_code_p (gdbarch))
+    return gdbarch_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
+				    args, nargs, value_type, real_pc, bp_addr);
+  else if (FIX_CALL_DUMMY_P ())
+    return legacy_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
+				   args, nargs, value_type, real_pc, bp_addr);
+  else    
+    return generic_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
+				    args, nargs, value_type, real_pc, bp_addr);
+}
+
 /* All this stuff with a dummy frame may seem unnecessarily complicated
    (why not just save registers in GDB?).  The purpose of pushing a dummy
    frame which looks just like a real frame is so that if you call a
@@ -362,98 +496,51 @@
   struct_return = using_struct_return (function, funaddr, value_type,
 				       using_gcc);
 
+  /* Determine the location of the breakpoint (and possibly other
+     stuff) that the called function will return to.  The SPARC, for a
+     function returning a structure or union, needs to make space for
+     not just the breakpoint but also an extra word containing the
+     size (?) of the structure being passed.  */
+
+  /* The actual breakpoint (at BP_ADDR) is inserted separatly so there
+     is no need to write that out.  */
+
   switch (CALL_DUMMY_LOCATION)
     {
     case ON_STACK:
-      {
-	/* CALL_DUMMY is an array of words (REGISTER_SIZE), but each
-	   word is in host byte order.  Before calling FIX_CALL_DUMMY,
-	   we byteswap it and remove any extra bytes which might exist
-	   because ULONGEST is bigger than REGISTER_SIZE.  */
-	/* NOTE: This is pretty wierd, as the call dummy is actually a
-	   sequence of instructions.  But CISC machines will have to
-	   pack the instructions into REGISTER_SIZE units (and so will
-	   RISC machines for which INSTRUCTION_SIZE is not
-	   REGISTER_SIZE).  */
-	/* NOTE: This is pretty stupid.  CALL_DUMMY should be in
-	   strict target byte order. */
-	CORE_ADDR start_sp;
-	ULONGEST *dummy = alloca (SIZEOF_CALL_DUMMY_WORDS);
-	int sizeof_dummy1 = (REGISTER_SIZE * SIZEOF_CALL_DUMMY_WORDS
-			     / sizeof (ULONGEST));
-	char *dummy1 = alloca (sizeof_dummy1);
-	memcpy (dummy, CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS);
-	if (INNER_THAN (1, 2))
-	  {
-	    /* Stack grows down */
-	    sp -= sizeof_dummy1;
-	    start_sp = sp;
-	  }
-	else
-	  {
-	    /* Stack grows up */
-	    start_sp = sp;
-	    sp += sizeof_dummy1;
-	  }
-	/* NOTE: cagney/2002-09-10: Don't bother re-adjusting the
-	   stack after allocating space for the call dummy.  A target
-	   can specify a SIZEOF_DUMMY1 (via SIZEOF_CALL_DUMMY_WORDS)
-	   such that all local alignment requirements are met.  */
-	/* Create a call sequence customized for this function and the
-	   number of arguments for it.  */
+      /* "dummy_addr" is here just to keep old targets happy.  New
+	 targets return that same information via "sp" and "bp_addr".  */
+      if (INNER_THAN (1, 2))
 	{
-	  int i;
-	  for (i = 0; i < (int) (SIZEOF_CALL_DUMMY_WORDS / sizeof (dummy[0]));
-	       i++)
-	    store_unsigned_integer (&dummy1[i * REGISTER_SIZE],
-				    REGISTER_SIZE,
-				    (ULONGEST) dummy[i]);
+	  sp = push_dummy_code (current_gdbarch, sp, funaddr,
+				using_gcc, args, nargs, value_type,
+				&real_pc, &bp_addr);
+	  dummy_addr = sp;
 	}
-	/* NOTE: cagney/2003-04-22: This computation of REAL_PC,
-	   BP_ADDR and DUMMY_ADDR is pretty messed up.  It comes from
-	   constant tinkering with the values.  Instead a
-	   FIX_CALL_DUMMY replacement (PUSH_DUMMY_BREAKPOINT?) should
-	   just do everything.  */
-#ifdef GDB_TARGET_IS_HPPA
-	real_pc = FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
-				  value_type, using_gcc);
-#else
-	if (FIX_CALL_DUMMY_P ())
-	  {
-	    /* gdb_assert (CALL_DUMMY_LOCATION == ON_STACK) true?  */
-	    FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, value_type,
-			    using_gcc);
-	  }
-	real_pc = start_sp;
-#endif
-	dummy_addr = start_sp;
-	/* Yes, the offset is applied to the real_pc and not the dummy
-	   addr.  Ulgh!  Blame the HP/UX target.  */
-	bp_addr = real_pc + CALL_DUMMY_BREAKPOINT_OFFSET;
-	/* Yes, the offset is applied to the real_pc and not the
-	   dummy_addr.  Ulgh!  Blame the HP/UX target.  */
-	real_pc += CALL_DUMMY_START_OFFSET;
-	write_memory (start_sp, (char *) dummy1, sizeof_dummy1);
-	if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-	  generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1);
-	break;
-      }
+      else
+	{
+	  dummy_addr = sp;
+	  sp = push_dummy_code (current_gdbarch, sp, funaddr,
+				using_gcc, args, nargs, value_type,
+				&real_pc, &bp_addr);
+	}
+      break;
     case AT_ENTRY_POINT:
       real_pc = funaddr;
       dummy_addr = CALL_DUMMY_ADDRESS ();
       /* A call dummy always consists of just a single breakpoint, so
          it's address is the same as the address of the dummy.  */
       bp_addr = dummy_addr;
-      if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-	/* NOTE: cagney/2002-04-13: The entry point is going to be
-           modified with a single breakpoint.  */
-	generic_save_call_dummy_addr (CALL_DUMMY_ADDRESS (),
-				      CALL_DUMMY_ADDRESS () + 1);
       break;
     default:
       internal_error (__FILE__, __LINE__, "bad switch");
     }
 
+  if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
+    /* Save where the breakpoint is going to be inserted so that the
+       dummy-frame code is later able to re-identify it.  */
+    generic_save_call_dummy_addr (bp_addr, bp_addr + 1);
+
   if (nargs < TYPE_NFIELDS (ftype))
     error ("too few arguments in function call");
 
@@ -646,7 +733,7 @@
        simply error out.  That would the implementation of this method
        for all ABIs (which is probably a good thing).  */
     sp = gdbarch_push_dummy_call (current_gdbarch, current_regcache,
-				  dummy_addr, nargs, args, sp, struct_return,
+				  bp_addr, nargs, args, sp, struct_return,
 				  struct_addr);
   else  if (DEPRECATED_PUSH_ARGUMENTS_P ())
     /* Keep old targets working.  */
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.94
diff -u -r1.94 sparc-tdep.c
--- sparc-tdep.c	30 Apr 2003 22:01:37 -0000	1.94
+++ sparc-tdep.c	1 May 2003 21:06:32 -0000
@@ -3224,7 +3224,15 @@
       set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0x30);
       set_gdbarch_call_dummy_length (gdbarch, 0x38);
 
-      /* NOTE: cagney/2002-04-26: Based from info posted by Peter
+      /* NOTE: cagney/2003-05-01: Using the just added push_dummy_code
+	 architecture method, it is now possible to implement a
+	 generic dummy frames based inferior function call that stores
+	 the breakpoint (and struct info) on the stack.  Further, by
+	 treating a SIGSEG at a breakpoint as equivalent to a SIGTRAP
+	 it is even possible to make this work when the stack is
+	 no-execute.
+
+	 NOTE: cagney/2002-04-26: Based from info posted by Peter
 	 Schauer around Oct '99.  Briefly, due to aspects of the SPARC
 	 ABI, it isn't possible to use ON_STACK with a strictly
 	 compliant compiler.
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.142
diff -u -r1.142 gdbint.texinfo
--- doc/gdbint.texinfo	29 Apr 2003 01:49:48 -0000	1.142
+++ doc/gdbint.texinfo	1 May 2003 21:06:44 -0000
@@ -3095,19 +3095,31 @@
 Should be deprecated in favor of a macro that uses target-byte-ordered
 data.
 
+This method has been replaced by @code{push_dummy_code}
+(@pxref{push_dummy_code}).
+
 @item SIZEOF_CALL_DUMMY_WORDS
 @findex SIZEOF_CALL_DUMMY_WORDS
 The size of @code{CALL_DUMMY_WORDS}.  This must return a positive value.
 See also @code{CALL_DUMMY_LENGTH}.
 
+This method has been replaced by @code{push_dummy_code}
+(@pxref{push_dummy_code}).
+
 @item CALL_DUMMY
 @findex CALL_DUMMY
 A static initializer for @code{CALL_DUMMY_WORDS}.  Deprecated.
 
+This method has been replaced by @code{push_dummy_code}
+(@pxref{push_dummy_code}).
+
 @item CALL_DUMMY_LOCATION
 @findex CALL_DUMMY_LOCATION
 See the file @file{inferior.h}.
 
+This method has been replaced by @code{push_dummy_code}
+(@pxref{push_dummy_code}).
+
 @item DEPRECATED_CALL_DUMMY_STACK_ADJUST
 @findex DEPRECATED_CALL_DUMMY_STACK_ADJUST
 Stack adjustment needed when performing an inferior function call.  This
@@ -3706,6 +3718,27 @@
 Returns the updated top-of-stack pointer.
 
 This method replaces @code{DEPRECATED_PUSH_ARGUMENTS}.
+
+@item CORE_ADDR push_dummy_code (@var{gdbarch}, @var{sp}, @var{funaddr}, @var{using_gcc}, @var{args}, @var{nargs}, @var{value_type}, @var{real_pc}, @var{bp_addr})
+@findex push_dummy_code
+@findex FIX_CALL_DUMMY
+@anchor{push_dummy_code} Given a stack based call dummy, push the
+instruction sequence (including space for a breakpoint) to which the
+called function should return.
+
+Set @var{bp_addr} to the address at which the breakpoint instruction
+should be inserted, @var{real_pc} to the resume address when starting
+the call sequence, and return the updated inner-most stack address.
+
+By default, the stack is grown sufficient to hold a frame-aligned
+(@pxref{frame_align}) breakpoint, @var{bp_addr} is set to the address
+reserved for that breakpoint, and @var{real_pc} set to @var{funaddr}.
+
+This method replaces @code{CALL_DUMMY_WORDS},
+@code{SIZEOF_CALL_DUMMY_WORDS}, @code{CALL_DUMMY},
+@code{CALL_DUMMY_LOCATION}, @code{REGISTER_SIZE},
+@code{GDB_TARGET_IS_HPPA}, @code{CALL_DUMMY_BREAKPOINT_OFFSET}, and
+@code{FIX_CALL_DUMMY}.
 
 @item DEPRECATED_PUSH_DUMMY_FRAME
 @findex DEPRECATED_PUSH_DUMMY_FRAME

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]