<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>Hi Bert, thanks for the impression!</p>
<p><br>
</p>
<p>This led me to even more ideas:</p>
<p></p>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li>Add a flag to ContextVariablesInpector whether to show all stack items or only the named variables. If disabled, it does not need to display context top at all. If enabled, it looks more like a ContextInspector.</li><li>Depending on the fact whether we're debugging bytecode (#isBytecodeDebugger?), set or unset that CVI flag.</li><li>Also depending on #isBytecodeDebugger, show or hide the Simulate button :-)</li></ul>
<p></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>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<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">
<br>
</div>
Best,</div>
<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">
Christoph<br>
<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 Bert Freudenberg <bert@freudenbergs.de><br>
<b>Gesendet:</b> Montag, 20. Januar 2020 22:40 Uhr<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Changeset/Concept: BytecodeDebugger.3.cs</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:#000000">
<div>Nice - almost looks like my SqueakJS debugger :)</div>
<div><br>
</div>
<div>For debugging the VM I found it useful to show the current stack and context chain: </div>
<div><br>
</div>
<div><img naturalheight="647" naturalwidth="800" alt="Screen Shot 2020-01-20 at 08.28.26.jpg" style="margin-right: 25px; user-select: none;" src="cid:ii_k5mxcugm2"><br>
</div>
</div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"> </div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:rgb(0,0,0)">
- Bert -</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jan 20, 2020 at 7:04 AM Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_5460191068815105027divtagdefaultwrapper" 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 id="gmail-m_5460191068815105027divtagdefaultwrapper" 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>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:0px 0px 0px 40px; border:none; padding:0px">
<blockquote style="margin:0px 0px 0px 40px; border:none; padding:0px">
<div 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><span style="font-size:12pt">InstructionPointer >> #subclassResponsibility</span></div>
</div>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px; border:none; padding:0px">
<div 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><span style="font-size:12pt; white-space:pre-wrap"></span><span style="font-size:12pt">| sender |</span></div>
</div>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px; border:none; padding:0px">
<div 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><span style="font-size:12pt; white-space:pre-wrap"></span><span style="font-size:12pt">sender := thisContext sender.</span></div>
</div>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px; border:none; padding:0px">
<div 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><span style="font-size:12pt; white-space:pre-wrap"></span><span style="font-size:12pt">(self class whichCategoryIncludesSelector: sender selector) = #'instruction decoding'</span></div>
</div>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px; border:none; padding:0px">
<div 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><span style="font-size:12pt; white-space:pre-wrap"></span><span style="font-size:12pt">ifFalse: [^ super subclassResponsibility].</span></div>
</div>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px; border:none; padding:0px">
<div 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><span style="font-size:12pt; white-space:pre-wrap"></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 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">
<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 style="display:inline-block; width:98%">
<div id="gmail-m_5460191068815105027divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>>
 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="gmail-m_5460191068815105027divtagdefaultwrapper" 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="gmail-m_5460191068815105027img888164" style="max-width: 99.9%; user-select: none;" src="cid:16fc4b9283af456b1e51"><br>
</p>
<p>Take attention to the Simulate button!</p>
<p><img naturalheight="408" naturalwidth="553" size="57006" id="gmail-m_5460191068815105027img880250" style="max-width: 99.9%; user-select: none;" src="cid:16fc4b9283af456b1e52"><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="gmail-m_5460191068815105027Signature">
<div id="gmail-m_5460191068815105027divtagdefaultwrapper" 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">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>