* Patches from Jeffrey Law <law@cs.utah.edu>.
authorStu Grossman <grossman@cygnus>
Wed, 5 May 1993 23:52:10 +0000 (23:52 +0000)
committerStu Grossman <grossman@cygnus>
Wed, 5 May 1993 23:52:10 +0000 (23:52 +0000)
* gdb/hppa-tdep.c: Declare frame_saved_pc.
(frameless_function_invocation): New function.
(frame_saved_pc, init_extra_frame_info): Use
frameless_function_invocation.
* gdb/config/tm-hppa.h (SAVED_PC_AFTER_CALL): Use saved_pc_after
call instead of just grabbing the value currently in %r2.
(FRAMELESS_FUNCTION_INVOCATION): Use frameless_function_invocation.
* gdb/config/tm-hppah.h (SAVED_PC_AFTER_CALL): Delete private
definition and use the common one in tm-hppa.h.

gdb/ChangeLog
gdb/hppa-tdep.c

index a8b003b26122c8d0d1e70c5452953e563f8cc250..c87b328f995564cfaf0be4354c5cd97556f60781 100644 (file)
@@ -1,6 +1,15 @@
 Wed May  5 15:16:33 1993  Stu Grossman  (grossman@cygnus.com)
 
         * Patches from Jeffrey Law <law@cs.utah.edu>.
+       * gdb/hppa-tdep.c: Declare frame_saved_pc.
+       (frameless_function_invocation): New function.
+       (frame_saved_pc, init_extra_frame_info): Use 
+       frameless_function_invocation.
+       * gdb/config/tm-hppa.h (SAVED_PC_AFTER_CALL): Use saved_pc_after
+       call instead of just grabbing the value currently in %r2.
+       (FRAMELESS_FUNCTION_INVOCATION): Use frameless_function_invocation.
+       * gdb/config/tm-hppah.h (SAVED_PC_AFTER_CALL): Delete private
+       definition and use the common one in tm-hppa.h.
        * gdb/hppa-tdep.c (frame_chain_valid): If "use_unwind" is true, then
        use unwind descriptors to determine if the frame chain is valid.
        * gdb/hppa-tdep.c (find_dummy_frame_regs):  Rework so that
index 2163ed5d8d16db8467d47177861f99ef060c9db7..65443b9eae6c6650f6e060bbe125d5c0f4d1f596 100644 (file)
@@ -61,6 +61,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 static int restore_pc_queue PARAMS ((struct frame_saved_regs *fsr));
 static int hppa_alignof PARAMS ((struct type *arg));
+CORE_ADDR frame_saved_pc PARAMS ((FRAME frame));
 
 \f
 /* Routines to extract various sized constants out of hppa 
@@ -345,6 +346,26 @@ rp_saved(pc)
     return 0;
 }
 \f
+int
+frameless_function_invocation (frame)
+     FRAME frame;
+{
+
+  if (use_unwind)
+    {
+      struct unwind_table_entry *u;
+
+      u = find_unwind_entry (frame->pc);
+
+      if (u == 0)
+       return 0;
+
+      return (u->Total_frame_size == 0);
+    }
+  else
+    return frameless_look_for_prologue (frame);
+}
+
 CORE_ADDR
 saved_pc_after_call (frame)
      FRAME frame;
@@ -362,7 +383,7 @@ frame_saved_pc (frame)
 {
   CORE_ADDR pc = get_frame_pc (frame);
 
-  if (frameless_look_for_prologue (frame))
+  if (frameless_function_invocation (frame))
     {
       int ret_regnum;
 
@@ -401,7 +422,7 @@ init_extra_frame_info (fromleaf, frame)
   else
     frame->frame = read_register (SP_REGNUM) - framesize;
 
-  if (!frameless_look_for_prologue (frame)) /* Frameless? */
+  if (!frameless_function_invocation (frame)) /* Frameless? */
     return;                                /* No, quit now */
 
   /* For frameless functions, we need to look at the caller's frame */
This page took 0.030695 seconds and 4 git commands to generate.