Getting Diagnostics
- Logging: DDD logs all interactions.
- Debugging DDD: Facilities to debug DDD.
- Customizing Diagnostics: All diagnostics resources.
Node:Logging, Next:Debugging DDD, Up:Diagnostics</small>
Logging
If things go wrong, the first and most important information source is the DDDIllegal HTML tag removed : log file. This file, created in ~/.ddd/log (~ stands for your home directory), records the following information:
- Your DDD configuration (at the top)
All programs invoked by DDD, shown as
$Illegal HTML tag removed : program
Illegal HTML tag removed : args
Illegal HTML tag removed : ...
All DDD messages, shown as
#Illegal HTML tag removed : message
.
All information sent from DDD to the inferior debugger, shown as
->Illegal HTML tag removed : text
.
All information sent from the inferior debugger standard output to DDD, shown as
<-Illegal HTML tag removed : text
.
All information sent from the inferior debugger standard error to DDD, shown as
<=Illegal HTML tag removed : text
.33
All information sent from DDD to Gnuplot, shown as
>>Illegal HTML tag removed : text
.
All information sent from Gnuplot standard output to DDD, shown as
<<Illegal HTML tag removed : text
.
All information sent from Gnuplot standard error to DDD, shown as
<=Illegal HTML tag removed : text
.
- If DDD crashes, a GDB backtrace of the DDD core dump is included at the end.
This information, all in one place, should give you (and anyone maintaining DDD) a first insight of what's going wrong.
- Disabling Logging:
Node:Disabling Logging, Up:Logging
Disabling Logging
The log files created by DDD can become quite large, so you might want to turn off logging. There is no explicit DDD feature that allows you to do that. However, you can easily create a symbolic link from ~/.ddd/log to /dev/null, such that logging information is lost. Enter the following commands at the shell prompt:
$
**Illegal HTML tag removed :** cd
$
**Illegal HTML tag removed :** rm .ddd/log
$
**Illegal HTML tag removed :** ln -s /dev/null .ddd/log
$ _
Be aware, though, that having logging turned off makes diagnostics much more difficult; in case of trouble, it may be hard to reproduce the error.
Node:Debugging DDD, Next:Customizing Diagnostics, Previous:Logging, Up:Diagnostics</small>
Debugging DDD
As long as DDD is compiled with -g (see Compiling for Debugging), you can invoke a debugger on DDD--even DDD itself, if you wish. From within DDD, a special Maintenance menu is provided that invokes GDB on the running DDD process. See Maintenance Menu, for details.
The DDD distribution comes with a .gdbinit file that is suitable for debugging DDD. Among others, this defines a ddd command that sets up an environment for debugging DDD and a string command that lets you print the contents of DDD string variables; just use print Illegal HTML tag removed : var followed by string.
You can cause DDD to dump core at any time by sending it a SIGUSR1 signal. DDD resumes execution while you can examine the core file with GDB.
When debugging DDD, it can be useful to make DDD not catch fatal errors. This can be achieved by setting the environment variable DDD_NO_SIGNAL_HANDLERS before invoking DDD.
Node:Customizing Diagnostics, Previous:Debugging DDD, Up:Diagnostics</small>
Customizing Diagnostics
You can use these additional resources to obtain diagnostics about DDD. Most of them are tied to a particular invocation option.
| appDefaultsVersion(class Version) | Resource |
|---|---|
| The version of the DDD app-defaults file. If this string does not match the version of the current DDD executable, DDD issues a warning. |
|---|
| checkConfiguration(class CheckConfiguration) | Resource |
|---|---|
If on, check the DDD environment (in particular, the X configuration), report any possible problem causes and exit. See Options, for the --check-configuration option. |
|---|
| dddinitVersion(class Version) | Resource |
|---|---|
The version of the DDD executable that last wrote the ~/.ddd/init file. If this string does not match the version of the current DDD executable, DDD issues a warning. |
|---|
| debugCoreDumps(class DebugCoreDumps) | Resource |
|---|---|
If on, DDD invokes a debugger on itself when receiving a fatal signal. See Maintenance Menu, for setting this resource. |
|---|
| dumpCore(class DumpCore) | Resource |
|---|---|
If on (default), DDD dumps core when receiving a fatal signal. See Maintenance Menu, for setting this resource. |
|---|
| maintenance(class Maintenance) | Resource |
|---|---|
If on, enables the top-level Maintenance menu (see Maintenance Menu) with additional options. See Options, for the --maintenance option. |
|---|
| showConfiguration(class ShowConfiguration) | Resource |
|---|---|
If on, show the DDD configuration on standard output and exit. See Options, for the --configuration option. |
|---|
| showFonts(class ShowFonts) | Resource |
|---|---|
If on, show the DDD font definitions on standard output and exit. See Options, for the --fonts option. |
|---|
| showInvocation(class ShowInvocation) | Resource |
|---|---|
If on, show the DDD invocation options on standard output and exit. See Options, for the --help option. |
|---|
| showLicense(class ShowLicense) | Resource |
|---|---|
If on, show the DDD license on standard output and exit. See Options, for the --license option. |
|---|
| showManual(class ShowManual) | Resource |
|---|---|
If on, show this DDD manual page on standard output and exit. If the standard output is a terminal, the manual page is shown in a pager ($PAGER, less or more). See Options, for the --manual option. |
|---|
| showNews(class ShowNews) | Resource |
|---|---|
If on, show the DDD news on standard output and exit. See Options, for the --news option. |
|---|
| showVersion(class ShowVersion) | Resource |
|---|---|
If on, show the DDD version on standard output and exit. See Options, for the --version option. |
|---|
| suppressWarnings(class SuppressWarnings) | Resource |
|---|---|
If on, X warnings are suppressed. This is sometimes useful for executables that were built on a machine with a different X or M*tif configuration. By default, this is off. See X Warnings, for details. |
|---|
| trace(class Trace) | Resource |
|---|---|
If on, show the dialog between DDD and the inferior debugger on standard output. Default is off. See Options, for the --trace option. |
|---|
Node:Configuration Notes, Next:Dirty Tricks, Previous:Bugs, Up:Top