on master help sign in
Documents how to include debugging symbols

This documents the possibility of using %flag C "-g" to include debug symbols to improve the backtrace information when debugging runtime errors (i.e. segfaults) of Idris programs with gdb.

commit34da9c53d5d3ed72e5600ba05059de00c57efbd9 authorRob Stewart <robstewart57@gmail.com> dateFri 24 Nov 2017, 14:36 (9 years ago) parent7664753
1 file changed+8
docs/tutorial/miscellany.rst+8
docs/tutorial/miscellany.rst+8
@@ -366,6 +366,14 @@ is shown below :
366366 main = do
367367 putStrLn $ show $ factorial 3
368368
369+To compile the generated C with debugging information e.g. to use
370+``gdb`` to debug segmentation faults in Idris programs, use the
371+``%flag C`` pragma to include debugging symbols, as is shown below :
372+
373+.. code-block:: idris
374+
375+ %flag C "-g"
376+
369377JavaScript Target
370378=================
371379