<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>Further ideas to improve overall bytecode tools:</p>
<p><br>
</p>
<p></p>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li>We could reuse Marcel's recent #save*InspectorState approach to memorize which methods should be displayed as bytecode. It would be also great to extend the Debugger factory API to specify the desired contentsSymbol. CodeHolders (such as MessageSets or
 other debuggers) could pass their contentsSymbol if you open a new CodeHolder on them, for example by pressing Browse, Implementors, or also via debugIt. Maybe we could also make a preference for the preferred content symbol?</li><li>It would be great if the bytecode (i. e. CompiledCode >> #symbolic) would show real evaluable Smalltalk messages. For example, 'returnTop' has no implementors, and if you want to find out what this bytecode does, you need to either debug the stepInto button,
 or browse your image via #<span>methodStringsContainingit</span>, so I would find it much more convenient to directly write 'methodReturnTop' into the bytecode.<br>
A very simple approach could be the following:</li></ul>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="font-size: 12pt;">InstructionPointer >> #subclassResponsibility</span></div>
</div>
</blockquote>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="font-size: 12pt; white-space: pre;"></span><span style="font-size: 12pt;">| sender |</span></div>
</div>
</blockquote>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="font-size: 12pt; white-space: pre;"></span><span style="font-size: 12pt;">sender := thisContext sender.</span></div>
</div>
</blockquote>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="font-size: 12pt; white-space: pre;"></span><span style="font-size: 12pt;">(self class whichCategoryIncludesSelector: sender selector) = #'instruction decoding'</span></div>
</div>
</blockquote>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="font-size: 12pt; white-space: pre;"></span><span style="font-size: 12pt;">ifFalse: [^ super subclassResponsibility].</span></div>
</div>
</blockquote>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="font-size: 12pt; white-space: pre;"></span><span style="font-size: 12pt;">self print: sender asMessage.</span></div>
</div>
</blockquote>
However, this would require a proper use of "^ self subclassResponsibility" in InstructionClient.</blockquote>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li>We could also use a multi-column list instead of a text pane to display the bytecodes.</li><li>Maybe also provide a side-by-side view of both source and bytecode with synchronized selection? This could help associating the bytecodes with the original source.</li><li>...</li></ul>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
<b>Gesendet:</b> Montag, 20. Januar 2020 15:39 Uhr<br>
<b>An:</b> Squeak Dev<br>
<b>Betreff:</b> [squeak-dev] Changeset/Concept: BytecodeDebugger.3.cs</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Hi all, time for some more context fun! :-)</p>
<p><br>
</p>
<p>Marcel recently mentioned to me that we could need some kind of "raw debugger" for a better experience when exploring the bytecode.</p>
<p>The current best work"flow" to do this was: In the open debugger, first evaluate [ThisContext method symbolic edit] <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">in
 the CVI (ContextVariablesInspector) to see the bytecode.</span> Then, while debugging, you need to evaluate [ThisContext pc] in the CVI repeatedly to check the current position and compare it with the bytecode to see what's going on. Furthermore, you could
 open the debug menu of the stepInto button and debug the button action to dive into the deeps of context simulation.</p>
<p><br>
</p>
<p>This changeset proposes an implementation for debugging the bytecode directly. It's still very alpha-WiP-tbd-y, but it might give you an impression of my approach.</p>
<p>Some screenshots (sorry, Dave!):</p>
<p>Comeback of the code provenance button:</p>
<p><img naturalheight="407" naturalwidth="551" size="53722" id="img888164" tabindex="0" style="max-width: 99.9%; user-select: none;" src="cid:d1d771ba-ba9b-41cb-b7ed-08c00b322fc5"><br>
</p>
<p>Take attention to the Simulate button!</p>
<p><img naturalheight="408" naturalwidth="553" size="57006" id="img880250" tabindex="0" style="max-width: 99.9%; user-select: none;" src="cid:d6ebdeed-824c-4cbb-8299-af44d771afdd"><br>
</p>
<p><br>
</p>
<p>Go ahead and give me feedback! It would be nice to have an early version of this feature in Trunk in not-so-far time; I am sure this could be helpful for investigating all the context bug I reported over the latest months.</p>
<p>I'm excited to hear from you!</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>