diff for review: mercury_stack_trace.c bug fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jul 4 16:03:51 AEST 1998


Zoltan, can you please check that I got this right?
I've already committed it.

runtime/mercury_stack_trace.c:
	Fix some bugs in Zoltan's recent changes that prevented it
	from compiling with --debug.

Index: runtime/mercury_stack_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_trace.c,v
retrieving revision 1.11
diff -u -r1.11 mercury_stack_trace.c
--- mercury_stack_trace.c	1998/07/03 02:35:23	1.11
+++ mercury_stack_trace.c	1998/07/04 06:00:23
@@ -58,18 +58,18 @@
 #ifndef MR_STACK_TRACE
 	fprintf(stderr, "Stack dump not available in this grade.\n");
 #else
-	Label			*label;
-	MR_Stack_Layout_Label	*layout;
-	MR_Stack_Layout_Entry	*entry_layout;
-	const char		*result;
+	const MR_Internal		*label;
+	const MR_Stack_Layout_Label	*layout;
+	const MR_Stack_Layout_Entry	*entry_layout;
+	const char			*result;
 
 	fprintf(stderr, "Stack dump follows:\n");
 
-	label = lookup_label_addr(success_pointer);
+	label = MR_lookup_internal_by_addr(success_pointer);
 	if (label == NULL) {
 		fprintf(stderr, "internal label not found\n");
 	} else {
-		layout = (MR_Stack_Layout_Label *) label->e_layout;
+		layout = label->i_layout;
 		entry_layout = layout->MR_sll_entry;
 		result = MR_dump_stack_from_layout(stderr, entry_layout,
 			det_stack_pointer, current_frame);

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list