aboutsummaryrefslogtreecommitdiffstats
path: root/debug/Dwarfgen.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-10-01 12:19:16 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-10-01 12:19:16 +0200
commiteaf4bab84af4b3db1ca9c6785ed803bbbd61b9a7 (patch)
treef6233fc2272d6495ec22afafd5ef5534ba32df44 /debug/Dwarfgen.ml
parent06a1a35d759dc780e389218b5f78ce3415d4b3cd (diff)
downloadcompcert-kvx-eaf4bab84af4b3db1ca9c6785ed803bbbd61b9a7.tar.gz
compcert-kvx-eaf4bab84af4b3db1ca9c6785ed803bbbd61b9a7.zip
Only print locations for symbols that are present in the assembler.
Diffstat (limited to 'debug/Dwarfgen.ml')
-rw-r--r--debug/Dwarfgen.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/debug/Dwarfgen.ml b/debug/Dwarfgen.ml
index aaf2d53f..8f71d487 100644
--- a/debug/Dwarfgen.ml
+++ b/debug/Dwarfgen.ml
@@ -284,13 +284,17 @@ let gen_types sec needed =
acc) types [])
let global_variable_to_entry sec acc id v =
+ let loc = match v.gvar_atom with
+ | Some a when StringSet.mem (extern_atom a) !printed_vars ->
+ Some (LocSymbol a)
+ | _ -> None in
let var = {
variable_file_loc = translate_file_loc sec v.gvar_file_loc;
variable_declaration = Some v.gvar_declaration;
variable_external = Some v.gvar_external;
variable_name = v.gvar_name;
variable_type = v.gvar_type;
- variable_location = match v.gvar_atom with Some a -> Some (LocSymbol a) | None -> None;
+ variable_location = loc;
} in
new_entry id (DW_TAG_variable var),IntSet.add v.gvar_type acc