aboutsummaryrefslogtreecommitdiff
path: root/gas/doc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-03-11 10:17:14 +0000
committerNick Clifton <nickc@redhat.com>2020-03-11 10:17:14 +0000
commit5496f3c635dce3e12348d6e81c3f74815fdfe7b5 (patch)
tree656a7d7904a075b22d0bf20de5ec02c81f9a9964 /gas/doc
parentb76f3a42371cb0d83a1128a434852447da76b5e9 (diff)
downloadgdb-5496f3c635dce3e12348d6e81c3f74815fdfe7b5.zip
gdb-5496f3c635dce3e12348d6e81c3f74815fdfe7b5.tar.gz
gdb-5496f3c635dce3e12348d6e81c3f74815fdfe7b5.tar.bz2
Add support for generating DWARF-5 format directory and file name tables from the assembler.
PR 25611 PR 25614 * dwarf.h (DWARF2_Internal_LineInfo): Add li_address_size and li_segment_size fields. * dwarf.c (read_debug_line_header): Record the address size and segment selector size values (if present) in the lineinfo structure. (display_formatted_table): Warn if the format count is empty but the table itself is not empty. Display the format count and entry count at the start of the table dump. (display_debug_lines_raw): Display the address size and segement selector size fields, if present. * testsuite/binutils-all/dw5.W: Update expected output. gas * dwarf2dbg.c (DWARF2_FILE_TIME_NAME): Default to -1. (DWARF2_FILE_SIZE_NAME): Default to -1. (DWARF2_LINE_VERSION): Default to the current dwarf level or 3, whichever is higher. (DWARF2_LINE_MAX_OPS_PER_INSN): Provide a default value of 1. (NUM_MD5_BYTES): Define. (struct file entry): Add md5 field. (get_filenum): Delete and replace with... (get_basename): New function. (get_directory_table_entry): New function. (allocate_filenum): New function. (allocate_filename_to_slot): New function. (dwarf2_where): Use new functions. (dwarf2_directive_filename): Add support for extended .file pseudo-op. (dwarf2_directive_loc): Allow the use of file number zero with DWARF 5 or higher. (out_file_list): Rename to... (out_dir_and_file_list): Add DWARF 5 support. (out_debug_line): Emit extra values into the section header for DWARF 5. (out_debug_str): Allow for file 0 to be used with DWARF 5. * doc/as.texi (.file): Update the description of this pseudo-op. * testsuite/gas/elf-dwarf-5-file0.s: Add more lines. * testsuite/gas/elf-dwarf-5-file0.d: Update expected dump output. * testsuite/gas/lns/lns-diag-1.l: Update expected error message. * NEWS: Mention the new feature.
Diffstat (limited to 'gas/doc')
-rw-r--r--gas/doc/as.texi18
1 files changed, 17 insertions, 1 deletions
diff --git a/gas/doc/as.texi b/gas/doc/as.texi
index 711578f..0a6727e 100644
--- a/gas/doc/as.texi
+++ b/gas/doc/as.texi
@@ -5366,13 +5366,29 @@ to the @code{.debug_line} file name table. The syntax is:
The @var{fileno} operand should be a unique positive integer to use as the
index of the entry in the table. The @var{filename} operand is a C string
-literal.
+literal enclosed in double quotes. The @var{filename} can include directory
+elements. If it does, then the directory will be added to the directory table
+and the basename will be added to the file table.
The detail of filename indices is exposed to the user because the filename
table is shared with the @code{.debug_info} section of the DWARF2 debugging
information, and thus the user must know the exact indices that table
entries will have.
+If DWARF-5 support has been enabled via the @option{-gdwarf-5} option then
+an extended version of the @code{file} is also allowed:
+
+@smallexample
+.file @var{fileno} [@var{dirname}] @var{filename} [md5 @var{value}]
+@end smallexample
+
+With this version a separate directory name is allowed, although if this is
+used then @var{filename} should not contain any directory components. In
+addtion an md5 hash value of the contents of @var{filename} can be provided.
+This will be stored in the the file table as well, and can be used by tools
+reading the debug information to verify that the contents of the source file
+match the contents of the compiled file.
+
@node Fill
@section @code{.fill @var{repeat} , @var{size} , @var{value}}