Pure C debugger with low res program

General Discussion, STOS.
User avatar
sandord
Posts: 764
Joined: 13 Aug 2018 22:08
Location: The Netherlands

Pure C debugger with low res program

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7380
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: Pure C debugger with low res program

Post by stephen_usher »

I take it that you started the debugger when the machine was already booted in low res mode?
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
sandord
Posts: 764
Joined: 13 Aug 2018 22:08
Location: The Netherlands

Re: Pure C debugger with low res program

Post 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.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7380
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: Pure C debugger with low res program

Post 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.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: Pure C debugger with low res program

Post 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.
User avatar
sandord
Posts: 764
Joined: 13 Aug 2018 22:08
Location: The Netherlands

Re: Pure C debugger with low res program

Post 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.
czietz
Posts: 586
Joined: 14 Jan 2018 13:02

Re: Pure C debugger with low res program

Post 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.
User avatar
sandord
Posts: 764
Joined: 13 Aug 2018 22:08
Location: The Netherlands

Re: Pure C debugger with low res program

Post 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:
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: Pure C debugger with low res program

Post 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.
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: Pure C debugger with low res program

Post 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.

Return to “SOFTWARE”

Who is online

Users browsing this forum: ClaudeBot and 3 guests