[m-dev.] for review: number mdb variables from 1

Erwan Jahier Erwan.Jahier at irisa.fr
Tue Jun 22 22:39:36 AEST 1999


| Erwan, is this change going to break the external debugger?

Yes.
But with the following change, it seems to work ok.

Thanks Fergus.


===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.c,v
retrieving revision 1.18
diff -u -r1.18 mercury_trace_external.c
--- mercury_trace_external.c    1999/05/27 01:01:33     1.18
+++ mercury_trace_external.c    1999/06/22 12:34:39
@@ -842,7 +940,7 @@
                var_list = list_empty();
        );
 
-       for (i = var_count - 1; i >= 0; i--) {
+       for (i = var_count ; i > 0; i--) {
                problem = MR_trace_return_var_info(i, NULL,
                                &type_info, &value);
                if (problem != NULL) {
@@ -888,7 +986,7 @@
                var_names_list = list_empty();
        );
 
-       for (i = var_count - 1; i >= 0; i--) {
+       for (i = var_count ; i > 0; i--) {
                problem = MR_trace_return_var_info(i, &name, NULL, NULL);
                if (problem != NULL) {
                        fatal_error(problem);
@@ -926,7 +1024,7 @@
                type_list = list_empty();
         );
 
-       for (i = var_count - 1; i >= 0; i--) {
+       for (i = var_count ; i > 0; i--) {
                problem = MR_trace_return_var_info(i, NULL, &type_info, NULL);
                if (problem != NULL) {
                        fatal_error(problem);

-- 
R1.


--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list