Skip to content

Commit ef364ea

Browse files
authored
Merge pull request commercialhaskell#5098 from flip111/patch-7
Update GUIDE.md about debugging symbols
2 parents 241a81d + 232673c commit ef364ea

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

doc/GUIDE.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,13 +1819,11 @@ To generate a backtrace in case of exceptions during a test or benchmarks run,
18191819
use the `--trace` flag. Like `--profile` this compiles with profiling options,
18201820
but adds the `+RTS -xc` runtime option.
18211821
1822-
### DWARF
1822+
### Debugging symbols
18231823
1824-
`stack` now supports debugging and profiling with
1825-
[DWARF information](https://ghc.haskell.org/trac/ghc/wiki/DWARF),
1826-
using the `--no-strip`, `--no-library-stripping`, and `--no-executable-stripping`
1827-
flags to disable the default behavior of removing such information from compiled
1828-
libraries and executables.
1824+
Building with debugging symbols in the [DWARF information](https://ghc.haskell.org/trac/ghc/wiki/DWARF) is supported by `stack`. This can be done by passing the flag `--ghc-options="-g"` and also to override the default behaviour of stripping executables of debugging symbols by passing either one of the following flags: `--no-strip`, `--no-library-stripping` or `--no-executable-stripping`.
1825+
1826+
In Windows GDB can be isntalled to debug an executable with `stack exec -- pacman -S gdb`. Windows visual studio compiler's debugging format PDB is not supported at the moment. This might be possible by [separating](https://stackoverflow.com/questions/866721/how-to-generate-gcc-debug-symbol-outside-the-build-target) debugging symbols and [converting](https://github.com/rainers/cv2pdb) their format. Or as an option when [using the LLVM backend](http://blog.llvm.org/2017/08/llvm-on-windows-now-supports-pdb-debug.html).
18291827
18301828
## More resources
18311829

0 commit comments

Comments
 (0)