aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-06-24 12:19:36 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-09-20 12:31:33 +0000
commitaaddaf82ede448cc67e279ad5585eb313a2bef19 (patch)
tree79945993eefcbb3ea6d329f7a01830fba8720b80 /gcc/ada/adaint.c
parent7a8e133af28f8039740d09c650f0eca0a03113f6 (diff)
downloadgcc-aaddaf82ede448cc67e279ad5585eb313a2bef19.zip
gcc-aaddaf82ede448cc67e279ad5585eb313a2bef19.tar.gz
gcc-aaddaf82ede448cc67e279ad5585eb313a2bef19.tar.bz2
[Ada] Add support for PE-COFF PIE to System.Dwarf_Line
gcc/ada/ * adaint.c (__gnat_get_executable_load_address): Add Win32 support. * libgnat/s-objrea.ads (Get_Xcode_Bounds): Fix typo in comment. (Object_File): Minor reformatting. (ELF_Object_File): Uncomment predicate. (PECOFF_Object_File): Likewise. (XCOFF32_Object_File): Likewise. * libgnat/s-objrea.adb: Minor reformatting throughout. (Get_Load_Address): Implement for PE-COFF. * libgnat/s-dwalin.ads: Remove clause for System.Storage_Elements and use consistent wording in comments. (Dwarf_Context): Set type of Low, High and Load_Address to Address. * libgnat/s-dwalin.adb (Get_Load_Displacement): New function. (Is_Inside): Call Get_Load_Displacement. (Low_Address): Likewise. (Open): Adjust to type change. (Aranges_Lookup): Change type of Addr to Address. (Read_Aranges_Entry): Likewise for Start and adjust. (Enable_Cach): Adjust to type change. (Symbolic_Address): Change type of Addr to Address. (Symbolic_Traceback): Call Get_Load_Displacement.
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r--gcc/ada/adaint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 06a4895..d4445f0 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -3542,6 +3542,9 @@ __gnat_get_executable_load_address (void)
return (const void *)map->l_addr;
+#elif defined (_WIN32)
+ return GetModuleHandle (NULL);
+
#else
return NULL;
#endif