delorie.com/djgpp/faq/crashes/redirect.html
|
search
|
I want to read all the error messages that gcc throws on me, but
they are so many that I can't keep up. How can I redirect them
to a file?
When I add ``-v'' to the gcc command line, how can I put all the
voluminous output into a file, so I don't miss anything when
reporting a problem?
I have this nitty-gritty graphics program which bombs from time
to time, but the registers and traceback info is hidden by the
graphics display. How can I see it?
There are several alternatives:
- You can put 2r1 into your
GO32 environment variable, which will redirect stderr to stdout,
and redirect stdout to a file by appending ``> file'' to
your command line.
- You can use a shell smarter then command.com, such as
4dos, which knows how to redirect standard error stream to a
file. 4dos is shareware and can be found, e.g., on SimTel
mirrors.
- You can add ``core file'' to your GO32 environment variable, to have
your traceback written to the named file. This only works for the
exception traceback redirection (useful when running graphics
applications).
- You can run your program under any one of the programs which save
the output of programs they spawn in a file. I suggest using a
program called script, which is similar to its Unix namesake.
It has an advantage of saving everything which goes to screen AND
showing it on the screen at the same time. script can be
found on SimTel mirrors as script11.zip (e.g.,
oak.oakland.edu:/SimTel/msdos/screen/script11.zip).