How to set "advance off" mode
This sheet describes how to run a VE program in "advance off" mode under GDB.
In this mode, instruction execution is held until the preceding instructions have completed.
As the result, GDB shows the precise state when HW exception occurs.
You can set "advance off" mode with the following procedures in GDB.
1. Set break point at main() function.
2. Run the VE program The VE program will stop at main() function.
3. Set advance off mode bit in PSW register.
set $psw=($psw | 0x8000000000000000)
4. Continue the VE program.
(NOTE) "segfaut_g" is VE program which causes a segmentation fault
$ /opt/nec/ve/bin/gdb -q segfault_g
Reading symbols from ve_bin/bin/segfault_g...done.
(gdb) break main
Breakpoint 1 at 0x600000000690: file segfault.c, line 6.
(gdb) run
Starting program: /opt/nec/ve/bin/ve_exec --traceme  -- /home/veuser/segfault_g
Breakpoint 1, main () at segfault.c:6
6       {
(gdb) set $psw=($psw | 0x8000000000000000)
(gdb) c
Hello, I am 43754
Program received signal SIGSEGV, Segmentation fault.
main () at segfault.c:22
22              printf("val3 %d\n", val3);
(gdb) list
17              val2 = 3;
18              val3 = val2 + val1;
19              val4p = NULL;
20              *val4p = val3;
22              printf("val3 %d\n", val3);
23              return 0;
24      }