diff options
-rw-r--r-- | byterun/instrtrace.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/byterun/instrtrace.c b/byterun/instrtrace.c index 694edaff74..9e354f5555 100644 --- a/byterun/instrtrace.c +++ b/byterun/instrtrace.c @@ -183,21 +183,20 @@ caml_trace_value_file (value v, code_t prog, int proglen, FILE * f) if (prog && v % sizeof (int) == 0 && (code_t) v >= prog && (code_t) v < (code_t) ((char *) prog + proglen)) - fprintf (f, "=code@%" ARCH_INTNAT_PRINTF_FORMAT "d", (code_t) v - prog); + fprintf (f, "=code@%ld", (long) ((code_t) v - prog)); else if (Is_long (v)) fprintf (f, "=long%" ARCH_INTNAT_PRINTF_FORMAT "d", Long_val (v)); else if ((void*)v >= (void*)caml_stack_low && (void*)v < (void*)caml_stack_high) - fprintf (f, "=stack_%" ARCH_INTNAT_PRINTF_FORMAT "d", - (intnat*)caml_stack_high - (intnat*)v); + fprintf (f, "=stack_%ld", (long) ((intnat*)caml_stack_high - (intnat*)v)); else if (Is_block (v)) { int s = Wosize_val (v); int tg = Tag_val (v); int l = 0; switch (tg) { case Closure_tag: - fprintf (f, "=closure[s%d,cod%" ARCH_INTNAT_PRINTF_FORMAT "d]", - s, (code_t) (Code_val (v)) - prog); + fprintf (f, "=closure[s%d,cod%ld]", + s, (long) ((code_t) (Code_val (v)) - prog)); goto displayfields; case String_tag: l = caml_string_length (v); @@ -252,12 +251,11 @@ caml_trace_accu_sp_file (value accu, value * sp, code_t prog, int proglen, value *p; fprintf (f, "accu="); caml_trace_value_file (accu, prog, proglen, f); - fprintf (f, "\n sp=%#" ARCH_INTNAT_PRINTF_FORMAT "x " - "@%" ARCH_INTNAT_PRINTF_FORMAT "d:", - (intnat) sp, caml_stack_high - sp); + fprintf (f, "\n sp=%#" ARCH_INTNAT_PRINTF_FORMAT "x @%ld:", + (intnat) sp, (long) (caml_stack_high - sp)); for (p = sp, i = 0; i < 12 + (1 << caml_trace_level) && p < caml_stack_high; p++, i++) { - fprintf (f, "\n[%ld] ", caml_stack_high - p); + fprintf (f, "\n[%ld] ", (long) (caml_stack_high - p)); caml_trace_value_file (*p, prog, proglen, f); }; putc ('\n', f); |