[m-users.] Error making c file after upgrading to Mercury 22.01

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Apr 10 10:48:53 AEST 2022



On Sat, 9 Apr 2022 20:16:19 +0200, Dirk Ziegemeyer <dirk at ziegemeyer.de> wrote:
> Unfortunately, I don't know where too find more information on how to debug this, because the .err files are empty.
> I would appreciate any help on how to debug this kind of error.

The compiler is supposed to set the exit status to indicate an error
only when it has generated and printed an error message to tell the user
what the error is. It seems that a part of the compiler is breaking this rule.
The way to debug this is to

- compile the compiler itself in a debug grade,
- invoke this compiler with the arguments that cause the problem
- verify that the result is the same as in the problem report
- invoke the compiler again the same way, but under mdb,
- put a breakpoint on io.set_exit_status, and
- continue.

This should tell you where the exit status is set to indicate an error.
You then see whether the neighboring code creates an error message,
and if yes, then you follow it to see where it gets discarded without
being printed.

We can do this much more easily than you, so if you want, you could
send us either your whole program, or whatever part of it is needed
to reproduce the error.

Zoltan.





More information about the users mailing list