Revision tags: llvmorg-21-init |
|
#
8f18f36b |
| 17-Jan-2025 |
Adrian Prantl <aprantl@apple.com> |
[lldb] Skip unreliable test under ASAN
|
Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
#
a3cd8d76 |
| 28-Aug-2024 |
David Spickett <david.spickett@linaro.org> |
[lldb][lldb-dap][test] Enable variable tests on Windows
At least for our Windows on Arm machine compiling with clang-cl, it has inverted which variables get a `::` prefix.
Would not surprise me if
[lldb][lldb-dap][test] Enable variable tests on Windows
At least for our Windows on Arm machine compiling with clang-cl, it has inverted which variables get a `::` prefix.
Would not surprise me if msvc does the opposite so feel free to revert if these tests fail for you.
show more ...
|
Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
fa637711 |
| 24-May-2024 |
Pavel Labath <pavel@labath.sk> |
[lldb-dap] Automatically skip lldb-dap tests for remote platforms (#93169)
The don't currently work (and they're also not particularly useful,
since all of the remote stuff happens inside lldb).
[lldb-dap] Automatically skip lldb-dap tests for remote platforms (#93169)
The don't currently work (and they're also not particularly useful,
since all of the remote stuff happens inside lldb).
This saves us from annotating tests one by one.
show more ...
|
#
af8f1554 |
| 21-May-2024 |
Pavel Labath <pavel@labath.sk> |
[lldb-dap] Don't send expanded descriptions for "hover" expressions (#92726)
VSCode will automatically ask for the children (in structured form) so
there's no point in sending the textual represent
[lldb-dap] Don't send expanded descriptions for "hover" expressions (#92726)
VSCode will automatically ask for the children (in structured form) so
there's no point in sending the textual representation. This can make
displaying hover popups for complex variables with complicated data
formatters much faster. See discussion on #77026 for context.
show more ...
|
Revision tags: llvmorg-18.1.6 |
|
#
a4ad0528 |
| 17-May-2024 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb-dap] Replace `assertEquals` with `assertEqual` (NFC)
Fixes new test that were added or modified after #82073. Also fixes a formatting issue.
|
#
b8d38bb5 |
| 03-May-2024 |
jeffreytan81 <jeffreytan@meta.com> |
Fix dap variable value format issue (#90799)
While adding a UI feature in VSCode to toggle hex/dec in variables view
window. I noticed that it does not work after second toggle. Then I
noticed tha
Fix dap variable value format issue (#90799)
While adding a UI feature in VSCode to toggle hex/dec in variables view
window. I noticed that it does not work after second toggle. Then I
noticed that there is a bug that we only explicitly set hex format not
reset back to default during further toggle. The new test demonstrates
the bug.
This PR resets the format back to default if not using hex. One
complexity is that, we explicitly set registers value format to
AddressInfo, which shouldn't be overridden by default or hex settings.
---------
Co-authored-by: jeffreytan81 <jeffreytan@fb.com>
show more ...
|
Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4 |
|
#
9c246882 |
| 21-Feb-2024 |
Jordan Rupprecht <rupprecht@google.com> |
[lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsne
[lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).
For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.
show more ...
|
Revision tags: llvmorg-18.1.0-rc3 |
|
#
80fcecb1 |
| 17-Feb-2024 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Replace assertEquals with assertEqual (NFC) (#82073)
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
[lldb] Replace assertEquals with assertEqual (NFC) (#82073)
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.
show more ...
|
Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
40a361ac |
| 12-Jan-2024 |
John Harrison <harjohn@google.com> |
[lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (#77026)
When generating a `display_value` for a variable the current approach
calls `SBValue::GetValue()` and `SBValu
[lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (#77026)
When generating a `display_value` for a variable the current approach
calls `SBValue::GetValue()` and `SBValue::GetSummary()` to generate a
`display_value` for the `SBValue`. However, there are cases where both
of these return an empty string and the fallback is to print a pointer
and type name instead (e.g. `FooBarType @ 0x00321`).
For swift types, lldb includes a langauge runtime plugin that can
generate a description of the object but this is only used with
`SBValue::GetDescription()`.
For example:
```
$ lldb swift-binary
... stop at breakpoint ...
lldb> script
>>> event = lldb.frame.GetValueForVariablePath("event")
>>> print("Value", event.GetValue())
Value None
>>> print("Summary", event.GetSummary())
Summary None
>>> print("Description", event) # __str__ calls SBValue::GetDescription()
Description (main.Event) event = (name = "Greetings", time = 2024-01-04 23:38:06 UTC)
```
With this change, if GetValue and GetSummary return empty then we try
`SBValue::GetDescription()` as a fallback before using the previous
logic of printing `<type> @ <addr>`.
show more ...
|
#
ffd173ba |
| 02-Jan-2024 |
Walter Erquinigo <a20012251@gmail.com> |
[lldb-dap] Emit more structured info along with variables (#75244)
In order to allow smarter vscode extensions, it's useful to send
additional structured information of SBValues to the client.
Spe
[lldb-dap] Emit more structured info along with variables (#75244)
In order to allow smarter vscode extensions, it's useful to send
additional structured information of SBValues to the client.
Specifically, I'm now sending error, summary, autoSummary and
inMemoryValue in addition to the existing properties being sent. This is
cheap because these properties have to be calculated anyway to generate
the display value of the variable, but they are now available for
extensions to better analyze variables. For example, if the error field
is not present, the extension might be able to provide cool features,
and the current way to do that is to look for the `"<error: "` prefix,
which is error-prone.
This also incorporates a tiny feedback from
https://github.com/llvm/llvm-project/pull/74865#issuecomment-1850695477
show more ...
|
#
0ea19bd3 |
| 11-Dec-2023 |
Walter Erquinigo <a20012251@gmail.com> |
[lldb-dap] Emit declarations along with variables (#74865)
This is an extension to the protocol that emits the declaration
information along with the metadata of each variable. This can be used
by
[lldb-dap] Emit declarations along with variables (#74865)
This is an extension to the protocol that emits the declaration
information along with the metadata of each variable. This can be used
by vscode extensions to implement, for example, a "goToDefinition"
action in the debug tab, or for showing the value of a variable right
next to where it's declared during a debug session.
As this is cheap, I'm not gating this information under any setting.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5 |
|
#
638a8393 |
| 13-Nov-2023 |
Michael Buch <michaelbuch12@gmail.com> |
Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (#71780)
This patch relands https://github.com/llvm/llvm-project/pull/70639
It was
Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (#71780)
This patch relands https://github.com/llvm/llvm-project/pull/70639
It was reverted because under certain conditions we triggered an
assertion
in `DIBuilder`. Specifically, in the original patch we called
`EmitGlobalVariable`
at the end of `CGDebugInfo::finalize`, after all the temporary `DIType`s
have
been uniqued. With limited debug-info such temporary nodes would be
created
more frequently, leaving us with non-uniqued nodes by the time we got to
`DIBuilder::finalize`; this violated its pre-condition and caused
assertions to trigger.
To fix this, the latest iteration of the patch moves
`EmitGlobalVariable` to the
beginning of `CGDebugInfo::finalize`. Now, when we create a temporary
`DIType` node as a result of emitting a variable definition, it will get
uniqued
in time. A test-case was added for this scenario.
We also now don't emit a linkage name for non-locationed constants since
LLDB doesn't make use of it anyway.
Original commit message:
"""
When an LLDB user asks for the value of a static data member, LLDB
starts
by searching the Names accelerator table for the corresponding variable
definition DIE. For static data members with out-of-class definitions
that
works fine, because those get represented as global variables with a
location
and making them eligible to be added to the Names table. However,
in-class
definitions won’t get indexed because we usually don't emit global
variables
for them. So in DWARF we end up with a single `DW_TAG_member` that
usually holds the constant initializer. But we don't get a corresponding
CU-level `DW_TAG_variable` like we do for out-of-class definitions.
To make it more convenient for debuggers to get to the value of inline
static data
members, this patch makes sure we emit definitions for static variables
with
constant initializers the same way we do for other static variables.
This also aligns
Clang closer to GCC, which produces CU-level definitions for inline
statics and also
emits these into `.debug_pubnames`.
The implementation keeps track of newly created static data members.
Then in `CGDebugInfo::finalize`, we emit a global `DW_TAG_variable` with
a
`DW_AT_const_value` for any of those declarations that didn't end up
with a
definition in the `DeclCache`.
The newly emitted `DW_TAG_variable` will look as follows:
```
0x0000007b: DW_TAG_structure_type
DW_AT_calling_convention (DW_CC_pass_by_value)
DW_AT_name ("Foo")
...
0x0000008d: DW_TAG_member
DW_AT_name ("i")
DW_AT_type (0x00000062 "const int")
DW_AT_external (true)
DW_AT_declaration (true)
DW_AT_const_value (4)
Newly added
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
0x0000009a: DW_TAG_variable
DW_AT_specification (0x0000008d "i")
DW_AT_const_value (4)
DW_AT_linkage_name ("_ZN2t2IiE1iIfEE")
```
This patch also drops the `DW_AT_const_value` off of the declaration
since we
now always have it on the definition. This ensures that the
`DWARFParallelLinker`
can type-merge class with static members where we couldn't attach the
constant
on the declaration in some CUs.
"""
Dependent changes:
* https://github.com/llvm/llvm-project/pull/71800
show more ...
|
#
066eea75 |
| 07-Nov-2023 |
Hans Wennborg <hans@chromium.org> |
Revert "Reland "clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)""
This casued asserts:
llvm/lib/IR/Metadata.cpp:689: void llvm::MD
Revert "Reland "clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)""
This casued asserts:
llvm/lib/IR/Metadata.cpp:689: void llvm::MDNode::resolve(): Assertion `isUniqued() && "Expected this to be uniqued"' failed.
See comments on the PR.
This also reverts the dependent follow-up commits, see below.
> When an LLDB user asks for the value of a static data member, LLDB > starts by searching the Names accelerator table for the corresponding > variable definition DIE. For static data members with out-of-class > definitions that works fine, because those get represented as global > variables with a location and making them eligible to be added to the > Names table. However, in-class definitions won<E2><80><99>t get indexed because > we usually don't emit global variables for them. So in DWARF we end > up with a single `DW_TAG_member` that usually holds the constant > initializer. But we don't get a corresponding CU-level > `DW_TAG_variable` like we do for out-of-class definitions. > > To make it more convenient for debuggers to get to the value of > inline static data members, this patch makes sure we emit definitions > for static variables with constant initializers the same way we do > for other static variables. This also aligns Clang closer to GCC, > which produces CU-level definitions for inline statics and also > emits these into `.debug_pubnames`. > > The implementation keeps track of newly created static data members. > Then in `CGDebugInfo::finalize`, we emit a global `DW_TAG_variable` > with a `DW_AT_const_value` for any of those declarations that didn't > end up with a definition in the `DeclCache`. > > The newly emitted `DW_TAG_variable` will look as follows: > ``` > 0x0000007b: DW_TAG_structure_type > DW_AT_calling_convention (DW_CC_pass_by_value) > DW_AT_name ("Foo") > ... > > 0x0000008d: DW_TAG_member > DW_AT_name ("i") > DW_AT_type (0x00000062 "const int") > DW_AT_external (true) > DW_AT_declaration (true) > DW_AT_const_value (4) > > Newly added > vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv > > 0x0000009a: DW_TAG_variable > DW_AT_specification (0x0000008d "i") > DW_AT_const_value (4) > DW_AT_linkage_name ("_ZN2t2IiE1iIfEE") > ``` > > This patch also drops the `DW_AT_const_value` off of the declaration > since we now always have it on the definition. This ensures that the > `DWARFParallelLinker` can type-merge class with static members where > we couldn't attach the constant on the declaration in some CUs.
This reverts commit 7c3707aea8a6f1fc245ad2862982b8a51b6c0fea. This reverts commit cab0a19467ac2e6e1e022087f4b6cb90d55da040. This reverts commit 317481b3c8b34b0c3f106c514e6aa39b70886110. This reverts commit 15fc809404d4715822e5349b76dcca50eb100eec. This reverts commit 470de2bbec7f5fdd199775aa99c68ac76f4d5c74.
show more ...
|
#
7c3707ae |
| 06-Nov-2023 |
Michael Buch <michaelbuch12@gmail.com> |
Reland "clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)"
When an LLDB user asks for the value of a static data member, LLDB starts by s
Reland "clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)"
When an LLDB user asks for the value of a static data member, LLDB starts by searching the Names accelerator table for the corresponding variable definition DIE. For static data members with out-of-class definitions that works fine, because those get represented as global variables with a location and making them eligible to be added to the Names table. However, in-class definitions won’t get indexed because we usually don't emit global variables for them. So in DWARF we end up with a single `DW_TAG_member` that usually holds the constant initializer. But we don't get a corresponding CU-level `DW_TAG_variable` like we do for out-of-class definitions.
To make it more convenient for debuggers to get to the value of inline static data members, this patch makes sure we emit definitions for static variables with constant initializers the same way we do for other static variables. This also aligns Clang closer to GCC, which produces CU-level definitions for inline statics and also emits these into `.debug_pubnames`.
The implementation keeps track of newly created static data members. Then in `CGDebugInfo::finalize`, we emit a global `DW_TAG_variable` with a `DW_AT_const_value` for any of those declarations that didn't end up with a definition in the `DeclCache`.
The newly emitted `DW_TAG_variable` will look as follows: ``` 0x0000007b: DW_TAG_structure_type DW_AT_calling_convention (DW_CC_pass_by_value) DW_AT_name ("Foo") ...
0x0000008d: DW_TAG_member DW_AT_name ("i") DW_AT_type (0x00000062 "const int") DW_AT_external (true) DW_AT_declaration (true) DW_AT_const_value (4)
Newly added vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
0x0000009a: DW_TAG_variable DW_AT_specification (0x0000008d "i") DW_AT_const_value (4) DW_AT_linkage_name ("_ZN2t2IiE1iIfEE") ```
This patch also drops the `DW_AT_const_value` off of the declaration since we now always have it on the definition. This ensures that the `DWARFParallelLinker` can type-merge class with static members where we couldn't attach the constant on the declaration in some CUs.
show more ...
|
#
333124cf |
| 06-Nov-2023 |
Michael Buch <michaelbuch12@gmail.com> |
Revert "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)"
This reverts commit 4909814c08fdf4ec8bd9dad4f157d03de7c3c800.
Following LLDB
Revert "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)"
This reverts commit 4909814c08fdf4ec8bd9dad4f157d03de7c3c800.
Following LLDB patch had to be reverted due to Linux test failures: ``` ef3febadf606c2fc4f1ad8d85a7ecdde16e4cbb3 ```
Since without that LLDB patch the LLDB tests would fail, revert this clang patch for now.
show more ...
|
#
4909814c |
| 06-Nov-2023 |
Michael Buch <michaelbuch12@gmail.com> |
[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)
When an LLDB user asks for the value of a static data member, LLDB
starts by
searchi
[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (#70639)
When an LLDB user asks for the value of a static data member, LLDB
starts by
searching the Names accelerator table for the corresponding variable
definition
DIE. For static data members with out-of-class definitions that works
fine,
because those get represented as global variables with a location and
making them
eligible to be added to the Names table. However, in-class definitions
won’t get
indexed because we usually don't emit global variables for them. So in
DWARF
we end up with a single `DW_TAG_member` that usually holds the constant
initializer.
But we don't get a corresponding CU-level `DW_TAG_variable` like we do
for
out-of-class definitions.
To make it more convenient for debuggers to get to the value of inline
static data members,
this patch makes sure we emit definitions for static variables with
constant initializers
the same way we do for other static variables. This also aligns Clang
closer to GCC, which
produces CU-level definitions for inline statics and also emits these
into `.debug_pubnames`.
The implementation keeps track of newly created static data members.
Then in
`CGDebugInfo::finalize`, we emit a global `DW_TAG_variable` with a
`DW_AT_const_value` for
any of those declarations that didn't end up with a definition in the
`DeclCache`.
The newly emitted `DW_TAG_variable` will look as follows:
```
0x0000007b: DW_TAG_structure_type
DW_AT_calling_convention (DW_CC_pass_by_value)
DW_AT_name ("Foo")
...
0x0000008d: DW_TAG_member
DW_AT_name ("i")
DW_AT_type (0x00000062 "const int")
DW_AT_external (true)
DW_AT_declaration (true)
DW_AT_const_value (4)
Newly added
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
0x0000009a: DW_TAG_variable
DW_AT_specification (0x0000008d "i")
DW_AT_const_value (4)
DW_AT_linkage_name ("_ZN2t2IiE1iIfEE")
```
This patch also drops the `DW_AT_const_value` off of the declaration since we now always have it on the definition. This ensures that the `DWARFParallelLinker` can type-merge class with static members where we couldn't attach the constant on the declaration in some CUs.
show more ...
|
Revision tags: llvmorg-17.0.4 |
|
#
01263c6c |
| 19-Oct-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[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:
[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/
show more ...
|