Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC/RFA/frame stuff] Fix build failure in alpha-osf1-tdep.c
@ 2003-06-04  0:27 Joel Brobecker
  2003-06-04  2:47 ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2003-06-04  0:27 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

This is the second source of problems in alpha-osf-tdep.c: The
frame_info structure has become opaque, but this file still had some
references to its old fields.

Looking at the documentation in frames.h (very useful, btw), it seems
that the following change should be correct. Andrew, could you have a
close look (I am unable to test it, as I have a 3rd build failure, which
I will report shortly)? Regardless of your review, I will NOT commit
this change until have I have full build that I can test.

2003-06-03  J. Brobecker  <brobecker@gnat.com>

        * alpha-osf1-tdep.c (alpha_osf1_skip_sigtramp_frame): Replace
        references to struct frame_info fields by calls to the equivalent
        accessors. Necessary now that frame_info is opaque.
        (alpha_osf1_pc_in_sigtramp): Likewise.

Looks ok?

Thanks,
-- 
Joel

[-- Attachment #2: frames.diff --]
[-- Type: text/plain, Size: 1105 bytes --]

Index: alpha-osf1-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-osf1-tdep.c,v
retrieving revision 1.12
diff -u -3 -p -r1.12 alpha-osf1-tdep.c
--- alpha-osf1-tdep.c	3 Jun 2003 23:49:32 -0000	1.12
+++ alpha-osf1-tdep.c	4 Jun 2003 00:19:41 -0000
@@ -37,7 +37,7 @@ alpha_osf1_skip_sigtramp_frame (struct f
 
   find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
   if (PC_IN_SIGTRAMP (pc, name))
-    return frame->frame;
+    return get_frame_base (frame);
   return 0;
 }
 
@@ -50,8 +50,12 @@ alpha_osf1_pc_in_sigtramp (CORE_ADDR pc,
 static CORE_ADDR
 alpha_osf1_sigcontext_addr (struct frame_info *frame)
 {
-  return (read_memory_integer (frame->next ? frame->next->frame
-					   : frame->frame, 8));
+  struct frame_info *next_frame = get_next_frame (frame);
+
+  if (next_frame != NULL)
+    return (read_memory_integer (get_frame_base (next_frame), 8));
+  else
+    return (read_memory_integer (get_frame_base (frame), 8));
 }
 
 /* This is the definition of CALL_DUMMY_ADDRESS.  It's a heuristic that is used

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-06-04 20:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-04  0:27 [RFC/RFA/frame stuff] Fix build failure in alpha-osf1-tdep.c Joel Brobecker
2003-06-04  2:47 ` Andrew Cagney
2003-06-04  5:31   ` Joel Brobecker
2003-06-04  6:05   ` Joel Brobecker
2003-06-04 17:33     ` Andrew Cagney
2003-06-04 17:40       ` David Carlton
2003-06-04 20:41       ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox