aboutsummaryrefslogtreecommitdiffstats
path: root/debug/Dwarfgen.ml
diff options
context:
space:
mode:
Diffstat (limited to 'debug/Dwarfgen.ml')
-rw-r--r--debug/Dwarfgen.ml11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug/Dwarfgen.ml b/debug/Dwarfgen.ml
index 56a318fe..d198a92f 100644
--- a/debug/Dwarfgen.ml
+++ b/debug/Dwarfgen.ml
@@ -475,9 +475,14 @@ module Dwarfgenaux (Target: TARGET) =
let f_id = get_opt_val f.fun_atom in
let acc = match f.fun_return_type with Some s -> acc =<< s | None -> acc in
let f_entry = new_entry id (DW_TAG_subprogram f_tag) in
- let params,acc = mmap (function_parameter_to_entry f_id) acc f.fun_parameter in
- let vars,acc = fun_scope_to_entries f_id acc f.fun_scope in
- add_children f_entry (params@vars),acc
+ let children,acc =
+ if not !Clflags.option_gglobal then
+ let params,acc = mmap (function_parameter_to_entry f_id) acc f.fun_parameter in
+ let vars,acc = fun_scope_to_entries f_id acc f.fun_scope in
+ params@vars,acc
+ else
+ [],acc in
+ add_children f_entry (children),acc
let definition_to_entry acc id t =
match t with