Persistent Sessions
If you want to interrupt your current DDD session, you can save the entire the entire DDD state as Illegal HTML tag removed : session on disk and resume later.
- Saving Sessions:
- Resuming Sessions:
- Deleting Sessions:
- Customizing Sessions:
Node:Saving Sessions, Next:Resuming Sessions, Up:Sessions
Saving Sessions
To save a session, select File => Save Session As
. You will be asked for a symbolic session name Illegal HTML tag removed : session.
If your program is running (see Running), or if you have opened a core file (see Opening Core Dumps), DDD can also include a core file in the session such that the debuggee data will be restored when re-opening it. To get a core file, DDD typically must Illegal HTML tag removed : kill the debuggee. This means that you cannot resume program execution after saving a session. Depending on your architecture, other options for getting a core file may also be available.
Including a core dump is necessary for restoring memory contents and the current execution position. To include a core dump, enable Include Core Dump
.
After clicking on Save
, the session is saved in ~/.ddd/sessions/
Illegal HTML tag removed : session.
Here's a list of the items whose state is saved in a session:
- The state of the debugged program, as a core file.5
- All breakpoints and watchpoints (see Stopping).
- All signal settings (see Signals).
- All displays (see Displaying Values).6
- All DDD options (see Saving Options).
- All debugger settings (see Debugger Settings).
- All user-defined buttons (see Defining Buttons).
- All user-defined commands (see Defining Commands).
- The positions and sizes of DDD windows.
- The command history (see Command History).
After saving the current state as a session, the session becomes Illegal HTML tag removed : active. This means that DDD state will be saved as session defaults:
User options will be saved in
~/.ddd/sessions/
Illegal HTML tag removed : session
/init
instead of~/.ddd/init
. See Saving Options, for details.The DDD command history will be saved in
~/.ddd/sessions/
Illegal HTML tag removed : session
/history
instead of~/.ddd/history
. See Command History, for details.
To make the current session inactive, open the default session named [None]
. See Resuming Sessions, for details on opening sessions.
Node:Resuming Sessions, Next:Deleting Sessions, Previous:Saving Sessions, Up:Sessions
Resuming Sessions
To resume a previously saved session, select File => Open Session
and choose a session name from the list. After clicking on Open
, the entire DDD state will be restored from the given session.
The session named [None]
is the Illegal HTML tag removed : default session which is active when starting DDD. To save options for default sessions, choose the default session before exiting DDD. See Saving Options, for details.
If a the restored session includes a core dump, the program being debugged will be in the same state at the time the session was saved; in particular, you can examine the program data. However, you will not be able to resume program execution since the process and its environment (open files, resources, etc.) no longer exist. However, you can restart the program, re-using the restored breakpoints and data displays.
Opening sessions also restores command definitions, buttons, display shortcuts and the source tab width. This way, you can maintain a different set of definitions for each session.
You can also specify a session to open when starting DDD. To invoke DDD with a session Illegal HTML tag removed : session, use
ddd --session **Illegal HTML tag removed :** session
There is also a shortcut that opens the session Illegal HTML tag removed : session and invokes the inferior debugger on an executable named Illegal HTML tag removed : session (in case Illegal HTML tag removed : session cannot be opened):
ddd = **Illegal HTML tag removed :** session
There is no need to give further command-line options when restarting a session, as they will be overridden by the options saved in the session.
You can also use an X session manager such as xsm
to save and restore DDD sessions.7 When being shut down by a session manager, DDD saves its state under the name specified by the session manager; resuming the X session makes DDD reload its saved state.
Node:Deleting Sessions, Next:Customizing Sessions, Previous:Resuming Sessions, Up:Sessions
Deleting Sessions
To delete sessions that are no longer needed, select File => Open Session
or File => Save Session
. Select the sessions you want to delete and click on Delete
.
The default session [None]
cannot be deleted.
Node:Customizing Sessions, Previous:Deleting Sessions, Up:Sessions
Customizing Sessions
You can change the place where DDD saves its sessions by setting the environment variable DDD_SESSIONS
to the name of a directory. Default is ~/.ddd/sessions/
.
Where applicable, DDD supports a gcore
command to obtain core files of the running program. You can enter its path via Edit => Preferences => Helpers => Get Core File
. Leave the value empty if you have no gcore
or similar command.
This setting is tied to the following resource (see Customizing):
getCoreCommand(class GetCoreCommand) | Resource |
---|---|
Leave the value empty if you have no gcore or similar command. |
---|
Node:Remote Debugging, Next:Customizing Debugger Interaction, Previous:Sessions, Up:Invocation