Skip to content

Commit 1c56d59

Browse files
gibbyfreeehuss
authored andcommitted
address pr comments
1 parent c3be903 commit 1c56d59

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/attributes/debugger.md

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

3-
he following [attributes] are used for enhancing the debugging experience when using third-party debuggers like GDB or LLDB.
3+
The 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

@@ -9,7 +9,7 @@ This enables an improved debugger experience for types outside of Rust's standar
99

1010
### Using `debugger_visualizer` with Natvis
1111

12-
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.
12+
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.
1313
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

@@ -90,19 +90,19 @@ 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])
9191
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

93-
Consider a crate called `foobar` with this directory structure:
93+
Consider a crate called `PersonPrinter` with this directory structure:
9494

9595
```text
9696
/Cargo.toml
97-
/person_printer.py
97+
/printer.py
9898
+-- src
9999
+-- main.rs
100100
```
101101

102102
Where `main.rs` contains:
103103

104104
```rust ignore
105-
#![debugger_visualizer(gdb_script_file = "../bar.py")]
105+
#![debugger_visualizer(gdb_script_file = "../printer.py")]
106106
mod person {
107107
pub struct Person {
108108
pub name: String,
@@ -118,7 +118,7 @@ fn main() {
118118
}
119119
```
120120

121-
and `person_printer.py` contains:
121+
and `printer.py` contains:
122122

123123
```python
124124
import gdb
@@ -138,7 +138,7 @@ def lookup(val):
138138
lookup_tag = val.type.tag
139139
if lookup_tag is None:
140140
return None
141-
if "foobar::person::Person" == lookup_tag:
141+
if "PersonPrinter::person::Person" == lookup_tag:
142142
return PersonPrinter(val)
143143

144144
return None

0 commit comments

Comments
 (0)