]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-12-08 Andrew Cagney <ac131313@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Mon, 9 Dec 2002 00:32:08 +0000 (00:32 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 9 Dec 2002 00:32:08 +0000 (00:32 +0000)
* stack.c (frame_info): Use get_prev_frame.
* blockframe.c (frame_address_in_block): Ditto.
* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
(rs6000_frameless_function_invocation): Ditto.
(rs6000_frame_saved_pc): Ditto.
(rs6000_frame_chain): Ditto.
* arch-utils.c (init_frame_pc_default): Ditto.

gdb/ChangeLog
gdb/arch-utils.c
gdb/blockframe.c
gdb/rs6000-tdep.c
gdb/stack.c

index 525b0069b18c837b544cf9ac100e8280bbff5b69..630e43ea68fe81d492ad21b9ca5abdc2b59d8a34 100644 (file)
@@ -1,3 +1,13 @@
+2002-12-08  Andrew Cagney  <ac131313@redhat.com>
+
+       * stack.c (frame_info): Use get_prev_frame.
+       * blockframe.c (frame_address_in_block): Ditto.
+       * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
+       (rs6000_frameless_function_invocation): Ditto.
+       (rs6000_frame_saved_pc): Ditto.
+       (rs6000_frame_chain): Ditto.
+       * arch-utils.c (init_frame_pc_default): Ditto.
+
 2002-12-08  Andrew Cagney  <ac131313@redhat.com>
 
        * config/mn10200/tm-mn10200.h (DEPRECATED_PC_IN_CALL_DUMMY):
index a805dbc6b9327da3c59bd46a9e9fe37f0506ee50..dfbbc2119299388dfbf4050400c1fe1b4d1dd52d 100644 (file)
@@ -383,9 +383,9 @@ void
 init_frame_pc_default (int fromleaf, struct frame_info *prev)
 {
   if (fromleaf)
-    prev->pc = SAVED_PC_AFTER_CALL (prev->next);
-  else if (prev->next != NULL)
-    prev->pc = FRAME_SAVED_PC (prev->next);
+    prev->pc = SAVED_PC_AFTER_CALL (get_next_frame (prev));
+  else if (get_next_frame (prev) != NULL)
+    prev->pc = FRAME_SAVED_PC (get_next_frame (prev));
   else
     prev->pc = read_pc ();
 }
index 84b8cc48a16794e001889bf437f52ecc5f248b04..caaecd48450b6afcef33791b837c320ec628fce8 100644 (file)
@@ -213,8 +213,8 @@ frame_address_in_block (struct frame_info *frame)
   /* FIXME: cagney/2002-11-10: Should this instead test for
      NORMAL_FRAME?  A dummy frame (in fact all the abnormal frames)
      save the PC value in the block.  */
-  if (frame->next != 0
-      && get_frame_type (frame->next) != SIGTRAMP_FRAME)
+  if (get_next_frame (frame) != 0
+      && get_frame_type (get_next_frame (frame)) != SIGTRAMP_FRAME)
     --pc;
 
   return pc;
index b6e336bbb687247b4fe8ef27ba2eb33148e0c5b7..31b6cb1f6218d3fcf1eeea83270706ae2c083f07 100644 (file)
@@ -169,7 +169,7 @@ rs6000_init_extra_frame_info (int fromleaf, struct frame_info *fi)
   fi->extra_info = (struct frame_extra_info *)
     frame_obstack_alloc (sizeof (struct frame_extra_info));
   fi->extra_info->initial_sp = 0;
-  if (fi->next != (CORE_ADDR) 0
+  if (get_next_frame (fi) != (CORE_ADDR) 0
       && fi->pc < TEXT_SEGMENT_BASE)
     /* We're in get_prev_frame */
     /* and this is a special signal frame.  */
@@ -1477,7 +1477,8 @@ rs6000_frameless_function_invocation (struct frame_info *fi)
 
   /* Don't even think about framelessness except on the innermost frame
      or if the function was interrupted by a signal.  */
-  if (fi->next != NULL && !(get_frame_type (fi->next) == SIGTRAMP_FRAME))
+  if (get_next_frame (fi) != NULL
+      && !(get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
     return 0;
 
   func_start = get_pc_function_start (fi->pc);
@@ -1526,10 +1527,11 @@ rs6000_frame_saved_pc (struct frame_info *fi)
 
   (void) skip_prologue (func_start, fi->pc, &fdata);
 
-  if (fdata.lr_offset == 0 && fi->next != NULL)
+  if (fdata.lr_offset == 0 && get_next_frame (fi) != NULL)
     {
-      if ((get_frame_type (fi->next) == SIGTRAMP_FRAME))
-       return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET,
+      if ((get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
+       return read_memory_addr (get_next_frame (fi)->frame
+                                + SIG_FRAME_LR_OFFSET,
                                 wordsize);
       else if (DEPRECATED_PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0))
        /* The link register wasn't saved by this frame and the next
@@ -1756,8 +1758,8 @@ rs6000_frame_chain (struct frame_info *thisframe)
   if ((get_frame_type (thisframe) == SIGTRAMP_FRAME))
     fp = read_memory_addr (thisframe->frame + SIG_FRAME_FP_OFFSET,
                              wordsize);
-  else if (thisframe->next != NULL
-          && (get_frame_type (thisframe->next) == SIGTRAMP_FRAME)
+  else if (get_next_frame (thisframe) != NULL
+          && (get_frame_type (get_next_frame (thisframe)) == SIGTRAMP_FRAME)
           && FRAMELESS_FUNCTION_INVOCATION (thisframe))
     /* A frameless function interrupted by a signal did not change the
        frame pointer.  */
index 76cd4a58c36db98db67c7fb9ce883c6050f81a96..d1dbd4eb6078b8193834e2abb2eb0e54818d50aa 100644 (file)
@@ -837,15 +837,15 @@ frame_info (char *addr_exp, int from_tty)
       printf_filtered (" called by frame at ");
       print_address_numeric (calling_frame_info->frame, 1, gdb_stdout);
     }
-  if (fi->next && calling_frame_info)
+  if (get_next_frame (fi) && calling_frame_info)
     puts_filtered (",");
   wrap_here ("   ");
-  if (fi->next)
+  if (get_next_frame (fi))
     {
       printf_filtered (" caller of frame at ");
-      print_address_numeric (fi->next->frame, 1, gdb_stdout);
+      print_address_numeric (get_next_frame (fi)->frame, 1, gdb_stdout);
     }
-  if (fi->next || calling_frame_info)
+  if (get_next_frame (fi) || calling_frame_info)
     puts_filtered ("\n");
   if (s)
     printf_filtered (" source language %s.\n",