[Lldb-commits] [lldb] 442ee78 - [lldb-dap] Fix Markdown tables in README.md

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 3 20:59:09 PST 2024


Author: Jonas Devlieghere
Date: 2024-12-03T20:59:02-08:00
New Revision: 442ee78cb414cd7101482bb677e62631e94e5480

URL: https://github.com/llvm/llvm-project/commit/442ee78cb414cd7101482bb677e62631e94e5480
DIFF: https://github.com/llvm/llvm-project/commit/442ee78cb414cd7101482bb677e62631e94e5480.diff

LOG: [lldb-dap] Fix Markdown tables in README.md

The markdown tables in the README aren't getting rendered correctly on
the LLDB-DAP page in the Visual Studio arketplace [1]. This is a
somewhat speculative fix as the table itself appears to be correct. Even
if this change doesn't fix it, the new formatting significantly improves
the readability.

[1] https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.lldb-dap

Added: 
    

Modified: 
    lldb/tools/lldb-dap/README.md

Removed: 
    


################################################################################
diff  --git a/lldb/tools/lldb-dap/README.md b/lldb/tools/lldb-dap/README.md
index 42b5f501e32c65..8196dfdd5073c8 100644
--- a/lldb/tools/lldb-dap/README.md
+++ b/lldb/tools/lldb-dap/README.md
@@ -6,9 +6,9 @@ The extension requires the `lldb-dap` (formerly `lldb-vscode`) binary.
 This binary is not packaged with the VS Code extension.
 
 There are multiple ways to obtain this binary:
-* use the binary provided by your toolchain (for example `xcrun -f lldb-dap` on macOS) or contact your toolchain vendor to include it.
-* download one of the relase packages from the [LLVM release page](https://github.com/llvm/llvm-project/releases/). The `LLVM-19.1.0-{operating_system}.tar.xz` packages contain a prebuilt `lldb-dap` binary.
-* build it from source (see [LLDB's build instructions](https://lldb.llvm.org/resources/build.html))
+* Use the binary provided by your toolchain (for example `xcrun -f lldb-dap` on macOS) or contact your toolchain vendor to include it.
+* Download one of the relase packages from the [LLVM release page](https://github.com/llvm/llvm-project/releases/). The `LLVM-19.1.0-{operating_system}.tar.xz` packages contain a prebuilt `lldb-dap` binary.
+* Build it from source (see [LLDB's build instructions](https://lldb.llvm.org/resources/build.html)).
 
 By default, the VS Code extension will expect to find `lldb-dap` in your `PATH`.
 Alternatively, you can explictly specify the location of the `lldb-dap` binary using the `lldb-dap.executable-path` setting.
@@ -179,26 +179,26 @@ The default hostname being used `localhost`.
 For both launch and attach configurations, lldb-dap accepts the following `lldb-dap`
 specific key/value pairs:
 
-|parameter          |type|req |         |
-|-------------------|----|:--:|---------|
-|**name**           |string|Y| A configuration name that will be displayed in the IDE.
-|**type**           |string|Y| Must be "lldb-dap".
-|**request**        |string|Y| Must be "launch" or "attach".
-|**program**        |string|Y| Path to the executable to launch.
-|**sourcePath**     |string| | Specify a source path to remap \"./\" to allow full paths to be used when setting breakpoints in binaries that have relative source paths.
-|**sourceMap**      |[string[2]]| | Specify an array of path re-mappings. Each element in the array must be a two element array containing a source and destination pathname. Overrides sourcePath.
-|**debuggerRoot**   | string| |Specify a working directory to use when launching lldb-dap. If the debug information in your executable contains relative paths, this option can be used so that `lldb-dap` can find source files and object files that have relative paths.
-|**commandEscapePrefix** | string | | The escape prefix to use for executing regular LLDB commands in the Debug Console, instead of printing variables. Defaults to a backtick. If it's an empty string, then all expression in the Debug Console are treated as regular LLDB commands.
-|**customFrameFormat** | string | | If non-empty, stack frames will have descriptions generated based on the provided format. See https://lldb.llvm.org/use/formatting.html for an explanation on format strings for frames. If the format string contains errors, an error message will be displayed on the Debug Console and the default frame names will be used. This might come with a performance cost because debug information might need to be processed to generate the description.
-|**customThreadFormat** | string | | Same as `customFrameFormat`, but for threads instead of stack frames.
-|**displayExtendedBacktrace**|bool| | Enable language specific extended backtraces.
-|**enableAutoVariableSummaries**|bool| | Enable auto generated summaries for variables when no summaries exist for a given type. This feature can cause performance delays in large projects when viewing variables.
-|**enableSyntheticChildDebugging**|bool| | If a variable is displayed using a synthetic children, also display the actual contents of the variable at the end under a [raw] entry. This is useful when creating sythetic child plug-ins as it lets you see the actual contents of the variable.
-|**initCommands**   |[string]| | LLDB commands executed upon debugger startup prior to creating the LLDB target.
-|**preRunCommands** |[string]| | LLDB commands executed just before launching/attaching, after the LLDB target has been created.
-|**stopCommands**   |[string]| | LLDB commands executed just after each stop.
-|**exitCommands**   |[string]| | LLDB commands executed when the program exits.
-|**terminateCommands** |[string]| | LLDB commands executed when the debugging session ends.
+| Parameter                         | Type        | Req |         |
+|-----------------------------------|-------------|:---:|---------|
+| **name**                          | string      | Y   | A configuration name that will be displayed in the IDE.
+| **type**                          | string      | Y   | Must be "lldb-dap".
+| **request**                       | string      | Y   | Must be "launch" or "attach".
+| **program**                       | string      | Y   | Path to the executable to launch.
+| **sourcePath**                    | string      |     | Specify a source path to remap \"./\" to allow full paths to be used when setting breakpoints in binaries that have relative source paths.
+| **sourceMap**                     | [string[2]] |     | Specify an array of path re-mappings. Each element in the array must be a two element array containing a source and destination pathname. Overrides sourcePath.
+| **debuggerRoot**                  | string      |     | Specify a working directory to use when launching lldb-dap. If the debug information in your executable contains relative paths, this option can be used so that `lldb-dap` can find source files and object files that have relative paths.
+| **commandEscapePrefix**           | string      |     | The escape prefix to use for executing regular LLDB commands in the Debug Console, instead of printing variables. Defaults to a backtick. If it's an empty string, then all expression in the Debug Console are treated as regular LLDB commands.
+| **customFrameFormat**             | string      |     | If non-empty, stack frames will have descriptions generated based on the provided format. See https://lldb.llvm.org/use/formatting.html for an explanation on format strings for frames. If the format string contains errors, an error message will be displayed on the Debug Console and the default frame names will be used. This might come with a performance cost because debug information might need to be processed to generate the description.
+| **customThreadFormat**            | string      |     | Same as `customFrameFormat`, but for threads instead of stack frames.
+| **displayExtendedBacktrace**      | bool        |     | Enable language specific extended backtraces.
+| **enableAutoVariableSummaries**   | bool        |     | Enable auto generated summaries for variables when no summaries exist for a given type. This feature can cause performance delays in large projects when viewing variables.
+| **enableSyntheticChildDebugging** | bool        |     | If a variable is displayed using a synthetic children, also display the actual contents of the variable at the end under a [raw] entry. This is useful when creating sythetic child plug-ins as it lets you see the actual contents of the variable.
+| **initCommands**                  | [string]    |     | LLDB commands executed upon debugger startup prior to creating the LLDB target.
+| **preRunCommands**                | [string]    |     | LLDB commands executed just before launching/attaching, after the LLDB target has been created.
+| **stopCommands**                  | [string]    |     | LLDB commands executed just after each stop.
+| **exitCommands**                  | [string]    |     | LLDB commands executed when the program exits.
+| **terminateCommands**             | [string]    |     | LLDB commands executed when the debugging session ends.
 
 All commands and command outputs will be sent to the debugger console when they are executed.
 Commands can be prefixed with `?` or `!` to modify their behavior:
@@ -208,25 +208,25 @@ Commands can be prefixed with `?` or `!` to modify their behavior:
 For JSON configurations of `"type": "launch"`, the JSON configuration can additionally
 contain the following key/value pairs:
 
-|parameter          |type|req |         |
-|-------------------|----|:--:|---------|
-|**program**        |string|Y| Path to the executable to launch.
-|**args**           |[string]|| An array of command line argument strings to be passed to the program being launched.
-|**cwd**            |string| | The program working directory.
-|**env**            |dictionary| | Environment variables to set when launching the program. The format of each environment variable string is "VAR=VALUE" for environment variables with values or just "VAR" for environment variables with no values.
-|**stopOnEntry**    |boolean| | Whether to stop program immediately after launching.
-|**runInTerminal**  |boolean| | Launch the program inside an integrated terminal in the IDE. Useful for debugging interactive command line programs.
-|**launchCommands** |[string]| | LLDB commands executed to launch the program.
+| Parameter                         | Type        | Req |         |
+|-----------------------------------|-------------|:---:|---------|
+| **program**                       | string      | Y   | Path to the executable to launch.
+| **args**                          | [string]    |     | An array of command line argument strings to be passed to the program being launched.
+| **cwd**                           | string      |     | The program working directory.
+| **env**                           | dictionary  |     | Environment variables to set when launching the program. The format of each environment variable string is "VAR=VALUE" for environment variables with values or just "VAR" for environment variables with no values.
+| **stopOnEntry**                   | boolean     |     | Whether to stop program immediately after launching.
+| **runInTerminal**                 | boolean     |     | Launch the program inside an integrated terminal in the IDE. Useful for debugging interactive command line programs.
+| **launchCommands**                | [string]    |     | LLDB commands executed to launch the program.
 
 For JSON configurations of `"type": "attach"`, the JSON configuration can contain
 the following `lldb-dap` specific key/value pairs:
 
-|parameter          |type    |req |         |
-|-------------------|--------|:--:|---------|
-|**program**        |string  | | Path to the executable to attach to. This value is optional but can help to resolve breakpoints prior the attaching to the program.
-|**pid**            |number  | | The process id of the process you wish to attach to. If **pid** is omitted, the debugger will attempt to attach to the program by finding a process whose file name matches the file name from **porgram**. Setting this value to `${command:pickMyProcess}` will allow interactive process selection in the IDE.
-|**waitFor**        |boolean | | Wait for the process to launch.
-|**attachCommands** |[string]| | LLDB commands that will be executed after **preRunCommands** which take place of the code that normally does the attach. The commands can create a new target and attach or launch it however desired. This allows custom launch and attach configurations. Core files can use `target create --core /path/to/core` to attach to core files.
+| Parameter                         | Type        | Req |         |
+|-----------------------------------|-------------|:---:|---------|
+| **program**                       | string      |     | Path to the executable to attach to. This value is optional but can help to resolve breakpoints prior the attaching to the program.
+| **pid**                           | number      |     | The process id of the process you wish to attach to. If **pid** is omitted, the debugger will attempt to attach to the program by finding a process whose file name matches the file name from **porgram**. Setting this value to `${command:pickMyProcess}` will allow interactive process selection in the IDE.
+| **waitFor**                       | boolean     |     | Wait for the process to launch.
+| **attachCommands**                | [string]    |     | LLDB commands that will be executed after **preRunCommands** which take place of the code that normally does the attach. The commands can create a new target and attach or launch it however desired. This allows custom launch and attach configurations. Core files can use `target create --core /path/to/core` to attach to core files.
 
 ## Debug Console
 
@@ -295,7 +295,7 @@ and may also be adjusted at runtime using the lldb command
 lldb-dap includes a command to trigger a Debug Adapter Protocol event
 from a script.
 
-The event maybe a custom DAP event or a standard event, if the event is not 
+The event maybe a custom DAP event or a standard event, if the event is not
 handled internally by `lldb-dap`.
 
 This command has the format:
@@ -316,9 +316,9 @@ For example you can use a launch configuration hook to trigger custom events lik
 }
 ```
 
-[See the specification](https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_Event) 
-for more details on Debug Adapter Protocol events and the VS Code 
-[debug.onDidReceiveDebugSessionCustomEvent](https://code.visualstudio.com/api/references/vscode-api#debug.onDidReceiveDebugSessionCustomEvent) 
+[See the specification](https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_Event)
+for more details on Debug Adapter Protocol events and the VS Code
+[debug.onDidReceiveDebugSessionCustomEvent](https://code.visualstudio.com/api/references/vscode-api#debug.onDidReceiveDebugSessionCustomEvent)
 API for handling a custom event from an extension.
 
 ## Contributing


        


More information about the lldb-commits mailing list