/usr/share/doc/gnat-gps/html/The-Debug-Menu.html is in gnat-gps-doc 5.0-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | <html lang="en">
<head>
<title>The Debug Menu - Using the GNAT Programming Studio</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNAT Programming Studio">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Debugging.html#Debugging" title="Debugging">
<link rel="next" href="The-Call-Stack-Window.html#The-Call-Stack-Window" title="The Call Stack Window">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 2002-2010 AdaCore.
This document is free; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see `http://www.gnu.org/licenses/'.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
pre.smallexample {background-color:rgb(240,240,240);
font-family: courier new,courier,fixed;
font-size: 14px;
margin: 0px 40px 0px 40px;
border-width: 1px 2px 2px 1px;
border-top-style: dotted;
border-left-style: dotted;
border-right-style: solid;
border-bottom-style: solid;
border-color: black;}
code {color:black;
font-family: courier new,courier,fixed;
font-size: 14px;}
body {font-family: arial,helvetica,sans-serif;
font-size: 16px;
max-width: 800px;
text-align: justify}
samp {font-family: courier new,courier,fixed;
font-size: 14px}
--></style>
</head>
<body>
<div class="node">
<a name="The-Debug-Menu"></a>
<p>
Next: <a rel="next" accesskey="n" href="The-Call-Stack-Window.html#The-Call-Stack-Window">The Call Stack Window</a>,
Up: <a rel="up" accesskey="u" href="Debugging.html#Debugging">Debugging</a>
<hr>
</div>
<h3 class="section">11.1 The Debug Menu</h3>
<p><a name="index-menu-457"></a><a name="index-debug-458"></a><a name="index-debugger-459"></a><!-- -->
<p class="noindent">The <code>Debug</code> entry in the menu bar provides operations that act at a
global level. Key shortcuts are available for the most common operations, and
are displayed in the menus themselves.
Here is a detailed list of the menu items that can be found in the menu bar:
<dl>
<dt><b>Run...</b><dd><a name="index-run-460"></a>Opens a dialog window allowing you to specify the arguments to pass to the
program to be debugged, and whether this program should be stopped at the
beginning of the main subprogram. If you confirm by clicking on the <i>OK</i>
button, the program will be launched according to the arguments entered.
<br><dt><b>Step</b><dd><a name="index-step-461"></a>Execute the program until it reaches a different source line.
<br><dt><b>Step Instruction</b><dd><a name="index-stepi-462"></a>Execute the program for one machine instruction only.
<br><dt><b>Next</b><dd><a name="index-next-463"></a>Execute the program until it reaches the next source line,
stepping over subroutine calls.
<br><dt><b>Next Instruction</b><dd><a name="index-nexti-464"></a>Execute the program until it reaches the next machine instruction,
stepping over subroutine calls.
<br><dt><b>Finish</b><dd><a name="index-finish-465"></a>Continue execution until selected stack frame returns.
<br><dt><b>Continue</b><dd><a name="index-continue-466"></a>Continue execution of the program being debugged.
<br><dt><b>Interrupt</b><dd><a name="index-interrupt-467"></a>Asynchronously interrupt the program being debugged. Note that depending on
the state of the program, you may stop it in low-level system code that does
not have debug information, or in some cases, not even a coherent state. Use
of breakpoints is preferable to interrupting programs. Interrupting programs
is nevertheless required in some situations, for example when the
program appears to be in an infinite (or at least very time-consuming) loop.
<br><dt><b>Terminate Current</b><dd><a name="index-terminate-468"></a>Terminate the current debug session
by terminating the underlying debugger (e.g <code>gdb</code>) used
to handle the low level debugging. You can control what happens to the
windows through the <code>Debugger/Debugger Windows</code> preference.
<br><dt><b>Terminate</b><dd><a name="index-terminate-469"></a>Terminate all your debug sessions. Same as <code>Terminate Current</code> if there
is only one debugger open.
</dl>
<h4 class="subsection">11.1.1 Debug</h4>
<dl>
<dt><b>Connect to Board...</b><dd><a name="index-connect-470"></a><a name="index-board-471"></a><a name="index-target-472"></a><a name="index-cross-debugger-473"></a>Opens a simple dialog to connect to a remote board. This option is only
relevant to cross debuggers.
<br><dt><b>Load File...</b><dd><a name="index-load-474"></a>
<a name="open-program-menu"></a>Opens a file selection dialog that allows you to choose a program to
debug. The program to debug is either an executable for native debugging, or
a partially linked module for cross environments (e.g VxWorks).
<br><dt><b>Add Symbols...</b><dd><a name="index-add-symbols-475"></a>Add the symbols from a given file/module. This corresponds to the gdb
command <i>add-symbol-file</i>. This menu is particularly useful under VxWorks
targets, where the modules can be loaded independently of the debugger.
For instance, if a module is independently loaded on the target (e.g. using
windshell), it is absolutely required to use this functionality,
otherwise the debugger won't work properly.
<br><dt><b>Attach...</b><dd><a name="index-attach-476"></a>Instead of starting a program to debug, you can instead attach to an
already running process. To do so, you need to specify the process id
of the process you want to debug. The process might be busy in an
infinite loop, or waiting for event processing. Note that as for
<a href="core-files.html#core-files">core files</a>, you need to specify an executable before attaching to a
process.
<br><dt><b>Detach</b><dd><a name="index-detach-477"></a>Detaches the currently debugged process from the underlying debugger.
This means that the executable will continue to run independently. You can use
the <i>Attach To Process</i> menu later to re-attach to this process.
<br><dt><b>Debug Core File...</b><dd><a name="index-core-file-478"></a><a name="core-files"></a>This will open a file selection dialog that allows you to debug a core file
instead of debugging a running process. Note that you must first specify an
executable to debug before loading a core file.
<br><dt><b>Kill</b><dd><a name="index-kill-479"></a>Kills the process being debugged.
</dl>
<h4 class="subsection">11.1.2 Data</h4>
<p><a name="index-menu-480"></a><a name="index-data-481"></a>Note that most items in this menu need to access the underlying debugger
when the process is stopped, not when it is running. This means that you first
need to stop the process on a breakpoint or interrupt it, before using
the following commands. Failing to do so will result in blank windows.
<dl>
<dt><b>Data Window</b><dd> Displays the Data window. If this window already exists, it is raised so
that it becomes visible
<br><dt><b>Call Stack</b><dd><a name="index-call-stack-482"></a> Displays the Call Stack window.
See <a href="The-Call-Stack-Window.html#The-Call-Stack-Window">The Call Stack Window</a> for more details.
<br><dt><b>Threads</b><dd><a name="index-thread-483"></a> Opens a new window containing the list of threads currently present in
the executable as reported by the underlying debugger. For each thread,
it will give information such as internal identifier, name and status.
This information is language- and debugger-dependent. You should refer to
the underlying debugger's documentation for more details.
As indicated above, the process being debugged needs to be stopped
before using this command, otherwise a blank list will be displayed.
<p>When supported by the underlying debugger, clicking on a thread will
change the context (variables, call stack, source file) displayed,
allowing you to inspect the stack of the selected thread.
<br><dt><b>Tasks</b><dd><a name="index-task-484"></a> For GDB only, this will open a new window containing the list of Ada
tasks currently present in the executable. Similarly to the thread
window, you can switch to a selected task context by clicking on it, if
supported by GDB. See the GDB documentation for the list of
items displayed for each task.
<p>As for the thread window, the process being debugged needs to be stopped
before using this window.
<p><a name="index-screen-shot-485"></a><img src="tasks.jpg" alt="tasks.jpg">
<br><dt><b>Protection Domains</b><dd><a name="index-protection-domain-486"></a> For VxWorks AE only, this will open a new window containing the
list of available protection domains in the target. To change to a
different protection domain, simply click on it. A <!-- {*} character -->
indicates the current protection domain.
<br><dt><b>Assembly</b><dd><a name="index-assembly-487"></a> Opens a new window displaying an assembly dump of the current code
being executed.
See <a href="The-Assembly-Window.html#The-Assembly-Window">The Assembly Window</a> for more details.
<br><dt><b>Edit Breakpoints</b><dd><a name="index-breakpoint-488"></a> Opens an advanced window to create and modify any kind of breakpoint,
including watchpoints (see <a href="The-Breakpoint-Editor.html#The-Breakpoint-Editor">The Breakpoint Editor</a>).
For simple breakpoint creation, see the description of the source window.
<br><dt><b>Examine Memory</b><dd><a name="index-memory-view-489"></a> Opens a memory viewer/editor. See <a href="The-Memory-Window.html#The-Memory-Window">The Memory Window</a> for more
details.
<br><dt><b>Command History</b><dd><a name="index-command-490"></a><a name="index-history-491"></a> Opens a dialog with the list of commands executed in the current session.
You can select any number of items in this list and replay the selection
automatically.
<br><dt><b>Display Local Variables</b><dd><a name="index-local-variables-492"></a> Opens an item in the Data Window containing all the local variables
for the current frame.
<br><dt><b>Display Arguments</b><dd><a name="index-arguments-493"></a> Opens an item in the Data Window containing the arguments
for the current frame.
<br><dt><b>Display Registers</b><dd><a name="index-registers-494"></a> Opens an item in the Data Window containing the machine registers
for the current frame.
<br><dt><b>Display Any Expression...</b><dd><a name="index-display-expression-495"></a> Opens a small dialog letting you specify an arbitrary expression
in the Data Window. This expression can be a variable name, or a
more complex expression, following the syntax of the underlying debugger.
See the documentation of e.g gdb for more details on the syntax.
The check button <i>Expression is a subprogram call</i> should be enabled
if the expression is actually a debugger
command (e.g <code>p/x var</code>) or a procedure call in the program being
debugged (e.g <code>call my_proc</code>).
<br><dt><b>Recompute</b><dd><a name="index-recompute-496"></a> Recomputes and refreshes all the items displayed in the Data Window.
</dl>
<!-- -->
</body></html>
|