[Scottish] debug
Allan Whiteford
allan at whiteford.org.uk
Thu Jan 22 14:45:53 GMT 2004
Huard, Elise - D C&W Consultant wrote:
> Hi,
>
> what would you say are the most useful commands for dbx ?
"help" :).
What commands are useful depends on if you're stepping through code as
it runs or examine a core file. If you're familiar with gdb then a lot
of versions of dbx include the command "gdb on" which allow you to use
gdb style commands such as "bt". "bt" is probably what you think of as
"stack". The intrinsic dbx command might be "whereami", I'm afraid I use
it with a mixture of dbx and gdb commands.
To find an FPE error you probably want to turn the signal handling
functions off, run the code, get a core file. Load the core file, and
find out which line you are on (bt or whereami) - hence which line is
dividing by zero[1].
Thanks,
Allan
[1] Floating point exceptions are always division by zero :).
More information about the Scottish
mailing list