News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Debugger?

Started by FORTRANS, October 20, 2022, 01:51:33 AM

Previous topic - Next topic

FORTRANS

   Okay, problem statement:  I am trying to debug a DOS program
that has 32-bit opcodes (or instructions).  MS-DOS DEBUG.EXE does
not support 32-bit opcodes.

   I googled to find a DOS compatible debugger that does support
them.  I found several hits that looked similar, called DEBUGX.
However the one that I chose does not work for me.

   From README.TXT.

= = =
5. Copyright

    This program is copyrighted, but feel free to use it as you wish.
    For full copyright conditions, see the file debug.asm.

    Paul Vojta (1995-2003)
    Andreas Grech (2006-2011)
    Vernon Brooks (2013-2016)
= = =

   From HISTORY.TXT.

= = =
1.32b [14 May 2016]
= = =

   From DEBUG.TXT.

= = =
DEBUG scripts
-------------
Because DEBUG uses the standard input and output devices, and because
these devices can be redirected, DEBUG can be made to input from
and/or output to a text file. This makes it possible to place DEBUG
commands and statements in a text file, a so-called DEBUG script, and
submit the file to DEBUG for processing.
= = =

   However it does not supply the redirected input to the program
being debugged.  So I cannot debug a program that gets its input from
the standard input.

   An example of what I tried in in PROBLEM0.TXT.  The files used and
created are PUZZLE1A.TXT, OUT1A.TXT, PUZZLE2A.TXT, and OUT2A.TXT.

   Any help or suggestions from any of you?

Regards,

Steve N.

Shintaro

Mate,
Have you tried CodeView?

MSC 7.0 has CV (CodeView) 4.01 HERE.

MSVC++ 1.52 has CV 4.10 HERE. I *think* this is the version you need, it can compile 386 code. I'm sorry I can't confirm, I have an assignment due.

Just so you know, apologies if you already know.
MSVC++ 1.52 was the last version to be able to compile 16 bit code. MSVC 4.0 included MSVC 1.52, then MSVC 4.2 dropped 16bit compiles.Currently, I am leaning towards compiling 16bit code on Windows NT (3.51/4.0), it seems a bit more stable. I need to do a lot more testing though.

Hope this helps.
"Wyrd bið ful āræd. Fate is inexorable."

_japheth

Quote from: FORTRANS on October 20, 2022, 01:51:33 AM
    Paul Vojta (1995-2003)
    Andreas Grech (2006-2011)
    Vernon Brooks (2013-2016)

I once was happy that Vernon Brooks took over maintenance, but he changed the license so his version cannot be distributed with FreeDos anymore.
So I'm again the maintainer...

Quote
An example of what I tried in in PROBLEM0.TXT.  The files used and
created are PUZZLE1A.TXT, OUT1A.TXT, PUZZLE2A.TXT, and OUT2A.TXT.

The problem might be easy to fix. However, you should provide a full test case. In your zip file, soduko.com is missing.
Dummheit, gepaart mit Dreistigkeit - eine furchtbare Macht.

FORTRANS

Hi,

Quote from: _japheth on October 20, 2022, 06:40:43 PM
Quote from: FORTRANS on October 20, 2022, 01:51:33 AM
    Paul Vojta (1995-2003)
    Andreas Grech (2006-2011)
    Vernon Brooks (2013-2016)

I once was happy that Vernon Brooks took over maintenance, but he changed the license so his version cannot be distributed with FreeDos anymore.
So I'm again the maintainer...

Good to know.  I thought you might be involved.
Quote

Quote
An example of what I tried in in PROBLEM0.TXT.  The files used and
created are PUZZLE1A.TXT, OUT1A.TXT, PUZZLE2A.TXT, and OUT2A.TXT.

The problem might be easy to fix. However, you should provide a full test case. In your zip file, soduko.com is missing.

   Attached.  After communicating with zedd151, this is my attempt to convert
to MASM a Sudoku solver posted on usenet, sudo.com, that was partially
disassembled.  So it is a non-working version of that program.

   Thank you for responding.

Regards,

Steve N.

FORTRANS

Hi,

Quote from: Shintaro on October 20, 2022, 10:52:25 AM
Mate,
Have you tried CodeView?

   No.  I did remember that it might solve my problem.  I made a cursory
search for an old version, but did not find anything useful.  So thank you
for the following links. 

QuoteMSC 7.0 has CV (CodeView) 4.01 HERE.

MSVC++ 1.52 has CV 4.10 HERE. I *think* this is the version you need, it can compile 386 code. I'm sorry I can't confirm, I have an assignment due.

Just so you know, apologies if you already know.
MSVC++ 1.52 was the last version to be able to compile 16 bit code. MSVC 4.0 included MSVC 1.52, then MSVC 4.2 dropped 16bit compiles.Currently, I am leaning towards compiling 16bit code on Windows NT (3.51/4.0), it seems a bit more stable. I need to do a lot more testing though.

Hope this helps.

   It might.  When CodeView first came out I could not use it.  I do
not remember why.  As I do not use C, it might not have been easily
available.  I think they charged for it when it was first introduced?
Or I might have disliked using it.  Or it could have been something
completely different.  At any rate I will have a look at it now.

Regards,

Steve N.

_japheth


detecting the bug wasn't too hard - if input was from a file, the debugger always read 256 bytes (until EOF).
Now it reads bytewise until a Linefeed is detected.

The test case displays "illegal input", though, so I'm not 100% sure if it's fully fixed.
Dummheit, gepaart mit Dreistigkeit - eine furchtbare Macht.

FORTRANS

Hi,

Quote from: _japheth on October 21, 2022, 02:33:39 AM

detecting the bug wasn't too hard - if input was from a file, the debugger always read 256 bytes (until EOF).
Now it reads bytewise until a Linefeed is detected.

   Thank you, that is good news.

QuoteThe test case displays "illegal input", though, so I'm not 100% sure if it's fully fixed.

   Yes, as it does in the OUT1A.TXT enclosed in the first post.  That is why
I needed a debugger.  My version is broken.  The original sudo.com was
only supplied as a binary file and a code listing that was incompatible with
MASM.  My attempted translation to MASM contains errors that need to
be tracked down.

   Some moderately recent posts in this forum between zedd151 and me
were discussing Sudoku solvers.  I pointed out sudo.com to him.  One, or
both of us, wanted to modify the program.  So I tried to translate it.

Regards,

Steve N.

FORTRANS

Hi,

   Where can I get a copy of the new version?  I thought you had
attached a copy, but that turned out to be a copy of the file that I
attached to the first post.

TIA,

Steve N.

zedd151

Quote from: FORTRANS on October 21, 2022, 03:47:56 AM
Hi, ....
   Some moderately recent posts in this forum between zedd151 and me
were discussing Sudoku solvers.  I pointed out sudo.com to him.  One, or
both of us, wanted to modify the program.  So I tried to translate it.

Regards,

Steve N.
Here http://masm32.com/board/index.php?topic=10287.msg113281#msg113281 and several other posts in that thread...
:biggrin:  Hi Steve! I see your still busy toiling over this.

_japheth

Quote from: FORTRANS on October 21, 2022, 05:33:28 AM
   Where can I get a copy of the new version?  I thought you had
attached a copy, but that turned out to be a copy of the file that I
attached to the first post.

Ops, sorry! Attached.


Dummheit, gepaart mit Dreistigkeit - eine furchtbare Macht.

FORTRANS

Hi,

   Just wanted to say I found the error.  Or at least an error, EAX
should have been EDX on one line.  And it solved the test puzzle.  Now
to yank out all the superfluous debugging and diagnostic code wedged
into the program.  And while debugging, I crashed the OS/2 VDM, which
should be looked into, if possible.

   Thanks to all who helped out or made suggestions!

Cheers,

Steve N.
   

FORTRANS

Hi,

   Shintaro and TimoVJL pointed out links to versions of CodeView that I
downloaded and tried out.  Thanks to both of you.

   The link Shintaro used was easier to unpack and investigate.  The program
ran in a Windows NTVDM and is a menu driven debugger.  Unfortunately
it crashes in an OS/2 VDM.  (Where I had everything set up.)

   TimoVJL's link was a bit harder to figure out due to Google searches and
Windows behavior adding up to misleading information.  But when the
program was successfully unpacked, it does work.  A somewhat older version
than the one from Shintaro.  Back to Google I suppose to find out how to
use Codeview.

   As _japheth's debugger solved the immediate problem, this will
undoubtedly be a rather slow process at best.  Oh well.

   Thanks again to all who responded.

Regards,

Steve N.

Shintaro

Quote from: FORTRANS on November 07, 2022, 12:04:42 AM

Unfortunately it crashes in an OS/2 VDM.  (Where I had everything set up.)

OS/2 VDM?? Are you running an old version of Windows NT or OS/2 Warp?
"Wyrd bið ful āræd. Fate is inexorable."

FORTRANS

Hi,

Quote from: Shintaro on November 07, 2022, 08:41:59 AM
Quote from: FORTRANS on November 07, 2022, 12:04:42 AM

Unfortunately it crashes in an OS/2 VDM.  (Where I had everything set up.)

OS/2 VDM?? Are you running an old version of Windows NT or OS/2 Warp?

   Well, one machine is set up for a dual boot of Windows 2000 and OS/2 4.0.
That is set up for program development, games, forum access, and problem
research (playing with algorithms and such).  Another is Windows XP, used for
playing DVDs mostly.  Another is Windows 8.1, which did the downloads, Google
searches, my e-mail, and is used when "modern" software is needed.

   Others in intermittent use run all sorts of things, unless they have recently
died, Win 10 (boots up for updates), eCs (OS/2 follow-on), and some others.
I think the last Win 98 has died.  The Win 3.11 fW is disconnected, and so forth.
Another dual boot has problems and was never used much anyway.  And some
MS-DOS 80186 palmtops might still be working, haven't looked for a while.

   If you get involved with computers and have a hard time throwing stuff out
you end up with a lot of stuff, mostly inert.  Need a dead PC/AT?

Cheers,

Steve N.

Shintaro

You could try Borland Turbo Debugger from that era, HERE
Books on TD are HERE on the Internet Archive.
There is also the OS/2 SDK HERE. Not sure if you already have that. It might have some tools or information that helps.

Yea, my family think I am a hoarder, but I am real happy that I held on to some of the old stuff. I really enjoy messing with the old hardware and software.
I am just a novice at fixing old boards, which is quite satisfying, but I don't have the time.

I mostly run VM's, but that is limited as some code can crash in a VM but work ok on real hardware. One of my current problems is finding a 1GB 2.5 inch disk for my Dell Latitude 610. I am going to use a compact flash card, until a DOM (Disk on Module) arrives. The DOM is better suited to replace a spinning disk.

I have 486 VLB waiting for a case. I just can't seem to find a case that I like, locally.
"Wyrd bið ful āræd. Fate is inexorable."