Author: David Spickett Date: 2025-12-09T12:41:19Z New Revision: 870aa89fbc07956f8672740a5243d422dbf43b87
URL: https://github.com/llvm/llvm-project/commit/870aa89fbc07956f8672740a5243d422dbf43b87 DIFF: https://github.com/llvm/llvm-project/commit/870aa89fbc07956f8672740a5243d422dbf43b87.diff LOG: [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. Added: Modified: lldb/docs/use/tutorials/custom-frame-recognizers.md lldb/docs/use/tutorials/script-driven-debugging.md lldb/docs/use/tutorials/writing-custom-commands.md Removed: ################################################################################ diff --git a/lldb/docs/use/tutorials/custom-frame-recognizers.md b/lldb/docs/use/tutorials/custom-frame-recognizers.md index 17bf9637d9a85..e1f859bad3b8d 100644 --- a/lldb/docs/use/tutorials/custom-frame-recognizers.md +++ b/lldb/docs/use/tutorials/custom-frame-recognizers.md @@ -33,14 +33,14 @@ It's important to restrict the recognizer to the libc library (which is `libsystem_kernel.dylib` on macOS) to avoid matching functions with the same name in other modules: -```c++ +``` (lldb) command script import .../fd_recognizer.py (lldb) frame recognizer add -l fd_recognizer.LibcFdRecognizer -n read -s libsystem_kernel.dylib ``` When the program is stopped at the beginning of the 'read' function in libc, we can view the recognizer arguments in 'frame variable': -```c++ +``` (lldb) b read (lldb) r Process 1234 stopped diff --git a/lldb/docs/use/tutorials/script-driven-debugging.md b/lldb/docs/use/tutorials/script-driven-debugging.md index 55b90b1e25bf5..0e93e869923a6 100644 --- a/lldb/docs/use/tutorials/script-driven-debugging.md +++ b/lldb/docs/use/tutorials/script-driven-debugging.md @@ -172,7 +172,7 @@ At this point we are ready to use the DFS function to see if the word "Romeo" is in our tree or not. To actually use it in LLDB on our dictionary program, you would do something like this: -```c++ +``` $ lldb (lldb) process attach -n "dictionary" Architecture set to: x86_64. @@ -423,7 +423,7 @@ Enter your Python command(s). Type 'DONE' to end. > print "Here is the problem. Going right, should go left!" > DONE ``` -```c++ +``` (lldb) continue Process 696 resuming Here is the problem. Going right, should go left! diff --git a/lldb/docs/use/tutorials/writing-custom-commands.md b/lldb/docs/use/tutorials/writing-custom-commands.md index d53b7e473a505..0b1d105f4a52f 100644 --- a/lldb/docs/use/tutorials/writing-custom-commands.md +++ b/lldb/docs/use/tutorials/writing-custom-commands.md @@ -413,7 +413,7 @@ you may want a `pofoo` X command, that equates po [ModifyString(X) capitalizedString]. The following debugger interaction shows how to achieve that goal: -```python3 +``` (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> def pofoo_funct(debugger, command, result, internal_dict): _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
