When Things Go Wrong
Here are some things to check when the debugger is not doing what you think
it should:
- If the debugger can't attach to the victim system:
- Ensure your serial cable is a "null modem" cable
(one that connects the transmit data pin of one machine to the receive data
pin of the other).
- Ensure that your serial cable is securely attached
to both the host and victim machines.
- Ensure that you have the serial cable connected to
the correct COMx port that KDB will use on the victim machine and to the
COMx port that you specified with the CAT_MACHINE environment variable on
the host machine.
- Ensure that KDB is installed on the victim machine,
and if necessary, check this by using a terminal emulator from the host
machine before running the debugger. If the terminal emulator is successful,
don't forget to shut it down before invoking the debugger.
- Ensure that your CAT_HOST_BIN_PATH is set correctly.
- Ensure that your CAT_COMMUNICATION_TYPE environment
variable is set to ASYNC_SIGBRK.
- Ensure that you have buffered UARTs on both host
and victim machines if you want to run at baud rates > 19200.
- Ensure that your communication port is enabled if
you use a ThinkPad.
If
the debugger only displays the disassembly listing of your program and not
the source listing:
- Ensure that the program was compiled with the proper
flags to enable source-level debugging. See Compiling
and Linking Your Program.
- Ensure that the executable in the CAT_HOST_BIN_PATH
was not processed by the DBGSTRIP utility. DBGSTRIP makes the executable
smaller by removing the debug information.
- Ensure that your CAT_HOST_SOURCE_PATH is set to reference
your source files.
- Ensure that the modules you want to debug are specified
by the CAT_MODULE_LIST environment variable.
[Back: Helpful Tips and Hints]
[Next: Using the Demo]