[Lldb-commits] [lldb] [lldb] Fix off-by-one error in ToDwarfSourceLanguage (PR #162315)
github-actions[bot] wrote: @joshpeterson Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail [here](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr). If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of [LLVM development](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy). You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! https://github.com/llvm/llvm-project/pull/162315 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Introduce ScriptedFrameProvider for real threads (PR #161870)
https://github.com/medismailben updated
https://github.com/llvm/llvm-project/pull/161870
Unicorn! · GitHub
body {
background-color: #f1f1f1;
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.container { margin: 50px auto 40px auto; width: 600px; text-align:
center; }
a { color: #4183c4; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { letter-spacing: -1px; line-height: 60px; font-size: 60px;
font-weight: 100; margin: 0px; text-shadow: 0 1px 0 #fff; }
p { color: rgba(0, 0, 0, 0.5); margin: 10px 0 10px; font-size: 18px;
font-weight: 200; line-height: 1.6em;}
ul { list-style: none; margin: 25px 0; padding: 0; }
li { display: table-cell; font-weight: bold; width: 1%; }
.logo { display: inline-block; margin-top: 35px; }
.logo-img-2x { display: none; }
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi),
only screen and (min-resolution: 2dppx) {
.logo-img-1x { display: none; }
.logo-img-2x { display: inline-block; }
}
#suggestions {
margin-top: 35px;
color: #ccc;
}
#suggestions a {
color: #66;
font-weight: 200;
font-size: 14px;
margin: 0 10px;
}
No server is currently available to service your
request.
Sorry about that. Please try refreshing and contact us if the problem
persists.
https://github.com/contact";>Contact Support —
https://www.githubstatus.com";>GitHub Status —
https://twitter.com/githubstatus";>@githubstatus
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB][NativePDB] Use typedef compiler type for typedef types (PR #156250)
@@ -0,0 +1,128 @@
+// REQUIRES: lld
+
+// Test that simple types can be found
+// RUN: %build --std=c++20 --nodefaultlib --arch=64 -o %t.exe -- %s
+// RUN: lldb-test symbols %t.exe | FileCheck %s
+
+bool *PB;
+bool &RB = *PB;
+bool *&RPB = PB;
+const bool &CRB = RB;
+bool *const BC = 0;
+const bool *const CBC = 0;
+
+long AL[2];
+
+const volatile short CVS = 0;
+const short CS = 0;
+volatile short VS;
+
+struct ReturnedStruct1 {};
+struct ReturnedStruct2 {};
+
+struct MyStruct {
+ static ReturnedStruct1 static_fn(char *) { return {}; }
+ ReturnedStruct2 const_member_fn(char *) const { return {}; }
+ void volatile_member_fn() volatile {};
+ void member_fn() {};
+};
+
+void (*PF)(int, bool *, const float, ...);
Nerixyz wrote:
> This variable seems unused.
It's unused, but still in the binary, because it's neither `static` nor
`inline`. And it is present in the debug info.
> Can we add a test case to show what you mean by return and parameters
> missing? What would the typename look like?
The type of the function itself gets created. This is checked at the bottom of
the file:
> ```
> // CHECK-DAG: Type{{.*}} , size = 0, compiler_type = 0x{{[0-9a-f]+}} void
> (int, _Bool *, const float, ...)
> // CHECK-DAG: Type{{.*}} , size = 8, compiler_type = 0x{{[0-9a-f]+}} void
> (*)(int, _Bool *, const float, ...)
> ```
However, the LLDB `Type`s for simple/primitive types don't get created. I
updated the test and moved `double` to a function parameter. Now, it's not
created as an LLDB `Type` with the native plugin. DWARF and DIA do create a
`Type`.
https://github.com/llvm/llvm-project/pull/156250
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Add deleted line in NextRangeBreakpointExplainsStop (PR #161597)
augusto2112 wrote: @jeffreytan81 thanks. It's for a downstream thread plan (which I plan to upstream). I added a call to `ClearNextBranchBreakpointExplainedStop()` from my thread plan's `ShouldStop()` as you suggested and that works. https://github.com/llvm/llvm-project/pull/161597 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Add deleted line in NextRangeBreakpointExplainsStop (PR #161597)
https://github.com/augusto2112 closed https://github.com/llvm/llvm-project/pull/161597 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix use after free on ModuleList::RemoveSharedModuleIfOrphaned (PR #155331)
https://github.com/augusto2112 closed https://github.com/llvm/llvm-project/pull/155331 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] support attaching by name for platform android (PR #160931)
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions cpp,h -- lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp lldb/source/Plugins/Platform/Android/PlatformAndroid.h `` :warning: The reproduction instructions above might return results for more than one PR in a stack if you are using a stacked PR workflow. You can limit the results by changing `origin/main` to the base branch/commit you want to compare against. :warning: View the diff from clang-format here. ``diff diff --git a/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp b/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp index e14c574bb..68206a5a7 100644 --- a/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp +++ b/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp @@ -492,9 +492,9 @@ PlatformAndroid::FindProcesses(const ProcessInstanceInfoMatch &match_info, // Remote Android platform: implement process name lookup using 'pidof' over // adb. - // LLDB stores the search name in GetExecutableFile() (even though it's - // actually a process name like "com.android.chrome" rather than an - // executable path). If no search name is provided, we can't use + // LLDB stores the search name in GetExecutableFile() (even though it's + // actually a process name like "com.android.chrome" rather than an + // executable path). If no search name is provided, we can't use // 'pidof', so return early with no results. const ProcessInstanceInfo &match_process_info = match_info.GetProcessInfo(); if (!match_process_info.GetExecutableFile() || `` https://github.com/llvm/llvm-project/pull/160931 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB] Handle i686 mingw32 mangling prefix (PR #160930)
https://github.com/Nerixyz closed https://github.com/llvm/llvm-project/pull/160930 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Add bidirectional packetLog to gdbclientutils.py (PR #162176)
@@ -306,7 +309,8 @@ def haltReason(self): # SIGINT is 2, return type is 2 digit hex string return "S02" -def qXferRead(self, obj, annex, offset, length): +def qXferRead(self, obj: str, annex: str, offset: int, + length: int) -> tuple[str | None, bool]: DavidSpickett wrote: In future please separate annotations of existing types into their own PR. If you're changing the type in the process of doing something then it's fine to include in the same PR. https://github.com/llvm/llvm-project/pull/162176 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Add bidirectional packetLog to gdbclientutils.py (PR #162176)
@@ -374,15 +378,17 @@ class UnexpectedPacketException(Exception): pass -class ServerChannel: +class ServerChannel(ABC): """ A wrapper class for TCP or pty-based server. """ -def get_connect_address(self): +@abstractmethod DavidSpickett wrote: Good idea, but separate PR please. https://github.com/llvm/llvm-project/pull/162176 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Remove class level packetLog in MockGDBServerResponder (PR #162453)
llvmbot wrote: @llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) Changes Added in 1902ffd9a4914d4cd03e200ca9050bf3b1564c19 but appears to be leftover code from some older design. I can't find any code that reads packetLog via the class itself, or checks whether it is None. No tests failed on AArch64 Linux after removing it. --- Full diff: https://github.com/llvm/llvm-project/pull/162453.diff 1 Files Affected: - (modified) lldb/packages/Python/lldbsuite/test/gdbclientutils.py (-1) ``diff diff --git a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py index b603c35c8df09..53e991a1471fd 100644 --- a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py +++ b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py @@ -87,7 +87,6 @@ class MockGDBServerResponder: """ registerCount = 40 -packetLog = None class RESPONSE_DISCONNECT: pass `` https://github.com/llvm/llvm-project/pull/162453 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB][NativePDB] Use typedef compiler type for typedef types (PR #156250)
Nerixyz wrote: Ping - I'd like to use the added test from this PR as the "current state" and fix the missing things from above in other PRs. https://github.com/llvm/llvm-project/pull/156250 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 7da07c0 - [lldb][test] Remove class level packetLog in MockGDBServerResponder (#162453)
Author: David Spickett Date: 2025-10-08T11:09:52Z New Revision: 7da07c081c081edb9f6706cb8ec298c3cee8ec17 URL: https://github.com/llvm/llvm-project/commit/7da07c081c081edb9f6706cb8ec298c3cee8ec17 DIFF: https://github.com/llvm/llvm-project/commit/7da07c081c081edb9f6706cb8ec298c3cee8ec17.diff LOG: [lldb][test] Remove class level packetLog in MockGDBServerResponder (#162453) Added in 1902ffd9a4914d4cd03e200ca9050bf3b1564c19 but appears to be leftover code from some older design. I can't find any code that reads packetLog via the class itself, or checks whether it is None. No tests failed on AArch64 Linux after removing it. Added: Modified: lldb/packages/Python/lldbsuite/test/gdbclientutils.py Removed: diff --git a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py index b603c35c8df09..53e991a1471fd 100644 --- a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py +++ b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py @@ -87,7 +87,6 @@ class MockGDBServerResponder: """ registerCount = 40 -packetLog = None class RESPONSE_DISCONNECT: pass ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix off-by-one error in ToDwarfSourceLanguage (PR #162315)
@@ -67,3 +67,16 @@ TEST_F(LanguageTest, SourceLanguage_AsLanguageType) {
EXPECT_EQ(SourceLanguage(eLanguageTypeUnknown).AsLanguageType(),
eLanguageTypeUnknown);
}
+
+TEST_F(LanguageTest, SourceLanguage_LastStandardLanguage) {
+ // eLanguageTypeLastStandardLanguage should be treated as a standard DWARF
+ // language.
+ SourceLanguage lang(eLanguageTypeLastStandardLanguage);
joshpeterson wrote:
It does pass! I've removed this check at 790b947.
https://github.com/llvm/llvm-project/pull/162315
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Remove class level packetLog in MockGDBServerResponder (PR #162453)
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/162453 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Add type hints to gdbclientutils.py and use abstract base class (PR #162172)
@@ -374,15 +378,17 @@ class UnexpectedPacketException(Exception): pass -class ServerChannel: +class ServerChannel(ABC): DavidSpickett wrote: Thanks, good to know. https://github.com/llvm/llvm-project/pull/162172 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Add type hints to gdbclientutils.py and use abstract base class (PR #162172)
DavidSpickett wrote: > That shouldn't be the case. I believe for Swift we have at least one bot that > still uses 3.8. If we want to bump the minimum version we should do that > through an RFC like David did: > https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731/20 At this point it would be an update for LLVM generally, which we are due but I don't expect this PR author to take on. > It's mainly type hints using the subscript operator on the builtin types like > list[str]. In 3.8 the correct way is: If this way will work in 3.9 as well, do it. If not, drop those annotations. Let's not make this situation more confusing, the pay off isn't there for the sake of a few type annotations. And yes we should have something somewhere enforcing our minimums but let me put it this way: we claim minimum compiler versions and those aren't tested by anyone either. So I'm sorry you had to encounter this confusion but it is what it is for the time being. https://github.com/llvm/llvm-project/pull/162172 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix off-by-one error in ToDwarfSourceLanguage (PR #162315)
https://github.com/Michael137 auto_merge_enabled https://github.com/llvm/llvm-project/pull/162315 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [libcxx] [lldb] [libc++] Use std::__{scope, exception}_guard throughout the code base (PR #161322)
https://github.com/philnik777 updated
https://github.com/llvm/llvm-project/pull/161322
>From fa982f394b6082345a7c66624a4204d46dbcf70e Mon Sep 17 00:00:00 2001
From: Nikolas Klauser
Date: Tue, 30 Sep 2025 08:29:05 +0200
Subject: [PATCH] [libc++] Use std::__{scope,exception}_guard throughout the
code base
---
libcxx/include/__hash_table | 66 ++---
libcxx/include/__memory/shared_ptr.h | 93 +++
.../__memory/uninitialized_algorithms.h | 158 +++
libcxx/include/__utility/scope_guard.h| 2 +
libcxx/include/__vector/vector_bool.h | 23 +-
libcxx/include/deque | 39 +--
libcxx/include/forward_list | 31 +--
libcxx/include/future | 14 +-
libcxx/include/list | 61 ++--
libcxx/include/string | 31 +--
libcxx/include/valarray | 152 +++---
libcxx/src/filesystem/error.h | 26 +-
libcxx/src/filesystem/format_string.h | 14 +-
libcxx/src/locale.cpp | 260 +-
.../deque-basic/TestDequeFromStdModule.py | 3 +
.../TestDbgInfoContentDequeFromStdModule.py | 3 +
.../TestForwardListFromStdModule.py | 3 +
.../TestDbgInfoContentListFromStdModule.py| 3 +
.../list/TestListFromStdModule.py | 3 +
19 files changed, 357 insertions(+), 628 deletions(-)
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index 2b246f82ce36d..74923ddb74e9c 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -44,6 +44,7 @@
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/pair.h>
+#include <__utility/scope_guard.h>
#include <__utility/swap.h>
#include <__utility/try_key_extraction.h>
#include
@@ -1317,23 +1318,14 @@ void __hash_table<_Tp, _Hash, _Equal,
_Alloc>::__move_assign(__hash_table& __u,
max_load_factor() = __u.max_load_factor();
if (bucket_count() != 0) {
__next_pointer __cache = __detach();
-#if _LIBCPP_HAS_EXCEPTIONS
- try {
-#endif // _LIBCPP_HAS_EXCEPTIONS
-const_iterator __i = __u.begin();
-while (__cache != nullptr && __u.size() != 0) {
- __assign_value(__cache->__upcast()->__get_value(),
std::move(__u.remove(__i++)->__get_value()));
- __next_pointer __next = __cache->__next_;
- __node_insert_multi(__cache->__upcast());
- __cache = __next;
-}
-#if _LIBCPP_HAS_EXCEPTIONS
- } catch (...) {
-__deallocate_node(__cache);
-throw;
+ auto __guard = std::__make_scope_guard([&] {
__deallocate_node(__cache); });
+ const_iterator __i = __u.begin();
+ while (__cache != nullptr && __u.size() != 0) {
+__assign_value(__cache->__upcast()->__get_value(),
std::move(__u.remove(__i++)->__get_value()));
+__next_pointer __next = __cache->__next_;
+__node_insert_multi(__cache->__upcast());
+__cache = __next;
}
-#endif // _LIBCPP_HAS_EXCEPTIONS
- __deallocate_node(__cache);
}
const_iterator __i = __u.begin();
while (__u.size() != 0)
@@ -1361,22 +1353,13 @@ void __hash_table<_Tp, _Hash, _Equal,
_Alloc>::__assign_unique(_InputIterator __
if (bucket_count() != 0) {
__next_pointer __cache = __detach();
-#if _LIBCPP_HAS_EXCEPTIONS
-try {
-#endif // _LIBCPP_HAS_EXCEPTIONS
- for (; __cache != nullptr && __first != __last; ++__first) {
-__assign_value(__cache->__upcast()->__get_value(), *__first);
-__next_pointer __next = __cache->__next_;
-__node_insert_unique(__cache->__upcast());
-__cache = __next;
- }
-#if _LIBCPP_HAS_EXCEPTIONS
-} catch (...) {
- __deallocate_node(__cache);
- throw;
+auto __guard = std::__make_scope_guard([&] {
__deallocate_node(__cache); });
+for (; __cache != nullptr && __first != __last; ++__first) {
+ __assign_value(__cache->__upcast()->__get_value(), *__first);
+ __next_pointer __next = __cache->__next_;
+ __node_insert_unique(__cache->__upcast());
+ __cache = __next;
}
-#endif // _LIBCPP_HAS_EXCEPTIONS
-__deallocate_node(__cache);
}
for (; __first != __last; ++__first)
__emplace_unique(*__first);
@@ -1391,22 +1374,13 @@ void __hash_table<_Tp, _Hash, _Equal,
_Alloc>::__assign_multi(_InputIterator __f
"__assign_multi may only be called with the containers value
type or the nodes value type");
if (bucket_count() != 0) {
__next_pointer __cache = __detach();
-#if _LIBCPP_HAS_EXCEPTIONS
-try {
-#endif // _LIBCPP_HAS_EXCEPTIONS
- for (; __cache != nullptr && __first != __last; ++__first) {
-__assign_value(__cache->__upcast()->__get_value(), *__first);
-__next_pointer __next = __cache->__next_;
-__node_insert_multi(__cache->__upcast());
-__cache = _
[Lldb-commits] [lldb] [lldb] Ignore trailing spaces on quit confirmation (PR #162263)
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Ebuka Ezike (da-viper)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/162263.diff
2 Files Affected:
- (modified) lldb/source/Core/IOHandler.cpp (+6-5)
- (modified) lldb/test/API/driver/quit_speed/TestQuitWithProcess.py (+25)
``diff
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index 57819eeade6e8..c2530aa0d00c5 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -152,15 +152,16 @@ void IOHandlerConfirm::IOHandlerComplete(IOHandler
&io_handler,
void IOHandlerConfirm::IOHandlerInputComplete(IOHandler &io_handler,
std::string &line) {
- if (line.empty()) {
+ const llvm::StringRef input = llvm::StringRef(line).rtrim();
+ if (input.empty()) {
// User just hit enter, set the response to the default
m_user_response = m_default_response;
io_handler.SetIsDone(true);
return;
}
- if (line.size() == 1) {
-switch (line[0]) {
+ if (input.size() == 1) {
+switch (input[0]) {
case 'y':
case 'Y':
m_user_response = true;
@@ -176,10 +177,10 @@ void IOHandlerConfirm::IOHandlerInputComplete(IOHandler
&io_handler,
}
}
- if (line == "yes" || line == "YES" || line == "Yes") {
+ if (input.equals_insensitive("yes")) {
m_user_response = true;
io_handler.SetIsDone(true);
- } else if (line == "no" || line == "NO" || line == "No") {
+ } else if (input.equals_insensitive("no")) {
m_user_response = false;
io_handler.SetIsDone(true);
}
diff --git a/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py
b/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py
index 2412b295bfb59..305e3cc397cf0 100644
--- a/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py
+++ b/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py
@@ -33,3 +33,28 @@ def test_run_quit(self):
child.sendline("quit")
print("sent quit")
child.expect(pexpect.EOF, timeout=15)
+
+@skipIfAsan
+def test_run_quit_with_prompt(self):
+"""Test that the lldb driver's batch mode works correctly with
trailing space in confimation."""
+import pexpect
+
+self.build()
+
+exe = self.getBuildArtifact("a.out")
+
+self.launch(executable=exe)
+child = self.child
+
+# Launch the process without a TTY so we don't have to interrupt:
+child.sendline("process launch -n")
+print("launched process")
+child.expect(r"Process ([\d]*) launched:")
+print("Got launch message")
+child.sendline("quit")
+print("sent quit")
+
+child.expect(r".*LLDB will kill one or more processes.*")
+# add trailing space to the confirmation.
+child.sendline("yEs ")
+child.expect(pexpect.EOF, timeout=15)
``
https://github.com/llvm/llvm-project/pull/162263
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Introduce ScriptedFrameProvider for real threads (PR #161870)
medismailben wrote: @vogelsgesang I've added a new `SBFrameList` class with iterators since there was so way to pass the existing StackFrameList in lazy way to the user script and updated the calls to `get_stackframes` to take it as an argument. I'm still waiting on @jimingham feedback on this before move forward but let me know if this newer approach fits better into your coroutines workflow. https://github.com/llvm/llvm-project/pull/161870 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Make SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again. (PR #162370)
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-win` running on `as-builder-10` while building `lldb` at step 7 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/197/builds/9662 Here is the relevant piece of the build log for the reference ``` Step 7 (cmake-configure) failure: cmake (failure) ... -- Looking for sys/resource.h - not found -- Looking for dlfcn.h -- Looking for dlfcn.h - not found -- Clang version: 22.0.0git -- Performing Test HAVE_LINKER_FLAG_LONG_PLT -- Performing Test HAVE_LINKER_FLAG_LONG_PLT - Success -- Found Perl: C:/Program Files/Git/usr/bin/perl.exe (found version "5.38.2") -- Found Python3: C:/Python312/python.exe (found version "3.12.7") found components: Interpreter -- Found SWIG: C:/Python312/Scripts/swig4.0.exe (found suitable version "4.3.0", minimum required is "4") -- Enable SWIG to generate LLDB bindings: TRUE -- Enable editline support in LLDB: FALSE -- Enable curses support in LLDB: FALSE -- Enable LZMA compression support in LLDB: FALSE -- Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.3") -- Could NOT find LuaAndSwig (missing: LUA_LIBRARIES LUA_INCLUDE_DIR LUA_VERSION_MINOR LUA_VERSION_MAJOR) -- Enable Lua scripting support in LLDB: FALSE -- Found Python3: C:/Python312/python.exe (found version "3.12.7") found components: Interpreter Development Development.Module Development.Embed -- Found PythonAndSwig: C:/Python312/libs/python312.lib -- Enable Python scripting support in LLDB: TRUE -- Enable Libxml 2 support in LLDB: FALSE -- Enable libfbsdvmcore support in LLDB: 0 -- LLDB version: 22.0.0git -- Looking for ppoll -- Looking for ppoll - not found -- Looking for ptsname_r -- Looking for ptsname_r - not found -- Looking for accept4 -- Looking for accept4 - not found -- Looking for termios.h -- Looking for termios.h - not found -- Looking for include files sys/types.h, sys/event.h -- Looking for include files sys/types.h, sys/event.h - not found -- Looking for process_vm_readv -- Looking for process_vm_readv - not found -- Looking for __NR_process_vm_readv -- Looking for __NR_process_vm_readv - not found -- Looking for compression_encode_buffer in compression -- Looking for compression_encode_buffer in compression - not found -- Skipping FreeBSDKernel plugin due to missing libfbsdvmcore -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Found make: C:/ninja/make.exe -- Configuring incomplete, errors occurred! See also "C:/buildbot/as-builder-10/lldb-x-aarch64/build/CMakeFiles/CMakeOutput.log". See also "C:/buildbot/as-builder-10/lldb-x-aarch64/build/CMakeFiles/CMakeError.log". CMake Error at C:/buildbot/as-builder-10/lldb-x-aarch64/llvm-project/lldb/unittests/CMakeLists.txt:25 (message): The LLDBBreakpointTests are not allowed to link liblldb. Call Stack (most recent call first): C:/buildbot/as-builder-10/lldb-x-aarch64/llvm-project/lldb/unittests/Breakpoint/CMakeLists.txt:1 (add_lldb_unittest) ``` https://github.com/llvm/llvm-project/pull/162370 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Make SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again. (PR #162370)
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `publish-sphinx-docs` running on `as-worker-4` while building `lldb` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/45/builds/16943 Here is the relevant piece of the build log for the reference ``` Step 4 (cmake-configure) failure: cmake (failure) ... -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Failed -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success -- Performing Test C_SUPPORTS_NO_PASS_FAILED_FLAG -- Performing Test C_SUPPORTS_NO_PASS_FAILED_FLAG - Success -- Performing Test CXX_SUPPORTS_NO_PASS_FAILED_FLAG -- Performing Test CXX_SUPPORTS_NO_PASS_FAILED_FLAG - Success -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed -- Looking for os_signpost_interval_begin -- Looking for os_signpost_interval_begin - not found -- Looking for flock -- Looking for flock - found -- Linker detection: GNU ld -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Success -- Performing Test HAS_WERROR_GLOBAL_CTORS -- Performing Test HAS_WERROR_GLOBAL_CTORS - Failed -- Looking for __x86_64__ -- Looking for __x86_64__ - found -- Found Git: /usr/bin/git (found version "2.43.0") -- Looking for logf128 -- Looking for logf128 - found -- Targeting AArch64 -- Targeting AMDGPU -- Targeting ARM -- Targeting AVR -- Targeting BPF -- Targeting Hexagon -- Targeting Lanai -- Targeting LoongArch -- Targeting Mips -- Targeting MSP430 -- Targeting NVPTX -- Targeting PowerPC -- Targeting RISCV -- Targeting Sparc -- Targeting SPIRV -- Targeting SystemZ -- Targeting VE -- Targeting WebAssembly -- Targeting X86 ``` https://github.com/llvm/llvm-project/pull/162370 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Revert "Make SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again." (PR #162544)
https://github.com/kazutakahirata created
https://github.com/llvm/llvm-project/pull/162544
Reverts llvm/llvm-project#162370
The PR breaks multiple buildbots:
https://lab.llvm.org/buildbot/#/builders/162/builds/32818
https://lab.llvm.org/buildbot/#/builders/181/builds/29448
>From 46d71e86fca35b77fc4e0ae2c1d76825aad7dc6f Mon Sep 17 00:00:00 2001
From: Kazu Hirata
Date: Wed, 8 Oct 2025 13:22:12 -0700
Subject: [PATCH] =?UTF-8?q?Revert=20"Make=20SBBreakpoint/SBBreakpointLocat?=
=?UTF-8?q?ion.SetCondition(nullptr)=20work=20aga=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit f3e2c20a23b11fbe1149e5d2e3631109af6d3238.
---
lldb/source/API/SBBreakpoint.cpp | 11 +--
lldb/source/API/SBBreakpointLocation.cpp | 11 +--
lldb/unittests/API/CMakeLists.txt | 1 -
.../API/SBBreakpointClearConditionTest.cpp| 69 ---
lldb/unittests/Breakpoint/CMakeLists.txt | 6 +-
5 files changed, 5 insertions(+), 93 deletions(-)
delete mode 100644 lldb/unittests/API/SBBreakpointClearConditionTest.cpp
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 23dba462478c9..07c0a2ea907ba 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -275,11 +275,7 @@ void SBBreakpoint::SetCondition(const char *condition) {
if (bkpt_sp) {
std::lock_guard guard(
bkpt_sp->GetTarget().GetAPIMutex());
-// Treat a null pointer as resetting the condition.
-if (!condition)
- bkpt_sp->SetCondition(StopCondition());
-else
- bkpt_sp->SetCondition(StopCondition(condition));
+bkpt_sp->SetCondition(StopCondition(condition));
}
}
@@ -292,10 +288,7 @@ const char *SBBreakpoint::GetCondition() {
std::lock_guard guard(
bkpt_sp->GetTarget().GetAPIMutex());
- StopCondition cond = bkpt_sp->GetCondition();
- if (!cond)
-return nullptr;
- return ConstString(cond.GetText()).GetCString();
+ return ConstString(bkpt_sp->GetCondition().GetText()).GetCString();
}
void SBBreakpoint::SetAutoContinue(bool auto_continue) {
diff --git a/lldb/source/API/SBBreakpointLocation.cpp
b/lldb/source/API/SBBreakpointLocation.cpp
index 2feaa5c805a15..e786435c4f8af 100644
--- a/lldb/source/API/SBBreakpointLocation.cpp
+++ b/lldb/source/API/SBBreakpointLocation.cpp
@@ -160,11 +160,7 @@ void SBBreakpointLocation::SetCondition(const char
*condition) {
if (loc_sp) {
std::lock_guard guard(
loc_sp->GetTarget().GetAPIMutex());
-// Treat a nullptr as clearing the condition
-if (!condition)
- loc_sp->SetCondition(StopCondition());
-else
- loc_sp->SetCondition(StopCondition(condition));
+loc_sp->SetCondition(StopCondition(condition));
}
}
@@ -177,10 +173,7 @@ const char *SBBreakpointLocation::GetCondition() {
std::lock_guard guard(
loc_sp->GetTarget().GetAPIMutex());
- StopCondition cond = loc_sp->GetCondition();
- if (!cond)
-return nullptr;
- return ConstString(cond.GetText()).GetCString();
+ return ConstString(loc_sp->GetCondition().GetText()).GetCString();
}
void SBBreakpointLocation::SetAutoContinue(bool auto_continue) {
diff --git a/lldb/unittests/API/CMakeLists.txt
b/lldb/unittests/API/CMakeLists.txt
index b86054fb353f7..1e778181435b4 100644
--- a/lldb/unittests/API/CMakeLists.txt
+++ b/lldb/unittests/API/CMakeLists.txt
@@ -2,7 +2,6 @@ add_lldb_unittest(APITests
SBCommandInterpreterTest.cpp
SBLineEntryTest.cpp
SBMutexTest.cpp
- SBBreakpointClearConditionTest.cpp
SBAPITEST
diff --git a/lldb/unittests/API/SBBreakpointClearConditionTest.cpp
b/lldb/unittests/API/SBBreakpointClearConditionTest.cpp
deleted file mode 100644
index 993f7f90d97c0..0
--- a/lldb/unittests/API/SBBreakpointClearConditionTest.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//===--===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===--===//
-// Use the umbrella header for -Wdocumentation.
-#include "lldb/API/LLDB.h"
-
-#include "TestingSupport/SubsystemRAII.h"
-#include "lldb/API/SBBreakpoint.h"
-#include "lldb/API/SBBreakpointLocation.h"
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBTarget.h"
-#include "gtest/gtest.h"
-#include
-#include
-
-using namespace lldb_private;
-using namespace lldb;
-
-class BreakpointClearConditionTest : public ::testing::Test {
-public:
- void SetUp() override {
-m_sb_debugger = SBDebugger::Create(/*source_init_files=*/false);
- };
-
- void TearDown() override { SBDebugger::Destroy(m_sb_debugger); }
- SBDebugger m_sb_debugger;
- SubsystemRAII subsystems;
-};
-
-template void test_condition(T sb_object) {
- const
[Lldb-commits] [lldb] Make SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again. (PR #162370)
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `lldb` at step 3 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/25424 Here is the relevant piece of the build log for the reference ``` Step 3 (cmake-configure) failure: cmake (failure) ... -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success -- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG -- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success -- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG -- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success -- Performing Test C_SUPPORTS_NO_PASS_FAILED_FLAG -- Performing Test C_SUPPORTS_NO_PASS_FAILED_FLAG - Success -- Performing Test CXX_SUPPORTS_NO_PASS_FAILED_FLAG -- Performing Test CXX_SUPPORTS_NO_PASS_FAILED_FLAG - Success -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Success -- Looking for os_signpost_interval_begin -- Looking for os_signpost_interval_begin - not found -- Looking for flock -- Looking for flock - found -- Linker detection: LLD -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Success -- Performing Test HAS_WERROR_GLOBAL_CTORS -- Performing Test HAS_WERROR_GLOBAL_CTORS - Success -- Performing Test LLVM_HAS_NOGLOBAL_CTOR_MUTEX -- Performing Test LLVM_HAS_NOGLOBAL_CTOR_MUTEX - Success -- Looking for __x86_64__ -- Looking for __x86_64__ - not found -- Found Git: /usr/bin/git (found version "2.34.1") -- Looking for logf128 -- Looking for logf128 - found -- Targeting AArch64 -- Targeting AMDGPU -- Targeting ARM -- Targeting AVR -- Targeting BPF -- Targeting Hexagon -- Targeting Lanai -- Targeting LoongArch -- Targeting Mips -- Targeting MSP430 -- Targeting NVPTX -- Targeting PowerPC -- Targeting RISCV -- Targeting Sparc -- Targeting SPIRV -- Targeting SystemZ -- Targeting VE ``` https://github.com/llvm/llvm-project/pull/162370 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Enforce that only the LLDB API unit tests can link liblldb (PR #162384)
ilovepi wrote: We're seeing this after this patch: ```console - Performing Test CXX_SUPPORTS_NO_DOCUMENTATION_DEPRECATED_SYNC - Success CMake Error at /b/s/w/ir/x/w/llvm-llvm-project/lldb/unittests/CMakeLists.txt:25 (message): The LLDBBreakpointTests are not allowed to link liblldb. Call Stack (most recent call first): /b/s/w/ir/x/w/llvm-llvm-project/lldb/unittests/Breakpoint/CMakeLists.txt:1 (add_lldb_unittest) ``` Seems related to this change. would you mind taking a look? Bot: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/lldb-linux-x64/b8701546007217978577/overview Log: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8701546007217978577/+/u/build_and_install_lldb/configure/stdout https://github.com/llvm/llvm-project/pull/162384 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Revert "Make SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again." (PR #162544)
kazutakahirata wrote: The build seems to be fixed as of 1395d4315bf49be64817b79e3863d183bb28c3e1. https://github.com/llvm/llvm-project/pull/162544 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 02572c6 - [lldb] Enforce that only the LLDB API unit tests can link liblldb (#162384)
Author: Jonas Devlieghere
Date: 2025-10-08T12:55:26-07:00
New Revision: 02572c6e9bbb60916ce471cbfec339b68a2121e2
URL:
https://github.com/llvm/llvm-project/commit/02572c6e9bbb60916ce471cbfec339b68a2121e2
DIFF:
https://github.com/llvm/llvm-project/commit/02572c6e9bbb60916ce471cbfec339b68a2121e2.diff
LOG: [lldb] Enforce that only the LLDB API unit tests can link liblldb (#162384)
Enforce that only specific tests can link liblldb. All the other unit
tests statically link the private libraries. Linking both the static
libraries and liblldb results in duplicated symbols.
Fixes #162378
Added:
Modified:
lldb/unittests/API/CMakeLists.txt
lldb/unittests/CMakeLists.txt
lldb/unittests/DAP/CMakeLists.txt
Removed:
diff --git a/lldb/unittests/API/CMakeLists.txt
b/lldb/unittests/API/CMakeLists.txt
index 06ac49244176c..ea140a23af605 100644
--- a/lldb/unittests/API/CMakeLists.txt
+++ b/lldb/unittests/API/CMakeLists.txt
@@ -3,6 +3,8 @@ add_lldb_unittest(APITests
SBLineEntryTest.cpp
SBMutexTest.cpp
+ SBAPITEST
+
LINK_LIBS
liblldb
)
diff --git a/lldb/unittests/CMakeLists.txt b/lldb/unittests/CMakeLists.txt
index 4c5267ae25b74..194dd425430e2 100644
--- a/lldb/unittests/CMakeLists.txt
+++ b/lldb/unittests/CMakeLists.txt
@@ -12,7 +12,7 @@ endif()
function(add_lldb_unittest test_name)
cmake_parse_arguments(ARG
-""
+"SBAPITEST"
""
"LINK_LIBS;LINK_COMPONENTS"
${ARGN})
@@ -21,6 +21,10 @@ function(add_lldb_unittest test_name)
message(FATAL_ERROR "Unit test name must end with 'Tests' for lit to find
it.")
endif()
+ if ("liblldb" IN_LIST ARG_LINK_LIBS AND NOT ARG_SBAPITEST)
+message(FATAL_ERROR "The ${test_name} are not allowed to link liblldb.")
+ endif()
+
list(APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS})
add_unittest(LLDBUnitTests
diff --git a/lldb/unittests/DAP/CMakeLists.txt
b/lldb/unittests/DAP/CMakeLists.txt
index 716159b454231..a08414c30e6cd 100644
--- a/lldb/unittests/DAP/CMakeLists.txt
+++ b/lldb/unittests/DAP/CMakeLists.txt
@@ -12,6 +12,8 @@ add_lldb_unittest(DAPTests
TestBase.cpp
VariablesTest.cpp
+ SBAPITEST
+
LINK_COMPONENTS
Support
LINK_LIBS
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Enforce that only the LLDB API unit tests can link liblldb (PR #162384)
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/162384 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Make SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again. (PR #162370)
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `cross-project-tests-sie-ubuntu-dwarf5` running on `doug-worker-1b` while building `lldb` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/163/builds/27856 Here is the relevant piece of the build log for the reference ``` Step 4 (cmake-configure) failure: cmake (failure) ... -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Failed -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success -- Performing Test C_SUPPORTS_NO_PASS_FAILED_FLAG -- Performing Test C_SUPPORTS_NO_PASS_FAILED_FLAG - Success -- Performing Test CXX_SUPPORTS_NO_PASS_FAILED_FLAG -- Performing Test CXX_SUPPORTS_NO_PASS_FAILED_FLAG - Success -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed -- Looking for os_signpost_interval_begin -- Looking for os_signpost_interval_begin - not found -- Looking for flock -- Looking for flock - found -- Linker detection: GNU Gold -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Success -- Performing Test HAS_WERROR_GLOBAL_CTORS -- Performing Test HAS_WERROR_GLOBAL_CTORS - Failed -- Looking for __x86_64__ -- Looking for __x86_64__ - found -- Found Git: /usr/bin/git (found version "2.34.1") -- Looking for logf128 -- Looking for logf128 - found -- Targeting X86 -- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter -- Looking for sys/resource.h -- Looking for sys/resource.h - found -- Looking for dlfcn.h -- Looking for dlfcn.h - found -- Looking for dladdr -- Looking for dladdr - found -- Clang version: 22.0.0git CMake Deprecation Warning at /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/CMakeLists.txt:456 (message): 'CLANG_ENABLE_ARCMT' is deprecated as ARCMigrate has been removed from Clang. Please use 'CLANG_ENABLE_OBJC_REWRITER' instead to enable or disable the Objective-C rewriter. -- Looking for include file sys/inotify.h -- Looking for include file sys/inotify.h - found -- Performing Test HAVE_LINKER_FLAG_LONG_PLT -- Performing Test HAVE_LINKER_FLAG_LONG_PLT - Success ``` https://github.com/llvm/llvm-project/pull/162370 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Language] Make SourceLanguage::GetDescription for language version (PR #162050)
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/162050
>From 2aee2b16d171206d953b86aa2a37ae4658c96774 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Mon, 6 Oct 2025 09:48:28 +0100
Subject: [PATCH 1/2] [lldb][Language] Make SourceLanguage::GetDescription for
language version
This makes sure we also include the version number in the description.
For `C++17`, this would, e.g., now return `"C++17"` instead of `"ISO C++"`.
---
lldb/source/Target/Language.cpp| 2 +-
lldb/unittests/Target/LanguageTest.cpp | 9 +++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp
index 2efd4bc1e2c09..8268d4ae4bb27 100644
--- a/lldb/source/Target/Language.cpp
+++ b/lldb/source/Target/Language.cpp
@@ -582,7 +582,7 @@ lldb::LanguageType SourceLanguage::AsLanguageType() const {
llvm::StringRef SourceLanguage::GetDescription() const {
return llvm::dwarf::LanguageDescription(
- static_cast(name));
+ static_cast(name), version);
}
bool SourceLanguage::IsC() const { return name == llvm::dwarf::DW_LNAME_C; }
diff --git a/lldb/unittests/Target/LanguageTest.cpp
b/lldb/unittests/Target/LanguageTest.cpp
index a1f9267dd45d0..a882d70b7e120 100644
--- a/lldb/unittests/Target/LanguageTest.cpp
+++ b/lldb/unittests/Target/LanguageTest.cpp
@@ -36,9 +36,14 @@ TEST_F(LanguageTest, SourceLanguage_GetDescription) {
EXPECT_EQ(SourceLanguage(eLanguageTypeC_plus_plus).GetDescription(),
"ISO C++");
EXPECT_EQ(SourceLanguage(eLanguageTypeC_plus_plus_17).GetDescription(),
-"ISO C++");
+"C++17");
EXPECT_EQ(SourceLanguage(eLanguageTypeC_plus_plus_20).GetDescription(),
-"ISO C++");
+"C++20");
+
+ EXPECT_EQ(SourceLanguage(eLanguageTypeC).GetDescription(),
+"C (K&R and ISO)");
+ EXPECT_EQ(SourceLanguage(eLanguageTypeC89).GetDescription(),
+"C89");
EXPECT_EQ(SourceLanguage(eLanguageTypeObjC).GetDescription(), "Objective C");
EXPECT_EQ(SourceLanguage(eLanguageTypeMipsAssembler).GetDescription(),
>From fb9a075cc92d0c2ec17f61fb29178aa05824638d Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Mon, 6 Oct 2025 10:16:48 +0100
Subject: [PATCH 2/2] fixup! clang-format
---
lldb/unittests/Target/LanguageTest.cpp | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lldb/unittests/Target/LanguageTest.cpp
b/lldb/unittests/Target/LanguageTest.cpp
index a882d70b7e120..720863bda68e4 100644
--- a/lldb/unittests/Target/LanguageTest.cpp
+++ b/lldb/unittests/Target/LanguageTest.cpp
@@ -40,10 +40,8 @@ TEST_F(LanguageTest, SourceLanguage_GetDescription) {
EXPECT_EQ(SourceLanguage(eLanguageTypeC_plus_plus_20).GetDescription(),
"C++20");
- EXPECT_EQ(SourceLanguage(eLanguageTypeC).GetDescription(),
-"C (K&R and ISO)");
- EXPECT_EQ(SourceLanguage(eLanguageTypeC89).GetDescription(),
-"C89");
+ EXPECT_EQ(SourceLanguage(eLanguageTypeC).GetDescription(), "C (K&R and
ISO)");
+ EXPECT_EQ(SourceLanguage(eLanguageTypeC89).GetDescription(), "C89");
EXPECT_EQ(SourceLanguage(eLanguageTypeObjC).GetDescription(), "Objective C");
EXPECT_EQ(SourceLanguage(eLanguageTypeMipsAssembler).GetDescription(),
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb-dap] Allow empty memory reference in disassemble arguments (PR #162517)
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Sergei Druzhkov (DrSergei)
Changes
This patch implements a workaround for a VSCode bug that causes it to send
disassemble requests with empty memory reference. You can find more detailed
description [here](https://github.com/microsoft/vscode/pull/270361). I propose
to allow empty memory reference and return invalid instructions when this
occurs.
Error log example:
```
1759923554.517830610 (stdio) -->
{"command":"disassemble","arguments":{"memoryReference":"","offset":0,"instructionOffset":-50,"instructionCount":50,"resolveSymbols":true},"type":"request","seq":3}
1759923554.518007517 (stdio) queued (command=disassemble seq=3)
1759923554.518254757 (stdio) <-- {"body":{"error":{"format":"invalid
arguments for request 'disassemble': malformed memory reference at
arguments.memoryReference\n{\n \"instructionCount\": 50,\n
\"instructionOffset\": -50,\n \"memoryReference\": /* error: malformed memory
reference */ \"\",\n \"offset\": 0,\n \"resolveSymbols\":
true\n}","id":3,"showUser":true}},"command":"disassemble","request_seq":3,"seq":0,"success":false,"type":"response"}
```
I am not sure that we should add workaround here when bug on VSCode side, but I
think this bug affects our users. WDYT?
---
Full diff: https://github.com/llvm/llvm-project/pull/162517.diff
5 Files Affected:
- (modified) lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
(+22)
- (modified) lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp (+5)
- (modified) lldb/tools/lldb-dap/JSONUtils.cpp (+6-1)
- (modified) lldb/tools/lldb-dap/JSONUtils.h (+4-1)
- (modified) lldb/tools/lldb-dap/Protocol/ProtocolRequests.cpp (+1-1)
``diff
diff --git a/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
b/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
index 0562f20335a23..6c41c86ff9ae5 100644
--- a/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
+++ b/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
@@ -91,3 +91,25 @@ def test_disassemble_backwards(self):
# clear breakpoints
self.set_source_breakpoints(source, [])
self.continue_to_exit()
+
+def test_disassemble_empty_memory_reference(self):
+"""
+Tests the 'disassemble' request with empty memory reference.
+"""
+program = self.getBuildArtifact("a.out")
+self.build_and_launch(program)
+source = "main.c"
+bp_line_no = line_number(source, "// breakpoint 1")
+self.set_source_breakpoints(source, [bp_line_no])
+self.continue_to_next_stop()
+
+instructions = self.dap_server.request_disassemble(
+memoryReference="", instructionOffset=0, instructionCount=50
+)
+self.assertEqual(len(instructions), 50)
+for instruction in instructions:
+self.assertEqual(instruction["presentationHint"], "invalid")
+
+# clear breakpoints
+self.set_source_breakpoints(source, [])
+self.continue_to_exit()
diff --git a/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
b/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
index 9542f091b055e..6d2eb74a9634c 100644
--- a/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
@@ -182,6 +182,11 @@ static DisassembledInstruction
ConvertSBInstructionToDisassembledInstruction(
/// `supportsDisassembleRequest` is true.
llvm::Expected
DisassembleRequestHandler::Run(const DisassembleArguments &args) const {
+ if (args.memoryReference == LLDB_INVALID_ADDRESS) {
+std::vector invalid_instructions(
+args.instructionCount, GetInvalidInstruction());
+return DisassembleResponseBody{std::move(invalid_instructions)};
+ }
const lldb::addr_t addr_ptr = args.memoryReference + args.offset;
lldb::SBAddress addr(addr_ptr, dap.target);
if (!addr.IsValid())
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp
b/lldb/tools/lldb-dap/JSONUtils.cpp
index 4f26599a49bac..c00e39c86b92a 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -122,7 +122,7 @@ DecodeMemoryReference(llvm::StringRef memoryReference) {
bool DecodeMemoryReference(const llvm::json::Value &v, llvm::StringLiteral key,
lldb::addr_t &out, llvm::json::Path path,
- bool required) {
+ bool required, bool allow_empty) {
const llvm::json::Object *v_obj = v.getAsObject();
if (!v_obj) {
path.report("expected object");
@@ -145,6 +145,11 @@ bool DecodeMemoryReference(const llvm::json::Value &v,
llvm::StringLiteral key,
return false;
}
+ if (allow_empty && mem_ref_str->empty()) {
+out = LLDB_INVALID_ADDRESS;
+return true;
+ }
+
const std::optional addr_opt =
DecodeMemoryReference(*mem_ref_str);
if (!addr_opt) {
diff --git a/lldb/tools/lldb-dap/JSO
[Lldb-commits] [lldb] support attaching by name for platform android (PR #160931)
cs01 wrote: If there is > 1 process with the same name, this occurs: ``` (lldb) process attach -n sleep error: attach failed: more than one process named sleep: PIDPARENT USER TRIPLE ARGUMENTS == == == == 5231 4741 root armv7-unknown-linux-androidsleep 1 5232 4741 root armv7-unknown-linux-androidsleep 1 5233 4741 root armv7-unknown-linux-androidsleep 1 5330 4741 root armv7-unknown-linux-androidsleep 10006 ``` https://github.com/llvm/llvm-project/pull/160931 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Language] Make SourceLanguage::GetDescription for language version (PR #162050)
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/162050 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][windows] add support for out of PATH python.dll resolution (PR #162509)
@@ -426,6 +433,47 @@ SBError Driver::ProcessArgs(const opt::InputArgList &args,
bool &exiting) {
return error;
}
+#ifdef _WIN32
+// Returns the full path to the lldb.exe executable
+inline std::wstring GetPathToExecutableW() {
+ // Iterate until we reach the Windows max path length (32,767).
+ std::vector buffer;
+ buffer.resize(MAX_PATH);
+ while (buffer.size() < 32767) {
compnerd wrote:
There is a doubling on failure, so this shouldn't be always false.
https://github.com/llvm/llvm-project/pull/162509
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
