aboutsummaryrefslogtreecommitdiffstats
path: root/debug/Debug.mli
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2022-07-28 18:10:30 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2022-09-03 09:59:01 +0200
commit9fcb0316df79ee741272340d7db0378872a53c5f (patch)
tree354edb0fb4dbc63a09dba4ede3244b7d95fdf692 /debug/Debug.mli
parent7c0df3799418b6044e448d6266a082b2fbd8ae1f (diff)
downloadcompcert-9fcb0316df79ee741272340d7db0378872a53c5f.tar.gz
compcert-9fcb0316df79ee741272340d7db0378872a53c5f.zip
Rework of struct member offsets for debug info.
The struct member byte and bit offsets are now set based upon the new function `struct_layout` from Ctypes.v, thus using the same code to compute as used to generate the actual struct access. The struct offset member information is addded using the types computed after the translation in C2C. Therefore we need to store the new internal names of the members as well as the composites and use them when adding the offset information. Fixes: #445
Diffstat (limited to 'debug/Debug.mli')
-rw-r--r--debug/Debug.mli14
1 files changed, 8 insertions, 6 deletions
diff --git a/debug/Debug.mli b/debug/Debug.mli
index 60e2f9bc..001cf0ea 100644
--- a/debug/Debug.mli
+++ b/debug/Debug.mli
@@ -22,9 +22,10 @@ type implem =
{
init: string -> unit;
atom_global: ident -> atom -> unit;
- set_composite_size: ident -> struct_or_union -> int option -> unit;
- set_member_offset: ident -> string -> int -> unit;
- set_bitfield_offset: ident -> string -> int -> string -> int -> unit;
+ set_composite_size: ident -> atom -> struct_or_union -> int option -> unit;
+ set_member_atom: str_id:atom -> string -> fld_id:atom -> unit;
+ set_member_offset: str_id:atom -> fld_id:atom -> int -> unit;
+ set_bitfield_offset: str_id:atom -> fld_id:atom -> bit_ofs:int -> byte_ofs:int -> size:int -> unit;
insert_global_declaration: Env.t -> globdecl -> unit;
add_fun_addr: atom -> section_name -> (int * int) -> unit;
generate_debug_info: (atom -> string) -> string -> debug_entries option;
@@ -56,9 +57,10 @@ val implem: implem ref
val init_compile_unit: string -> unit
val atom_global: ident -> atom -> unit
-val set_composite_size: ident -> struct_or_union -> int option -> unit
-val set_member_offset: ident -> string -> int -> unit
-val set_bitfield_offset: ident -> string -> int -> string -> int -> unit
+val set_composite_size: ident -> atom -> struct_or_union -> int option -> unit
+val set_member_atom: str_id:atom -> string -> fld_id:atom -> unit
+val set_member_offset: str_id:atom -> fld_id:atom -> int -> unit
+val set_bitfield_offset: str_id:atom -> fld_id:atom -> bit_ofs:int -> byte_ofs:int -> size:int -> unit
val insert_global_declaration: Env.t -> globdecl -> unit
val add_fun_addr: atom -> section_name -> (int * int) -> unit
val all_files_iter: (string -> unit) -> unit