| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |
| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |
| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |
| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| Re-land [lldb-dap] Add support for data breakpoint. (#81909) This implements functionality to handle DataBreakpointInfo request and SetDataBreakpoints request. Previous commit https://github.com/llvm/llvm-project/commit/8c56e78ec531f0e2460213c20fff869b6b7add99 was reverted because setting 1 byte watchpoint failed in the new test on ARM64. So, I changed the test to setting 4 byte watchpoint instead, and hope this won't break it again. It also adds the fixes from https://github.com/llvm/llvm-project/pull/81680. | 2 年前 |
| [lldb-dap] Support throw and catch exception breakpoints for dynamica… (#97871) …lly registered languages First of all, this is done to support exceptions for the Mojo language, but it's done in a way that will benefit any other plugin language. 1. I added a new lldb-dap CLI argument (not DAP field) called pre-init-commands. These commands are executed before DAP initialization. The other init-commands are executed after DAP initialization. It's worth mentioning that the debug adapter returns to VSCode the list of supported exception breakpoints during DAP initialization, which means that I need to register the Mojo plugin before that initialization step, hence the need for pre-init-commands. In general, language plugins should be registered in that step, as they affect the capabilities of the debugger. 2. I added a set of APIs for lldb-dap to query information of each language related to exception breakpoints. E.g. whether a language supports throw or catch breakpoints, how the throw keyword is called in each particular language, etc. 3. I'm realizing that the Swift support for exception breakpoints in lldb-dap should have been implemented in this way, instead of hardcoding it. | 2 年前 |
| [lldb-dap] Support throw and catch exception breakpoints for dynamica… (#97871) …lly registered languages First of all, this is done to support exceptions for the Mojo language, but it's done in a way that will benefit any other plugin language. 1. I added a new lldb-dap CLI argument (not DAP field) called pre-init-commands. These commands are executed before DAP initialization. The other init-commands are executed after DAP initialization. It's worth mentioning that the debug adapter returns to VSCode the list of supported exception breakpoints during DAP initialization, which means that I need to register the Mojo plugin before that initialization step, hence the need for pre-init-commands. In general, language plugins should be registered in that step, as they affect the capabilities of the debugger. 2. I added a set of APIs for lldb-dap to query information of each language related to exception breakpoints. E.g. whether a language supports throw or catch breakpoints, how the throw keyword is called in each particular language, etc. 3. I'm realizing that the Swift support for exception breakpoints in lldb-dap should have been implemented in this way, instead of hardcoding it. | 2 年前 |
| Re-land [lldb-dap] Add support for data breakpoint. (#81909) This implements functionality to handle DataBreakpointInfo request and SetDataBreakpoints request. Previous commit https://github.com/llvm/llvm-project/commit/8c56e78ec531f0e2460213c20fff869b6b7add99 was reverted because setting 1 byte watchpoint failed in the new test on ARM64. So, I changed the test to setting 4 byte watchpoint instead, and hope this won't break it again. It also adds the fixes from https://github.com/llvm/llvm-project/pull/81680. | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb] Use StringRef::{starts,ends}_with (NFC) This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with. | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb-dap] Don't call GetNumChildren on non-indexed synthetic variables (#93534) A synthetic child provider might need to do considerable amount of work to compute the number of children. lldb-dap is currently calling that for all synthethic variables, but it's only actually using the value for values which it deems to be "indexed" (which is determined by looking at the name of the first child). This patch reverses the logic so that GetNumChildren is only called for variables with a suitable first child. | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |
| [lldb][dap] Avoid concurrent HandleCommand calls (#83162) The EventThreadFunction can end up calling HandleCommand concurrently with the main request processing thread. The underlying API does not appear to be thread safe, so add a narrowly scoped mutex lock to prevent calling it in this place from more than one thread. Fixes #81686. Prior to this, TestDAP_launch.py is 4% flaky. After, it passes in 1000 runs. | 2 年前 |
| [lldb-dap] Implement command directives (#74808) This adds support for optionally prefixing any command with ? and/or !. - ? prevents the output of a commands to be printed to the console unless it fails. - ! aborts the dap if the command fails. They come in handy when programmatically running commands on behalf of the user without wanting them to know unless they fail, or when a critical setup is required as part of launchCommands and it's better to abort on failures than to silently skip. | 2 年前 |
| [lldb-dap] Support throw and catch exception breakpoints for dynamica… (#97871) …lly registered languages First of all, this is done to support exceptions for the Mojo language, but it's done in a way that will benefit any other plugin language. 1. I added a new lldb-dap CLI argument (not DAP field) called pre-init-commands. These commands are executed before DAP initialization. The other init-commands are executed after DAP initialization. It's worth mentioning that the debug adapter returns to VSCode the list of supported exception breakpoints during DAP initialization, which means that I need to register the Mojo plugin before that initialization step, hence the need for pre-init-commands. In general, language plugins should be registered in that step, as they affect the capabilities of the debugger. 2. I added a set of APIs for lldb-dap to query information of each language related to exception breakpoints. E.g. whether a language supports throw or catch breakpoints, how the throw keyword is called in each particular language, etc. 3. I'm realizing that the Swift support for exception breakpoints in lldb-dap should have been implemented in this way, instead of hardcoding it. | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb-dap] Separate user and developer documentation (#92428) The README.md is what users see when they look for the extension in the Marketplace [1]. Right now, it's a mix of developer documentation (for us) and user documentation. This commit moves the developer docs into docs and the lldb website and refocuses the README on using the extension. [1] https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.lldb-dap | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753) This adds a layer between SounceBreakpoint/FunctionBreakpoint and BreakpointBase to have better separation and encapsulation so we are not directly operating on SBBreakpoint. I basically moved the SBBreakpoint and the methods that requires it from BreakpointBase to Breakpoint. This allows adding support for data watchpoint easier by sharing the logic inside BreakpointBase. | 2 年前 |
| [lldb-dap] Deduplicate watchpoints starting at the same address on SetDataBreakpointsRequest. (#83192) If a SetDataBreakpointsRequest contains a list data breakpoints which have duplicate starting addresses, the current behaviour is returning {verified: true} to both watchpoints with duplicated starting addresses. This confuses the client and what actually happens in lldb is the second one overwrite the first one. This fixes it by letting the last watchpoint at given address have {verified: true} and all previous watchpoints at the same address should have {verfied: false} at response. | 2 年前 |
| [lldb-dap] Deduplicate watchpoints starting at the same address on SetDataBreakpointsRequest. (#83192) If a SetDataBreakpointsRequest contains a list data breakpoints which have duplicate starting addresses, the current behaviour is returning {verified: true} to both watchpoints with duplicated starting addresses. This confuses the client and what actually happens in lldb is the second one overwrite the first one. This fixes it by letting the last watchpoint at given address have {verified: true} and all previous watchpoints at the same address should have {verfied: false} at response. | 2 年前 |
| [lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 |
| Add lldb version into initialize response lldb-dap (#98703) Frequently, while troubleshooting user's debugging issues in VScode, we would like to know lldb version so that we can confirm if certain patch/feature is in or not. This PR adds version string into initialize response so that telemetry can track it. --------- Co-authored-by: jeffreytan81 <jeffreytan@fb.com> | 2 年前 |
| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |
| [lldb-dap] Bump the version to 0.2.2 Bump the lldb-dap version to 0.2.2. | 2 年前 |
| [lldb-dap] Create a typescript extension for lldb-dap (#75515) The main motivations behind this are two: - Allow different companies developing their own vscode extensions for LLDB to have a single contribution point, thus sharing resources and working as a virtual large team. - Allow for visual ways to configure the debugger, which currently has to be done through launch.json files. In terms of implementation, this is very straightforward and these are the most important details: - All the cpp code has been moved to a subfolder for cleanness. There's a specific commit in the list of commits of this PR that just does that, in case that helps reviewing this. - A new folder src-ts has been created for the typescript code - The ts extension can be used in two ways: as a regular vscode extension and as a library. There file extension.ts explains which entry point to use. - The README has been updated the mention how to install the extension, which is simpler than before. There are two additional sections for rebuilding and formatting. - The ts code I added merely sets up the debug adapter using two possible options: reading the lldb-dap path from vscode settings or from a config object passed by users of the extension is used as a library. I did this to show how we can support easily both worlds. | 2 年前 |