<div dir="ltr"><b>Proposal:</b><div><br></div><div>Add a new  pseudo instruction:</div><div>     CodeBuilder.setDebugOption(int kind, int level)</div><div><br></div><div>Meaning:</div><div>kind == 1 // CodeListing  </div><div>             2 .. n  // Reserved</div><div><br></div><div>when kind == 1</div><div>level == 0 // Off</div><div>              1 // code listing as when "stack size mismatch" error.</div><div>              2 // with additional Thread.dumpstack(); </div><div>              3 .. n  // Reserved</div><div><br></div><div>Or something like it.</div><div><br></div><div><b>Motivation:</b></div><div><br></div><div><span style="background-color:rgb(248,249,250);color:rgb(32,33,36);font-family:inherit">I am building a code generator for the<a href="https://portablesimula.github.io/github.io/"> Open Source Simula</a> compiler.</span></div><div><span style="background-color:rgb(248,249,250);color:rgb(32,33,36);font-family:inherit"><br></span></div><div>During debugging, it would be nice to be able to see the code that is generated and possibly where the individual instructions were generated from.</div><div><br></div><div>This is particularly interesting for errors such as: "stack size mismatch", "operand stack underflow", etc. <span style="background-color:rgb(248,249,250);color:rgb(32,33,36);font-family:inherit"><br></span></div><div><br></div></div>