Title: | DEBUG |
Notice: | Updated locations for reporting QARs -- see note 834.1 |
Moderator: | LOWFAT::DIETER |
Created: | Fri Jan 24 1986 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1868 |
Total number of notes: | 8200 |
I have a customer that reports the following behavior with the debugger: /* US3RMC::"[email protected]" /* Seq # C970529-1456 ID # 18197 /* Following is a small program that can be used to demonstrate the problem /* we discussed yesterday about the VMS debugger on OpenVMS AXP. (V6.21H3) /* /* The program (TESTDBG.C) was compiled and linked as follows: /* /* CC/LIS/DEB/NOOPT/SHOW=(EXPAN)/STAND=VAXC/EXTERN=COMMON TESTDBG /* LINK/MAP/DEBUG TESTDBG /* /**/ #include <stdio.h> #include <stdlib.h> void myfunc(void); main() { printf("\nNow testing the debugger..."); myfunc(); } void myfunc(void) { long int i; long int j; j = -1; if (j >= 0) { printf("\nEntered the IF construct."); } printf("\nOut of the IF construct."); } /* When I ran this program, the compiler placed 'i' in stack memory and 'j /* in R3. /* /* Run the program in debug mode. /* Note that 'j' is set to -1 in the program. /* Stop the program at the statement reading "if (j >= 0)". /* Deposit a small positive integer value into j. /* examine j ! It will have the new value. /* examine R3 ! It will have a large negative value. /* Step ! It will step over and not into the loop. /* /**/ any help would be appreciated John Griffin CSC32::j_griffin
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1866.1 | Expected behavior because of load/store/register arch. | CPEEDY::FLEURY | Fri May 30 1997 14:26 | 10 | |
RE: .0 This is expected behavior for Alpha machines.(IMHO) If you look at the listings, you will probably find an LDL or LDQ instruction prior to the breakpoint which loads R3 with "J". Once this is done, the location "J" is still the memory location and this is what is updated by the DEP statement. If the load instruction followed the breakpoint, you would have seen the behavior you initially expected. Dan |