File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff 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>
You can’t perform that action at this time.
0 commit comments