[PATCH v2 2/4] Output file checksums in CodeView section
commited6690a0ca911138abd4d707510fd03ef188a28b
authorMark Harmstone <mark@harmstone.com>
Sat, 11 May 2024 14:15:43 +0000 (11 08:15 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 11 May 2024 14:15:43 +0000 (11 08:15 -0600)
tree468ce8c7bb76ff29b4fb43267738fad2047846b4
parent36781ef8fd26eb9a0686957e7bac8f5ccc5ecc3f
[PATCH v2 2/4] Output file checksums in CodeView section

Outputs the file name and MD5 hash of the main source file into the
CodeView .debug$S section, along with that of any #include'd files.

gcc/
* dwarf2codeview.cc (DEBUG_S_STRINGTABLE): Define.
(DEBUG_S_FILECHKSMS, CHKSUM_TYPE_MD5, HASH_SIZE): Likewise.
(codeview_string, codeview_source_file): New structures.
(struct string_hasher): New class for codeview_string hashing.
(files, last_file, num_files, string_offset): New variables.
(strings_hstab, strings, last_string): Likewise.
(add_string, codevie_start_source_file): New functions.
(write_strings_tabe, write_soruce_files): Likewise.
(codeview_debug_finish): Call new functions.
* dwarf2codeview.h (codeview_start_source_file): Prototype.
* dwarf2out.cc (dwarf2out_start_source_file): Handle codeview.
gcc/dwarf2codeview.cc
gcc/dwarf2codeview.h
gcc/dwarf2out.cc