diff options
Diffstat (limited to 'compiler/nativeGen/Dwarf')
-rw-r--r-- | compiler/nativeGen/Dwarf/Constants.hs | 3 | ||||
-rw-r--r-- | compiler/nativeGen/Dwarf/Types.hs | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/compiler/nativeGen/Dwarf/Constants.hs b/compiler/nativeGen/Dwarf/Constants.hs index 4b334fca3d..333d670914 100644 --- a/compiler/nativeGen/Dwarf/Constants.hs +++ b/compiler/nativeGen/Dwarf/Constants.hs @@ -60,13 +60,14 @@ dW_CHILDREN_no = 0 dW_CHILDREN_yes = 1 dW_FORM_addr, dW_FORM_data4, dW_FORM_string, dW_FORM_flag, - dW_FORM_block1, dW_FORM_ref4 :: Word + dW_FORM_block1, dW_FORM_ref4, dW_FORM_flag_present :: Word dW_FORM_addr = 0x01 dW_FORM_data4 = 0x06 dW_FORM_string = 0x08 dW_FORM_flag = 0x0c dW_FORM_block1 = 0x0a dW_FORM_ref4 = 0x13 +dW_FORM_flag_present = 0x19 -- | Dwarf native types dW_ATE_address, dW_ATE_boolean, dW_ATE_float, dW_ATE_signed, diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs index 00d0535a07..f9262b4e83 100644 --- a/compiler/nativeGen/Dwarf/Types.hs +++ b/compiler/nativeGen/Dwarf/Types.hs @@ -66,7 +66,8 @@ pprAbbrev :: DwarfAbbrev -> SDoc pprAbbrev = pprLEBWord . fromIntegral . fromEnum -- | Abbreviation declaration. This explains the binary encoding we --- use for representing @DwarfInfo@. +-- use for representing 'DwarfInfo'. Be aware that this must be updated +-- along with 'pprDwarfInfo'. pprAbbrevDecls :: Bool -> SDoc pprAbbrevDecls haveDebugLine = let mkAbbrev abbr tag chld flds = @@ -76,11 +77,11 @@ pprAbbrevDecls haveDebugLine = in dwarfAbbrevSection $$ ptext dwarfAbbrevLabel <> colon $$ mkAbbrev DwAbbrCompileUnit dW_TAG_compile_unit dW_CHILDREN_yes - ([ (dW_AT_name, dW_FORM_string) + ([(dW_AT_name, dW_FORM_string) , (dW_AT_producer, dW_FORM_string) , (dW_AT_language, dW_FORM_data4) , (dW_AT_comp_dir, dW_FORM_string) - , (dW_AT_use_UTF8, dW_FORM_flag) + , (dW_AT_use_UTF8, dW_FORM_flag_present) -- not represented in body ] ++ (if haveDebugLine then [ (dW_AT_stmt_list, dW_FORM_data4) ] @@ -117,7 +118,6 @@ pprDwarfInfoOpen haveSrc (DwarfCompileUnit _ name producer compDir lineLbl) = $$ pprString producer $$ pprData4 dW_LANG_Haskell $$ pprString compDir - $$ pprFlag True -- use UTF8 $$ if haveSrc then sectionOffset lineLbl dwarfLineLabel else empty |