diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-12-26 23:41:04 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-15 03:35:45 -0500 |
commit | 1e19183d08a3312ac2331b8284d17bc17170a51e (patch) | |
tree | a823cc90a072513d725b1f237b87d5451fe89023 /compiler/GHC/CmmToAsm.hs | |
parent | 0a7e592cb1883824a14639372ba284766849ff3a (diff) | |
download | haskell-1e19183d08a3312ac2331b8284d17bc17170a51e.tar.gz |
nativeGen/dwarf: Only produce DW_AT_source_note DIEs in -g3
Standard debugging tools don't know how to understand these so let's not
produce them unless asked.
Diffstat (limited to 'compiler/GHC/CmmToAsm.hs')
-rw-r--r-- | compiler/GHC/CmmToAsm.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs index 223eb33fb5..013ad24554 100644 --- a/compiler/GHC/CmmToAsm.hs +++ b/compiler/GHC/CmmToAsm.hs @@ -1187,9 +1187,10 @@ initNCGConfig dflags this_mod = NCGConfig ArchX86 -> v _ -> Nothing - , ncgDwarfEnabled = debugLevel dflags > 0 + , ncgDwarfEnabled = debugLevel dflags > 0 , ncgDwarfUnwindings = debugLevel dflags >= 1 - , ncgDwarfStripBlockInfo = debugLevel dflags < 2 -- We strip out block information when running with -g0 or -g1. , ncgExposeInternalSymbols = gopt Opt_ExposeInternalSymbols dflags + , ncgDwarfStripBlockInfo = debugLevel dflags < 2 -- We strip out block information when running with -g0 or -g1. + , ncgDwarfSourceNotes = debugLevel dflags >= 3 -- We produce GHC-specific source-note DIEs only with -g3 } |