DEBUG.EXE single-step doesn't work on dynamic recompiler. I tried to add the trap stuff, and got it to work for one instruction, and then it complained that CS is not present. Now, if EMM386 isn't loaded, and DEBUG does everything in real mode, it works fine, but when it is loaded and DEBUG does its stuff in protected mode, that error occurs and PCem fatals due to triple fault. I also noticed that on the dynamic recompiler, CALLs, INTs, etc. don t seem to get properly traced. Ie. when the TRAP should land me before a CALL or an INT, it instead goes ahead and executes that instruction anyway. On the interpreter, however, it behaves correctly.
Edit: Made it work correctly by moving the TRAP handler to inside the while(!cpu_block_end) code block when the code is dynamically interpreted. It now works exactly as it should, INT 1h correctly executed before all opcodes, and no faults or fatals. :p
DEBUG.EXE single-step doesn't awork on dynamic recompiler...
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: DEBUG.EXE single-step doesn't awork on dynamic recompile
Trap flag has been implemented in rev 193.
Re: DEBUG.EXE single-step doesn't awork on dynamic recompile
You accidentally removed:
int trap = flags & T_FLAG;
from exec386().
int trap = flags & T_FLAG;
from exec386().
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: DEBUG.EXE single-step doesn't awork on dynamic recompile
That's intentional.
Re: DEBUG.EXE single-step doesn't awork on dynamic recompile
But without that, the code won't work at all. It does if (trap) in many places, how can if (trap) possibly ever be true if trap is never declared and only ever set in one place, to 0.
Edit: Somehow, it's working without it. I guess I must have missed something then when I read the code.
Edit: Somehow, it's working without it. I guess I must have missed something then when I read the code.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: DEBUG.EXE single-step doesn't awork on dynamic recompile
trap is set at the beginning of all interpreted instructions, in exec386().
I like how little faith you have in my abilities to actually test what I'm committing.
I like how little faith you have in my abilities to actually test what I'm committing.