aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-23 19:45:44 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-23 19:45:44 +0200
commitdccd211b1be1fd80f3804b0586286566c874d523 (patch)
tree3299ea8995c2cbe55cdc760301cadc9960d87e42 /debug
parentb448fbba97c1008599610d0c9bc834881b9dc219 (diff)
downloadcompcert-kvx-dccd211b1be1fd80f3804b0586286566c874d523.tar.gz
compcert-kvx-dccd211b1be1fd80f3804b0586286566c874d523.zip
Also convert the fun stamp + scope id to debug id Hashtable in an
atom + scope id Hashtable.
Diffstat (limited to 'debug')
-rw-r--r--debug/DebugInformation.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml
index ef8993ea..80d71dfd 100644
--- a/debug/DebugInformation.ml
+++ b/debug/DebugInformation.ml
@@ -439,7 +439,7 @@ let atom_to_local: (atom, int) Hashtbl.t = Hashtbl.create 7
let scope_to_local: (int * int,int) Hashtbl.t = Hashtbl.create 7
(* Map from scope id + function atom to debug id *)
-let atom_to_scope: (atom, int) Hashtbl.t = Hashtbl.create 7
+let atom_to_scope: (atom * int, int) Hashtbl.t = Hashtbl.create 7
let find_lvar_stamp id =
let id = (Hashtbl.find stamp_to_local id) in
@@ -599,9 +599,11 @@ let atom_global_variable id atom =
let atom_function id atom =
try
- let id,f = find_fun_stamp id.stamp in
- replace_fun id ({f with fun_atom = Some atom;});
- Hashtbl.add atom_to_definition atom id
+ let id',f = find_fun_stamp id.stamp in
+ replace_fun id' ({f with fun_atom = Some atom;});
+ Hashtbl.add atom_to_definition atom id';
+ Hashtbl.iter (fun (fid,sid) tid -> if fid = id.stamp then
+ Hashtbl.add atom_to_scope (atom,sid) tid) scope_to_local
with Not_found -> ()
let add_fun_addr atom (high,low) =