This file is indexed.

/usr/share/doc/gnat-gps/html/Solving-Problems.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
<html lang="en">
<head>
<title>Solving Problems - 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="Environment.html#Environment" title="Environment">
<link rel="prev" href="Reporting-Suggestions-and-Bugs.html#Reporting-Suggestions-and-Bugs" title="Reporting Suggestions and Bugs">
<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="Solving-Problems"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Reporting-Suggestions-and-Bugs.html#Reporting-Suggestions-and-Bugs">Reporting Suggestions and Bugs</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Environment.html#Environment">Environment</a>
<hr>
</div>

<h3 class="section">17.6 Solving Problems</h3>

<p><a name="index-problems-950"></a><a name="index-solving-problems-951"></a><!--  -->

<p class="noindent">This section addresses some common problems that may arise when using or
installing GPS.

     <dl>
<dt>&lsquo;<samp><span class="samp">Non-privileged users cannot start GPS</span></samp>&rsquo;<dd>Q: I have installed GPS originally as super user, and ran GPS successfully,
but normal users can't.

     <p>A: You should check the permissions of the directory $HOME/.gps and its
subdirectories, they should be owned by the user.

     <br><dt>&lsquo;<samp><span class="samp">GPS crashes whenever I open a source editor</span></samp>&rsquo;<dd>This is usually due to font problems. Editing the file
<samp><span class="file">$HOME/.gps/preferences</span></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.

     <br><dt>&lsquo;<samp><span class="samp">GPS refuses to start the debugger</span></samp>&rsquo;<dd><a name="index-debugger-952"></a>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
'gdb' 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).

     <br><dt>&lsquo;<samp><span class="samp">GPS is frozen during a debugging session</span></samp>&rsquo;<dd><a name="index-debugger-953"></a>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
&lt;Ctrl-C&gt; in the shell where you'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-954"></a><a name="index-Windows-955"></a>and the <code>Task Manager</code> under Windows: this will terminate your debugging
session, and will unblock GPS.

     <br><dt>&lsquo;<samp><span class="samp">My Ada program fails during elaboration. How can I debug it ?</span></samp>&rsquo;<dd><a name="index-g_t_002dg-956"></a><a name="index-gnatmake-957"></a>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><span class="option">-C</span></samp> switch was used) program, compiled in the usual manner,
and fully debuggable provided that the <samp><span class="option">-g</span></samp> switch is used on
the <samp><span class="command">gnatlink</span></samp> command (or <samp><span class="option">-g</span></samp> is used in the
<samp><span class="command">gnatmake</span></samp> command itself).

     <p>The name of this package containing the main program is
<samp><span class="file">b~xxx.ads/adb</span></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.

     <br><dt>&lsquo;<samp><span class="samp">How can I debug the Ada run-time library ?</span></samp>&rsquo;<dd>The run time distributed in binary versions of GNAT hasn't been
compiled with debug information. Thus, it needs to be recompiled
before you can actually debug it.

     <p>The simplest is to recompile your application by adding the switches
<samp><span class="option">-a</span></samp> and <samp><span class="option">-f</span></samp> to the <samp><span class="command">gnatmake</span></samp> 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>Another possibility on Unix systems is to use the file <samp><span class="file">Makefile.adalib</span></samp>
that can be found in the adalib directory of your GNAT installation and
specify e.g <samp><span class="option">-g -O2</span></samp> for the <samp><span class="option">CFLAGS</span></samp> switches.

     <br><dt>&lsquo;<samp><span class="samp">The GPS main window is not displayed</span></samp>&rsquo;<dd>If when launching GPS, nothing happens, you can try to rename the <samp><span class="file">.gps</span></samp>
directory (see <a href="Files.html#Files">Files</a>) to start from a fresh set up.

     <br><dt>&lsquo;<samp><span class="samp">My project have several files with the same name. How can I import it in GPS?</span></samp>&rsquo;<dd>GPS'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>There are several solutions to handle this issue:

          <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>You can then have a scenario variable that changes the order of source
directories to give visibility on one of the other duplicate files.

          <li>Use scenario variables in the project

          <p>The idea is that you define various scenarios in your project (For
instance compiling in "debug" mode or "production" 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.

          <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's guide for more
information on extending projects.

          <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).

     </ul>

     <br><dt>&lsquo;<samp><span class="samp">GPS is very slow compared to previous versions under unix (GPS &lt; 4.0.0)</span></samp>&rsquo;<dd>
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.

     <br><dt>&lsquo;<samp><span class="samp">Using the space key brings the smart completion window under Ubuntu</span></samp>&rsquo;<dd>
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
<samp><span class="command">gnome-keyboard-properties</span></samp>).

     <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.

   </dl>

<!-- ********************************** -->
<!-- * GNU Free Documentation License * -->
<!-- ********************************** -->
   </body></html>