From ad96cf758bd44cba968f01ed8c72c8b4f31216f0 Mon Sep 17 00:00:00 2001 From: nickysn Date: Fri, 25 May 2018 20:03:15 +0000 Subject: [PATCH] + emit a DW_AT_address_class dwarf attribute on i8086 for procdefs, indicating their call model (near or far) git-svn-id: trunk@39120 - --- compiler/dbgdwarf.pas | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/dbgdwarf.pas b/compiler/dbgdwarf.pas index 0bc9cf4b0c..58a1c44bd3 100644 --- a/compiler/dbgdwarf.pas +++ b/compiler/dbgdwarf.pas @@ -2307,6 +2307,13 @@ implementation cc:=dwarf_calling_convention(def); if (cc<>DW_CC_normal) then append_attribute(DW_AT_calling_convention,DW_FORM_data1,[ord(cc)]); +{$ifdef i8086} + { Call model (near or far). Open Watcom compatible. } + if tcpuprocdef(def).is_far then + append_attribute(DW_AT_address_class,DW_FORM_data1,[DW_ADDR_far16]) + else + append_attribute(DW_AT_address_class,DW_FORM_data1,[DW_ADDR_none]); +{$endif i8086} { Externally visible. } if (po_global in def.procoptions) and (def.parast.symtablelevel<=normal_function_level) then