This file is indexed.

/usr/share/doc/gnat-gps/html/Solving-Problems.html is in gnat-gps-doc 5.0-16.

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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- 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 2 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/.

A copy of the license is included in the section entitled
"GNU General Public License". -->
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Using the GNAT Programming Studio: Solving Problems</title>

<meta name="description" content="Using the GNAT Programming Studio: Solving Problems">
<meta name="keywords" content="Using the GNAT Programming Studio: Solving Problems">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index-table.html#Index-table" rel="index" title="Index table">
<link href="Environment.html#Environment" rel="up" title="Environment">
<link href="GNU-General-Public-License.html#GNU-General-Public-License" rel="next" title="GNU General Public License">
<link href="Reporting-Suggestions-and-Bugs.html#Reporting-Suggestions-and-Bugs" rel="previous" title="Reporting Suggestions and Bugs">
<style type="text/css">
<!--
   

a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
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 lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Solving-Problems"></a>
<div class="header">
<p>
Previous: <a href="Reporting-Suggestions-and-Bugs.html#Reporting-Suggestions-and-Bugs" accesskey="p" rel="previous">Reporting Suggestions and Bugs</a>, Up: <a href="Environment.html#Environment" accesskey="u" rel="up">Environment</a> &nbsp; [<a href="Index-table.html#Index-table" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Solving-Problems-1"></a>
<h3 class="section">17.6 Solving Problems</h3>
<a name="index-problems"></a>
<a name="index-solving-problems"></a>

<p>This section addresses some common problems that may arise when using or
installing GPS.
</p>
<dl compact="compact">
<dt>&lsquo;<samp>Non-privileged users cannot start GPS</samp>&rsquo;</dt>
<dd><p>Q: I have installed GPS originally as super user, and ran GPS successfully,
but normal users can&rsquo;t.
</p>
<p>A: You should check the permissions of the directory $HOME/.gps and its
subdirectories, they should be owned by the user.
</p>
</dd>
<dt>&lsquo;<samp>GPS crashes whenever I open a source editor</samp>&rsquo;</dt>
<dd><p>This is usually due to font problems. Editing the file
<samp>$HOME/.gps/preferences</samp> and changing the name of the fonts, e.g
changing <i>Courier</i> by <i>Courier Medium</i>, and <i>Helvetica</i> by <i>Sans</i>
should solve the problem.
</p>
</dd>
<dt>&lsquo;<samp>GPS refuses to start the debugger</samp>&rsquo;</dt>
<dd><a name="index-debugger-7"></a>
<p>If GPS cannot properly initialize the debugger (using the menu
<code>Debug-&gt;Initialize</code>), it is usually because the underlying debugger
(gdb) cannot be launched properly. To verify this, try to launch the
&rsquo;gdb&rsquo; command from a shell (i.e outside GPS). If gdb cannot be launched from
a shell, it usually means that you are using a wrong version of gdb
(e.g a version of gdb built for Solaris 8, but run on Solaris 2.6).
</p>
</dd>
<dt>&lsquo;<samp>GPS is frozen during a debugging session</samp>&rsquo;</dt>
<dd><a name="index-debugger-8"></a>
<p>If GPS is no longer responding while debugging an application you should
first wait a little bit, since some communications between GPS and gdb
can take a long time to finish. If GPS is still not responding after a
few minutes, you can usually get the control back in GPS by either typing
<tt class="key">Ctrl-C</tt> in the shell where you&rsquo;ve started GPS: this should unblock it;
if it does not work, you can kill the gdb process launched by GPS using the
<code>ps</code> and <code>kill</code>, or the <code>top</code> command under Unix,
<a name="index-Unix-1"></a>
<a name="index-Windows-6"></a>
and the <code>Task Manager</code> under Windows: this will terminate your debugging
session, and will unblock GPS.
</p>
</dd>
<dt>&lsquo;<samp>My Ada program fails during elaboration. How can I debug it ?</samp>&rsquo;</dt>
<dd><a name="index-_002dg"></a>
<a name="index-gnatmake"></a>
<p>If your program was compiled with GNAT, the main program is
generated by the binder. This program is an ordinary Ada (or C if the
<samp>-C</samp> switch was used) program, compiled in the usual manner,
and fully debuggable provided that the <samp>-g</samp> switch is used on
the <code>gnatlink</code> command (or <samp>-g</samp> is used in the
<code>gnatmake</code> command itself).
</p>
<p>The name of this package containing the main program is
<samp>b~xxx.ads/adb</samp> where xxx is the name of the Ada main unit given
in the gnatbind command, and you can edit and debug this file in the
normal manner. You will see a series of calls to the elaboration
routines of the packages, and you can debug these in the usual manner,
just as if you were debugging code in your application.
</p>
</dd>
<dt>&lsquo;<samp>How can I debug the Ada run-time library ?</samp>&rsquo;</dt>
<dd><p>The run time distributed in binary versions of GNAT hasn&rsquo;t been
compiled with debug information. Thus, it needs to be recompiled
before you can actually debug it.
</p>
<p>The simplest is to recompile your application by adding the switches
<samp>-a</samp> and <samp>-f</samp> to the <code>gnatmake</code> command
line. This extra step is then no longer required, assuming that you
keep the generated object and ali files corresponding to the GNAT run time
available.
</p>
<p>Another possibility on Unix systems is to use the file <samp>Makefile.adalib</samp>
that can be found in the adalib directory of your GNAT installation and
specify e.g <samp>-g -O2</samp> for the <samp>CFLAGS</samp> switches.
</p>
</dd>
<dt>&lsquo;<samp>The GPS main window is not displayed</samp>&rsquo;</dt>
<dd><p>If when launching GPS, nothing happens, you can try to rename the <samp>.gps</samp>
directory (see <a href="Files.html#Files">Files</a>) to start from a fresh set up.
</p>
</dd>
<dt>&lsquo;<samp>My project have several files with the same name. How can I import it in GPS?</samp>&rsquo;</dt>
<dd><p>GPS&rsquo;s projects do not allow implicit overriding of sources file, i.e.
you cannot have multiple times the same file name in the project
hierarchy. The reason is that GPS needs to know exactly where the file
is, and cannot reliably guess which occurrence to use.
</p>
<p>There are several solutions to handle this issue:
</p>
<ul>
<li> Put all duplicate files in the same project

<p>There is one specific case where a project is allowed to have duplicate source
files: if the list of source directories is specified explicitly. All
duplicate files must be in the same project. With these conditions, there is
no ambiguity for GPS and the GNAT tools which file to use, and the first
file found on the source path is the one hiding all the others. GPS only
shows the first file.
</p>
<p>You can then have a scenario variable that changes the order of source
directories to give visibility on one of the other duplicate files.
</p>
</li><li> Use scenario variables in the project

<p>The idea is that you define various scenarios in your project (For
instance compiling in &quot;debug&quot; mode or &quot;production&quot; mode), and change
the source directories depending on this setup.  Such projects can be
edited directly from GPS (in the project properties editor, this is
the right part of the window, as described in this documentation). On
top of the project view (left part of the GPS main window), you
have a combo box displayed for each of the variable, allowing a simple
switch between scenarios depending on what you want to build.
</p>
</li><li> Use extending projects

<p>These projects cannot currently be created through GPS, so you will
need to edit them by hand. See the GNAT user&rsquo;s guide for more
information on extending projects.
</p>
<p>The idea behind this approach is that you can have a local overriding of some
source files from the common build/source setup (if you are working
on a small part of the whole system, you may not want to have a complete
copy of the code on your local machine).
</p>
</li></ul>

</dd>
<dt>&lsquo;<samp>GPS is very slow compared to previous versions under unix (GPS &lt; 4.0.0)</samp>&rsquo;</dt>
<dd>
<p>GPS versions 4.x need the X RENDER extension when running under unix
systems to perform at a reasonable speed, so you need to make sure your X
server properly supports this extension.
</p>
</dd>
<dt>&lsquo;<samp>Using the space key brings the smart completion window under Ubuntu</samp>&rsquo;</dt>
<dd>
<p>This is specific to the way GNOME is configured on Ubuntu distributions.
To address this incompatibility, close GPS, then go to the GNOME menu
<i>System-&gt;Preferences-&gt;Keyboard</i> (or launch
<code>gnome-keyboard-properties</code>).
</p>
<p>Select the <i>Layout</i> tab, click on <i>Layout Options</i>. Then click twice
on <i>Using space key to input non-breakable space character</i> and then
select <i>Usual space at any level</i> and then close the dialogs.
</p>
</dd>
</dl>

<hr>
<div class="header">
<p>
Previous: <a href="Reporting-Suggestions-and-Bugs.html#Reporting-Suggestions-and-Bugs" accesskey="p" rel="previous">Reporting Suggestions and Bugs</a>, Up: <a href="Environment.html#Environment" accesskey="u" rel="up">Environment</a> &nbsp; [<a href="Index-table.html#Index-table" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>