Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Ninho

E-mail

06.03.2011, 16:48
 

freeDOS DEBUG : parsing bug (Developers)

Hi All! and, this is primarily for Japheth to review :

In Debug a command line similar to this (never mind the numerics, made up as I type) :

- m0:34l4 0:334

... is, probably unexpectedly, interpreted as it were "M0" (=choose 8086 target proc, IIRC). In effect, the given command is like truncated after m0 - the rest of the line being ignored. The initially intended action would require a separator (space) after letter M, as was said another time...

I know, this is by design, although unfortunate IMHO, and was already underlined, BUT even if we were to agree with that parsing, there remains the important point which was NOT addressed last time that case was evoked, viz

In accordance with the stated lexical design, the example command, and similar ones, should never be accepted in the first place, at least not without an appropriate error message ! I am of the opinion this is a non disputable case of a [i]parsing/lexing bug. Since you most certainly want to flag the case, wouldn't it be better to accept the example line, interpreting it as a "move" like MS Debug would; change might require a little backtracking (just a guess) but would be beneficial in any case. Using some OTHER letter than M for processor choice would not be bad either, depends how you much you value the need for backward compatibility - since you are changing things along anyway, I submit this idea too.

Hope this is easily corrected without in-depth revising of the lex analysis. Should you mess with the lexer, you might as well look into being more liberal in accepted separators in general, in particular commas should probably be interchangeable with blank/tab. Also define a separator sign like "#" for the purpose of introducing COMMENTS (useful in scripts; maybe there is one already ?). Another useful extension could be a separator for multiple ASM instructions on the same line, maybe ";".

Yes, yes, I'm very sorry ;=)

---
Ninho

Japheth

Homepage

Germany (South),
08.03.2011, 09:13

@ Ninho
 

freeDOS DEBUG : parsing bug

> Hi All! and, this is primarily for Japheth to review :

Here's the part of the source (debug.asm) where you should do those experiments:


mmm proc
        cmp al,CR
        jz mach
        mov ah,[si-2]
        or ah,TOLOWER
        cmp ah,'m'
        jz mach
        push si
        call getdword
        cmp al,CR
        jz @F
        call skipwhite
@@:


As soon as you've found a properly working fix, just post it here and I will happily add it to the debug package.

---
MS-DOS forever!

Ninho

E-mail

12.03.2011, 11:50

@ Japheth
 

freeDOS DEBUG : "N" command bug

Another annoyance : the N command has 2 goals - one, to set a filename for L and W commands; second, to (re)set the debuggee's command line arguments. MS-Debug and DRDOS SID both copy the given argument to the debuggee's PSP (and also to its father's), completed with EOL, properly filling the byte count
at PSP:80h (the so-called DTA). Unfortunately, fDEBUG does only the first half of its duty :(

> As soon as you've found a properly working fix, just post it here
> and I will happily add it to the debug package.

I make no promise to even look for a fix, at the moment, sorry, there are more urgent things to be done. Just reporting for the record and if the Herr Maintainer doesn't, hopefully someone with time in their hands will find themselves amused at debugging debug ;=)

--
Ninho

Japheth

Homepage

Germany (South),
16.03.2011, 10:21

@ Ninho
 

freeDOS DEBUG : "N" command bug

> Another annoyance : the N command has 2 goals - one, to set a filename for
> L and W commands; second, to (re)set the debuggee's command line arguments.
> MS-Debug and DRDOS SID both copy the given argument to the debuggee's PSP
> (and also to its father's), completed with EOL, properly filling the byte
> count
> at PSP:80h (the so-called DTA). Unfortunately, fDEBUG does only the first
> half of its duty :(

I confirm this behavior. It isn't that bad, because the L command will take over the second half of the duties.

---
MS-DOS forever!

Ninho

E-mail

16.03.2011, 19:43

@ Japheth
 

freeDOS DEBUG : "N" command bug

>> argument to the debuggee's PSP
>> (and also to its father's), completed with EOL, properly filling the byte
>> count at PSP:80h (the so-called DTA). Unfortunately, fDEBUG does only the first
>> half of its duty :(
>
> I confirm this behavior. It isn't that bad, because the L command will take
> over the second half of the duties.

Except when you'd like to set command line params /without/ having to reload the
debuggee... ;=)

---
Ninho

Back to index page
Thread view  Board view
22049 Postings in 2034 Threads, 396 registered users, 251 users online (0 registered, 251 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum