On at 2023-08-26 16:30 +0200, C. Masloch via Freedos-user wrote:
Hello list,

I finished release 6 of lDebug (with a small L) today. This is my advanced 86-DOS debugger project based on FreeDOS Debug/X (in turn based on MS-DOS Debug), with some ideas from DR-DOS Debug. The duration since the prior release 5 is back to less than 6 months as opposed to the year between releases 4 and 5. Apart from the usual amount of bugfixes, there are some new features.

I just found a bug in the release 6 revision of lDebug. It makes the DIL command (Dump Interrupt chains with discovery of hidden chains through AMIS Interrupt Lists) not work properly. Depending on the prior use of (and left-over contents in) the auxiliary buffer, it could either seem to appear to work, it could display an error immediately on any hidden chain being detected (very common), or it could overflow the auxiliary buffer (only possible if hundreds and hundreds of interrupt entrypoints are found for one particular interrupt number).

It is unfortunate that this bug slipped by me into the release. I am considering whether to make a "minor" release about it. As a halfway remedy for now, I created a Script for lDebug that can patch an uncompressed executable (ldebugu.com, ldebugxu.com, lcdebugu.com, etc) to work around the bug. I have tested this patch on several different files. It is described some on my blog [1]. A copy of the patch itself is also hosted on our server [2]. The files that can be patched in the FreeDOS package are found in the package's directory tree at these positions:

SOURCE/LDEBUG/ldebug/bin/ldebugu.com

SOURCE/LDEBUG/ldebug/bin/ldebugxu.com

This is the complete script file:

=== snip patch6.sld
install flat
l
r v1 := bxcx >> 4
r v2 := 0
r v3 := bxcx
if (v1 <= 1000) then goto :small
r v2 := v1 - 1000
r v3 := 10000
:small
s cs+10+v2:0 l v3 B1 04 89 C3 D3 EB
if (src != 1) then goto :error
u srs:sro - 4 l 1
if (auo != sro) then goto :error
r v0 := word [srs:sro - 2]
s cs+10+400:0 l 10000 3B 3E byte v0 byte (v0 >> 8)
if (src != 3) then goto :error
a srs:sro0
 cmp di, (8 * #1024 + #16 - #24)
 .
a srs:sro1
 cmp di, (8 * #1024 + #16 - #24)
 .
a srs:sro2
 cmp di, (8 * #1024 + #16 - #24)
 .
w
goto :eof

:error
; Error detected
=== snip

This is how to use it:

* Run DOS command "ldebug ldebugu.com"
* Run lDebug command "y patch6.sld"
* Observe whether last line indicates "Error detected"

Regards,
ecm


[1]: https://pushbx.org/ecm/dokuwiki/blog/pushbx/2023/0903_august/september_work#the_dil_bugfix
[2]: https://pushbx.org/ecm/test/20230902/patch6.sld


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to