Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help with debugging Win31 standard mode driver

0 views
Skip to first unread message

Paul Robertson

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to
I am trying to develop a comm driver for Win 3.1 to run in standard mode.
My problem is how to debug my code.
I can run WDEB386, and set breakpoints etc. but I cant use the trace_out or
mono_out VMM services.
Maybe I could use the DPMI to get a linear address for the monochrome
adapter and write my own mono output routines.
Another idea I had was to output short strings directly to the debug 16550
UART (ignoring the fact that WDEB386 is using it).

Does anyone have any experience of debugging standard mode drivers?

Thanks
--
Paul Robertson


Mike

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to
> I am trying to develop a comm driver for Win 3.1 to run in standard > mode.
> My problem is how to debug my code.

What means "standard mode" - protected?

> I can run WDEB386, and set breakpoints etc. but I cant use the > trace_out or mono_out VMM services.

Use inclide debug.inc
...
TRACE_OUT "debug message"
int 3

and compile code with DEBUG options (depend on compiler)

> Maybe I could use the DPMI to get a linear address for the monochrome
> adapter and write my own mono output routines.
> Another idea I had was to output short strings directly to the debug > 16550 UART (ignoring the fact that WDEB386 is using it).

Why? You do not need to do that.
Just use WDEB according to instructions (use monochrome monitor
or serial port output).
Also do not forget to insert corresponding string to 386Enh section
of SYSTEM.INI and restart Windows.

good luck!
Mike

Paul Robertson

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to
"Standard mode" is the alternative to "Enhanced mode" for 80286 processors
or machines with limited memory.
This means (unless I am mistaken) that there is no VMM, and therefore I
can't call VMM services.

If you have some Win 3.1 code which outputs messages with TRACE_OUT, try
starting windows 3.1 under the debugger with the /s command line option, and
let me know if the debug output appears


Mike <or...@hea.iki.rssi.ru> wrote in message
news:37AA09...@hea.iki.rssi.ru...

tom picard

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to
so your driver is a 16 bit dll right?
if so how about OutputDebugString(), or something like that.
then I think, there is a little app that catches the messages or maybe they
go out the serial port.

there are problems, like when does the driver load? before user.exe or
after?
so it may be hard to debug the start up.

Tom


Paul Robertson wrote in message
<933844651.25269.0...@news.demon.co.uk>...


>I am trying to develop a comm driver for Win 3.1 to run in standard mode.
>My problem is how to debug my code.

>I can run WDEB386, and set breakpoints etc. but I cant use the trace_out or
>mono_out VMM services.

>Maybe I could use the DPMI to get a linear address for the monochrome
>adapter and write my own mono output routines.
>Another idea I had was to output short strings directly to the debug 16550
>UART (ignoring the fact that WDEB386 is using it).
>

Jeff Henkels

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to
tom picard <to...@pvinc.com> wrote in message
news:7oct2r$l...@caribe.pdx.oneworld.com...

> so your driver is a 16 bit dll right?
> if so how about OutputDebugString(), or something like that.
> then I think, there is a little app that catches the messages or maybe
they
> go out the serial port.

It's called OX.SYS and allows you to redirect debug output.

Geoff Chappell

unread,
Aug 7, 1999, 3:00:00 AM8/7/99
to
Paul Robertson wrote in message
<933844651.25269.0...@news.demon.co.uk>...
>I can run WDEB386, and set breakpoints etc. but I cant use the trace_out or
>mono_out VMM services.

Well, no, there is no VMM there - but even under enhanced mode, your driver
is presumably at the application level. Oh, are we to infer that your
particular problem involves some ring 0 execution, as for interrupt
handling?

>Another idea I had was to output short strings directly to the debug 16550
>UART (ignoring the fact that WDEB386 is using it).

You do know that there is an INT 41h interface to the debugger, don't you?
Microsoft did document this, starting with Windows 95, so you may as well
use it if all else escapes you.

----
Geoff Chappell
Consulting Software Analyst

email: geo...@ozemail.com.au
web: http://www.ozemail.com.au/~geoffch


0 new messages