From 8c1b59808e9ee9888a846de2e3ff111628863f28 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 10 Nov 2015 17:39:02 +0100 Subject: Do not enforce locations for function parameters. In the case of struct function parameters it is not always guaranteed that they are still there and not translated into plain integer arguments. Bug 17609. --- debug/Dwarfgen.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debug') diff --git a/debug/Dwarfgen.ml b/debug/Dwarfgen.ml index f62fac26..7addaba3 100644 --- a/debug/Dwarfgen.ml +++ b/debug/Dwarfgen.ml @@ -384,7 +384,9 @@ module Dwarfgenaux (Target: TARGET) = with Not_found -> None,[] let function_parameter_to_entry f_id acc p = - let loc,loc_list = location_entry f_id (get_opt_val p.parameter_atom) in + let loc,loc_list = match p.parameter_atom with + | None -> None,[] + | Some p -> location_entry f_id p in let p = { formal_parameter_artificial = None; formal_parameter_name = name_opt p.parameter_name; -- cgit