Page 1 of 2
Pure C debugger with low res program
Posted: 20 Sep 2020 13:56
by sandord
I'm writing a Pure C program that runs in low resolution. It also disables the mouse.
However, when debugging using the Pure C debugger, the debugger doesn't seem to do anything to keep the mouse working, switch back to medium resolution when showing the debugger etc. So as soon as my program switches to low res and/or disables the mouse, the debugger basically becomes unusable.
Untitled2.png
I've tried playing around with the settings in the debugger (see picture) but it didn't help. Is this a known limitation or am I missing something?
Untitled.png
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 16:01
by stephen_usher
I take it that you started the debugger when the machine was already booted in low res mode?
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 16:15
by sandord
stephen_usher wrote: 20 Sep 2020 16:01
I take it that you started the debugger when the machine was already booted in low res mode?
Well, the debugger doesn't let me start it when in low res mode so I started it in medium res. When running my program from the debugger, it (my program) switches to low res.
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 17:38
by stephen_usher
Oh, that'll be why then. I wonder why it won't start in low res mode. Sounds like a design failure.
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 18:15
by thorsten.otto
stephen_usher wrote: 20 Sep 2020 17:38
Sounds like a design failure.
Did you ever try to design GEM dialog for low resolution? That's hardly possible in serious programs.
@sandord: you should try to turn off VDI graphics, maybe that helps.
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 19:09
by sandord
thorsten.otto wrote: 20 Sep 2020 18:15
@sandord: you should try to turn off VDI graphics, maybe that helps.
The funny thing is that when I click the checkbox, it doesn't respond. So apparently it cannot be disabled.
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 19:27
by czietz
Iirc, printed manual or online help (I don't remember which) states that "non-VDI" mode of Pure Debugger can only be used in the high-res mode.
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 20:00
by sandord
czietz wrote: 20 Sep 2020 19:27
Iirc, printed manual or online help (I don't remember which) states that "non-VDI" mode of Pure Debugger can only be used in the high-res mode.
Thanks, that should explain the disabled checkbox then.
I guess I'm going to need a better debugger :roll: But that would probably mean switching compilers :shock:
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 20:06
by thorsten.otto
czietz wrote: 20 Sep 2020 19:27
Iirc, printed manual or online help (I don't remember which) states that "non-VDI" mode of Pure Debugger can only be used in the high-res mode.
That makes sense. Apparently they write directly to the screen otherwise, but only have routines for mono-chrome mode to do so (the Pure-C shell does similar things when you switch to the User-Screen).
That also explains your messed up screen: the VDI is not aware that your program switched the resolution. Maybe you can work around this by catching bus-error yourself, switching back to the original resolution in the handler, and then jump to whatever routine was installed before. That won't help though when trying to set breakpoints, i guess.
Re: Pure C debugger with low res program
Posted: 20 Sep 2020 20:08
by thorsten.otto
sandord wrote: 20 Sep 2020 20:00
[I guess I'm going to need a better debugger :roll: But that would probably mean switching compilers :shock:
The only other debugger that i know of than can debug C-Code on a source level basis is gdb, and that only works on MiNT, and only partially. With all others you can just debug the generated assembly code.