- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- macro never comes back
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 08:52 AM
07-23-2009 08:52 AM
macro never comes back
.entry loop, ^m<>
10$: brb 10$
.end loop
$ macro /noopt /debug loop
$ link /debug loop
$ run loop
OpenVMS Alpha Debug64 Version V8.3-014
%DEBUG-I-INITIAL, Language: AMACRO, Module: LOOP
DBG> step
stepped to LOOP\$L1
4: 10$: brb 10$
DBG> step <<<<< never comes back until I hit ^Y
Interrupt
Code never comes back until a ^Y is hit. There is clearly a problem with DBG. Why does it hang?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 09:23 AM
07-23-2009 09:23 AM
Re: macro never comes back
Ok. Interesting. Nice reproducer. Can't say I'd expect to see that construction in production code, but...
Call HP, and report the bug formally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 09:34 AM
07-23-2009 09:34 AM
Re: macro never comes back
I concur with Hoff, it would appear to be a bug.
Before reporting it, I would suggest that you try the other obvious one line loops (e.g., those involving the BRW and JMP instructions).
- Bob Gezelter, http://wwwa.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 09:42 PM
07-23-2009 09:42 PM
Re: macro never comes back
This is NOT a bug or a problem with DEBUG.
This is correct behaviour! DEBUG is doing precisely what you asked.
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.
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.
Alternatively, to debug this construct (if that makes sense!) you can use STEP/INSTRUCTION which will break after each executed instruction.
DBG> step/inst
stepped to LOOP\LOOP\%LINE 3+1: mov r42 = r12
3: .entry loop, ^m<>
DBG> step/inst
stepped to LOOP\LOOP\%LINE 3+2: mov r29 = r12 ;;
3: .entry loop, ^m<>
DBG> step/inst
stepped to LOOP\LOOP\%LINE 4: br.many 0000000
4: 10$: brb 10$
DBG> step/inst
stepped to LOOP\LOOP\%LINE 4: br.many 0000000
4: 10$: brb 10$
DBG> step/inst
stepped to LOOP\LOOP\%LINE 4: br.many 0000000
4: 10$: brb 10$
DBG> step/inst
stepped to LOOP\LOOP\%LINE 4: br.many 0000000
4: 10$: brb 10$
DBG> step/inst
stepped to LOOP\LOOP\%LINE 4: br.many 0000000
4: 10$: brb 10$
DBG> step/inst
stepped to LOOP\LOOP\%LINE 4: br.many 0000000
4: 10$: brb 10$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2009 03:38 AM
07-24-2009 03:38 AM
Re: macro never comes back
Mea culpa.
Indeed, the HELP text under /LINE notes that it is the default.
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
automatically type STEP/INTO.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2009 03:47 AM
07-24-2009 03:47 AM
Re: macro never comes back
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2009 05:29 AM
07-24-2009 05:29 AM
Re: macro never comes back
For the record, I verified that this behavior also occurs on VAX.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2009 10:58 AM
07-27-2009 10:58 AM
Re: macro never comes back
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.
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.
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.
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.
Also remember that some languages aren't "single line". Consider the double-nested infinite loop [which takes O(n2) time to complete. :)]
1: 2: goto 2; goto 1;
where's the next LINE?