<div dir="ltr"><div>Hi,</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, 22 Oct 2026 at 00:35, Volker Wysk <<a href="mailto:post@volker-wysk.de">post@volker-wysk.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6977212412574555368"><div><div>Am Donnerstag, dem 22.10.2026 um 00:08 +1100 schrieb Julien Fischer:</div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 22 Oct 2026 at 00:03, Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank">post@volker-wysk.de</a>> wrote:<br></div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div><div><div>I was happy too early. I just remembered that hlc grades don't support debugging...</div><div><br></div><div>The compiler doesn't reject "--grade=hlc.gc --debug", like it should.</div></div></div><br></blockquote><div><br></div><div>Yes it does.<br></div><div><br></div><div> $ mmc --grade hlc.gc --debug hello<br> Debugging is available only in low level C grades.</div></div></div></blockquote><div><br></div><div>I've tried. It looks like it does so only when the "--debug" option comes after the "--grade" option:</div><div><br></div><div><a href="mailto:vw@desktop" target="_blank">vw@desktop</a>:~/src/odbc-bug$ mmc --grade=hlc.gc --debug hello</div><div>mmc:</div><div>Debugging is available only in low level C grades.</div><div><br></div><div><a href="mailto:vw@desktop" target="_blank">vw@desktop</a>:~/src/odbc-bug$ mmc --debug --grade=hlc.gc hello</div><div>mercury_compile: cannot find source for module `hello' in directories `.'</div></div></div></blockquote><div><br></div><div>The explanation is that the --debug option does not do what you expect.</div><div><span style="background-color:transparent">What it does is *add* the ".debug" grade component to the currently</span></div><div>selected <span style="background-color:transparent">grade. If you haven't explicitly selected a grade, the compiler</span></div><div><span style="background-color:transparent">will use whatever default grade it was configured with.)</span></div><div><span style="background-color:transparent">The other thing to understand is that the --grade option overwrites</span></div><div><span style="background-color:transparent">all previously set grade options. The order that the options</span></div><div><span style="background-color:transparent">appear on the command line is significant.</span></div><div><br></div><div>In the case where the command line option are --grade=hlc.gc --debug,</div><div>what you are saying is:</div><div><br></div><div>1. Change the currently selected grade to hlc.gc.</div><div>2. Add the "debug" grade component to that grade, yielding "hlc.gc.debug".</div><div>3. The compiler detects the use of the incompatible components "hlc" and "debug"</div><div> in the selected grade and reports the above error.</div><div><br></div><div>In the case where the command line options are --debug --grade hlc.gc, what</div><div><span style="background-color:transparent">you are saying is:</span></div><div><span style="background-color:transparent"><br></span></div><div><span style="background-color:transparent">1. Add the --debug component to the default grade, which will (probably) yield</span></div><div><span style="background-color:transparent"> "asm_fast.gc.debug".</span></div><div><span style="background-color:transparent">2. Overwrite the selected grade with "hlc.gc".</span></div><div><span style="background-color:transparent">3. There are no incompatible components in "hlc.gc", so there is no error.</span></div><div><span style="background-color:transparent"><br></span></div><div><span style="background-color:transparent">(We are aware that the way the grade selection options operate is rather confusing</span></div><div><span style="background-color:transparent">and there are plans to change them.)</span></div><div><span style="background-color:transparent"><br></span></div><div><span style="background-color:transparent">Julien.</span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6977212412574555368"><div><div><span></span></div></div>
</div></blockquote></div></div>