Skip to content

Commit 44c7328

Browse files
committed
fix style errors
1 parent 31b1c48 commit 44c7328

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/attributes/debugger.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# Debugger attributes
22

3-
The following [attributes] are used for enhancing the debugging experience when using third-party debuggers like GDB or LLDB.
3+
he following [attributes] are used for enhancing the debugging experience when using third-party debuggers like GDB or LLDB.
44

55
## The `debugger_visualizer` attribute
66

7-
The `debugger_visualizer` attribute can be used to embed a debugger visualizer file into the debug information generated by `rustc`.
7+
The `debugger_visualizer` attribute can be used to embed a debugger visualizer file into the debug information generated by `rustc`.
88
This enables an improved debugger experience for types outside of Rust's standard library.
99

1010
### Using `debugger_visualizer` with Natvis
1111

1212
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.
13-
A Natvis file is embedded using the `natvis-file` meta item.
13+
A Natvis file is embedded using the `natvis-file` meta item.
1414
For detailed information on the Natvis format, refer to Microsoft's [Natvis documentation].
1515

1616
<div class="warning">
17-
Currently, this attribute only supports embedding Natvis files on `-windows-msvc` targets.
17+
Currently, this attribute only supports embedding Natvis files on `-windows-msvc` targets.
1818
</div>
1919

2020
Consider a crate with this directory structure:
2121

2222
```text
2323
/Cargo.toml
24-
/Rectangle.natvis
24+
/Rectangle.natvis
2525
+-- src
2626
+-- main.rs
2727
```
@@ -81,14 +81,14 @@ When viewed under WinDbg, the `fancy_rect` variable would be shown as follows:
8181

8282
### Using `debugger_visualizer` with GDB
8383

84-
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.
85-
These scripts are embedded using the `gdb_script_file` meta item.
84+
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.
85+
These scripts are embedded using the `gdb_script_file` meta item.
8686
For detailed information on pretty printers, refer to GDB's [pretty print documentation].
8787

8888
Embedded pretty printers are not automatically loaded when debugging a binary under GDB.
8989
There are two ways to enable auto-loading embedded pretty printers:
9090
1. Launch GDB with extra arguments to explicitly add a directory or binary to the auto-load safe path: `gdb -iex "set auto-load safe-path path/to/binary" path/to/binary` (For more information, see GDB's [auto-loading documentation])
91-
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`.
91+
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`.
9292

9393
Consider a crate called `foobar` with this directory structure:
9494

@@ -148,7 +148,7 @@ gdb.current_objfile().pretty_printers.append(lookup)
148148

149149
When the crate's debug executable is passed into GDB, `print bob` will display:
150150

151-
```
151+
```text
152152
"Bob" is 10 years old.
153153
```
154154

0 commit comments

Comments
 (0)