Mail Archives: djgpp/1998/04/03/23:23:24
Noam Rotem wrote:
>
> Nate Eldredge wrote:
>
> > *When* the program crashes (by
> > doing something illegal), a register dump and stack traceback is printed to
> > help you debug it. The `symify' program can help make those numbers more
> > meaningful.
>
> Where can I find this 'symify'? Should I add something to the linking process in
> order to preserve the symbolic tables?
Symify comes with DJGPP (specifically, in djdev201.zip); it should be in
your 'bin' directory. To use it properly, you should add the '-g' flag
to the compiler command line; this adds full debugging symbol
information. Note that this must be done at compilation; the linker is
not capable of generating symbol tables. By default it leaves debugging
information in the final executable; with the '-s' option it will remove
such information.
When a program crashes, you must run "symify program.exe" while the
traceback remains on the screen. If you saved the traceback to disk
(perhaps by redirecting stderr), use "symify -i traceback-file
program.exe". This is useful for debugging graphics programs that crash
while not in text mode. To have symify save the "symified" traceback to
a file, use "symify -o output-file program.exe". This file could then
be posted here if you can't figure out your problem from its contents.
My standard compilation options for C and C++ programs are '-Wall',
'-O', and '-g'. Together, this produces maximum warnings and optimized
code with full debugging information.
--
---------------------------------------------------------------------
| John M. Aldrich | "A committee is a life form with six |
| aka Fighteer I | or more legs and no brain." |
| mailto:fighteer AT cs DOT com | |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -