diff options
author | Mark Harmstone <mark@harmstone.com> | 2024-05-11 08:19:53 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-05-11 08:19:53 -0600 |
commit | 1f129e5e2b74c20a757f2809792af229b551b09b (patch) | |
tree | f3ec2ce24e98514508281a6127d147fdb5b96db1 /gcc/dwarf2codeview.h | |
parent | ed6690a0ca911138abd4d707510fd03ef188a28b (diff) | |
download | gcc-1f129e5e2b74c20a757f2809792af229b551b09b.zip gcc-1f129e5e2b74c20a757f2809792af229b551b09b.tar.gz gcc-1f129e5e2b74c20a757f2809792af229b551b09b.tar.bz2 |
[PATCH v2 3/4] Output line numbers in CodeView section
Outputs the DEBUG_S_LINES block in the CodeView .debug$S section, which
maps between line numbers and addresses.
You'll need a fairly recent version of GAS for the .secidx directive to
be recognized.
gcc/
* dwarf2codeview.cc (DEBUG_S_LINES, LINE_LABEL): Define.
(END_FUNC_LABEL): Likewise.
(struct codeview_line, codeview_line_block): New structures.
(codeview_function): Likewise.
(line_label_num, func_label_num, funcs, last_func): New variables.
(last_filename, last_file_id): Likewise.
(codeview_source_line, write_line_numbers): New functions.
(codeview_switch_text_section, codeview_end_epilogue): Likewise.
(codeview_debug_finish): Call write_line_numbers.
* dwarf2codeview.h (codeview_source_line): Prototype.
(codeview_switch_text_secction, codeview_end_epilogue): Likewise.
* dwarf2out.cc (dwarf2_end_epilogue): Add codeview support.
(dwarf2out_switch_text_section): Likewise.
(dwarf2out_source_line): Likewise.
* opts.cc (finish_options): Handle codeview debugging symbols.
Diffstat (limited to 'gcc/dwarf2codeview.h')
-rw-r--r-- | gcc/dwarf2codeview.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/dwarf2codeview.h b/gcc/dwarf2codeview.h index e2d732b..b6421b6 100644 --- a/gcc/dwarf2codeview.h +++ b/gcc/dwarf2codeview.h @@ -26,6 +26,9 @@ along with GCC; see the file COPYING3. If not see /* Debug Format Interface. Used in dwarf2out.cc. */ extern void codeview_debug_finish (void); +extern void codeview_source_line (unsigned int, const char *); extern void codeview_start_source_file (const char *); +extern void codeview_switch_text_section (); +extern void codeview_end_epilogue (void); #endif /* GCC_DWARF2CODEVIEW_H */ |