From 5beeba02f16b2d65cceec5ee5577547ba3547c94 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 8 Apr 2019 17:24:28 +0200 Subject: Print only debug info for printed functions. Functions that are removed from the compilation unit, for example inline functions without extern, should not produce debug information. This commit reuses the mechanism used for variables in order to track additionally the printed functions. Therefore the printed variable versions are exchanged for a printed symbol version. Bug 26234 --- debug/Dwarfgen.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'debug/Dwarfgen.ml') diff --git a/debug/Dwarfgen.ml b/debug/Dwarfgen.ml index de07add1..50063df8 100644 --- a/debug/Dwarfgen.ml +++ b/debug/Dwarfgen.ml @@ -344,7 +344,7 @@ module Dwarfgenaux (Target: TARGET) = let global_variable_to_entry acc id v = let loc = match v.gvar_atom with - | Some a when is_variable_printed (extern_atom a) -> + | Some a when is_symbol_printed (extern_atom a) -> Some (LocSymbol a) | _ -> None in let var = { @@ -529,7 +529,10 @@ module Dwarfgenaux (Target: TARGET) = match t with | GlobalVariable g -> Some (global_variable_to_entry acc id g) | Function f -> + if is_symbol_printed f.fun_name then Some (function_to_entry sec_name acc id f) + else + None end -- cgit