Load and Save Breakpoints for Executables in Read-Only Directories
By default, TotalView saves and loads breakpoints to a file named <executable>.TVD.v4breakpoints, located in the same directory as the <executable> file. For example, if you're debugging an executable named a.out in your $HOME directory, the breakpoint file is saved as $HOME/a.out.TVD.v4breakpoints. However, if the directory containing the executable is read-only, TotalView cannot write the breakpoint file.
To work around this problem, you can configure TotalView to automatically load and save breakpoint files using a directory where you have read and write permissions.
When loading a program, TotalView also searches for a saved breakpoint file in the directories listed in the EXECUTABLE_PATH state variable. If it finds a matching file, it loads the breakpoints from that file. Later, when breakpoints are saved, they are written back to the same file.
The following procedure is an example of how to configure TotalView to automatically load and save breakpoints for a Python executable named /bin/python3.
To configure TotalView to automatically load and save breakpoints:
-
Create a directory for the TotalView saved breakpoint files. This can be any directory name and location that you want. For example:
% mkdir $HOME/saved-breakpoints. -
Set the EXECUTABLE_PATH state variable to include the directory name by using one of the following methods:
-
New Modern UI: Select File > Preferences > SEARCH PATH and add the saved breakpoint directory name to the list.
-
Classic UI: Select File > Search Path... >EXECUTABLE_PATH and add the saved breakpoint directory name to the list.
-
CLI or TotalView Startup File (e.g.,
$HOME/.tvdrc): Add the following line to set the EXECUTABLE_PATH state variable to the saved breakpoint directory name:dset EXECUTABLE_PATH {$HOME/saved-breakpoints}
Environment variables (such as$HOME) are allowed in the search path strings, and are expanded when the path is searched. -
-
Start TotalView on the executable. For example
% totalview python3. -
Save a breakpoint file to the saved breakpoint directory by using one of the following methods:
-
New Modern UI: Select Action Points > Save As..., navigate to the saved breakpoint directory, and type the name of the saved breakpoint file. For example,
python3.TVD.v4breakpoints. -
Classic UI: Select Action Point > Save As..., navigate to the saved breakpoint directory, and type the name of the saved breakpoint file. For example,
python3.TVD.v4breakpoints. -
CLI: Issue the following command:
dactions -save $env(HOME)/saved‑breakpoints/python3.TVD.v4breakpoints
-
In this example, after completing the above configuration, when TotalView starts up on "python3", it will load and save the breakpoints to the python3.TVD.v4breakpoints file in the saved breakpoint directory.