For review: fix errors that occurs when MR_USE_EXTERNAL_DEBUGGER is on.

Erwan Jahier Erwan.Jahier at irisa.fr
Thu Jul 23 20:32:26 AEST 1998


Fergus Henderson wrote:
> 
> Erwan Jahier, you wrote:
> >
> > This one is for Zoltan or Fergus.
> >
> > This change undo a change made by Zoltan quite a long time ago.
> >
> > runtime/mercury_trace.c:
> > runtime/mercury_trace_external.c:
> > runtime/mercury_trace_external.c:
> >       Add "MR_trace_cmd_info *cmd" in argument of MR_trace_event_external().
> 
> What's the rationale for this change?

This change fix various errors that prevent thoses files to compile when
MR_USE_EXTERNAL_DEBUGGER is on.


runtime/mercury_trace.c:
runtime/mercury_trace_external.c:
runtime/mercury_trace_external.c:
	Add "MR_trace_cmd_info *cmd" in argument of MR_trace_event_external() 
	because it is needed when debugger_request_type = MR_REQUEST_NO_TRACE.
	
	port is no longer pass through MR_trace_make_var_list().


Index: mercury_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_trace.c,v
retrieving revision 1.16
diff -u -r1.16 mercury_trace.c
--- mercury_trace.c	1998/07/16 14:12:57	1.16
+++ mercury_trace.c	1998/07/23 09:19:14
@@ -128,7 +128,7 @@
 	MR_copy_regs_to_saved_regs(max_mr_num);
 #ifdef MR_USE_EXTERNAL_DEBUGGER
 	if (MR_trace_handler == MR_TRACE_EXTERNAL) {
-		MR_trace_event_external(layout, port, seqno, depth, path);
+		MR_trace_event_external(cmd, layout, port, seqno, depth, path);
 	} else {
 		MR_trace_event_internal(cmd, layout, port, seqno, depth, path);
 	}
Index: mercury_trace_external.c
===================================================================
RCS file:
/home/mercury1/repository/mercury/runtime/mercury_trace_external.c,v
retrieving revision 1.3
diff -u -r1.3 mercury_trace_external.c
--- mercury_trace_external.c	1998/07/13 22:44:12	1.3
+++ mercury_trace_external.c	1998/07/23 09:36:21
@@ -303,8 +308,9 @@
 }
 
 void
-MR_trace_event_external(const MR_Stack_Layout_Label *layout,
-	MR_trace_port port, Unsigned seqno, Unsigned depth, const char *path)
+MR_trace_event_external(MR_trace_cmd_info *cmd, 
+	const MR_Stack_Layout_Label *layout, MR_trace_port port,
+	Unsigned seqno, Unsigned depth, const char *path)
 {
 	static bool searching = FALSE;
 	static Word search_data;
@@ -350,13 +356,13 @@
 					fprintf(stderr, "\nMercury runtime: "
 						"REQUEST_CURRENT\n");
 				}
-				var_list = MR_trace_make_var_list(port, layout);
+				var_list = MR_trace_make_var_list(layout);
 				MR_output_current(layout, port, seqno, depth,
 					var_list, path, debugger_request);
 				break;
 				
 			case MR_REQUEST_NO_TRACE:
-				MR_trace_cmd = MR_CMD_TO_END;
+				cmd->MR_trace_cmd = MR_CMD_TO_END;
 				return;
 
 			default:

Index: mercury_trace_external.h
===================================================================
RCS file:
/home/mercury1/repository/mercury/runtime/mercury_trace_external.h,v
retrieving revision 1.1
diff -u -r1.1 mercury_trace_external.h
--- mercury_trace_external.h	1998/05/16 07:28:26	1.1
+++ mercury_trace_external.h	1998/07/23 09:19:40
@@ -11,7 +11,8 @@
 
 extern	void	MR_trace_init_external(void);
 extern	void	MR_trace_final_external(void);
-extern	void	MR_trace_event_external(const MR_Stack_Layout_Label
*layout,
+extern	void	MR_trace_event_external(MR_trace_cmd_info *cmd,
+			const MR_Stack_Layout_Label *layout,
 			MR_trace_port port, Unsigned seqno, Unsigned depth,
 			const char *path);
 

-- 
R1.



More information about the developers mailing list