File tree 1 file changed +17
-4
lines changed
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1415,10 +1415,23 @@ su - postgres
1415
1415
1416
1416
<note>
1417
1417
<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</>.
1422
1435
</para>
1423
1436
</note>
1424
1437
</step>
You can’t perform that action at this time.
0 commit comments