diff: Bug fix for mercury_memory_handlers.c.

Tyson Dowd trd at cs.mu.OZ.AU
Sun Jul 26 16:54:54 AEST 1998


Hi,

Here's a fix for the compilation errors that occured in the
(not so) nightly builds recently.

I'll commit this now.

===================================================================


Estimated hours taken: 0.5

Fix a bug in get_pc_from_context that was causing compile
errors on IRIX and Solaris.

runtime/mercury_memory_handlers.c:
	Fix a bug in get_pc_from_context -- it wasn't using the correct
	type (ucontext_t) for the context.


Index: runtime/mercury_memory_handlers.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory_handlers.c,v
retrieving revision 1.5
diff -u -r1.5 mercury_memory_handlers.c
--- mercury_memory_handlers.c	1998/07/22 07:52:55	1.5
+++ mercury_memory_handlers.c	1998/07/26 05:53:51
@@ -547,12 +547,12 @@
 
   #ifdef PC_ACCESS
 
-	struct sigcontext *context = the_context;
+	ucontext_t *context = the_context;
 
     #ifdef PC_ACCESS_GREG
-	pc_at_signal = (Code *) context->gregs[PC_ACCESS];
+	pc_at_signal = (Code *) context->uc_mcontext.gregs[PC_ACCESS];
     #else
-	pc_at_signal = (Code *) context->PC_ACCESS;
+	pc_at_signal = (Code *) context->uc_mcontext.PC_ACCESS;
     #endif
 
   #else /* not PC_ACCESS */


-- 
       Tyson Dowd           # There isn't any reason why Linux can't be
                            # implemented as an enterprise computing solution.
     trd at cs.mu.oz.au        # Find out what you've been missing while you've
http://www.cs.mu.oz.au/~trd # been rebooting Windows NT. -- InfoWorld, 1998.



More information about the developers mailing list