You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Natvis is an XML-based framework for Microsoft debuggers (such as Visual Studio and WinDbg) that uses declarative rules to customize the display of types.
14
24
For detailed information on the Natvis format, refer to Microsoft's [Natvis documentation].
GDB supports the use of a structured Python script, called a *pretty printer*, that describes how a type should be visualized in the debugger view.
76
92
For detailed information on pretty printers, refer to GDB's [pretty printing documentation].
77
93
@@ -81,6 +97,7 @@ There are two ways to enable auto-loading embedded pretty printers:
81
97
For more information, see GDB's [auto-loading documentation].
82
98
1. Create a file named `gdbinit` under `$HOME/.config/gdb` (you may need to create the directory if it doesn't already exist). Add the following line to that file: `add-auto-load-safe-path path/to/binary`.
These scripts are embedded using the `gdb_script_file` key, which is a path relative to the crate source file.
85
102
86
103
<!-- ignore: requires external files -->
@@ -142,16 +159,23 @@ When the crate's debug executable is passed into GDB[^rust-gdb], `print bob` wil
142
159
143
160
## The `collapse_debuginfo` attribute
144
161
162
+
r[attributes.debugger.collapse_debuginfo]
163
+
164
+
165
+
r[attributes.debugger.collapse_debuginfo.general]
145
166
The *`collapse_debuginfo`[attribute]* controls whether code locations from a macro definition are collapsed into a single location associated with the macro's call site,
146
167
when generating debuginfo for code calling this macro.
147
168
169
+
r[attributes.debugger.collapse_debuginfo.syntax]
148
170
The attribute uses the [_MetaListIdents_] syntax to specify its inputs, and can only be applied to macro definitions.
149
171
172
+
r[attributes.debugger.collapse_debuginfo.options]
150
173
Accepted options:
151
174
-`#[collapse_debuginfo(yes)]` --- code locations in debuginfo are collapsed.
152
175
-`#[collapse_debuginfo(no)]` --- code locations in debuginfo are not collapsed.
153
176
-`#[collapse_debuginfo(external)]` --- code locations in debuginfo are collapsed only if the macro comes from a different crate.
154
177
178
+
r[attributes.debugger.collapse_debuginfo.default]
155
179
The `external` behavior is the default for macros that don't have this attribute, unless they are built-in macros.
0 commit comments