Skip to content

Commit 870aa89

Browse files
committed
[lldb][docs] Remove syntax hint from some output blocks
This tries to parse the block as that language but in these cases fails because they aren't purely that language. This falls back to a permissive mode which is fine, but highlights the invalid tokens like errors which isn't great. Instead don't try to highlight these blocks. This fixes 4 warnings seen in the docs build: lldb/docs/use/tutorials/custom-frame-recognizers.md:43: WARNING: Lexing literal_block <...> as "c++" resulted in an error at token: '#'. Retrying in relaxed mode. lldb/docs/use/tutorials/script-driven-debugging.md:175: WARNING: Lexing literal_block <...> as "c++" resulted in an error at token: '#'. Retrying in relaxed mode. lldb/docs/use/tutorials/script-driven-debugging.md:426: WARNING: Lexing literal_block <...> as "c++" resulted in an error at token: '#'. Retrying in relaxed mode. lldb/docs/use/tutorials/writing-custom-commands.md:416: WARNING: Lexing literal_block <...> as "python3" resulted in an error at token: '$'. Retrying in relaxed mode.
1 parent 4e94198 commit 870aa89

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lldb/docs/use/tutorials/custom-frame-recognizers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ It's important to restrict the recognizer to the libc library (which is
3333
`libsystem_kernel.dylib` on macOS) to avoid matching functions with the same name
3434
in other modules:
3535

36-
```c++
36+
```
3737
(lldb) command script import .../fd_recognizer.py
3838
(lldb) frame recognizer add -l fd_recognizer.LibcFdRecognizer -n read -s libsystem_kernel.dylib
3939
```
4040

4141
When the program is stopped at the beginning of the 'read' function in libc, we can view the recognizer arguments in 'frame variable':
4242

43-
```c++
43+
```
4444
(lldb) b read
4545
(lldb) r
4646
Process 1234 stopped

lldb/docs/use/tutorials/script-driven-debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ At this point we are ready to use the DFS function to see if the word "Romeo"
172172
is in our tree or not. To actually use it in LLDB on our dictionary program,
173173
you would do something like this:
174174

175-
```c++
175+
```
176176
$ lldb
177177
(lldb) process attach -n "dictionary"
178178
Architecture set to: x86_64.
@@ -423,7 +423,7 @@ Enter your Python command(s). Type 'DONE' to end.
423423
> print "Here is the problem. Going right, should go left!"
424424
> DONE
425425
```
426-
```c++
426+
```
427427
(lldb) continue
428428
Process 696 resuming
429429
Here is the problem. Going right, should go left!

lldb/docs/use/tutorials/writing-custom-commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ you may want a `pofoo` X command, that equates po [ModifyString(X)
413413
capitalizedString]. The following debugger interaction shows how to achieve
414414
that goal:
415415
416-
```python3
416+
```
417417
(lldb) script
418418
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
419419
>>> def pofoo_funct(debugger, command, result, internal_dict):

0 commit comments

Comments
 (0)