about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-03 12:49:57 +0000
committerbors <bors@rust-lang.org>2024-12-03 12:49:57 +0000
commit8575f8f91bbd7dca529d362afc8117db74661c3b (patch)
tree965b784e4412f4a5d9ec4381ecdf5f18809d15ea /src
parentae3703cdf271b07cbc7cbaeda0ea8ab6bba60160 (diff)
parente9fbb6f27177d9e7579af064c18184114ed9cec9 (diff)
downloadrust-8575f8f91bbd7dca529d362afc8117db74661c3b.tar.gz
rust-8575f8f91bbd7dca529d362afc8117db74661c3b.zip
Auto merge of #104342 - mweber15:add_file_location_to_more_types, r=wesleywiser
Require `type_map::stub` callers to supply file information

This change attaches file information (`DIFile` reference and line number) to struct debug info nodes.

Before:

```
; foo.ll
...
!5 = !DIFile(filename: "<unknown>", directory: "")
...
!16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !5, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "4cb373851db92e732c4cb5651b886dd0")
...
```

After:

```
; foo.ll
...
!3 = !DIFile(filename: "foo.rs", directory: "/home/matt/src/rust98678", checksumkind: CSK_SHA1, checksum: "bcb9f08512c8f3b8181ef4726012bc6807bc9be4")
...
!16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !3, line: 3, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "9e5968c7af39c148acb253912b7f409f")
...
```

Fixes #98678

r? `@wesleywiser`
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/compiler-flags/debug_info_type_line_numbers.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/debug_info_type_line_numbers.md b/src/doc/unstable-book/src/compiler-flags/debug_info_type_line_numbers.md
new file mode 100644
index 00000000000..bea667dcf44
--- /dev/null
+++ b/src/doc/unstable-book/src/compiler-flags/debug_info_type_line_numbers.md
@@ -0,0 +1,7 @@
+# `debug-info-type-line-numbers`
+
+---
+
+This option causes additional type and line information to be emitted in debug
+info to provide richer information to debuggers. This is currently off by
+default as it causes some compilation scenarios to be noticeably slower.