diff options
Diffstat (limited to 'ortho/mcode/ortho_code-x86-abi.adb')
-rw-r--r-- | ortho/mcode/ortho_code-x86-abi.adb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ortho/mcode/ortho_code-x86-abi.adb b/ortho/mcode/ortho_code-x86-abi.adb index 56c5543..a915f92 100644 --- a/ortho/mcode/ortho_code-x86-abi.adb +++ b/ortho/mcode/ortho_code-x86-abi.adb @@ -87,7 +87,6 @@ package body Ortho_Code.X86.Abi is Mark (Decls_Mark); Consts.Mark (Consts_Mark); Mark (Types_Mark); - Dwarf.Mark (Dwarf_Mark); end if; end Start_Body; @@ -114,6 +113,15 @@ package body Ortho_Code.X86.Abi is Emits.Emit_Subprg (Subprg); + if Get_Decl_Depth (Subprg.D_Decl) = O_Toplevel + and then Flag_Debug = Debug_Dwarf + then + Dwarf.Emit_Decls_Until (Subprg.D_Body); + if not Debug.Flag_Debug_Keep then + Dwarf.Mark (Dwarf_Mark); + end if; + end if; + -- Recurse on nested subprograms. Child := Subprg.First_Child; while Child /= null loop |