[m-dev.] debugging problems inside mmc --make
Zoltan Somogyi
zoltan.somogyi at runbox.com
Thu Mar 17 14:19:34 AEDT 2022
2022-03-17 14:12 GMT+11:00 "Peter Wang" <novalazy at gmail.com>:
> On Thu, 17 Mar 2022 00:42:53 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>> I am willing to take a look at Mantis #552, but I can't reproduce the crash
>> inside the debugger. Long ago, I added the lmc script to the system,
>> which allows you to run "mdb lmcN <args>", but this does not work
>> with --make, which of course Java bootchecks use. I have tinkered with
>> superficial aspects of mmc --make, but never worked on its core algorithms,
>> and the main reason is that I don't know of any equivalent of lmc
>> that does work with mmc --make. Do any of you have any personal
>> scripts that fill this role? If so, can you please document it and add it
>> to tools?
>
> A bit late, but wouldn't you just set the MERCURY_COMPILER environment
> variable, then run "mmc --make foo"? This will invoke the compiler from
> your workspace, but link with the libraries from your installed copy of
> the Mercury system, which is fine for debugging mmc --make.
That trick works in some cases, but it breaks down as soon as there is
some difference between the options that the installed compiler was
built with, and the options used in the bootcheck that contains the failure
you are tracking down.
As you may guess, my installed compiler was *not* built with
-O0 --intermod-opt. Nor was it built in Java grade, so all the foreign_procs
in .opt files were for the wrong language :-(
Zoltan.
More information about the developers
mailing list