Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit155e56b

Browse files
committed
Update documentation suggestions for debugging the backend.
Tom Lane, with minor adjustments by me.
1 parentb6f9834 commit155e56b

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

‎doc/src/sgml/installation.sgml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,10 +1415,23 @@ su - postgres
14151415

14161416
<note>
14171417
<para>
1418-
Server developers should consider using the configure options
1419-
<option>--enable-cassert</> and <option>--enable-debug</> to enhance the
1420-
ability to detect and debug server errors. Your debugger might
1421-
also require specific compiler flags to produce useful output.
1418+
When developing code inside the server, it is recommended to
1419+
use the configure options <option>--enable-cassert</> (which
1420+
turns on many run-time error checks) and <option>--enable-debug</>
1421+
(which improves the usefulness of debugging tools).
1422+
</para>
1423+
1424+
<para>
1425+
If using GCC, it is best to build with an optimization level of
1426+
at least <option>-O1</>, because using no optimization
1427+
(<option>-O0</>) disables some important compiler warnings (such
1428+
as the use of uninitialized variables). However, non-zero
1429+
optimization levels can complicate debugging because stepping
1430+
through compiled code will usually not match up one-to-one with
1431+
source code lines. If you get confused while trying to debug
1432+
optimized code, recompile the specific files of interest with
1433+
<option>-O0</>. An easy way to do this is by passing an option
1434+
to <application>make</>: <command>gmake PROFILE=-O0 file.o</>.
14221435
</para>
14231436
</note>
14241437
</step>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp