Attaching to a Running Process
If the debugged program is already running in some process, you can Illegal HTML tag removed : attach to this process (instead of starting a new one with Run
).22
To attach DDD to a process, select File => Attach to Process
. You can now choose from a list of processes. Then, press the Attach
button to attach to the specified process.
The first thing DDD does after arranging to debug the specified process is to stop it. You can examine and modify an attached process with all the DDD commands that are ordinarily available when you start processes with Run
. You can insert breakpoints; you can step and continue; you can modify storage. If you would rather the process continue running, you may use Continue
after attaching DDD to the process.
When using Attach to Process
, you should first use Open Program
to specify the program running in the process and load its symbol table.
When you have finished debugging the attached process, you can use the File => Detach Process
to release it from DDD control. Detaching the process continues its execution. After Detach Process
, that process and DDD become completely independent once more, and you are ready to attach another process or start one with Run
.
You can customize the list of processes shown by defining an alternate command to list processes. See Edit => Preferences => Helpers => List Processes
; See Customizing Attaching to Processes, for details.
- Customizing Attaching to Processes:
Node:Customizing Attaching to Processes, Up:Attaching to a Process
Customizing Attaching to Processes
When attaching to a process (see Attaching to a Process), DDD uses a ps
command to get the list of processes. This command is defined by the psCommand
resource.
psCommand(class PsCommand) | Resource |
---|---|
Note that the output of this command is filtered by DDD; a process is only shown if it can be attached to. The DDD process itself as well as the process of the inferior debugger are suppressed, too. |
---|
Node:Program Stop, Next:Resuming Execution, Previous:Attaching to a Process, Up:Running