From 24b4159b6a29328c529e0e59405e03ea192aa99e Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 16 Oct 2015 13:06:09 +0200 Subject: Implemented the usage of DW_AT_ranges for non-contiguous address ranges. The gcc produces DW_AT_ranges for non-contiguous address ranges, like compilation units containing functions which are placed in different ELF-sections or lexical scopes that are split up. With this commit CompCert also uses this DWARF v3 feature for gnu backend based targets. In order to ensure backward compability a flag is added which avoids this and produces debug info in DWARF v2 format. Bug 17392. --- ia32/TargetPrinter.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ia32') diff --git a/ia32/TargetPrinter.ml b/ia32/TargetPrinter.ml index e9238a99..e38fa1db 100644 --- a/ia32/TargetPrinter.ml +++ b/ia32/TargetPrinter.ml @@ -106,6 +106,7 @@ module Cygwin_System : SYSTEM = | Section_debug_loc -> ".section .debug_loc,\"dr\"" | Section_debug_line _ -> ".section .debug_line,\"dr\"" | Section_debug_abbrev -> ".section .debug_abbrev,\"dr\"" + | Section_debug_abbrev -> ".section .debug_ranges,\"dr\"" | Section_debug_str-> assert false (* Should not be used *) let stack_alignment = 8 (* minimum is 4, 8 is better for perfs *) @@ -158,6 +159,7 @@ module ELF_System : SYSTEM = | Section_debug_loc -> ".section .debug_loc,\"\",@progbits" | Section_debug_line _ -> ".section .debug_line,\"\",@progbits" | Section_debug_abbrev -> ".section .debug_abbrev,\"\",@progbits" + | Section_debug_ranges -> ".section .debug_ranges,\"\",@progbits" | Section_debug_str -> ".section .debug_str,\"MS\",@progbits,1" let stack_alignment = 8 (* minimum is 4, 8 is better for perfs *) @@ -213,7 +215,8 @@ module MacOS_System : SYSTEM = | Section_debug_loc -> ".section __DWARF,__debug_loc,regular,debug" | Section_debug_line _ -> ".section __DWARF,__debug_line,regular,debug" | Section_debug_str -> ".section __DWARF,__debug_str,regular,debug" - | Section_debug_abbrev -> ".section __DWARF,__debug_abbrev,regular,debug" (* Dummy value *) + | Section_debug_abbrev -> ".section __DWARF,__debug_ranges,regular,debug" + | Section_debug_abbrev -> ".section __DWARF,__debug_abbrev,regular,debug" let stack_alignment = 16 (* mandatory *) -- cgit