<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: macro never comes back in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465786#M95669</link>
    <description>So to distill this problem report down to its core, you're reporting that the OpenVMS Alpha V8.3 debugger can't single-step past a Macro32 branch to self instruction; past a one-instruction infinite loop.&lt;BR /&gt;&lt;BR /&gt;Ok.  Interesting.  Nice reproducer.  Can't say I'd expect to see that construction in production code, but...&lt;BR /&gt;&lt;BR /&gt;Call HP, and report the bug formally.&lt;BR /&gt;</description>
    <pubDate>Thu, 23 Jul 2009 16:23:46 GMT</pubDate>
    <dc:creator>Hoff</dc:creator>
    <dc:date>2009-07-23T16:23:46Z</dc:date>
    <item>
      <title>macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465785#M95668</link>
      <description>.title  loop &lt;BR /&gt; &lt;BR /&gt;        .entry  loop, ^m&amp;lt;&amp;gt; &lt;BR /&gt;10$:    brb     10$ &lt;BR /&gt; &lt;BR /&gt;        .end    loop &lt;BR /&gt;$ macro /noopt /debug loop &lt;BR /&gt;$ link /debug loop &lt;BR /&gt;$ run loop &lt;BR /&gt; &lt;BR /&gt;         OpenVMS Alpha Debug64 Version V8.3-014 &lt;BR /&gt; &lt;BR /&gt;%DEBUG-I-INITIAL, Language: AMACRO, Module: LOOP &lt;BR /&gt; &lt;BR /&gt;DBG&amp;gt; step &lt;BR /&gt;stepped to LOOP\$L1 &lt;BR /&gt;     4: 10$:    brb     10$ &lt;BR /&gt;DBG&amp;gt; step &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; never comes back until I hit ^Y &lt;BR /&gt; Interrupt &lt;BR /&gt;&lt;BR /&gt;Code never comes back until a ^Y is hit.  There is clearly a problem with DBG.  Why does it hang?</description>
      <pubDate>Thu, 23 Jul 2009 15:52:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465785#M95668</guid>
      <dc:creator>IT Response</dc:creator>
      <dc:date>2009-07-23T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465786#M95669</link>
      <description>So to distill this problem report down to its core, you're reporting that the OpenVMS Alpha V8.3 debugger can't single-step past a Macro32 branch to self instruction; past a one-instruction infinite loop.&lt;BR /&gt;&lt;BR /&gt;Ok.  Interesting.  Nice reproducer.  Can't say I'd expect to see that construction in production code, but...&lt;BR /&gt;&lt;BR /&gt;Call HP, and report the bug formally.&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jul 2009 16:23:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465786#M95669</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-23T16:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465787#M95670</link>
      <description>IT Response,&lt;BR /&gt;&lt;BR /&gt;I concur with Hoff, it would appear to be a bug.&lt;BR /&gt;&lt;BR /&gt;Before reporting it, I would suggest that you try the other obvious one line loops (e.g., those involving the BRW and JMP instructions).&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://wwwa.rlgsc.com" target="_blank"&gt;http://wwwa.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Thu, 23 Jul 2009 16:34:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465787#M95670</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2009-07-23T16:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465788#M95671</link>
      <description>I don't concur with Hoff and Robert.&lt;BR /&gt;&lt;BR /&gt;This is NOT a bug or a problem with DEBUG.&lt;BR /&gt;&lt;BR /&gt;This is correct behaviour! DEBUG is doing precisely what you asked.&lt;BR /&gt;&lt;BR /&gt;The default for STEP is STEP/LINE. It's supposed to execute until you reach the next line of code. Since your program never reaches the next line (because there isn't one), it doesn't break. QED.&lt;BR /&gt;&lt;BR /&gt;You can always hit ^Y and type DEBUG to return to the DBG prompt. That's the correct, documented way to break out of a loop.&lt;BR /&gt;&lt;BR /&gt;Alternatively, to debug this construct (if that makes sense!) you can use STEP/INSTRUCTION which will break after each executed instruction.&lt;BR /&gt;&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 3+1:             mov         r42 = r12&lt;BR /&gt;     3: .entry loop, ^m&amp;lt;&amp;gt;&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 3+2:             mov         r29 = r12 ;;&lt;BR /&gt;     3: .entry loop, ^m&amp;lt;&amp;gt;&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 4:             br.many     0000000&lt;BR /&gt;     4: 10$: brb 10$&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 4:             br.many     0000000&lt;BR /&gt;     4: 10$: brb 10$&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 4:             br.many     0000000&lt;BR /&gt;     4: 10$: brb 10$&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 4:             br.many     0000000&lt;BR /&gt;     4: 10$: brb 10$&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 4:             br.many     0000000&lt;BR /&gt;     4: 10$: brb 10$&lt;BR /&gt;DBG&amp;gt; step/inst&lt;BR /&gt;stepped to LOOP\LOOP\%LINE 4:             br.many     0000000&lt;BR /&gt;     4: 10$: brb 10$&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Jul 2009 04:42:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465788#M95671</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-07-24T04:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465789#M95672</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;Mea culpa.&lt;BR /&gt;&lt;BR /&gt;Indeed, the HELP text under /LINE notes that it is the default.&lt;BR /&gt;&lt;BR /&gt;In fact, I was burned often enough long ago that my hand no longer will type STEP when I am sitting at a subroutine call or branch, I &lt;BR /&gt;automatically type STEP/INTO.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Fri, 24 Jul 2009 10:38:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465789#M95672</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2009-07-24T10:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465790#M95673</link>
      <description>It's one of those wonderful hair-splits, and here I think the current behavior for this, um, degenerate case is wrong.   At its core, this is the difference between the next line of source code (which is 10$: brb 10$), and a different line of source code.  What I think is happening here is that the debugger is itself getting stuck in the infinite loop; that there's a boundary case here.  But if you're going to step through an infinite loop in the interim and prior to HP making a statement on this behavior, well, stick a NOP into the loop while you're confirming that the infinite loop  here is, in fact, infinite, and that should coax the debugger into allowing you to prove the loop is infinite.</description>
      <pubDate>Fri, 24 Jul 2009 10:47:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465790#M95673</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-24T10:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465791#M95674</link>
      <description>Gentlemen,&lt;BR /&gt;&lt;BR /&gt;For the record, I verified that this behavior also occurs on VAX.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:29:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465791#M95674</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2009-07-24T12:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: macro never comes back</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465792#M95675</link>
      <description>So think about what happens when you ask the debugger to step to the next line.  &lt;BR /&gt;&lt;BR /&gt;For code without branches, the debugger will scan forward looking for PCs that map to a different line number than the current PC.  It will set a break point there; begin execution of the code; take the breakpoint; put back the original instruction; print the DBG prompt.&lt;BR /&gt;&lt;BR /&gt;Of course the complicated case is when the line contains a branch.  For some computed branch where you don't know the target or is some conditional branch, I think the debugger sets a breakpoint on the branch itself, begins execution; takes the breakpoint; puts back the branch; does a single step; and checks if we're at a different line or not.  Repeat as necessary.  &lt;BR /&gt;&lt;BR /&gt;When the debugger does know the target [ie, this exact situation], the debugger checks the destination and if the PC/line mapping is a DIFFERENT line, it will set a breakpoint.  In this case, the destination is the same line and it wouldn't surprise me that the breakpoint is not set.&lt;BR /&gt;&lt;BR /&gt;You can certainly ask HP to check with the debugger team on the philosophy of such a STEP, but it didn't surprise me that it loops.&lt;BR /&gt;&lt;BR /&gt;Also remember that some languages aren't "single line".  Consider the double-nested infinite loop [which takes O(n2) time to complete. :)]&lt;BR /&gt;&lt;BR /&gt;1: 2: goto 2; goto 1;&lt;BR /&gt;&lt;BR /&gt;where's the next LINE?</description>
      <pubDate>Mon, 27 Jul 2009 17:58:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/macro-never-comes-back/m-p/4465792#M95675</guid>
      <dc:creator>John Reagan</dc:creator>
      <dc:date>2009-07-27T17:58:55Z</dc:date>
    </item>
  </channel>
</rss>

