www.delorie.com/djgpp/v2faq/faq098.html | search |
| Previous | Next | Up | Top |
gdb myprog > prnThis will only work if the program itself doesn't write to stdout (graphics programs usually don't); otherwise the debugger output will get mixed up with your program's output.
Beginning with version 1.1, RHIDE and RHGDB support debugging graphics programs, so upgrade to latest version of RHIDE and use its built-in debugger or the stand-alone RHGDB subset. This support doesn't work for all video modes, but the standard VGA modes and VESA modes are supported.
The FSDB debugger can switch between the application screen and the debugger screen, so you might use it, at a price of working with a low-level debugger. Press Alt-<F5> to switch between the two screens. Stock FSDB as distributed with DJGPP can only do this with text screens, but a modified version of FSDB with graphics support is available that knows about many graphics modes. The same distribution can also be found on the Oulu repository.
As yet another possibility, consider using the MSHELL program which will redirect I/O from any program to the monochrome monitor at the BIOS level, so you can use it even with GDB. MSHELL was written by DJ Delorie and is available from DJ's server. Be sure that you don't have some other TSR installed that catches screen writes and bypasses the BIOS functions, or else MSHELL won't help you. For example, changing the code page (with the DOS CHCP or MODE commands) might do this.
RHIDE also supports dual-monitor systems for debugging, it allows you to use the monochrome monitor for interface with the debugger, while leaving the color screen for your program's display, with no need to swap between them.
If you have any problems with dual-monitor support, in particular with RHIDE, make sure your memory manager doesn't grab the B000
segment for its own purposes. This
region should be available for the mono adapter, or your system might crash when you try using it.
Another way to redirect the output of a program to a monochrome monitor is by using the MDA display driver from BinaryInfosys. It is a true DOS device driver, and so can be opened as a file--handy for sending debug info, for example. This driver is free and is available from BinaryInfosys' home page.
webmaster donations bookstore | delorie software privacy |
Copyright ⌐ 1998 by Eli Zaretskii | Updated Sep 1998 |
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)