[Lldb-commits] [lldb] [llvm] Add AArch64 support to the premerge tests (PR #155274)
tstellar wrote: Also, because I had to change the name of the tests to include the arch, we will need to update the rulset which requires the precommit tests to pass. https://github.com/llvm/llvm-project/pull/155274 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Correct bridgeOS -> BridgeOS spelling (PR #163479)
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/163479 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][ObjC] Consult Objective-C runtime decl vendor when completing type (PR #164011)
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/164011 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] refactor watchpoint functionality (PR #159807)
dlav-sc wrote: The RFC topic is here: https://discourse.llvm.org/t/rfc-software-watchpoints-support/88391 Please take a look when you get a chance. https://github.com/llvm/llvm-project/pull/159807 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
@@ -2427,9 +2438,16 @@ static bool IsStandardConversion(Sema &S, Expr* From,
QualType ToType,
// Complex promotion (Clang extension)
SCS.Second = ICK_Complex_Promotion;
FromType = ToType.getUnqualifiedType();
+ } else if (S.IsOverflowBehaviorTypePromotion(FromType, ToType)) {
+// OverflowBehaviorType promotions
+SCS.Second = ICK_Integral_Promotion;
+FromType = ToType.getUnqualifiedType();
JustinStitt wrote:
As per the documentation and previously agreed upon semantics, these overflow
behavior types have special promotion properties. We do this to preserve
bitwidths when it matters.
https://github.com/llvm/llvm-project/pull/148914
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] update lldb-server platform help parsing (PR #162730)
https://github.com/cs01 updated https://github.com/llvm/llvm-project/pull/162730
>From e0cf0976a43e09cea26693727888c08ad8021af0 Mon Sep 17 00:00:00 2001
From: Chad Smith
Date: Thu, 9 Oct 2025 11:52:01 -0700
Subject: [PATCH] update lldb-server platform help text
---
...s.test => TestGdbserverErrorMessages.test} | 0
.../TestPlatformErrorMessages.test| 27 ++
.../Shell/lldb-server/TestPlatformHelp.test | 41 +++
.../TestPlatformSuccessfulStartup.test| 37 +++
lldb/tools/lldb-server/CMakeLists.txt | 5 +
lldb/tools/lldb-server/PlatformOptions.td | 75 +
lldb/tools/lldb-server/lldb-platform.cpp | 265 +++---
7 files changed, 341 insertions(+), 109 deletions(-)
rename lldb/test/Shell/lldb-server/{TestErrorMessages.test =>
TestGdbserverErrorMessages.test} (100%)
create mode 100644 lldb/test/Shell/lldb-server/TestPlatformErrorMessages.test
create mode 100644 lldb/test/Shell/lldb-server/TestPlatformHelp.test
create mode 100644
lldb/test/Shell/lldb-server/TestPlatformSuccessfulStartup.test
create mode 100644 lldb/tools/lldb-server/PlatformOptions.td
diff --git a/lldb/test/Shell/lldb-server/TestErrorMessages.test
b/lldb/test/Shell/lldb-server/TestGdbserverErrorMessages.test
similarity index 100%
rename from lldb/test/Shell/lldb-server/TestErrorMessages.test
rename to lldb/test/Shell/lldb-server/TestGdbserverErrorMessages.test
diff --git a/lldb/test/Shell/lldb-server/TestPlatformErrorMessages.test
b/lldb/test/Shell/lldb-server/TestPlatformErrorMessages.test
new file mode 100644
index 0..549af99930c6b
--- /dev/null
+++ b/lldb/test/Shell/lldb-server/TestPlatformErrorMessages.test
@@ -0,0 +1,27 @@
+# UNSUPPORTED: system-windows
+
+RUN: %platformserver 2>&1 | FileCheck --check-prefixes=NO_LISTEN,ALL %s
+NO_LISTEN: error: either --listen or --child-platform-fd is required
+
+RUN: %lldb-server platform --listen 2>&1 | FileCheck
--check-prefixes=LISTEN_MISSING,ALL %s
+LISTEN_MISSING: error: --listen: missing argument
+
+RUN: %lldb-server p --bogus 2>&1 | FileCheck --check-prefixes=BOGUS,ALL %s
+BOGUS: error: unknown argument '--bogus'
+
+RUN: %platformserver --gdbserver-port 2>&1 | FileCheck
--check-prefixes=GDBPORT_MISSING,ALL %s
+GDBPORT_MISSING: error: --gdbserver-port: missing argument
+
+RUN: %platformserver --gdbserver-port notanumber --listen :1234 2>&1 |
FileCheck --check-prefixes=GDBPORT_INVALID %s
+GDBPORT_INVALID: error: invalid --gdbserver-port value
+
+RUN: %platformserver --socket-file 2>&1 | FileCheck
--check-prefixes=SOCKETFILE_MISSING,ALL %s
+SOCKETFILE_MISSING: error: --socket-file: missing argument
+
+RUN: %platformserver --log-file 2>&1 | FileCheck
--check-prefixes=LOGFILE_MISSING,ALL %s
+LOGFILE_MISSING: error: --log-file: missing argument
+
+RUN: %platformserver --log-channels 2>&1 | FileCheck
--check-prefixes=LOGCHANNELS_MISSING,ALL %s
+LOGCHANNELS_MISSING: error: --log-channels: missing argument
+
+ALL: Use 'lldb-server {{p|platform}} --help' for a complete list of options.
diff --git a/lldb/test/Shell/lldb-server/TestPlatformHelp.test
b/lldb/test/Shell/lldb-server/TestPlatformHelp.test
new file mode 100644
index 0..1fe08a39ba0e9
--- /dev/null
+++ b/lldb/test/Shell/lldb-server/TestPlatformHelp.test
@@ -0,0 +1,41 @@
+# UNSUPPORTED: system-windows
+
+RUN: %platformserver --help 2>&1 | FileCheck %s
+RUN: %platformserver -h 2>&1 | FileCheck %s
+RUN: %lldb-server p --help 2>&1 | FileCheck %s
+RUN: %lldb-server p -h 2>&1 | FileCheck %s
+RUN: %lldb-server platform --help 2>&1 | FileCheck %s
+RUN: %lldb-server platform -h 2>&1 | FileCheck %s
+
+CHECK: OVERVIEW: lldb-server platform
+CHECK: USAGE: lldb-server {{p|platform}} [options] --listen
<{{[[]}}host]:port> {{[[]}}[--] program args...]
+
+CHECK: CONNECTION OPTIONS:
+CHECK: --gdbserver-port
+CHECK-SAME: Short form: -P
+CHECK: --listen <{{[[]}}host]:port>
+CHECK-SAME: Short form: -L
+CHECK: --socket-file
+CHECK-SAME: Short form: -f
+
+CHECK: GENERAL OPTIONS:
+CHECK: --help
+CHECK: --log-channels
+CHECK: Short form: -c
+CHECK: --log-file
+CHECK-SAME: Short form: -l
+CHECK: --server
+
+CHECK: OPTIONS:
+CHECK: -- program args
+
+CHECK: DESCRIPTION
+CHECK: Acts as a platform server for remote debugging
+
+CHECK: EXAMPLES
+CHECK: # Listen on port 1234, exit after first connection
+CHECK: lldb-server platform --listen tcp://0.0.0.0:1234
+CHECK: # Listen on port , accept multiple connections
+CHECK: lldb-server platform --server --listen tcp://localhost:
+CHECK: # Listen on Unix domain socket
+CHECK: lldb-server platform --listen unix:///tmp/lldb-server.sock
diff --git a/lldb/test/Shell/lldb-server/TestPlatformSuccessfulStartup.test
b/lldb/test/Shell/lldb-server/TestPlatformSuccessfulStartup.test
new file mode 100644
index 0..77e35fb158dae
--- /dev/null
+++ b/lldb/test/Shell/lldb-server/TestPlatformSuccessfulStartup.test
@@ -0,0 +1,37 @@
+# UNSUPPORTED: system-windows
+
+# Test successful startup with valid TCP listen address
+# T
[Lldb-commits] [lldb] [lldb] Add deleted line in NextRangeBreakpointExplainsStop (PR #161597)
augusto2112 wrote: By the way, the comment [on this line](https://github.com/llvm/llvm-project/pull/161597/files#diff-46aa8e984a6ebc1d4032efa38c8fba130ab4a8851fba18842e36c37daef32e50R471) strongly implies that the breakpoint should be cleared: ``` // If we've hit the next branch breakpoint, then clear it. ``` 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] Introduce ScriptedFrameProvider for real threads (PR #161870)
@@ -0,0 +1,52 @@
+//===-- ScriptedFrameProvider.h *- C++ -*-===//
+//
+// 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
+//
+//===--===//
+
+#ifndef LLDB_INTERPRETER_SCRIPTEDFRAMEPROVIDER_H
+#define LLDB_INTERPRETER_SCRIPTEDFRAMEPROVIDER_H
+
+#include "lldb/Utility/ScriptedMetadata.h"
+#include "lldb/Utility/Status.h"
+#include "lldb/lldb-forward.h"
+#include "llvm/Support/Error.h"
+
+namespace lldb_private {
+
+class ScriptedFrameProvider {
+public:
+ /// Constructor that initializes the scripted frame provider.
+ ///
+ /// \param[in] thread_sp
+ /// The thread for which to provide scripted frames.
+ ///
+ /// \param[in] scripted_metadata
+ /// The metadata containing the class name and arguments for the
+ /// scripted frame provider.
+ ///
+ /// \param[out] error
+ /// Status object to report any errors during initialization.
+ ScriptedFrameProvider(lldb::ThreadSP thread_sp,
+const ScriptedMetadata &scripted_metadata,
+Status &error);
+ ~ScriptedFrameProvider();
+
+ /// Get the stack frames from the scripted frame provider.
+ ///
+ /// \return
+ /// An Expected containing the StackFrameListSP if successful,
+ /// otherwise an error describing what went wrong.
+ llvm::Expected
+ GetStackFrames(lldb::StackFrameListSP real_frames);
JDevlieghere wrote:
Assuming this gets called lazily from the StackFrameList:
1. I would expect this to take the `provided_frames` as an in/out parameter.
2. I would expect an argument with a number of how many frames to provide.
The number of frames should be larger than the size of the already provided
frames.
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] [lldb][CPlusPlusLanguage] Avoid redundant const char* -> StringRef roundtrip (PR #161499)
DavidSpickett wrote: > We've been seen (very sporadic) lifetime issues around this area. Could the ConstString not be null terminated and sometimes the data after it happens to be interpretable as a string and sometimes it isn't? Thinking about what the conclusion is if you don't see anymore crashes after this change. The explicit length in the StringRef might be preventing an over reading strlen. https://github.com/llvm/llvm-project/pull/161499 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Introduce ScriptedFrameProvider (PR #161870)
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Med Ismail Bennani (medismailben)
Changes
---
Patch is 27.35 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llvm/llvm-project/pull/161870.diff
19 Files Affected:
- (modified) lldb/include/lldb/API/SBThread.h (+2)
- (added)
lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h (+27)
- (modified) lldb/include/lldb/Interpreter/ScriptInterpreter.h (+5)
- (added) lldb/include/lldb/Interpreter/ScriptedFrameProvider.h (+51)
- (modified) lldb/include/lldb/Target/Thread.h (+9)
- (modified) lldb/include/lldb/lldb-forward.h (+6)
- (modified) lldb/source/API/SBThread.cpp (+27)
- (modified) lldb/source/Commands/CommandObjectFrame.cpp (+95)
- (modified) lldb/source/Commands/CommandObjectThread.cpp (+1)
- (modified) lldb/source/Interpreter/CMakeLists.txt (+1)
- (added) lldb/source/Interpreter/ScriptedFrameProvider.cpp (+86)
- (modified)
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt (+1)
- (modified)
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptInterpreterPythonInterfaces.h
(+1)
- (added)
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.cpp
(+57)
- (added)
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.h
(+41)
- (modified)
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
(+4)
- (modified)
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (+5)
- (modified)
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h (+3)
- (modified) lldb/source/Target/Thread.cpp (+30)
``diff
diff --git a/lldb/include/lldb/API/SBThread.h b/lldb/include/lldb/API/SBThread.h
index e9fe5858d125e..7b91228528bc7 100644
--- a/lldb/include/lldb/API/SBThread.h
+++ b/lldb/include/lldb/API/SBThread.h
@@ -229,6 +229,8 @@ class LLDB_API SBThread {
SBValue GetSiginfo();
+ void RegisterFrameProvider(const char *class_name, SBStructuredData
&args_data);
+
private:
friend class SBBreakpoint;
friend class SBBreakpointLocation;
diff --git
a/lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
b/lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
new file mode 100644
index 0..7618d5e15d563
--- /dev/null
+++ b/lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
@@ -0,0 +1,27 @@
+//===-- ScriptedFrameProviderInterface.h *- C++
-*-===//
+//
+// 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
+//
+//===--===//
+
+#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
+#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
+
+#include "lldb/lldb-private.h"
+
+#include "ScriptedInterface.h"
+
+namespace lldb_private {
+class ScriptedFrameProviderInterface : public ScriptedInterface {
+public:
+ virtual llvm::Expected
+ CreatePluginObject(llvm::StringRef class_name, lldb::ThreadSP thread_sp,
+ StructuredData::DictionarySP args_sp) = 0;
+
+ virtual StructuredData::ArraySP GetStackFrames() { return {}; }
+};
+} // namespace lldb_private
+
+#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h
b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
index 024bbc90a9a39..76ade002089bb 100644
--- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
@@ -27,6 +27,7 @@
#include "lldb/Host/StreamFile.h"
#include "lldb/Interpreter/Interfaces/OperatingSystemInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedFrameInterface.h"
+#include "lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h"
@@ -536,6 +537,10 @@ class ScriptInterpreter : public PluginInterface {
return {};
}
+ virtual lldb::ScriptedFrameProviderInterfaceSP
CreateScriptedFrameProviderInterface() {
+return {};
+ }
+
virtual lldb::ScriptedThreadPlanInterfaceSP
CreateScriptedThreadPlanInterface() {
return {};
diff --git a/lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
b/lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
new file mode 100644
index 0..6c4053f11eeb3
--- /dev/null
+++ b/lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
@@ -0,0 +1,51 @@
+//===-- ScriptedFrameProvider.h *- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 w
[Lldb-commits] [lldb] [lldb] Introduce ScritedFrameProvider (PR #161870)
https://github.com/medismailben created
https://github.com/llvm/llvm-project/pull/161870
None
>From c1792fcf350dae422b1671ba18e2b095e45863e1 Mon Sep 17 00:00:00 2001
From: Med Ismail Bennani
Date: Fri, 3 Oct 2025 16:53:37 +0100
Subject: [PATCH] [lldb] Introduce ScritedFrameProvider
Signed-off-by: Med Ismail Bennani
---
lldb/include/lldb/API/SBThread.h | 2 +
.../ScriptedFrameProviderInterface.h | 27 ++
.../lldb/Interpreter/ScriptInterpreter.h | 5 +
.../lldb/Interpreter/ScriptedFrameProvider.h | 51 ++
lldb/include/lldb/Target/Thread.h | 9 ++
lldb/include/lldb/lldb-forward.h | 6 ++
lldb/source/API/SBThread.cpp | 27 ++
lldb/source/Commands/CommandObjectFrame.cpp | 95 +++
lldb/source/Commands/CommandObjectThread.cpp | 1 +
lldb/source/Interpreter/CMakeLists.txt| 1 +
.../Interpreter/ScriptedFrameProvider.cpp | 86 +
.../Python/Interfaces/CMakeLists.txt | 1 +
.../ScriptInterpreterPythonInterfaces.h | 1 +
.../ScriptedFrameProviderPythonInterface.cpp | 57 +++
.../ScriptedFrameProviderPythonInterface.h| 41
.../Interfaces/ScriptedPythonInterface.h | 4 +
.../Python/ScriptInterpreterPython.cpp| 5 +
.../Python/ScriptInterpreterPythonImpl.h | 3 +
lldb/source/Target/Thread.cpp | 30 ++
19 files changed, 452 insertions(+)
create mode 100644
lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
create mode 100644 lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
create mode 100644 lldb/source/Interpreter/ScriptedFrameProvider.cpp
create mode 100644
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.cpp
create mode 100644
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.h
diff --git a/lldb/include/lldb/API/SBThread.h b/lldb/include/lldb/API/SBThread.h
index e9fe5858d125e..7b91228528bc7 100644
--- a/lldb/include/lldb/API/SBThread.h
+++ b/lldb/include/lldb/API/SBThread.h
@@ -229,6 +229,8 @@ class LLDB_API SBThread {
SBValue GetSiginfo();
+ void RegisterFrameProvider(const char *class_name, SBStructuredData
&args_data);
+
private:
friend class SBBreakpoint;
friend class SBBreakpointLocation;
diff --git
a/lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
b/lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
new file mode 100644
index 0..7618d5e15d563
--- /dev/null
+++ b/lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
@@ -0,0 +1,27 @@
+//===-- ScriptedFrameProviderInterface.h *- C++
-*-===//
+//
+// 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
+//
+//===--===//
+
+#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
+#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
+
+#include "lldb/lldb-private.h"
+
+#include "ScriptedInterface.h"
+
+namespace lldb_private {
+class ScriptedFrameProviderInterface : public ScriptedInterface {
+public:
+ virtual llvm::Expected
+ CreatePluginObject(llvm::StringRef class_name, lldb::ThreadSP thread_sp,
+ StructuredData::DictionarySP args_sp) = 0;
+
+ virtual StructuredData::ArraySP GetStackFrames() { return {}; }
+};
+} // namespace lldb_private
+
+#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h
b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
index 024bbc90a9a39..76ade002089bb 100644
--- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
@@ -27,6 +27,7 @@
#include "lldb/Host/StreamFile.h"
#include "lldb/Interpreter/Interfaces/OperatingSystemInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedFrameInterface.h"
+#include "lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h"
#include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h"
@@ -536,6 +537,10 @@ class ScriptInterpreter : public PluginInterface {
return {};
}
+ virtual lldb::ScriptedFrameProviderInterfaceSP
CreateScriptedFrameProviderInterface() {
+return {};
+ }
+
virtual lldb::ScriptedThreadPlanInterfaceSP
CreateScriptedThreadPlanInterface() {
return {};
diff --git a/lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
b/lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
new file mode 100644
index 0..6c4053f11eeb3
--- /dev/null
+++ b/lldb/i
[Lldb-commits] [lldb] [LLDB][PDB] Run UDT layout test with native PDB too (PR #159769)
@@ -1,51 +1,63 @@
REQUIRES: target-windows, lld
RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/UdtLayoutTest.cpp
-RUN: %lldb -b -s %S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s
+RUN: env LLDB_USE_NATIVE_PDB_READER=0 %lldb -b -s
%S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s
+RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -b -s
%S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s
-CHECK:(int) C::abc = 123
+CHECK:(int) {{(::)?}}C::abc = 123
CHECK:(List[16]) ls = {
-CHECK: [15] = {
-CHECK:Prev = nullptr
-CHECK:Next = nullptr
-CHECK:Value = {
-CHECK: B<0> = {
-CHECK:A = {
-CHECK: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:}
-CHECK:_a = '\x01'
-CHECK:_b = 2
-CHECK:_c = 3
-CHECK: }
-CHECK: B<1> = {
-CHECK:A = {
-CHECK: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:}
-CHECK:_a = '\x02'
-CHECK:_b = 4
-CHECK:_c = 6
-CHECK: }
-CHECK: B<2> = {
-CHECK:A = {
-CHECK: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:}
-CHECK:_a = '\x03'
-CHECK:_b = 6
-CHECK:_c = 9
-CHECK: }
-CHECK: B<3> = {
-CHECK:A = {
-CHECK: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:}
-CHECK:_a = '\x04'
-CHECK:_b = 8
-CHECK:_c = 12
-CHECK: }
-CHECK: A = {
-CHECK:_u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK: }
-CHECK: _x = 5
-CHECK: _y = 10
-CHECK: _z = '\x0f'
-CHECK:}
-CHECK: }
-CHECK:}
+
+CHECK: [14] = {
Michael137 wrote:
Can we just have two `CHECK` prefixes. One for the native and one for the DIA
plugin. And check the respective layouts.
I find that less confusing to someone reading this file for the first time
https://github.com/llvm/llvm-project/pull/159769
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][MachO][NFC] Extract ObjC metadata symbol parsing into helper function (PR #161536)
https://github.com/Michael137 auto_merge_enabled https://github.com/llvm/llvm-project/pull/161536 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Fix TestEmptyFuncThreadStepOut.py (PR #161788)
https://github.com/igorkudrin edited https://github.com/llvm/llvm-project/pull/161788 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Fix TestEmptyFuncThreadStepOut.py (PR #161788)
igorkudrin wrote:
> > because a breakpoint was set before the last instruction of the function
>
> Expand this a bit. Like "Meaning, before the epilogue of the function."
I expanded the description a bit; hope it is clearer now. I don't think
mentioning "epilogue" would improve it. Probably, my original description,
which mentioned it, was too confusing.
Actually, we can set a breakpoint at the first instruction of the epilogue by
rewriting the source like:
```
void done() {
return; // Set breakpoint here
}
```
With `br set -p "// Set breakpoint here"`, a breakpoint can be set at the start
of the epilogue:
```
> objdump -dl main.o
:
done():
.../main.c:2
0: 55 push %rbp
1: 48 89 e5mov%rsp,%rbp
.../main.c:3
4: 5d pop%rbp
5: c3 ret
6: 66 2e 0f 1f 84 00 00cs nopw 0x0(%rax,%rax,1)
d: 00 00 00
```
But that would not help much, because it is still not the last instruction of
the function and does not prove interaction between thread plans.
https://github.com/llvm/llvm-project/pull/161788
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB] Add type casting to DIL. (PR #159500)
@@ -44,6 +47,31 @@ nested_name_specifier = type_name "::" | namespace_name '::' | nested_name_specifier identifier "::" ; +type_id = type_specifier_seq [abstract_declarator] ; + +type_specifier_seq = type_specifier [type_specifier]; + +type_specifier = ["::"] [nested_name_specifier] type_name; + | "char" + | "bool" + | "short" + | "int" + | "long" + | "signed" + | "unsigned" + | "float" + | "double" + | "void" ; adrian-prantl wrote: I think I have a problem with hardcoding C type names in the grammar itself. I believe this should be an identifier and it should be up to TypeSystem to recognize these. Is that feasible? https://github.com/llvm/llvm-project/pull/159500 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Implement Process::ReadMemoryRanges (PR #163651)
@@ -1571,6 +1571,25 @@ class Process : public std::enable_shared_from_this, virtual size_t ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, Status &error); + /// Read from multiple memory ranges and write the results into buffer. + /// + /// \param[in] ranges + /// A collection of ranges (base address + size) to read from. + /// + /// \param[out] buffer + /// A buffer where the read memory will be written to. It must be at least felipepiovezan wrote: Yes! It is a bit subtle, maybe we can find a way to make it a bit more explicit https://github.com/llvm/llvm-project/pull/163651 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Support shared cache relative objc method types (PR #163663)
https://github.com/cooperp approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/163663 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Added a check for the specialization existence (PR #154123)
https://github.com/tgs-sc updated
https://github.com/llvm/llvm-project/pull/154123
>From f158ed36c1045b8b996786b7c022fd26680d95ea Mon Sep 17 00:00:00 2001
From: Timur Golubovich
Date: Mon, 8 Sep 2025 14:43:50 +0300
Subject: [PATCH] [lldb][DWARFASTParserClang] Added a check for the
specialization existence
While debugging an application with incorrect dwarf information, where
DW_TAG_template_value_parameter was lost, I found that lldb does not
check that the corresponding specialization exists. As a result, at the
stage when ASTImporter works, the type is completed in such a way that
it inherits from itself. And during the calculation of layout, an
infinite recursion occurs. To catch this error, I added a corresponding check
at the stage of restoring the type from dwarf information.
---
.../SymbolFile/DWARF/DWARFASTParserClang.cpp | 11 +
.../TypeSystem/Clang/TypeSystemClang.cpp | 5 +
.../unittests/SymbolFile/DWARF/CMakeLists.txt | 3 +-
.../DWARF/DWARFASTParserClangTests.cpp| 34 +
.../Inputs/DW_AT_spec_decl_exists-test.yaml | 677 ++
5 files changed, 729 insertions(+), 1 deletion(-)
create mode 100644
lldb/unittests/SymbolFile/DWARF/Inputs/DW_AT_spec_decl_exists-test.yaml
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 82e9d867c3ac0..36bc17680f3fa 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1901,6 +1901,17 @@ DWARFASTParserClang::ParseStructureLikeDIE(const
SymbolContext &sc,
m_ast.CreateClassTemplateSpecializationDecl(
containing_decl_ctx, GetOwningClangModule(die),
class_template_decl,
tag_decl_kind, template_param_infos);
+if (!class_specialization_decl) {
+ if (log) {
+dwarf->GetObjectFile()->GetModule()->LogMessage(
+log,
+"SymbolFileDWARF({0:p}) - Failed to create specialization for "
+"clang::ClassTemplateDecl({1}, {2:p}).",
+this, llvm::StringRef(attrs.name), class_template_decl);
+ }
+ return TypeSP();
+}
+
clang_type =
m_ast.CreateClassTemplateSpecializationType(class_specialization_decl);
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 21c265ede0bc5..8783bc1919283 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1681,6 +1681,11 @@ TypeSystemClang::CreateClassTemplateSpecializationDecl(
class_template_specialization_decl->setInstantiationOf(class_template_decl);
class_template_specialization_decl->setTemplateArgs(
TemplateArgumentList::CreateCopy(ast, args));
+ void *insert_pos = nullptr;
+ if (class_template_decl->findSpecialization(args, insert_pos))
+return nullptr;
+ class_template_decl->AddSpecialization(class_template_specialization_decl,
+ insert_pos);
class_template_specialization_decl->setDeclName(
class_template_decl->getDeclName());
diff --git a/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
b/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
index eb2e00adba64b..88492188e794b 100644
--- a/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
+++ b/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
@@ -27,6 +27,7 @@ add_lldb_unittest(SymbolFileDWARFTests
set(test_inputs
test-dwarf.exe
- DW_AT_default_value-test.yaml)
+ DW_AT_default_value-test.yaml
+ DW_AT_spec_decl_exists-test.yaml)
add_unittest_inputs(SymbolFileDWARFTests "${test_inputs}")
diff --git a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
index 0cae01de2902a..1abce6999874e 100644
--- a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
+++ b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
@@ -599,6 +599,40 @@ TEST_F(DWARFASTParserClangTests,
TestDefaultTemplateParamParsing) {
}
}
+TEST_F(DWARFASTParserClangTests, TestSpecDeclExistsError) {
+ // Tests that parsing a ClassTemplateSpecializationDecl that already exists
+ // is handled gracefully.
+ auto BufferOrError = llvm::MemoryBuffer::getFile(
+ GetInputFilePath("DW_AT_spec_decl_exists-test.yaml"), /*IsText=*/true);
+ ASSERT_TRUE(BufferOrError);
+ YAMLModuleTester t(BufferOrError.get()->getBuffer());
+
+ DWARFUnit *unit = t.GetDwarfUnit();
+ ASSERT_NE(unit, nullptr);
+ const DWARFDebugInfoEntry *cu_entry = unit->DIE().GetDIE();
+ ASSERT_EQ(cu_entry->Tag(), DW_TAG_compile_unit);
+ DWARFDIE cu_die(unit, cu_entry);
+
+ auto holder = std::make_unique("ast");
+ auto &ast_ctx = *holder->GetAST();
+ DWARFASTParserClangStub ast_parser(ast_ctx);
+
+ llvm::SmallVector specializations;
+ for (DWARFDIE die : cu_die.children()) {
+SymbolC
[Lldb-commits] [lldb] support attaching by name for platform android (PR #160931)
@@ -477,6 +477,248 @@ std::string PlatformAndroid::GetRunAs() {
}
return run_as.str();
}
+
+// Helper function to populate process status information from
+// /proc/[pid]/status
+void PlatformAndroid::PopulateProcessStatusInfo(
+lldb::pid_t pid, ProcessInstanceInfo &process_info) {
+ // Read /proc/[pid]/status to get parent PID, UIDs, and GIDs
+ Status error;
+ auto status_adb = GetAdbClient(error);
+ if (error.Fail())
+return;
+
+ std::string status_output;
+ StreamString status_cmd;
+ status_cmd.Printf(
+ "cat /proc/%llu/status 2>/dev/null | grep -E '^(PPid|Uid|Gid):'",
+ (unsigned long long)pid);
+ Status status_error =
+ status_adb->Shell(status_cmd.GetData(), seconds(5), &status_output);
+
+ if (status_error.Fail() || status_output.empty())
+return;
+
+ llvm::SmallVector lines;
+ llvm::StringRef(status_output).split(lines, '\n');
+
+ for (llvm::StringRef line : lines) {
+line = line.trim();
+if (line.starts_with("PPid:")) {
+ llvm::StringRef ppid_str = line.substr(5).trim();
+ lldb::pid_t ppid;
+ if (llvm::to_integer(ppid_str, ppid))
+process_info.SetParentProcessID(ppid);
+} else if (line.starts_with("Uid:")) {
+ llvm::SmallVector uid_parts;
+ line.substr(4).trim().split(uid_parts, '\t', -1, false);
+ if (uid_parts.size() >= 2) {
+uint32_t uid, euid;
+if (llvm::to_integer(uid_parts[0].trim(), uid))
+ process_info.SetUserID(uid);
+if (llvm::to_integer(uid_parts[1].trim(), euid))
+ process_info.SetEffectiveUserID(euid);
+ }
+} else if (line.starts_with("Gid:")) {
+ llvm::SmallVector gid_parts;
+ line.substr(4).trim().split(gid_parts, '\t', -1, false);
+ if (gid_parts.size() >= 2) {
+uint32_t gid, egid;
+if (llvm::to_integer(gid_parts[0].trim(), gid))
+ process_info.SetGroupID(gid);
+if (llvm::to_integer(gid_parts[1].trim(), egid))
+ process_info.SetEffectiveGroupID(egid);
+ }
+}
+ }
+}
+
+// Helper function to populate command line arguments from /proc/[pid]/cmdline
+void PlatformAndroid::PopulateProcessCommandLine(
+lldb::pid_t pid, ProcessInstanceInfo &process_info) {
+ // Read /proc/[pid]/cmdline to get command line arguments
+ Status error;
+ auto cmdline_adb = GetAdbClient(error);
+ if (error.Fail())
+return;
+
+ std::string cmdline_output;
+ StreamString cmdline_cmd;
+ cmdline_cmd.Printf("cat /proc/%llu/cmdline 2>/dev/null | tr '\\000' ' '",
+ (unsigned long long)pid);
+ Status cmdline_error =
+ cmdline_adb->Shell(cmdline_cmd.GetData(), seconds(5), &cmdline_output);
+
+ if (cmdline_error.Fail() || cmdline_output.empty())
+return;
+
+ cmdline_output = llvm::StringRef(cmdline_output).trim().str();
+ if (cmdline_output.empty())
+return;
+
+ llvm::SmallVector args;
+ llvm::StringRef(cmdline_output).split(args, ' ', -1, false);
+ if (args.empty())
+return;
+
+ process_info.SetArg0(args[0]);
+ Args process_args;
+ for (size_t i = 1; i < args.size(); i++) {
+if (!args[i].empty())
+ process_args.AppendArgument(args[i]);
+ }
+ process_info.SetArguments(process_args, false);
+}
+
+// Helper function to populate architecture from /proc/[pid]/exe
+void PlatformAndroid::PopulateProcessArchitecture(
+lldb::pid_t pid, ProcessInstanceInfo &process_info) {
+ // Read /proc/[pid]/exe to get executable path for architecture detection
+ Status error;
+ auto exe_adb = GetAdbClient(error);
walter-erquinigo wrote:
dito
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] Add bidirectional packetLog to gdbclientutils.py (PR #162176)
DavidSpickett wrote:
> Yes it is, sorry about that. I used to use phabricator for this back when
> that was the way to do reviews, I don't currently know of a tool that works
> with github PR's
I miss this feature too. We mention a couple of tools on
https://llvm.org/docs/GitHub.html#using-graphite-for-stacked-pull-requests but
I've not tried any of them myself.
> I meant that the mock server is logging both the packets it receives from the
> lldb client and the packets it sends back to it.
Ok so we're only talking about the mock server here.
> It's mostly calling packetLog.index(...) with specific packets to confirm
> their presence and testing ranges based on that
Reading the whole PR there are several confusing things (which predate your
changes but still) in here. They only get worse when we add another log.
I would prefer you do this by extending the current log to include all packets.
So that we have 1 log with 3 views. Sent, received and all. The existing code
can all be changed to use the received view. Logging prints them all. Could
leave out sent given that nothing will use it right now.
As a starting point (feel free to take this):
```
from collections.abc import Sequence
class PacketLog(object):
SENT = 0
RECEIVED = 1
def __init__(self):
self._sent = []
self._received = []
self._order = []
def add_sent(self, packet):
self._sent.append(packet)
self._order.append(PacketLog.SENT)
def add_received(self, packet):
self._received.append(packet)
self._order.append(PacketLog.RECEIVED)
def __iter__(self):
sent = iter(self._sent)
received = iter(self._received)
for direction in self._order:
if direction == PacketLog.SENT:
yield next(sent)
else:
yield next(received)
class PacketView(Sequence):
def __init__(self, packets):
self.packets = packets
def __getitem__(self, idx):
return self.packets[idx]
def __len__(self):
return len(self.packets)
@property
def sent(self):
return PacketLog.PacketView(self._sent)
@property
def received(self):
return PacketLog.PacketView(self._received)
pl = PacketLog()
pl.add_sent("sent this thing 1")
pl.add_received("received this thing 2")
pl.add_sent("sent this thing 3")
pl.add_received("received this thing 4")
for p in pl:
print(p)
print()
for p in pl.sent:
print(p)
print(pl.sent.index("sent this thing 1"))
print(pl.sent[0])
print()
for p in pl.received:
print(p)
print(pl.received[0])
print(pl.received.index("received this thing 4"))
print()
pl.received[1] = "345345345" # will error, don't let us modify the packets
```
Two lists so we keep the indexing, slicing, iterating we do now, and a third
list for insertion order so the log prints them in the correct sequence.
Wrapping the lists prevents us modifying them and making the order go out of
sync.
There's some super fancy ways to do this but we're not too concerned about
being Pythonic here.
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] support attaching by name for platform android (PR #160931)
@@ -477,6 +477,85 @@ std::string PlatformAndroid::GetRunAs() {
}
return run_as.str();
}
+uint32_t
+PlatformAndroid::FindProcesses(const ProcessInstanceInfoMatch &match_info,
+ ProcessInstanceInfoList &proc_infos) {
+ // Use the parent implementation for host platform
+ if (IsHost())
+return PlatformLinux::FindProcesses(match_info, proc_infos);
+
+ // For remote Android platform, implement process name lookup using adb
+ proc_infos.clear();
cs01 wrote:
I was deferring to the other call to do it, but I think it's fine to do
unconditionally
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] Fix TypeSystemClang::GetBasicTypeEnumeration for 128-bit int types (PR #162278)
https://github.com/sedymrak updated
https://github.com/llvm/llvm-project/pull/162278
From 04fea010905c6a24dd5b51e3cb7ff96c4b33d40d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?=
Date: Tue, 7 Oct 2025 12:18:43 +0200
Subject: [PATCH 1/4] [lldb] Fix the TypeSystemClang::GetBasicTypeEnumeration
wrt. 128-bit integer types
---
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp | 4 ++--
lldb/unittests/Symbol/TestTypeSystemClang.cpp| 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 21c265ede0bc5..1a574c97d9e46 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -849,8 +849,8 @@ lldb::BasicType
TypeSystemClang::GetBasicTypeEnumeration(llvm::StringRef name) {
{"unsigned long long int", eBasicTypeUnsignedLongLong},
// "int128"
- {"__int128_t", eBasicTypeInt128},
- {"__uint128_t", eBasicTypeUnsignedInt128},
+ {"__int128", eBasicTypeInt128},
+ {"unsigned __int128", eBasicTypeUnsignedInt128},
// "bool"
{"bool", eBasicTypeBool},
diff --git a/lldb/unittests/Symbol/TestTypeSystemClang.cpp
b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
index f673cceae00dd..814e6578766bd 100644
--- a/lldb/unittests/Symbol/TestTypeSystemClang.cpp
+++ b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
@@ -159,9 +159,9 @@ TEST_F(TestTypeSystemClang, TestGetBasicTypeFromName) {
GetBasicQualType("unsigned long long"));
EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedLongLong),
GetBasicQualType("unsigned long long int"));
- EXPECT_EQ(GetBasicQualType(eBasicTypeInt128),
GetBasicQualType("__int128_t"));
+ EXPECT_EQ(GetBasicQualType(eBasicTypeInt128), GetBasicQualType("__int128"));
EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedInt128),
-GetBasicQualType("__uint128_t"));
+GetBasicQualType("unsigned __int128"));
EXPECT_EQ(GetBasicQualType(eBasicTypeVoid), GetBasicQualType("void"));
EXPECT_EQ(GetBasicQualType(eBasicTypeBool), GetBasicQualType("bool"));
EXPECT_EQ(GetBasicQualType(eBasicTypeFloat), GetBasicQualType("float"));
From 7092c65a45d35a4e57488d3d3472946f9217 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?=
Date: Fri, 10 Oct 2025 01:42:16 +0200
Subject: [PATCH 2/4] [lldb] reverting some of the previous changes that break
backward-compatibility
---
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 1a574c97d9e46..21691c4a6cc87 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -849,6 +849,8 @@ lldb::BasicType
TypeSystemClang::GetBasicTypeEnumeration(llvm::StringRef name) {
{"unsigned long long int", eBasicTypeUnsignedLongLong},
// "int128"
+ {"__int128_t", eBasicTypeInt128},
+ {"__uint128_t", eBasicTypeUnsignedInt128},
{"__int128", eBasicTypeInt128},
{"unsigned __int128", eBasicTypeUnsignedInt128},
From 89f03065d934da984193b8aa41218e7603923ac6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?=
Date: Fri, 10 Oct 2025 01:53:39 +0200
Subject: [PATCH 3/4] [lldb] reverting some of the previous changes that break
backward-compatibility
---
lldb/unittests/Symbol/TestTypeSystemClang.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lldb/unittests/Symbol/TestTypeSystemClang.cpp
b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
index 814e6578766bd..1981e912fa4fa 100644
--- a/lldb/unittests/Symbol/TestTypeSystemClang.cpp
+++ b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
@@ -159,6 +159,9 @@ TEST_F(TestTypeSystemClang, TestGetBasicTypeFromName) {
GetBasicQualType("unsigned long long"));
EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedLongLong),
GetBasicQualType("unsigned long long int"));
+ EXPECT_EQ(GetBasicQualType(eBasicTypeInt128),
GetBasicQualType("__int128_t"));
+ EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedInt128),
+GetBasicQualType("__uint128_t"));
EXPECT_EQ(GetBasicQualType(eBasicTypeInt128), GetBasicQualType("__int128"));
EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedInt128),
GetBasicQualType("unsigned __int128"));
From 02885e1a17d187b6c7c526f61184837b2a40adee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?=
Date: Fri, 10 Oct 2025 10:12:05 +0200
Subject: [PATCH 4/4] [lldb] add comments concerning the 128-bit integer types
---
.../Plugins/TypeSystem/Clang/TypeSystemClang.cpp | 10 ++
1 file changed, 10 insertions(+)
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
b/lldb/source/Plugins/Type
[Lldb-commits] [lldb] [llvm] [lldb] Add type hints to gdbclientutils.py and use abstract base class (PR #162172)
https://github.com/dsandersllvm updated
https://github.com/llvm/llvm-project/pull/162172
>From bd8a1e123b468c5e9f2251d2a7f55d9c22069396 Mon Sep 17 00:00:00 2001
From: Daniel Sanders
Date: Fri, 3 Oct 2025 20:05:11 -0700
Subject: [PATCH 1/4] [lldb] Add type hints to gdbclientutils.py and fix issues
Everything in this should be python 3.9. The docs say the minimum is 3.8
but there's existing code in this suite that needs 3.9 so I think 3.9 is
ok.
Issues:
qEcho() is passed an argument by the callers that the function didn't have
Several functions in the base class would silently do nothing if not
overriden. These now use @abstractmethod to require overrides
sendall() had inconsistent return types between overrides
---
.../Python/lldbsuite/test/gdbclientutils.py | 70 ---
1 file changed, 43 insertions(+), 27 deletions(-)
diff --git a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
index b603c35c8df09..5fe1bc3155386 100644
--- a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
+++ b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
@@ -1,3 +1,4 @@
+from abc import ABC, abstractmethod
import ctypes
import errno
import io
@@ -5,6 +6,7 @@
import socket
import traceback
from lldbsuite.support import seven
+from typing import Optional
def checksum(message):
@@ -86,8 +88,8 @@ class MockGDBServerResponder:
handles any packet not recognized in the common packet handling code.
"""
-registerCount = 40
-packetLog = None
+registerCount: int = 40
+packetLog: Optional[list[str]] = None
class RESPONSE_DISCONNECT:
pass
@@ -103,6 +105,7 @@ def respond(self, packet):
Return the unframed packet data that the server should issue in
response
to the given packet received from the client.
"""
+assert self.packetLog is not None
self.packetLog.append(packet)
if packet is MockGDBServer.PACKET_INTERRUPT:
return self.interrupt()
@@ -242,7 +245,7 @@ def qProcessInfo(self):
def qHostInfo(self):
return "ptrsize:8;endian:little;"
-def qEcho(self):
+def qEcho(self, _: int):
return "E04"
def qQueryGDBServer(self):
@@ -263,10 +266,10 @@ def A(self, packet):
def D(self, packet):
return "OK"
-def readRegisters(self):
+def readRegisters(self) -> str:
return "" * self.registerCount
-def readRegister(self, register):
+def readRegister(self, register: int) -> str:
return ""
def writeRegisters(self, registers_hex):
@@ -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]:
return None, False
def _qXferResponse(self, data, has_more):
@@ -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
+def get_connect_address(self) -> str:
"""Get address for the client to connect to."""
-def get_connect_url(self):
+@abstractmethod
+def get_connect_url(self) -> str:
"""Get URL suitable for process connect command."""
def close_server(self):
@@ -394,10 +400,12 @@ def accept(self):
def close_connection(self):
"""Close all resources used by the accepted connection."""
-def recv(self):
+@abstractmethod
+def recv(self) -> bytes:
"""Receive a data packet from the connected client."""
-def sendall(self, data):
+@abstractmethod
+def sendall(self, data: bytes) -> None:
"""Send the data to the connected client."""
@@ -428,11 +436,11 @@ def close_connection(self):
self._connection.close()
self._connection = None
-def recv(self):
+def recv(self) -> bytes:
assert self._connection is not None
return self._connection.recv(4096)
-def sendall(self, data):
+def sendall(self, data: bytes) -> None:
assert self._connection is not None
return self._connection.sendall(data)
@@ -444,10 +452,10 @@ def __init__(self):
)[0]
super().__init__(family, type, proto, addr)
-def get_connect_address(self):
+def get_connect_address(self) -> str:
return "[{}]:{}".format(*self._server_socket.getsockname())
-def get_connect_url(self):
+def get_connect_url(self) -> str:
return "connect://" + self.get_connect_address()
@@ -455,10 +463,10 @@ class UnixServerSocket(ServerSocket):
def __init__(self, addr):
super().__init__(socket.AF_UNIX, socket.SOCK_STREAM, 0, addr)
-def ge
[Lldb-commits] [lldb] Revert "[lldb] Cortex-M exception unwind API test cleanup" (PR #162520)
https://github.com/dzhidzhoev closed https://github.com/llvm/llvm-project/pull/162520 ___ 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)
https://github.com/JDevlieghere approved this pull request. 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] Parse qSupported MultiMemRead tag in GDB Remote Client (PR #163249)
https://github.com/felipepiovezan updated
https://github.com/llvm/llvm-project/pull/163249
>From 2c6aec5408fa3119da4f333819257f0557a08f97 Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan
Date: Mon, 13 Oct 2025 12:15:14 -0700
Subject: [PATCH 1/2] [lldb] Parse qSupported MultiMemRead tag in GDB Remote
Client
This is in preparation for the new MultiMemRead packet discussed in the
RFC [1].
An alternative to using qSupported would be having clients send an empty
MultiMemRead packet. However, this is problematic because the
already-existing packet M is a prefix of MultiMemRead; an empty reply
would be ambiguous in this case. It is also risky that the stub might
interpret the MultiMemRead as a valid M packet.
Another advantage of qSupported is that this packet is already
exchanged, so parsing a new field is simpler than having to exchange one
extra packet.
[1]: https://discourse.llvm.org/t/rfc-a-new-vectorized-memory-read-packet/88441
---
.../gdb-remote/GDBRemoteCommunicationClient.cpp | 10 ++
.../Process/gdb-remote/GDBRemoteCommunicationClient.h | 3 +++
.../gdb-remote/GDBRemoteCommunicationClientTest.cpp | 11 +++
3 files changed, 24 insertions(+)
diff --git
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 7d2bd452acca9..11f164c2426ce 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -211,6 +211,12 @@ bool
GDBRemoteCommunicationClient::GetReverseStepSupported() {
return m_supports_reverse_step == eLazyBoolYes;
}
+bool GDBRemoteCommunicationClient::GetMultiMemReadSupported() {
+ if (m_supports_multi_mem_read == eLazyBoolCalculate)
+GetRemoteQSupported();
+ return m_supports_multi_mem_read == eLazyBoolYes;
+}
+
bool GDBRemoteCommunicationClient::QueryNoAckModeSupported() {
if (m_supports_not_sending_acks == eLazyBoolCalculate) {
m_send_acks = true;
@@ -339,6 +345,7 @@ void
GDBRemoteCommunicationClient::ResetDiscoverableSettings(bool did_exec) {
m_supported_async_json_packets_is_valid = false;
m_supported_async_json_packets_sp.reset();
m_supports_jModulesInfo = true;
+m_supports_multi_mem_read = eLazyBoolCalculate;
}
// These flags should be reset when we first connect to a GDB server and when
@@ -365,6 +372,7 @@ void GDBRemoteCommunicationClient::GetRemoteQSupported() {
m_x_packet_state.reset();
m_supports_reverse_continue = eLazyBoolNo;
m_supports_reverse_step = eLazyBoolNo;
+ m_supports_multi_mem_read = eLazyBoolNo;
m_max_packet_size = UINT64_MAX; // It's supposed to always be there, but if
// not, we assume no limit
@@ -424,6 +432,8 @@ void GDBRemoteCommunicationClient::GetRemoteQSupported() {
m_supports_reverse_continue = eLazyBoolYes;
else if (x == "ReverseStep+")
m_supports_reverse_step = eLazyBoolYes;
+ else if (x == "MultiMemRead+")
+m_supports_multi_mem_read = eLazyBoolYes;
// Look for a list of compressions in the features list e.g.
//
qXfer:features:read+;PacketSize=2;qEcho+;SupportedCompressions=zlib-
// deflate,lzma
diff --git
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index a765e95bf9814..ad590a25d0f16 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -342,6 +342,8 @@ class GDBRemoteCommunicationClient : public
GDBRemoteClientBase {
bool GetReverseStepSupported();
+ bool GetMultiMemReadSupported();
+
LazyBool SupportsAllocDeallocMemory() // const
{
// Uncomment this to have lldb pretend the debug server doesn't respond to
@@ -574,6 +576,7 @@ class GDBRemoteCommunicationClient : public
GDBRemoteClientBase {
std::optional m_x_packet_state;
LazyBool m_supports_reverse_continue = eLazyBoolCalculate;
LazyBool m_supports_reverse_step = eLazyBoolCalculate;
+ LazyBool m_supports_multi_mem_read = eLazyBoolCalculate;
bool m_supports_qProcessInfoPID : 1, m_supports_qfProcessInfo : 1,
m_supports_qUserName : 1, m_supports_qGroupName : 1,
diff --git
a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
index f940229985887..ce042e5ddf422 100644
--- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
@@ -639,3 +639,14 @@ TEST_F(GDBRemoteCommunicationClientTest, CalculateMD5) {
EXPECT_EQ(expected_high, result->high());
}
#endif
+
+TEST_F(GDBRemoteCommunicationClientTest, MultiMemReadSupported) {
+ std::future async_result = std::async(std::laun
[Lldb-commits] [libcxx] [lldb] [lldb][test] Don't run libc++ API tests without a locally built libc++ (PR #162657)
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/162657
>From 0b23bd05541354a493acea8fbb2c89b771a3e774 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Thu, 9 Oct 2025 13:06:40 +0100
Subject: [PATCH 1/3] [lldb][test] Don't run libc++ API tests without a locally
built libc++
API tests in the `libc++` category will try their best to build against a
locally built libc++. If none exists, the `Makefile.rules` currently fall back
to using the system libc++.
The issue with falling back to the system libc++ is that we are now potentially
not testing what we intended to. But we also can't rely on certain libc++
features being available that the tests are trying to use. On Apple platforms
this is a configuration error (because libc++ is the only stdlib supported),
but we can't make it an error on Linux because a user might want to run the API
tests with libstdc++.
The Ubunutu 22.04 bots on the Apple fork are failing to run following tests are
failing:
* `TestLibcxxInternalsRecognizer.py`
* `TestDataFormatterStdRangesRefView.py`
because the system stdlib doesn't have `std::ranges` support yet. And the tests
just fail to build. Building libc++ on those bots is also not possible because
the system compiler is too old (and the Apple fork builds all the subprojects
standalone, so it requires the system compiler).
This patch marks tests in the `libc++` category as `UNSUPPORTED` if no local
libc++ is available.
The downside is that we will inevitably lose coverage on bots that were running
these tests without a local libc++. Arguably those weren't really testing the
right thing. But for vendors with LLDB forks it might have been useful to at
least know that the tests on the fork don't fail against the system libc++.
---
lldb/packages/Python/lldbsuite/test/dotest.py | 4
1 file changed, 4 insertions(+)
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py
b/lldb/packages/Python/lldbsuite/test/dotest.py
index 2966ac04227cb..0c854c23e31a4 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -788,7 +788,11 @@ def canRunLibcxxTests():
if lldbplatformutil.target_is_android() or
lldbplatformutil.platformIsDarwin():
return True, "libc++ always present"
+# Make sure -stdlib=libc++ works since that's how the tests will be built.
if platform == "linux":
+if not configuration.libcxx_include_dir or not
configuration.libcxx_library_dir:
+return False, "API tests require a locally built libc++."
+
with temp_file.OnDiskTempFile() as f:
cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o",
f.path, "-"]
p = subprocess.Popen(
>From cc9b3e83f4e23723ea94314c18432c244e298e31 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Thu, 9 Oct 2025 15:08:21 +0100
Subject: [PATCH 2/3] fixup! move comment
---
lldb/packages/Python/lldbsuite/test/dotest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py
b/lldb/packages/Python/lldbsuite/test/dotest.py
index 0c854c23e31a4..1d474a2180d22 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -788,11 +788,11 @@ def canRunLibcxxTests():
if lldbplatformutil.target_is_android() or
lldbplatformutil.platformIsDarwin():
return True, "libc++ always present"
-# Make sure -stdlib=libc++ works since that's how the tests will be built.
if platform == "linux":
if not configuration.libcxx_include_dir or not
configuration.libcxx_library_dir:
return False, "API tests require a locally built libc++."
+# Make sure -stdlib=libc++ works since that's how the tests will be
built.
with temp_file.OnDiskTempFile() as f:
cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o",
f.path, "-"]
p = subprocess.Popen(
>From 2ed5ef0e79b4dc861f83e1ca4aaec50613609209 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Thu, 9 Oct 2025 15:08:38 +0100
Subject: [PATCH 3/3] TEMPORARY: touch libcxx and lldb tests
---
libcxx/src/memory.cpp | 2 ++
.../generic/string/TestDataFormatterStdString.py| 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp
index 9be40cb9c1285..a3db8d3df37fd 100644
--- a/libcxx/src/memory.cpp
+++ b/libcxx/src/memory.cpp
@@ -29,6 +29,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
bad_weak_ptr::~bad_weak_ptr() noexcept {}
+struct __Blah {} __blah;
+
const char* bad_weak_ptr::what() const noexcept { return "bad_weak_ptr"; }
__shared_count::~__shared_count() {}
diff --git
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/TestDa
[Lldb-commits] [lldb] [lldb][TypeSystemClang] Added unique builtins types for __bf16 and _Float16 (PR #157674)
https://github.com/tgs-sc edited https://github.com/llvm/llvm-project/pull/157674 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] b181c22 - [lldb][RISCV] Fixed TestSymbolFileJSON for RISC-V (#161497)
Author: Georgiy Samoylov Date: 2025-10-01T15:40:42-07:00 New Revision: b181c22c54bd8c3f6d8a3071661572c5782a7a30 URL: https://github.com/llvm/llvm-project/commit/b181c22c54bd8c3f6d8a3071661572c5782a7a30 DIFF: https://github.com/llvm/llvm-project/commit/b181c22c54bd8c3f6d8a3071661572c5782a7a30.diff LOG: [lldb][RISCV] Fixed TestSymbolFileJSON for RISC-V (#161497) This test failed during testing on the RISC-V target because we couldn't strip the main label from the binary. main is dynamically linked when the -fPIC flag is enabled. The RISC-V ABI requires that executables support loading at arbitrary addresses to enable shared libraries and secure loading (ASLR). In PIC mode, function addresses cannot be hardcoded in the code. Instead, code is generated to load addresses from the GOT/PLT tables, which are initialized by the dynamic loader. The reference to main thus ends up in .dynsym and is dynamically bound. We cannot strip main or any other dynamically linked functions because these functions are referenced indirectly via dynamic linking tables (.plt and .got). Removing these symbols would break the dynamic linking mechanism needed to resolve function addresses at runtime, causing the executable to fail to correctly call them. Added: Modified: lldb/test/API/functionalities/json/symbol-file/Makefile Removed: diff --git a/lldb/test/API/functionalities/json/symbol-file/Makefile b/lldb/test/API/functionalities/json/symbol-file/Makefile index 13bc164582eee..5d05d95fc8428 100644 --- a/lldb/test/API/functionalities/json/symbol-file/Makefile +++ b/lldb/test/API/functionalities/json/symbol-file/Makefile @@ -1,4 +1,5 @@ C_SOURCES := main.c +CFLAGS_EXTRAS := -no-pie all: stripped.out ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb/cmake] unittests: Breakpoint: remove liblldb dep (PR #162571)
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/162571 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
JustinStitt wrote:
I think there is some confusion in this thread about how to tell the compiler
about intentional data loss.
The UX I like the most is something like the following:
```c
void foo() {
int __ob_trap a = -1;
u16 b = a; // trap, semantics we just agreed upon. implicit casts are sketchy
u16 c = (u16)a; // no trap, inform compiler about our intent explicitly, Rust
equivalent 'a as u16'
u16 d = (u16 __ob_wrap)a; // no trap, inform compiler about our intent
explcitly
u16 e = (u16 __ob_trap)a; // trap, Rust equivalent: 'a.try_into().unwrap()'
}
```
https://github.com/llvm/llvm-project/pull/148914
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Expression] Emit a 'Note' diagnostic that indicates the language used for expression evaluation (PR #161688)
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/161688 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [lldb] [llvm] [llvm][clang] Use the VFS in `FileCollector` (PR #160788)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross`
running on `suse-gary-m68k-cross` while building `clang,lldb,llvm` at step 5
"ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/27/builds/16650
Here is the relevant piece of the build log for the reference
```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[113/392] Building CXX object
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TUSchedulerTests.cpp.o
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp:
In member function ‘virtual void
clang::clangd::{anonymous}::TUSchedulerTests_PublishWithStalePreamble_Test::TestBody()::BlockPreambleThread::onPreambleAST(clang::clangd::PathRef,
llvm::StringRef, clang::clangd::CapturedASTCtx, std::shared_ptr)’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp:1219:10:
warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
1219 | if (BuildBefore)
| ^
[114/392] Building CXX object
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExpandDeducedTypeTests.cpp.o
[115/392] Building CXX object
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExtractVariableTests.cpp.o
[116/392] Building CXX object
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AddUsingTests.cpp.o
[117/392] Building CXX object
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/TweakTesting.cpp.o
[118/392] Building CXX object
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompleteTests.cpp.o
FAILED:
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompleteTests.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG
-D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd/unittests
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/../include-cleaner/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd/../clang-tidy
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess
-Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move
-Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3
-DNDEBUG -std=c++17 -Wno-variadic-macros -fno-exceptions -funwind-tables
-fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompleteTests.cpp.o
-MF
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompleteTests.cpp.o.d
-o
tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompleteTests.cpp.o
-c
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[119/392] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DeterminismTest.cpp.o
[120/392] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ConflictingEvalCallsTest.cpp.o
[121/392] Building CXX object
tools/cla
[Lldb-commits] [lldb] support attaching by name for platform android (PR #160931)
https://github.com/cs01 edited 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] [clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)
Michael137 wrote: @mgorny Any chance you have access to the full IR when compiling it with the clang on that bot? https://github.com/llvm/llvm-project/pull/122265 ___ 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)
@@ -477,6 +477,85 @@ std::string PlatformAndroid::GetRunAs() {
}
return run_as.str();
}
+uint32_t
+PlatformAndroid::FindProcesses(const ProcessInstanceInfoMatch &match_info,
+ ProcessInstanceInfoList &proc_infos) {
+ // Use the parent implementation for host platform
+ if (IsHost())
+return PlatformLinux::FindProcesses(match_info, proc_infos);
+
+ // For remote Android platform, implement process name lookup using adb
+ proc_infos.clear();
+
+ // Check if we're looking for a process by name
+ const ProcessInstanceInfo &match_process_info = match_info.GetProcessInfo();
+ if (!match_process_info.GetExecutableFile() ||
+ match_info.GetNameMatchType() == NameMatch::Ignore) {
+// Fall back to the parent implementation if not searching by name
+return PlatformLinux::FindProcesses(match_info, proc_infos);
+ }
+
+ std::string process_name = match_process_info.GetExecutableFile().GetPath();
+ if (process_name.empty())
+return 0;
+
+ // Use adb to find the process by name
+ Status error;
+ AdbClientUP adb(GetAdbClient(error));
+ if (error.Fail()) {
+Log *log = GetLog(LLDBLog::Platform);
+LLDB_LOGF(log, "PlatformAndroid::%s failed to get ADB client: %s",
+ __FUNCTION__, error.AsCString());
+return 0;
+ }
+
+ // Use 'pidof' command to get the PID for the process name
+ std::string pidof_output;
+ std::string command = "pidof " + process_name;
+ error = adb->Shell(command.c_str(), seconds(5), &pidof_output);
cs01 wrote:
> Can path contain special characters (e.g. space)? If so, maybe wrap with
> quotes?
Good call, I updated to wrap with quotes
> Also, what will happen if there are multiple processes running the same
> executable? (I did a quick internet search. It seems it's possible.)
Another good call. I updated to return the list of pids that match. Turns out
lldb does not care and will just use the first one. This behavior should
probably be changed to prompt the user to choose one, but that is out of scope
for this diff.
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][TypeSystemClang] Added unique builtins types for __bf16 and _Float16 (PR #157674)
https://github.com/tgs-sc edited https://github.com/llvm/llvm-project/pull/157674 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/159160 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] [lldb][Expression] Emit a 'Note' diagnostic that indicates the language used for expression evaluation (PR #161688)
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/161688
>From 8f7c7d59b74119fc16ef2b0e7f7f8c3de925697a Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Mon, 6 Oct 2025 09:37:51 +0100
Subject: [PATCH 1/6] [llvm][Dwarf] Add LanguageDescription API that accounts
for version
Currently `llvm::dwarf::LanguageDescription` returns a stringified
`DW_LNAME`. It would be useful to have an API that returns the language
name for a particular `DW_LNAME_`/version pair. LLDB's use case is that
it wants to display a human readable description of the language we got
from debug-info in diagnostics. We could maintain a side-table in LLDB
but though this might generally be useful to live next to the
`LanguageDescription` API.
(cherry picked from commit 544d86112320b1512e3ce3aaa11d177f47d5e206)
---
llvm/include/llvm/BinaryFormat/Dwarf.h | 7 ++
llvm/lib/BinaryFormat/Dwarf.cpp| 111 +
2 files changed, 118 insertions(+)
diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.h
b/llvm/include/llvm/BinaryFormat/Dwarf.h
index 2c5012510a5c3..624e5f63f2270 100644
--- a/llvm/include/llvm/BinaryFormat/Dwarf.h
+++ b/llvm/include/llvm/BinaryFormat/Dwarf.h
@@ -500,8 +500,15 @@ toDW_LNAME(SourceLanguage language) {
return {};
}
+/// Returns a version-independent language name.
LLVM_ABI llvm::StringRef LanguageDescription(SourceLanguageName name);
+/// Returns a language name corresponding to the specified version.
+/// If the version is not recognized for the specified language, returns
+/// the version-independent name.
+LLVM_ABI llvm::StringRef LanguageDescription(SourceLanguageName Name,
+ uint32_t Version);
+
inline bool isCPlusPlus(SourceLanguage S) {
bool result = false;
// Deliberately enumerate all the language options so we get a warning when
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index 8b24044e19e50..0202dffc3d6b2 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -472,6 +472,117 @@ StringRef
llvm::dwarf::LanguageDescription(dwarf::SourceLanguageName lname) {
return "Unknown";
}
+StringRef llvm::dwarf::LanguageDescription(dwarf::SourceLanguageName Name,
+ uint32_t Version) {
+ switch (Name) {
+ //
+ case DW_LNAME_Ada: {
+if (Version <= 1983)
+ return "Ada 83";
+if (Version <= 1995)
+ return "Ada 95";
+if (Version <= 2005)
+ return "Ada 2005";
+if (Version <= 2012)
+ return "Ada 2012";
+ } break;
+
+ case DW_LNAME_Cobol: {
+if (Version <= 1974)
+ return "COBOL-74";
+if (Version <= 1985)
+ return "COBOL-85";
+ } break;
+
+ case DW_LNAME_Fortran: {
+if (Version <= 1977)
+ return "FORTRAN 77";
+if (Version <= 1990)
+ return "FORTRAN 90";
+if (Version <= 1995)
+ return "Fortran 95";
+if (Version <= 2003)
+ return "Fortran 2003";
+if (Version <= 2008)
+ return "Fortran 2008";
+if (Version <= 2018)
+ return "Fortran 2018";
+ } break;
+
+ // MM
+ case DW_LNAME_C: {
+if (Version == 0)
+ break;
+if (Version <= 198912)
+ return "C89";
+if (Version <= 199901)
+ return "C99";
+if (Version <= 201112)
+ return "C11";
+if (Version <= 201710)
+ return "C17";
+ } break;
+
+ case DW_LNAME_C_plus_plus: {
+if (Version == 0)
+ break;
+if (Version <= 199711)
+ return "C++98";
+if (Version <= 200310)
+ return "C++03";
+if (Version <= 201103)
+ return "C++11";
+if (Version <= 201402)
+ return "C++14";
+if (Version <= 201703)
+ return "C++17";
+if (Version <= 202002)
+ return "C++20";
+ } break;
+
+ case DW_LNAME_ObjC_plus_plus:
+ case DW_LNAME_ObjC:
+ case DW_LNAME_Move:
+ case DW_LNAME_SYCL:
+ case DW_LNAME_BLISS:
+ case DW_LNAME_Crystal:
+ case DW_LNAME_D:
+ case DW_LNAME_Dylan:
+ case DW_LNAME_Go:
+ case DW_LNAME_Haskell:
+ case DW_LNAME_HLSL:
+ case DW_LNAME_Java:
+ case DW_LNAME_Julia:
+ case DW_LNAME_Kotlin:
+ case DW_LNAME_Modula2:
+ case DW_LNAME_Modula3:
+ case DW_LNAME_OCaml:
+ case DW_LNAME_OpenCL_C:
+ case DW_LNAME_Pascal:
+ case DW_LNAME_PLI:
+ case DW_LNAME_Python:
+ case DW_LNAME_RenderScript:
+ case DW_LNAME_Rust:
+ case DW_LNAME_Swift:
+ case DW_LNAME_UPC:
+ case DW_LNAME_Zig:
+ case DW_LNAME_Assembly:
+ case DW_LNAME_C_sharp:
+ case DW_LNAME_Mojo:
+ case DW_LNAME_GLSL:
+ case DW_LNAME_GLSL_ES:
+ case DW_LNAME_OpenCL_CPP:
+ case DW_LNAME_CPP_for_OpenCL:
+ case DW_LNAME_Ruby:
+ case DW_LNAME_Hylo:
+ case DW_LNAME_Metal:
+break;
+ }
+
+ // Fallback to un-versioned name.
+ return LanguageDescription(Name);
+}
+
StringRef llvm::dwarf::CaseString(unsigned Case) {
switch (Case) {
case DW_ID_case_sensitive:
>From 582f575d00f30df3927b6e1c14ec34c3175fcc28 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Mon, 6 Oc
[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] NFC: rename TagType::getOriginalDecl back to getDecl (PR #163271)
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/163271 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] check if CoreDumping is supported at runtime (PR #161385)
mysterymath wrote: Lack of this patch is still causing problems in our LLDB, and it appears that the PR's test failure in presubmit should be trivial to fix. Do you think you'll be able to land this soon? We can probably polish and land it if need be. https://github.com/llvm/llvm-project/pull/161385 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] [lldb-dap] Add multi-session support with shared debugger instances (PR #163653)
@@ -0,0 +1,119 @@
+//===-- DAPSessionManager.h *- C++ -*-===//
+//
+// 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
+//
+//===--===//
+
+#ifndef LLDB_TOOLS_LLDB_DAP_DAPSESSIONMANAGER_H
+#define LLDB_TOOLS_LLDB_DAP_DAPSESSIONMANAGER_H
+
+#include "lldb/API/SBBroadcaster.h"
+#include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBTarget.h"
+#include "lldb/Host/MainLoop.h"
+#include "lldb/lldb-types.h"
+#include "llvm/Support/Error.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace lldb_dap {
+
+// Forward declarations
+struct DAP;
+
+class ManagedEventThread {
+public:
+ // Constructor declaration
+ ManagedEventThread(lldb::SBBroadcaster broadcaster, std::thread t);
+
+ ~ManagedEventThread();
+
+ ManagedEventThread(const ManagedEventThread &) = delete;
+ ManagedEventThread &operator=(const ManagedEventThread &) = delete;
+
+private:
+ lldb::SBBroadcaster m_broadcaster;
+ std::thread m_event_thread;
+};
+
+/// Global DAP session manager.
+class DAPSessionManager {
+public:
+ /// Get the singleton instance of the DAP session manager.
+ static DAPSessionManager &GetInstance();
+
+ /// Register a DAP session.
+ void RegisterSession(lldb_private::MainLoop *loop, DAP *dap);
+
+ /// Unregister a DAP session.
+ void UnregisterSession(lldb_private::MainLoop *loop);
+
+ /// Get all active DAP sessions.
+ std::vector GetActiveSessions();
+
+ /// Disconnect all active sessions.
+ void DisconnectAllSessions();
+
+ /// Wait for all sessions to finish disconnecting.
+ /// Returns an error if any client disconnection failed, otherwise success.
+ llvm::Error WaitForAllSessionsToDisconnect();
+
+ /// Set the shared debugger instance for a unique target ID.
+ void SetSharedDebugger(uint32_t target_id, lldb::SBDebugger debugger);
+
+ /// Get the shared debugger instance for a unique target ID.
+ std::optional GetSharedDebugger(uint32_t target_id);
+
+ /// Get or create event thread for a specific debugger.
+ std::shared_ptr
+ GetEventThreadForDebugger(lldb::SBDebugger debugger, DAP *requesting_dap);
+
+ /// Find the DAP instance that owns the given target.
+ DAP *FindDAPForTarget(lldb::SBTarget target);
+
+ /// Static convenience method for FindDAPForTarget.
+ static DAP *FindDAP(lldb::SBTarget target) {
+return GetInstance().FindDAPForTarget(target);
+ }
+
+ /// Clean up shared resources when the last session exits.
+ void CleanupSharedResources();
+
+ /// Clean up expired event threads from the collection.
+ void ReleaseExpiredEventThreads();
+
+private:
+ DAPSessionManager() = default;
+ ~DAPSessionManager() = default;
+
+ // Non-copyable and non-movable.
+ DAPSessionManager(const DAPSessionManager &) = delete;
+ DAPSessionManager &operator=(const DAPSessionManager &) = delete;
+ DAPSessionManager(DAPSessionManager &&) = delete;
+ DAPSessionManager &operator=(DAPSessionManager &&) = delete;
+
+ bool m_client_failed = false;
+ std::mutex m_sessions_mutex;
+ std::condition_variable m_sessions_condition;
+ std::map m_active_sessions;
+
+ /// Optional map from target ID to shared debugger set when the native
+ /// process creates a new target.
+ std::map m_target_to_debugger_map;
walter-erquinigo wrote:
it should have been `target id -> SBTarget`, sorry :)
https://github.com/llvm/llvm-project/pull/163653
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Simplify obsolete error condition for malformed array member type offsets (PR #160132)
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/160132 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB][PDB] Split `func-symbols.test` between DIA and native (PR #163733)
https://github.com/Nerixyz created
https://github.com/llvm/llvm-project/pull/163733
The test checks that functions have the correct type assigned. Because of the
differences between the two PDB plugins, I split the test.
DIA creates one named `Type` per function and uses identical UIDs for `Type`
and `Function`, whereas native creates one unnamed type per signature and has
different UIDs.
The native test has the same input and checks the same functions.
>From 693bb0bd192840d67274d3014321c24de16821fa Mon Sep 17 00:00:00 2001
From: Nerixyz
Date: Thu, 16 Oct 2025 12:07:21 +0200
Subject: [PATCH] [LLDB][PDB] Split `func-symbols.test` between DIA and native
---
.../SymbolFile/NativePDB/func-symbols.test| 133 ++
.../Shell/SymbolFile/PDB/func-symbols.test| 2 +-
2 files changed, 134 insertions(+), 1 deletion(-)
create mode 100644 lldb/test/Shell/SymbolFile/NativePDB/func-symbols.test
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/func-symbols.test
b/lldb/test/Shell/SymbolFile/NativePDB/func-symbols.test
new file mode 100644
index 0..33ffad6b2f20f
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/func-symbols.test
@@ -0,0 +1,133 @@
+# REQUIRES: lld
+
+# Test that functions have the correct types.
+# This uses the same input as SymbolFile/PDB/func-symbols.test. However, DIA
+# creates one named `Type` per function and uses identical UIDs for `Type` and
+# `Function`, whereas native creates one unnamed type per signature and has
different UIDs.
+
+# RUN: split-file %s %t
+# RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib -o %t.exe
%t/main.cpp %t/second.cpp
+# RUN: lldb-test symbols %t.exe | FileCheck --check-prefix=CHECK-ONE %s
+# RUN: lldb-test symbols %t.exe | FileCheck --check-prefix=CHECK-TWO %s
+
+#--- main.cpp
+
+// Global functions
+int Func_arg_array(int array[]) { return 1; }
+void Func_arg_void(void) { return; }
+void Func_arg_none(void) { return; }
+void Func_varargs(...) { return; }
+
+// Class
+namespace MemberTest {
+ class A {
+ public:
+int Func(int a, ...) { return 1; }
+ };
+}
+
+// Template
+template
+void TemplateFunc(T ...Arg) {
+ return;
+}
+
+// namespace
+namespace {
+ void Func(int a, const long b, volatile bool c, ...) { return; }
+}
+
+namespace NS {
+ void Func(char a, int b) {
+return;
+ }
+}
+
+// Static function
+static long StaticFunction(int a)
+{
+ return 2;
+}
+
+// Inlined function
+inline void InlinedFunction(long a) { return; }
+
+extern void FunctionCall();
+
+int main() {
+ MemberTest::A v1;
+ v1.Func('a',10);
+
+ Func(1, 5, true, 10, 8);
+ NS::Func('c', 2);
+
+ TemplateFunc(10);
+ TemplateFunc(10,11,88);
+
+ StaticFunction(2);
+ InlinedFunction(1);
+
+ FunctionCall();
+ return 0;
+}
+
+#--- main-checks
+
+# CHECK-ONE: Module [[MD:.*]]
+# CHECK-ONE-DAG: SymbolFile native-pdb ([[MD]])
+# CHECK-ONE-DAG: [[TY0:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
int (int *)
+# CHECK-ONE-DAG: [[TY1:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
void (void)
+# CHECK-ONE-DAG: [[TY2:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
void (...)
+# CHECK-ONE-DAG: [[TY3:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
void (char, int)
+# CHECK-ONE-DAG: [[TY4:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
int (void)
+# CHECK-ONE-DAG: [[TY5:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
void (int, const long, volatile _Bool, ...)
+# CHECK-ONE-DAG: [[TY6:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
long (int)
+# CHECK-ONE-DAG: [[TY7:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
int (int, ...)
+# CHECK-ONE-DAG: [[TY8:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
void (int)
+# CHECK-ONE-DAG: [[TY9:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
void (int, int, int)
+# CHECK-ONE-DAG: [[TY10:.*]]: Type{{.*}} , size = 0, compiler_type = {{.*}}
void (long)
+
+# CHECK-ONE: {{.*}}: CompileUnit{{.*}}, language = "c++", file =
'{{.*}}main.cpp'
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ?Func_arg_array@@YAHQAH@Z, type =
[[TY0]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ?Func_arg_void@@YAXXZ, type =
[[TY1]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ?Func_arg_none@@YAXXZ, type =
[[TY1]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ?Func_varargs@@YAXZZ, type = [[TY2]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ?Func@NS@@YAXDH@Z, type = [[TY3]]
+# CHECK-ONE-DAG: Function{{.*}}, demangled = main, type = [[TY4]]
+# CHECK-ONE-DAG: Function{{.*}}, demangled = {{.*}}`anonymous
namespace'::Func{{.*}}, type = [[TY5]]
+# CHECK-ONE-DAG: Function{{.*}}, demangled = {{.*}}StaticFunction{{.*}}, type
= [[TY6]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ?Func@A@MemberTest@@QAAHHZZ, type =
[[TY7]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ??$TemplateFunc@$00H@@YAXH@Z, type
= [[TY8]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ??$TemplateFunc@$00HHH@@YAXHHH@Z,
type = [[TY9]]
+# CHECK-ONE-DAG: Function{{.*}}, mangled = ?InlinedFunc
[Lldb-commits] [lldb] [debugserver] Implement MultiMemRead packet (PR #162670)
@@ -0,0 +1,72 @@
+"""
+Tests the exit code/description coming from the debugserver.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+@skipUnlessDarwin
+@skipIfOutOfTreeDebugserver
+class TestCase(TestBase):
+def send_process_packet(self, packet_str):
+self.runCmd(f"proc plugin packet send {packet_str}", check=False)
+# The output is of the form:
+# packet:
+# response:
+reply = self.res.GetOutput().split("\n")
+reply[0] = reply[0].strip()
+reply[1] = reply[1].strip()
DavidSpickett wrote:
Could name these `packet` and `response`. Signals what you expect to find in
there.
https://github.com/llvm/llvm-project/pull/162670
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Add a scripted way to re-present a stop location (PR #158128)
@@ -566,43 +655,51 @@ void BreakpointLocation::GetDescription(Stream *s,
s->Indent();
}
- if (m_address.IsSectionOffset() &&
- (level == eDescriptionLevelFull || level == eDescriptionLevelInitial))
-s->Printf(", ");
- s->Printf("address = ");
-
- ExecutionContextScope *exe_scope = nullptr;
- Target *target = &m_owner.GetTarget();
- if (target)
-exe_scope = target->GetProcessSP().get();
- if (exe_scope == nullptr)
-exe_scope = target;
-
- if (level == eDescriptionLevelInitial)
-m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
- Address::DumpStyleFileAddress);
- else
-m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
- Address::DumpStyleModuleWithFileAddress);
-
- if (IsIndirect() && m_bp_site_sp) {
-Address resolved_address;
-resolved_address.SetLoadAddress(m_bp_site_sp->GetLoadAddress(), target);
-Symbol *resolved_symbol = resolved_address.CalculateSymbolContextSymbol();
-if (resolved_symbol) {
- if (level == eDescriptionLevelFull || level == eDescriptionLevelInitial)
-s->Printf(", ");
- else if (level == lldb::eDescriptionLevelVerbose) {
-s->EOL();
-s->Indent();
+ if (!is_scripted_desc) {
+if (m_address.IsSectionOffset() &&
+(level == eDescriptionLevelFull || level == eDescriptionLevelInitial))
+ s->Printf(", ");
+s->Printf("address = ");
+
+ExecutionContextScope *exe_scope = nullptr;
+Target *target = &m_owner.GetTarget();
+if (target)
+ exe_scope = target->GetProcessSP().get();
+if (exe_scope == nullptr)
+ exe_scope = target;
+
+if (level == eDescriptionLevelInitial)
+ m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
+ Address::DumpStyleFileAddress);
+else
+ m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
+ Address::DumpStyleModuleWithFileAddress);
+
+if (IsIndirect() && m_bp_site_sp) {
+ Address resolved_address;
+ resolved_address.SetLoadAddress(m_bp_site_sp->GetLoadAddress(), target);
+ Symbol *resolved_symbol =
resolved_address.CalculateSymbolContextSymbol();
+ if (resolved_symbol) {
+if (level == eDescriptionLevelFull || level ==
eDescriptionLevelInitial)
+ s->Printf(", ");
+else if (level == lldb::eDescriptionLevelVerbose) {
+ s->EOL();
+ s->Indent();
+}
+s->Printf("indirect target = %s",
+ resolved_symbol->GetName().GetCString());
}
- s->Printf("indirect target = %s",
-resolved_symbol->GetName().GetCString());
}
}
- bool is_resolved = IsResolved();
- bool is_hardware = is_resolved && m_bp_site_sp->IsHardware();
+ // Scripted breakpoint are currently always resolved. Does this seem right?
JDevlieghere wrote:
Should this be a fixme?
https://github.com/llvm/llvm-project/pull/158128
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][NFC] Fix spelling of function in log message (PR #161261)
https://github.com/yln created https://github.com/llvm/llvm-project/pull/161261
Fix spelling of `GetMemoryRegionInfo` function in
log message and comment and reformat code.
>From 92480535c7b660ac2c3255ccb38b5b77790577ec Mon Sep 17 00:00:00 2001
From: Julian Lettner
Date: Mon, 29 Sep 2025 12:19:31 -0700
Subject: [PATCH] [lldb][NFC] Fix spelling of function in log message
Fix spelling of `GetMemoryRegionInfo` function in
log message and comment and reformat code.
---
lldb/tools/debugserver/source/MacOSX/MachTask.mm | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.mm
b/lldb/tools/debugserver/source/MacOSX/MachTask.mm
index 8ae9d4df99657..e2395cffb3565 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachTask.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachTask.mm
@@ -213,7 +213,7 @@
}
//--
-// MachTask::MemoryRegionInfo
+// MachTask::GetMemoryRegionInfo
//--
int MachTask::GetMemoryRegionInfo(nub_addr_t addr, DNBRegionInfo *region_info)
{
task_t task = TaskPort();
@@ -221,9 +221,9 @@
return -1;
int ret = m_vm_memory.GetMemoryRegionInfo(task, addr, region_info);
- DNBLogThreadedIf(LOG_MEMORY, "MachTask::MemoryRegionInfo ( addr = 0x%8.8llx "
- ") => %i (start = 0x%8.8llx, size = 0x%8.8llx,
"
- "permissions = %u)",
+ DNBLogThreadedIf(LOG_MEMORY,
+ "MachTask::GetMemoryRegionInfo ( addr = 0x%8.8llx ) => %i "
+ "(start = 0x%8.8llx, size = 0x%8.8llx, permissions = %u)",
(uint64_t)addr, ret, (uint64_t)region_info->addr,
(uint64_t)region_info->size, region_info->permissions);
return ret;
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Don't run libc++ API tests without a locally built libc++ (PR #162657)
Michael137 wrote: > Were there tests that are in that category that were successfully testing the > Python libstdc++ data formatters that would now be no longer run? Nope those should be all under the libstdc++ test category https://github.com/llvm/llvm-project/pull/162657 ___ 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)
@@ -1,10 +1,15 @@ -add_lldb_unittest(LLDBBreakpointTests +add_lldb_unittest(LLDBBreakpointTests BreakpointIDTest.cpp + BreakpointClearConditionTest.cpp WatchpointAlgorithmsTests.cpp LINK_COMPONENTS Support LINK_LIBS +liblldb JDevlieghere wrote: When you mix static and dynamic libraries that contain the same code, you end up with two copies of the same symbols which leads to various hard-to-debug issues (like having two copies of globals). When you say it "works" you mean you don't notice any of these issues for this particular test, but that doesn't make it any less wrong :-) I like the idea of enforcing this at the CMake layer. I've filed: https://github.com/llvm/llvm-project/issues/162378 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] Introduce ScriptedFrameProvider (PR #161870)
https://github.com/medismailben updated
https://github.com/llvm/llvm-project/pull/161870
>From 89e7ab682c3c3f6c816c3c75effaf21c3ddaede7 Mon Sep 17 00:00:00 2001
From: Med Ismail Bennani
Date: Fri, 3 Oct 2025 19:41:55 +0100
Subject: [PATCH] [lldb] Introduce ScritedFrameProvider
Signed-off-by: Med Ismail Bennani
---
lldb/bindings/python/CMakeLists.txt | 1 +
.../templates/scripted_frame_provider.py | 159 +++
lldb/include/lldb/API/SBThread.h | 5 +
.../ScriptedFrameProviderInterface.h | 36 +++
.../lldb/Interpreter/ScriptInterpreter.h | 6 +
.../lldb/Interpreter}/ScriptedFrame.h | 42 ++-
.../lldb/Interpreter/ScriptedFrameProvider.h | 58
.../lldb/Target}/RegisterContextMemory.h | 6 +-
lldb/include/lldb/Target/StackFrameList.h | 1 +
lldb/include/lldb/Target/Thread.h | 9 +
lldb/include/lldb/lldb-enumerations.h | 13 +
lldb/include/lldb/lldb-forward.h | 6 +
lldb/source/API/SBThread.cpp | 34 +++
lldb/source/Commands/CommandObjectFrame.cpp | 95 +++
lldb/source/Commands/CommandObjectThread.cpp | 1 +
lldb/source/Interpreter/CMakeLists.txt| 2 +
.../ScriptedFrame.cpp | 84 --
.../Interpreter/ScriptedFrameProvider.cpp | 185 +
.../Python/OperatingSystemPython.cpp | 2 +-
.../Plugins/Process/Utility/CMakeLists.txt| 1 -
.../Plugins/Process/scripted/CMakeLists.txt | 1 -
.../Process/scripted/ScriptedThread.cpp | 5 +-
.../Plugins/Process/scripted/ScriptedThread.h | 2 +-
.../Python/Interfaces/CMakeLists.txt | 1 +
.../ScriptInterpreterPythonInterfaces.h | 1 +
.../ScriptedFrameProviderPythonInterface.cpp | 58
.../ScriptedFrameProviderPythonInterface.h| 43 +++
.../Interfaces/ScriptedPythonInterface.h | 4 +
.../Python/ScriptInterpreterPython.cpp| 5 +
.../Python/ScriptInterpreterPythonImpl.h | 3 +
lldb/source/Target/CMakeLists.txt | 1 +
.../RegisterContextMemory.cpp | 2 +-
lldb/source/Target/Thread.cpp | 114 +++-
.../scripted_frame_provider/Makefile | 3 +
.../TestScriptedFrameProvider.py | 249 ++
.../scripted_frame_provider/main.c| 14 +
.../test_frame_providers.py | 167
37 files changed, 1365 insertions(+), 54 deletions(-)
create mode 100644 lldb/examples/python/templates/scripted_frame_provider.py
create mode 100644
lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
rename lldb/{source/Plugins/Process/scripted =>
include/lldb/Interpreter}/ScriptedFrame.h (60%)
create mode 100644 lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
rename lldb/{source/Plugins/Process/Utility =>
include/lldb/Target}/RegisterContextMemory.h (92%)
rename lldb/source/{Plugins/Process/scripted => Interpreter}/ScriptedFrame.cpp
(66%)
create mode 100644 lldb/source/Interpreter/ScriptedFrameProvider.cpp
create mode 100644
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.cpp
create mode 100644
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.h
rename lldb/source/{Plugins/Process/Utility =>
Target}/RegisterContextMemory.cpp (99%)
create mode 100644
lldb/test/API/functionalities/scripted_frame_provider/Makefile
create mode 100644
lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py
create mode 100644 lldb/test/API/functionalities/scripted_frame_provider/main.c
create mode 100644
lldb/test/API/functionalities/scripted_frame_provider/test_frame_providers.py
diff --git a/lldb/bindings/python/CMakeLists.txt
b/lldb/bindings/python/CMakeLists.txt
index ef6def3f26872..28a8af8f06319 100644
--- a/lldb/bindings/python/CMakeLists.txt
+++ b/lldb/bindings/python/CMakeLists.txt
@@ -107,6 +107,7 @@ function(finish_swig_python swig_target
lldb_python_bindings_dir lldb_python_tar
"plugins"
FILES
"${LLDB_SOURCE_DIR}/examples/python/templates/parsed_cmd.py"
+"${LLDB_SOURCE_DIR}/examples/python/templates/scripted_frame_provider.py"
"${LLDB_SOURCE_DIR}/examples/python/templates/scripted_process.py"
"${LLDB_SOURCE_DIR}/examples/python/templates/scripted_platform.py"
"${LLDB_SOURCE_DIR}/examples/python/templates/operating_system.py"
diff --git a/lldb/examples/python/templates/scripted_frame_provider.py
b/lldb/examples/python/templates/scripted_frame_provider.py
new file mode 100644
index 0..1e19ae1698390
--- /dev/null
+++ b/lldb/examples/python/templates/scripted_frame_provider.py
@@ -0,0 +1,159 @@
+from abc import ABCMeta, abstractmethod
+
+import lldb
+
+
+class ScriptedFrameProvider(metaclass=ABCMeta):
+"""
+The base class for a scripted frame provider.
+
+A scripted frame provider allows you to pr
[Lldb-commits] [lldb] [lldb] Enable locate module callback for main executable (PR #160199)
https://github.com/clayborg requested changes to this pull request. A few things to fix mentioned in inline comments. We should add the ability to set the target in SBModuleSpec in the public API. So we need to add: ``` SBTarget SBModuleSpec::GetTarget(); void SBModuleSpec::SetTarget(SBTarget target); ``` https://github.com/llvm/llvm-project/pull/160199 ___ 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)
Nerixyz wrote: > Exactly. The extra underscore prefix on i386 isn't mingw specific either, > it's on MSVC as well - for regular C symbols. For other calling conventions > (like fastcall or vectorcall) the prefix is different though, and for MSVC > C++ mangled symbols, there's a different prefix. But Itanium C++ ABI on i386 > works through the regular (cdecl) mangling, which adds a `_` prefix, just > like all regular plain C functions. Ah, thank you for the clarification. Looking at [MS' docs](https://learn.microsoft.com/en-us/cpp/build/reference/decorated-names?view=msvc-170#FormatC), I think we should instead have some preprocessing function in the PDB plugin that strips the C mangling to then pass the potentially mangled name to `Mangled`. For example, on non-64bit, `_CFuncParamStdCall@4` would be stripped to `CFuncParamStdCall` and then passed to `Mangled`. Similarly, the leading underscore of `__RNvCsj4CZ6flxxfE_7___rustc12___rust_alloc` would be removed. Does this sound reasonable? If so, I'd close this PR and implement this when relanding #149701. 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] [clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Move options from clangDriver into new clangOptions library (NFC) (PR #163659)
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 h,cpp --
clang-tools-extra/clangd/CompileCommands.cpp
clang-tools-extra/modularize/CoverageChecker.cpp
clang-tools-extra/modularize/Modularize.cpp
clang-tools-extra/modularize/ModularizeUtilities.cpp
clang-tools-extra/pp-trace/PPTrace.cpp clang/include/clang/Driver/Driver.h
clang/include/clang/Frontend/Utils.h clang/lib/Driver/Compilation.cpp
clang/lib/Driver/Driver.cpp clang/lib/Driver/SanitizerArgs.cpp
clang/lib/Driver/ToolChain.cpp clang/lib/Driver/ToolChains/AIX.cpp
clang/lib/Driver/ToolChains/AMDGPU.cpp clang/lib/Driver/ToolChains/AMDGPU.h
clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
clang/lib/Driver/ToolChains/AVR.cpp
clang/lib/Driver/ToolChains/Arch/AArch64.cpp
clang/lib/Driver/ToolChains/Arch/ARM.cpp
clang/lib/Driver/ToolChains/Arch/CSKY.cpp
clang/lib/Driver/ToolChains/Arch/LoongArch.cpp
clang/lib/Driver/ToolChains/Arch/M68k.cpp
clang/lib/Driver/ToolChains/Arch/Mips.cpp
clang/lib/Driver/ToolChains/Arch/PPC.cpp
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
clang/lib/Driver/ToolChains/Arch/Sparc.cpp
clang/lib/Driver/ToolChains/Arch/SystemZ.cpp
clang/lib/Driver/ToolChains/Arch/VE.cpp
clang/lib/Driver/ToolChains/Arch/X86.cpp
clang/lib/Driver/ToolChains/BareMetal.cpp
clang/lib/Driver/ToolChains/CSKYToolChain.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/CrossWindows.cpp
clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Driver/ToolChains/Cygwin.cpp
clang/lib/Driver/ToolChains/Darwin.cpp
clang/lib/Driver/ToolChains/DragonFly.cpp clang/lib/Driver/ToolChains/Flang.cpp
clang/lib/Driver/ToolChains/FreeBSD.cpp clang/lib/Driver/ToolChains/Fuchsia.cpp
clang/lib/Driver/ToolChains/Gnu.cpp clang/lib/Driver/ToolChains/HIPAMD.cpp
clang/lib/Driver/ToolChains/HIPSPV.cpp
clang/lib/Driver/ToolChains/HIPUtility.cpp
clang/lib/Driver/ToolChains/Hexagon.cpp clang/lib/Driver/ToolChains/Hurd.cpp
clang/lib/Driver/ToolChains/Linux.cpp clang/lib/Driver/ToolChains/MSP430.cpp
clang/lib/Driver/ToolChains/MSVC.cpp clang/lib/Driver/ToolChains/Managarm.cpp
clang/lib/Driver/ToolChains/MinGW.cpp clang/lib/Driver/ToolChains/MipsLinux.cpp
clang/lib/Driver/ToolChains/NetBSD.cpp clang/lib/Driver/ToolChains/OHOS.cpp
clang/lib/Driver/ToolChains/OpenBSD.cpp
clang/lib/Driver/ToolChains/PPCFreeBSD.cpp
clang/lib/Driver/ToolChains/PPCLinux.cpp clang/lib/Driver/ToolChains/PS4CPU.cpp
clang/lib/Driver/ToolChains/SPIRV.cpp clang/lib/Driver/ToolChains/SYCL.cpp
clang/lib/Driver/ToolChains/Solaris.cpp clang/lib/Driver/ToolChains/UEFI.cpp
clang/lib/Driver/ToolChains/VEToolchain.cpp
clang/lib/Driver/ToolChains/WebAssembly.cpp
clang/lib/Driver/ToolChains/XCore.cpp clang/lib/Driver/ToolChains/ZOS.cpp
clang/lib/Driver/XRayArgs.cpp clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
clang/lib/Interpreter/Interpreter.cpp clang/lib/Interpreter/InterpreterUtils.h
clang/lib/Tooling/InterpolatingCompilationDatabase.cpp
clang/lib/Tooling/Tooling.cpp clang/tools/clang-check/ClangCheck.cpp
clang/tools/clang-installapi/ClangInstallAPI.cpp
clang/tools/clang-installapi/Options.cpp clang/tools/driver/cc1_main.cpp
clang/tools/driver/cc1as_main.cpp clang/tools/driver/driver.cpp
clang/unittests/Driver/DXCModeTest.cpp
flang/lib/Frontend/CompilerInvocation.cpp
flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
flang/tools/flang-driver/driver.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
llvm/include/llvm/MC/MCAsmInfo.h llvm/include/llvm/Option/Arg.h
clang/include/clang/Options/OptionUtils.h clang/include/clang/Options/Options.h
clang/lib/Options/DriverOptions.cpp clang/lib/Options/OptionUtils.cpp
--diff_from_common_commit
``
: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/clang-tools-extra/clangd/CompileCommands.cpp
b/clang-tools-extra/clangd/CompileCommands.cpp
index f5592b60a..7990f2719 100644
--- a/clang-tools-extra/clangd/CompileCommands.cpp
+++ b/clang-tools-extra/clangd/CompileCommands.cpp
@@ -267,8 +267,7 @@ void CommandMangler::operator()(tooling::CompileCommand
&Command,
IndicesToDrop.push_back(Input->getIndex());
}
// Anything after `--` is also treated as input, drop them as well.
- if (auto *DashDash =
- ArgList.getLastArgNoClaim(options::OPT__DASH_DASH)) {
+ if (auto *DashDash = ArgList.getLastArgNoClaim(options::OPT__DASH_DASH)) {
auto DashDashIndex = DashDash->getIndex() + 1;
[Lldb-commits] [lldb] [lldb] fix the "RegisterValue::SetValueFromData" method for 128-bit integer registers (PR #163646)
sedymrak wrote: Ok, then. I'll leave this branch in the current final state. Feel free to merge it when everything (the build, the tests) is settled. Thank you for the feedback. https://github.com/llvm/llvm-project/pull/163646 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Don't run libc++ API tests without a locally built libc++ (PR #162657)
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/162657 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [debugserver] Implement MultiMemRead packet (PR #162670)
@@ -3160,6 +3165,140 @@ rnb_err_t RNBRemote::HandlePacket_m(const char *p) {
return SendPacket(ostrm.str());
}
+/// Returns true if `str` starts with `prefix`.
+static bool starts_with(std::string_view str, std::string_view prefix) {
+ return str.size() >= prefix.size() &&
+ str.compare(0, prefix.size(), prefix) == 0;
jasonmolenda wrote:
debugserver doesn't link to llvm or lldb, today. it does include a socket
header from the lldb sources, but everything in there is defined in the header.
it does allow us to build debugserver entirely separately from the rest of
llvm/lldb, handy when cross compiling to a different target quickly, via its
Xcode project file.
https://github.com/llvm/llvm-project/pull/162670
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 31d2602 - [lldb] Add a missing include. NFC. (#162809)
Author: Martin Storsjö
Date: 2025-10-10T18:12:57+03:00
New Revision: 31d260211a27a59788c6a00a3bf55df8e5047940
URL:
https://github.com/llvm/llvm-project/commit/31d260211a27a59788c6a00a3bf55df8e5047940
DIFF:
https://github.com/llvm/llvm-project/commit/31d260211a27a59788c6a00a3bf55df8e5047940.diff
LOG: [lldb] Add a missing include. NFC. (#162809)
This fixes building LLDB for mingw with libstdc++, after
8ae30a3facd25c9c7c2cfb96b69466a6c4d22baa.
Previously, building errored out with errors like these:
In file included from
llvm-project/lldb/include/lldb/Protocol/MCP/Transport.h:12,
from
llvm-project/lldb/include/lldb/Protocol/MCP/Server.h:16,
from
llvm-project/lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.h:15,
from
llvm-project/lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp:9:
llvm-project/lldb/include/lldb/Host/JSONTransport.h:608:23: error: field
‘replied’ has incomplete type ‘std::atomic’
608 | std::atomic replied = {false};
| ^~~
In file included from
gcc-mingw/x86_64-w64-mingw32/include/c++/12.1.0/bits/shared_ptr_atomic.h:33,
from
gcc-mingw/x86_64-w64-mingw32/include/c++/12.1.0/memory:78,
from llvm-project/lldb/include/lldb/Host/Socket.h:12,
from
llvm-project/lldb/include/lldb/Core/ProtocolServer.h:13,
from
llvm-project/lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.h:12:
gcc-mingw/x86_64-w64-mingw32/include/c++/12.1.0/bits/atomic_base.h:162:12:
note: declaration of ‘struct std::atomic’
162 | struct atomic;
|^~
Added:
Modified:
lldb/include/lldb/Host/JSONTransport.h
Removed:
diff --git a/lldb/include/lldb/Host/JSONTransport.h
b/lldb/include/lldb/Host/JSONTransport.h
index 1453316e96fb4..892821ba36952 100644
--- a/lldb/include/lldb/Host/JSONTransport.h
+++ b/lldb/include/lldb/Host/JSONTransport.h
@@ -26,6 +26,7 @@
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/raw_ostream.h"
+#include
#include
#include
#include
___
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)
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 --
lldb/unittests/Breakpoint/BreakpointClearConditionTest.cpp
lldb/source/API/SBBreakpoint.cpp lldb/source/API/SBBreakpointLocation.cpp
``
: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/unittests/Breakpoint/BreakpointClearConditionTest.cpp
b/lldb/unittests/Breakpoint/BreakpointClearConditionTest.cpp
index 688c85a4a..f5c92c21a 100644
--- a/lldb/unittests/Breakpoint/BreakpointClearConditionTest.cpp
+++ b/lldb/unittests/Breakpoint/BreakpointClearConditionTest.cpp
@@ -42,8 +42,7 @@ public:
SubsystemRAII subsystems;
};
-template
-void test_condition(T sb_object) {
+template void test_condition(T sb_object) {
const char *in_cond_str = "Here is a condition";
sb_object.SetCondition(in_cond_str);
// Make sure we set the condition correctly:
@@ -56,7 +55,7 @@ void test_condition(T sb_object) {
out_cond_str = sb_object.GetCondition();
// And make sure an unset condition returns nullptr:
EXPECT_EQ(nullptr, out_cond_str);
- }
+ }
}
TEST_F(BreakpointClearConditionTest, BreakpointClearConditionTest) {
@@ -66,20 +65,19 @@ TEST_F(BreakpointClearConditionTest,
BreakpointClearConditionTest) {
// Create target
SBTarget sb_target;
SBError error;
- sb_target = m_sb_debugger.CreateTarget("", "x86_64-apple-macosx-",
"remote-macosx",
- /*add_dependent=*/ false, error);
+ sb_target =
+ m_sb_debugger.CreateTarget("", "x86_64-apple-macosx-", "remote-macosx",
+ /*add_dependent=*/false, error);
EXPECT_EQ(sb_target.IsValid(), true);
// Create breakpoint
- SBBreakpoint sb_breakpoint =
- sb_target.BreakpointCreateByAddress(0xDEADBEEF);
+ SBBreakpoint sb_breakpoint = sb_target.BreakpointCreateByAddress(0xDEADBEEF);
test_condition(sb_breakpoint);
-
+
// Address breakpoints always have one location, so we can also use this
// to test the location:
SBBreakpointLocation sb_loc = sb_breakpoint.GetLocationAtIndex(0);
EXPECT_EQ(sb_loc.IsValid(), true);
test_condition(sb_loc);
-
}
``
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][NativePDB] Consolidate simple types (PR #163209)
Nerixyz wrote: Ah I forgot to commit and push https://github.com/llvm/llvm-project/pull/163209 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB][NativePDB] Consolidate simple types (PR #163209)
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/163209 ___ 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)
jimingham wrote: BTW, I used the term `generator` when I probably shouldn't because that's more a term of art. I don't think "real generating iterators" are needed here, because we're really not building lists, we're always only answering the question "Give me the stack frame at index 5 or tell me it doesn't exist". Internally, if the StackFrameList was last asked about frame index 3, it knows that to provide 5 it has to start with 3 and generate 4 and then 5. But I can't see why we need fancier machinery than "the transmogrifier keeps track of how many frames it has generated so far, and does what it needs to to fill the gap between what it was last asked to fetch and what it was asked to fetch this time round. 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] [lldb/cmake] unittests: Breakpoint: remove liblldb dep (PR #162571)
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Justin Stitt (JustinStitt)
Changes
Remove the `liblldb` link target for these tests to fix CI failures.
Commit 02572c6e9bbb ("[lldb] Enforce that only the LLDB API unit tests can link
liblldb") disallows linking against liblldb for most tests. Then, Commit
f3e2c20a23b1 ("Make
SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again") got merged
just after this commit (but before CI could report the regression).
The tests still pass for me with ` $
./tools/lldb/unittests/Breakpoint/LLDBBreakpointTests`.
---
Full diff: https://github.com/llvm/llvm-project/pull/162571.diff
1 Files Affected:
- (modified) lldb/unittests/Breakpoint/CMakeLists.txt (-1)
``diff
diff --git a/lldb/unittests/Breakpoint/CMakeLists.txt
b/lldb/unittests/Breakpoint/CMakeLists.txt
index 3e4161313cd9d..c38b38bc5e90e 100644
--- a/lldb/unittests/Breakpoint/CMakeLists.txt
+++ b/lldb/unittests/Breakpoint/CMakeLists.txt
@@ -5,7 +5,6 @@ add_lldb_unittest(LLDBBreakpointTests
LINK_COMPONENTS
Support
LINK_LIBS
-liblldb
lldbBreakpoint
lldbCore
LLVMTestingSupport
``
https://github.com/llvm/llvm-project/pull/162571
___
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/joshpeterson updated
https://github.com/llvm/llvm-project/pull/162315
>From 248f4edc8bf264f944300846b2122a05129960d1 Mon Sep 17 00:00:00 2001
From: Josh Peterson
Date: Tue, 7 Oct 2025 12:14:45 -0400
Subject: [PATCH 1/3] [lldb] Fix off-by-one error in ToDwarfSourceLanguage
The ToDwarfSourceLanguage function incorrectly excluded languages
that equal eLanguageTypeLastStandardLanguage. The comparison used
`<` instead of `<=`, causing the last standard language to fall
through to the default case and return std::nullopt.
This broke language plugins that use eLanguageTypeLastStandardLanguage
(currently Mojo at 0x0033) as their language code, preventing proper
DWARF language conversion and breaking REPL functionality.
The fix changes the comparison from `<` to `<=` to include the last
standard language in the automatic conversion to DWARF source language.
This is a regression from commit 7f51a2a47d2e706d04855b0e41690ebafa2b3238
which introduced the ToDwarfSourceLanguage function.
---
lldb/source/Target/Language.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp
index 395718ecbe292..2efd4bc1e2c09 100644
--- a/lldb/source/Target/Language.cpp
+++ b/lldb/source/Target/Language.cpp
@@ -549,7 +549,7 @@ Language::~Language() = default;
static std::optional
ToDwarfSourceLanguage(lldb::LanguageType language_type) {
- if (language_type < lldb::eLanguageTypeLastStandardLanguage)
+ if (language_type <= lldb::eLanguageTypeLastStandardLanguage)
return static_cast(language_type);
switch (language_type) {
>From 3254a97a7351ff7f753414283476fe72dbc60155 Mon Sep 17 00:00:00 2001
From: Josh Peterson
Date: Tue, 7 Oct 2025 14:51:54 -0400
Subject: [PATCH 2/3] Add a test for the last language type
---
lldb/unittests/Target/LanguageTest.cpp | 13 +
1 file changed, 13 insertions(+)
diff --git a/lldb/unittests/Target/LanguageTest.cpp
b/lldb/unittests/Target/LanguageTest.cpp
index a00fda78d569a..d3302dcf63d33 100644
--- a/lldb/unittests/Target/LanguageTest.cpp
+++ b/lldb/unittests/Target/LanguageTest.cpp
@@ -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);
+ EXPECT_TRUE(lang);
+
+ // It should have a valid description (not "Unknown").
+ EXPECT_NE(lang.GetDescription(), "Unknown");
+
+ // It should convert to the correct language type.
+ EXPECT_EQ(lang.AsLanguageType(), eLanguageTypeLastStandardLanguage);
+}
>From 790b947c51e4ecd6574780cd4d84a7c7a7b61c61 Mon Sep 17 00:00:00 2001
From: Josh Peterson
Date: Wed, 8 Oct 2025 07:09:16 -0400
Subject: [PATCH 3/3] Allow the test to use the last language type
---
lldb/unittests/Target/LanguageTest.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lldb/unittests/Target/LanguageTest.cpp
b/lldb/unittests/Target/LanguageTest.cpp
index d3302dcf63d33..a1f9267dd45d0 100644
--- a/lldb/unittests/Target/LanguageTest.cpp
+++ b/lldb/unittests/Target/LanguageTest.cpp
@@ -24,9 +24,6 @@ TEST_F(LanguageTest, SourceLanguage_GetDescription) {
continue;
auto lang_type = static_cast(i);
-if (lang_type == lldb::eLanguageTypeLastStandardLanguage)
- continue;
-
SourceLanguage lang(lang_type);
// eLanguageTypeHIP is not implemented as a DW_LNAME because of a conflict.
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix bot failure due to new qSupported packet reply (PR #163643)
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Felipe de Azevedo Piovezan (felipepiovezan) Changes When [1] landed, gdbremote server tests had to be updated to understand the new packet field. [1]: https://github.com/llvm/llvm-project/pull/163249 --- Full diff: https://github.com/llvm/llvm-project/pull/163643.diff 1 Files Affected: - (modified) lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py (+1) ``diff diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py index aea6b9fe36b2c..5ba642bbedf74 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -931,6 +931,7 @@ def add_qSupported_packets(self, client_features=[]): "QNonStop", "SupportedWatchpointTypes", "SupportedCompressions", +"MultiMemRead", ] def parse_qSupported_response(self, context): `` https://github.com/llvm/llvm-project/pull/163643 ___ 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
>From 5fd3ebc549fd453aa4ec982b001aa32926983bfd Mon Sep 17 00:00:00 2001
From: Med Ismail Bennani
Date: Sat, 4 Oct 2025 14:10:19 +0100
Subject: [PATCH] [lldb] Introduce ScriptedFrameProvider for real threads
This patch introduces a new scripting affordance: `ScriptedFrameProvider`.
This allows users to provide custom stack frames for real native threads,
augmenting or replacing the standard unwinding mechanism. This is useful
for:
- Providing frames for custom calling conventions or languages
- Reconstructing missing frames from crash dumps or core files
- Adding diagnostic or synthetic frames for debugging
The frame provider supports four merge strategies:
- Replace: Replace entire stack with scripted frames
- Prepend: Add scripted frames before real stack
- Append: Add scripted frames after real stack
- ReplaceByIndex: Replace specific frames by index
With this change, frames can be synthesized from different sources:
- Either from a dictionary containing a PC address and frame index
- Or by creating a ScriptedFrame python object for full control
Architecture changes:
- Moved ScriptedFrame from `Plugins` to `Interpreter` to avoid
layering violations
- Moved `RegisterContextMemory` from `Plugins` to `Target` as it only
depends on Target and Utility layers
- Added `ScriptedFrameProvider` C++ wrapper and Python interface
- Updated `Thread::GetStackFrameList` to apply merge strategies
rdar://161834688
Signed-off-by: Med Ismail Bennani
---
lldb/bindings/python/CMakeLists.txt | 1 +
.../templates/scripted_frame_provider.py | 147 +++
lldb/include/lldb/API/SBThread.h | 5 +
.../ScriptedFrameProviderInterface.h | 36 +++
.../lldb/Interpreter/ScriptInterpreter.h | 6 +
.../lldb/Interpreter}/ScriptedFrame.h | 42 ++-
.../lldb/Interpreter/ScriptedFrameProvider.h | 58
.../lldb/Target}/RegisterContextMemory.h | 6 +-
lldb/include/lldb/Target/StackFrameList.h | 1 +
lldb/include/lldb/Target/Thread.h | 9 +
lldb/include/lldb/lldb-enumerations.h | 13 +
lldb/include/lldb/lldb-forward.h | 6 +
lldb/source/API/SBThread.cpp | 34 +++
lldb/source/Commands/CommandObjectFrame.cpp | 95 +++
lldb/source/Commands/CommandObjectThread.cpp | 1 +
lldb/source/Interpreter/CMakeLists.txt| 2 +
.../ScriptedFrame.cpp | 84 --
.../Interpreter/ScriptedFrameProvider.cpp | 188 +
.../Python/OperatingSystemPython.cpp | 2 +-
.../Plugins/Process/Utility/CMakeLists.txt| 1 -
.../Plugins/Process/scripted/CMakeLists.txt | 1 -
.../Process/scripted/ScriptedThread.cpp | 5 +-
.../Plugins/Process/scripted/ScriptedThread.h | 2 +-
.../Python/Interfaces/CMakeLists.txt | 1 +
.../ScriptInterpreterPythonInterfaces.h | 1 +
.../ScriptedFrameProviderPythonInterface.cpp | 58
.../ScriptedFrameProviderPythonInterface.h| 43 +++
.../Interfaces/ScriptedPythonInterface.h | 4 +
.../Python/ScriptInterpreterPython.cpp| 5 +
.../Python/ScriptInterpreterPythonImpl.h | 3 +
lldb/source/Target/CMakeLists.txt | 1 +
.../RegisterContextMemory.cpp | 2 +-
lldb/source/Target/Thread.cpp | 114 +++-
.../scripted_frame_provider/Makefile | 3 +
.../TestScriptedFrameProvider.py | 249 ++
.../scripted_frame_provider/main.c| 14 +
.../test_frame_providers.py | 167
37 files changed, 1356 insertions(+), 54 deletions(-)
create mode 100644 lldb/examples/python/templates/scripted_frame_provider.py
create mode 100644
lldb/include/lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h
rename lldb/{source/Plugins/Process/scripted =>
include/lldb/Interpreter}/ScriptedFrame.h (60%)
create mode 100644 lldb/include/lldb/Interpreter/ScriptedFrameProvider.h
rename lldb/{source/Plugins/Process/Utility =>
include/lldb/Target}/RegisterContextMemory.h (92%)
rename lldb/source/{Plugins/Process/scripted => Interpreter}/ScriptedFrame.cpp
(66%)
create mode 100644 lldb/source/Interpreter/ScriptedFrameProvider.cpp
create mode 100644
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.cpp
create mode 100644
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedFrameProviderPythonInterface.h
rename lldb/source/{Plugins/Process/Utility =>
Target}/RegisterContextMemory.cpp (99%)
create mode 100644
lldb/test/API/functionalities/scripted_frame_provider/Makefile
create mode 100644
lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py
create mode 100644 lldb/test/API/functionalities/scripted_frame_provider/main.c
create mode 100644
lldb/test/API/functionalities/scripted_f
[Lldb-commits] [lldb] [lldb] Add support for unique target ids (PR #160736)
@@ -159,6 +159,17 @@ class TargetList : public Broadcaster {
lldb::TargetSP FindTargetWithProcess(lldb_private::Process *process) const;
+ /// Find the target that has a globally unique ID that matches ID \a id
walter-erquinigo wrote:
```suggestion
/// Find the target that has a globally unique ID that matches ID \a id.
```
https://github.com/llvm/llvm-project/pull/160736
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb-dap] Send a 'process' event on restart. (PR #163833)
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/163833
>From 49e0b3b886f68c60dbfb737688ae4959d69df130 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 16 Oct 2025 10:34:48 -0700
Subject: [PATCH 1/2] [lldb-dap] Send a 'process' event on restart.
When we restart a process, send an updated 'process' event describing the newly
launched process.
---
lldb/tools/lldb-dap/EventHelper.cpp | 5 -
lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lldb/tools/lldb-dap/EventHelper.cpp
b/lldb/tools/lldb-dap/EventHelper.cpp
index 2b9ed229405a8..ebddb4ec1f502 100644
--- a/lldb/tools/lldb-dap/EventHelper.cpp
+++ b/lldb/tools/lldb-dap/EventHelper.cpp
@@ -15,6 +15,7 @@
#include "Protocol/ProtocolRequests.h"
#include "Protocol/ProtocolTypes.h"
#include "lldb/API/SBFileSpec.h"
+#include "lldb/API/SBPlatform.h"
#include "llvm/Support/Error.h"
#include
@@ -136,7 +137,9 @@ void SendProcessEvent(DAP &dap, LaunchMethod launch_method)
{
EmplaceSafeString(body, "name", exe_path);
const auto pid = dap.target.GetProcess().GetProcessID();
body.try_emplace("systemProcessId", (int64_t)pid);
- body.try_emplace("isLocalProcess", true);
+ body.try_emplace("isLocalProcess",
+ dap.target.GetPlatform().GetName() ==
+ lldb::SBPlatform::GetHostPlatform().GetName());
const char *startMethod = nullptr;
switch (launch_method) {
case Launch:
diff --git a/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
b/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
index 45dd7ddce0428..706e66fd643a3 100644
--- a/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
@@ -124,6 +124,8 @@ void RestartRequestHandler::operator()(
return;
}
+ SendProcessEvent(dap, Attach);
+
// This is normally done after receiving a "configuration done" request.
// Because we're restarting, configuration has already happened so we can
// continue the process right away.
>From c8fdc73832c44a6ba873c07dc42001c4eb90a0d9 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 16 Oct 2025 13:53:49 -0700
Subject: [PATCH 2/2] Restarts should be a 'launch' configuration.
---
lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
b/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
index 706e66fd643a3..100173bfc3082 100644
--- a/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp
@@ -124,7 +124,7 @@ void RestartRequestHandler::operator()(
return;
}
- SendProcessEvent(dap, Attach);
+ SendProcessEvent(dap, Launch);
// This is normally done after receiving a "configuration done" request.
// Because we're restarting, configuration has already happened so we can
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] update lldb-server platform help parsing (PR #162730)
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/162730 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb/cmake] unittests: Breakpoint: remove liblldb dep (PR #162571)
https://github.com/JustinStitt created
https://github.com/llvm/llvm-project/pull/162571
Remove the `liblldb` link target for these tests to fix CI failures.
Commit 02572c6e9bbb ("[lldb] Enforce that only the LLDB API unit tests can link
liblldb") disallows linking against liblldb for most tests. Then, Commit
f3e2c20a23b1 ("Make
SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again") got merged
just after this commit (but before CI could report the regression).
The tests still pass for me with ` $
./tools/lldb/unittests/Breakpoint/LLDBBreakpointTests`.
>From 87916926a2abf99c524f4987f6f280587e2761d6 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Wed, 8 Oct 2025 16:23:32 -0700
Subject: [PATCH] [lldb/cmake] unittests: Breakpoint: remove liblldb dep
Remove the liblldb link target for these tests to fix CI failures.
Commit 02572c6e9bbb ("[lldb] Enforce that only the LLDB API unit tests
can link liblldb") disallows linking against liblldb for most tests.
Then, Commit f3e2c20a23b1 ("Make
SBBreakpoint/SBBreakpointLocation.SetCondition(nullptr) work again") got
merged just after this commit (but before CI could report the
regression).
Signed-off-by: Justin Stitt
---
lldb/unittests/Breakpoint/CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/lldb/unittests/Breakpoint/CMakeLists.txt
b/lldb/unittests/Breakpoint/CMakeLists.txt
index 3e4161313cd9d..c38b38bc5e90e 100644
--- a/lldb/unittests/Breakpoint/CMakeLists.txt
+++ b/lldb/unittests/Breakpoint/CMakeLists.txt
@@ -5,7 +5,6 @@ add_lldb_unittest(LLDBBreakpointTests
LINK_COMPONENTS
Support
LINK_LIBS
-liblldb
lldbBreakpoint
lldbCore
LLVMTestingSupport
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] Add AArch64 support to the premerge tests (PR #155274)
tstellar wrote: This is ready for review. I set the continue-on-error property for the aarch64 tests for now to allow for a stabilization period that doesn't impact users. https://github.com/llvm/llvm-project/pull/155274 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [libc] [libcxx] [lld] [lldb] [llvm] [mlir] [openmp] [polly] Python-related cleanups (PR #163566)
rossburton wrote: > Moreover, this may have pretty big implications since the implementation of > these commands 8s very inconsistent across platforms and no common rules seem > to exist. Some platforms have `python` that aliases to `python3`, some alias > it to `python2`, some only have `python` etc. so I'm not convinced it's a > good idea to just change these broadly without considering possible platform > specific requirements My point exactly: the bulk of these scripts _are_ python3 scripts, so we can be precise. I'm unaware of any real systems where there is no python3 binary. If this code wanted to handle systems where there is only a `python` then half of the scripts have the wrong shebang... https://github.com/llvm/llvm-project/pull/163566 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][MachO][NFC] Extract ObjC metadata symbol parsing into helper function (PR #161536)
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 --
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
``
: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/ObjectFile/Mach-O/ObjectFileMachO.cpp
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index deacff0ec..4c0561401 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -2844,9 +2844,9 @@ void ObjectFileMachO::ParseSymtab(Symtab &symtab) {
type)) {
demangled_is_synthesized = true;
} else if (nlist.n_value != 0)
-symbol_section = section_info.GetSection(
-nlist.n_sect, nlist.n_value);
- type = eSymbolTypeData;
+ symbol_section = section_info.GetSection(
+ nlist.n_sect, nlist.n_value);
+type = eSymbolTypeData;
}
break;
@@ -3644,9 +3644,9 @@ void ObjectFileMachO::ParseSymtab(Symtab &symtab) {
symbol_name_non_abi_mangled, type))
{
demangled_is_synthesized = true;
} else if (nlist.n_value != 0)
- symbol_section =
- section_info.GetSection(nlist.n_sect, nlist.n_value);
-type = eSymbolTypeData;
+symbol_section =
+section_info.GetSection(nlist.n_sect, nlist.n_value);
+ type = eSymbolTypeData;
}
} break;
``
https://github.com/llvm/llvm-project/pull/161536
___
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)
Nerixyz wrote: I'm no real MinGW user, and I couldn't find documentation on the mangling used there, so I relied on examples. The mangled names on i686 mingw32 do have two underscores. From [this comment on an old patch](https://reviews.llvm.org/D22939#500090), it does seem like this is intended. But I can't find where Clang does this. Maybe @mstorsjo knows more? 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] [debugserver] Implement MultiMemRead packet (PR #162670)
@@ -3160,6 +3165,140 @@ rnb_err_t RNBRemote::HandlePacket_m(const char *p) {
return SendPacket(ostrm.str());
}
+/// Returns true if `str` starts with `prefix`.
+static bool starts_with(std::string_view str, std::string_view prefix) {
+ return str.size() >= prefix.size() &&
+ str.compare(0, prefix.size(), prefix) == 0;
kastiglione wrote:
```suggestion
return str.substr(0, prefix.size()) == prefix;
```
https://github.com/llvm/llvm-project/pull/162670
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] Fix typos: 'auxilliary' to 'auxiliary' and multiple other typos (PR #161935)
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using `@` followed by their GitHub username. If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the [LLVM GitHub User Guide](https://llvm.org/docs/GitHub.html). You can also ask questions in a comment on this PR, on the [LLVM Discord](https://discord.com/invite/xS7Z362) or on the [forums](https://discourse.llvm.org/). https://github.com/llvm/llvm-project/pull/161935 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Add a null check, actually use new SharedModuleList class (PR #162574)
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Augusto Noronha (augusto2112)
Changes
Now that the use after free bug has been fixed (397181d5c), actually use the
new SharedModuleList class.
---
Full diff: https://github.com/llvm/llvm-project/pull/162574.diff
1 Files Affected:
- (modified) lldb/source/Core/ModuleList.cpp (+6-7)
``diff
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 2ccebf3fabfc5..c40612c1ced5e 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -989,7 +989,7 @@ class SharedModuleList {
};
struct SharedModuleListInfo {
- ModuleList module_list;
+ SharedModuleList module_list;
ModuleListProperties module_list_properties;
};
}
@@ -1007,7 +1007,7 @@ static SharedModuleListInfo &GetSharedModuleListInfo()
return *g_shared_module_list_info;
}
-static ModuleList &GetSharedModuleList() {
+static SharedModuleList &GetSharedModuleList() {
return GetSharedModuleListInfo().module_list;
}
@@ -1017,8 +1017,8 @@ ModuleListProperties
&ModuleList::GetGlobalModuleListProperties() {
bool ModuleList::ModuleIsInCache(const Module *module_ptr) {
if (module_ptr) {
-ModuleList &shared_module_list = GetSharedModuleList();
-return shared_module_list.FindModule(module_ptr).get() != nullptr;
+SharedModuleList &shared_module_list = GetSharedModuleList();
+return shared_module_list.FindModule(*module_ptr).get() != nullptr;
}
return false;
}
@@ -1041,9 +1041,8 @@ ModuleList::GetSharedModule(const ModuleSpec
&module_spec, ModuleSP &module_sp,
const FileSpecList *module_search_paths_ptr,
llvm::SmallVectorImpl *old_modules,
bool *did_create_ptr, bool always_create) {
- ModuleList &shared_module_list = GetSharedModuleList();
- std::lock_guard guard(
- shared_module_list.m_modules_mutex);
+ SharedModuleList &shared_module_list = GetSharedModuleList();
+ std::lock_guard guard(shared_module_list.GetMutex());
char path[PATH_MAX];
Status error;
``
https://github.com/llvm/llvm-project/pull/162574
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] Fix typos: 'auxilliary' to 'auxiliary' and 'unit64_t' to 'uint64_t' (PR #161955)
https://github.com/smallzhong created
https://github.com/llvm/llvm-project/pull/161955
Corrects multiple instances of the misspelling 'auxilliary' to 'auxiliary'
across code, comments, and documentation in XCOFF-related files.
Also fixes a minor typo in comments within XCOFFObjectFile.cpp
where 'unit64_t' was written instead of 'uint64_t'.
From c9eb21f6286c14ee95f46c4f4bea9164aefde500 Mon Sep 17 00:00:00 2001
From: smallzhong
Date: Sat, 4 Oct 2025 20:21:49 +0800
Subject: [PATCH 1/2] Fix spelling of 'auxiliary' in XCOFF and related docs
Corrects multiple instances of the misspelling 'auxilliary' to 'auxiliary' in
comments and documentation across XCOFF-related source files, headers, and
tests.
---
lldb/include/lldb/Symbol/SymbolFile.h | 4 ++--
llvm/include/llvm/IR/MDBuilder.h | 2 +-
llvm/lib/MC/XCOFFObjectWriter.cpp | 14 +++---
llvm/lib/Object/XCOFFObjectFile.cpp| 2 +-
.../PowerPC/aix-xcoff-exception-section-debug.ll | 6 +++---
.../CodeGen/PowerPC/aix-xcoff-exception-section.ll | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/lldb/include/lldb/Symbol/SymbolFile.h
b/lldb/include/lldb/Symbol/SymbolFile.h
index 3b4d7bc01d132..50036c2ea049b 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -174,9 +174,9 @@ class SymbolFile : public PluginInterface {
/// object files.
///
/// \param comp_unit
- /// When this SymbolFile consists of multiple auxilliary
+ /// When this SymbolFile consists of multiple auxiliary
/// SymbolFiles, for example, a Darwin debug map that references
- /// multiple .o files, comp_unit helps choose the auxilliary
+ /// multiple .o files, comp_unit helps choose the auxiliary
/// file. In most other cases comp_unit's symbol file is
/// identical with *this.
///
diff --git a/llvm/include/llvm/IR/MDBuilder.h b/llvm/include/llvm/IR/MDBuilder.h
index df1c66cf24fcb..62184be96739b 100644
--- a/llvm/include/llvm/IR/MDBuilder.h
+++ b/llvm/include/llvm/IR/MDBuilder.h
@@ -143,7 +143,7 @@ class MDBuilder {
// PC sections metadata.
//===--===//
- /// A pair of PC section name with auxilliary constant data.
+ /// A pair of PC section name with auxiliary constant data.
using PCSection = std::pair>;
/// Return metadata for PC sections.
diff --git a/llvm/lib/MC/XCOFFObjectWriter.cpp
b/llvm/lib/MC/XCOFFObjectWriter.cpp
index fce6b2ac5cf8d..ad99f566655e4 100644
--- a/llvm/lib/MC/XCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/XCOFFObjectWriter.cpp
@@ -946,15 +946,15 @@ void XCOFFWriter::writeSymbolEntryForCsectMemberLabel(
(is64Bit() && ExceptionSection.isDebugEnabled) ? 3 : 2);
if (is64Bit() && ExceptionSection.isDebugEnabled) {
// On 64 bit with debugging enabled, we have a csect, exception, and
- // function auxilliary entries, so we must increment symbol index by 4.
+ // function auxiliary entries, so we must increment symbol index by 4.
writeSymbolAuxExceptionEntry(
ExceptionSection.FileOffsetToData +
getExceptionOffset(Entry->second.FunctionSymbol),
Entry->second.FunctionSize,
SymbolIndexMap[Entry->second.FunctionSymbol] + 4);
}
-// For exception section entries, csect and function auxilliary entries
-// must exist. On 64-bit there is also an exception auxilliary entry.
+// For exception section entries, csect and function auxiliary entries
+// must exist. On 64-bit there is also an exception auxiliary entry.
writeSymbolAuxFunctionEntry(
ExceptionSection.FileOffsetToData +
getExceptionOffset(Entry->second.FunctionSymbol),
@@ -1015,7 +1015,7 @@ void XCOFFWriter::writeSymbolAuxFunctionEntry(uint32_t
EntryOffset,
void XCOFFWriter::writeSymbolAuxExceptionEntry(uint64_t EntryOffset,
uint32_t FunctionSize,
uint32_t EndIndex) {
- assert(is64Bit() && "Exception auxilliary entries are 64-bit only.");
+ assert(is64Bit() && "Exception auxiliary entries are 64-bit only.");
W.write(EntryOffset);
W.write(FunctionSize);
W.write(EndIndex);
@@ -1348,7 +1348,7 @@ void XCOFFWriter::addExceptionEntry(const MCSymbol
*Symbol,
unsigned ReasonCode, unsigned FunctionSize,
bool hasDebug) {
// If a module had debug info, debugging is enabled and XCOFF emits the
- // exception auxilliary entry.
+ // exception auxiliary entry.
if (hasDebug)
ExceptionSection.isDebugEnabled = true;
auto Entry = ExceptionSection.ExceptionTable.find(Symbol->getName());
@@ -1474,8 +1474,8 @@ void XCOFFWriter::assignAddressesAndIndices(MCAssembler
&Asm) {
SymbolIndexMap[Sym.MCSym] = Sym.SymbolTableIndex;
[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)
@@ -297,6 +340,450 @@ class JSONRPCTransport : public IOTransport {
static constexpr llvm::StringLiteral kMessageSeparator = "\n";
};
-} // namespace lldb_private
+/// A handler for the response to an outgoing request.
+template
+using Reply =
+std::conditional_t,
+ llvm::unique_function,
+ llvm::unique_function)>>;
+
+namespace detail {
+template struct request_t final {
+ using type = llvm::unique_function)>;
+};
+template struct request_t final {
+ using type = llvm::unique_function)>;
+};
+template struct event_t final {
+ using type = llvm::unique_function;
+};
+template <> struct event_t final {
+ using type = llvm::unique_function;
+};
+} // namespace detail
+
+template
+using OutgoingRequest = typename detail::request_t::type;
+
+/// A function to send an outgoing event.
+template using OutgoingEvent = typename detail::event_t::type;
+
+/// Creates a request with the given id, method, and optional params.
+template
+Req MakeRequest(Id, llvm::StringRef, std::optional);
+
+/// Creates an error response for a given request.
+template
+Resp MakeResponse(const Req &, llvm::Error);
+
+/// Creates a success response for a given request.
+template
+Resp MakeResponse(const Req &, llvm::json::Value);
+
+/// Creates an event.
+template
+Evt MakeEvent(llvm::StringRef, std::optional);
+
+/// Extracts the result value from a response.
+template
+llvm::Expected GetResult(const Resp &);
+
+/// Extracts the id from a response.
+template Id GetId(const Resp &);
+
+/// Extracts the method from a request or event.
+template llvm::StringRef GetMethod(const T &);
+
+/// Extracts the parameters from a request or event.
+template llvm::json::Value GetParams(const T &);
+
+/// Binder collects a table of functions that handle calls.
+///
+/// The wrapper takes care of parsing/serializing responses.
+///
+/// This allows a JSONTransport to handle incoming and outgoing requests and
+/// events.
+///
+/// A simple example could be to a method to a lambda like:
+///
+/// \code{cpp}
+/// Binder binder{transport};
+/// // Binds an incoming request handler.
+/// binder.bind>("adder", [](const vector ¶ms) {
+/// int sum = 0;
+/// for (int v : params)
+/// sum += v;
+/// return sum;
+/// });
+/// // Binds an outgoing request handler.
ashgti wrote:
Done.
https://github.com/llvm/llvm-project/pull/159160
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [debugserver] Support for `qMemTags` packet (PR #160952)
@@ -0,0 +1,94 @@
+"""Test MTE Memory Tagging on Apple platforms"""
+
+import lldb
+import re
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+import lldbsuite.test.cpu_feature as cpu_feature
+
+exe_name = "uaf_mte" # Must match Makefile
+
+
+class TestDarwinMTE(TestBase):
+NO_DEBUG_INFO_TESTCASE = True
+
+@skipUnlessFeature(cpu_feature.AArch64.MTE)
+def test_tag_fault(self):
+self.build()
+exe = self.getBuildArtifact(exe_name)
+
+target = self.dbg.CreateTarget(exe)
+self.assertTrue(target, VALID_TARGET)
+
+process = target.LaunchSimple(None, None, None)
+self.assertState(process.GetState(), lldb.eStateStopped,
PROCESS_STOPPED)
+
+self.expect(
+"thread info",
+substrs=[
+"stop reason = EXC_ARM_MTE_TAG_FAULT",
+"MTE tag mismatch detected",
+],
+)
+
+@skipUnlessFeature(cpu_feature.AArch64.MTE)
+def test_memory_read_with_tags(self):
+self.build()
+lldbutil.run_to_source_breakpoint(
+self, "// before free", lldb.SBFileSpec("main.c"),
exe_name=exe_name
+)
+
+# (lldb) memory read ptr-16 ptr+48 --show-tags
+# 0x7d2c00930: 00 00 00 00 00 00 00 00 d0 e3 a5 0a 02 00 00 00
(tag: 0x3)
+# 0x7d2c00940: 48 65 6c 6c 6f 00 00 00 00 00 00 00 00 00 00 00
Hello... (tag: 0xb)
+# 0x7d2c00950: 57 6f 72 6c 64 00 00 00 00 00 00 00 00 00 00 00
World... (tag: 0xb)
+# 0x7d2c00960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
(tag: 0x9)
+self.expect(
+"memory read ptr-16 ptr+48 --show-tags",
+substrs=[" Hello...", " World..."],
+patterns=[r"(.*\(tag: 0x[0-9a-f]\)\n){4}"],
+)
+
+def _parse_pointer_tag(self):
+return re.search(r"Logical tag: (0x[0-9a-f])",
self.res.GetOutput()).group(1)
+
+def _parse_memory_tags(self, expected_tag_count):
+tags = re.findall(r"\): (0x[0-9a-f])", self.res.GetOutput())
+self.assertEqual(len(tags), expected_tag_count)
+return tags
+
+@skipUnlessFeature(cpu_feature.AArch64.MTE)
+def test_memory_tag_read(self):
+self.build()
+lldbutil.run_to_source_breakpoint(
+self, "// before free", lldb.SBFileSpec("main.c"),
exe_name=exe_name
+)
+
+# (lldb) memory tag read ptr-1 ptr+33
+# Logical tag: 0x5
+# Allocation tags:
+# [0x100a65a40, 0x100a65a50): 0xf (mismatch)
+# [0x100a65a50, 0x100a65a60): 0x5
+# [0x100a65a60, 0x100a65a70): 0x5
+# [0x100a65a70, 0x100a65a80): 0x2 (mismatch)
+self.expect(
+"memory tag read ptr-1 ptr+33",
+substrs=["Logical tag: 0x", "Allocation tags:", "(mismatch)"],
+patterns=[r"(\[.*\): 0x[0-9a-f].*\n){4}"],
+)
+self.assertEqual(self.res.GetOutput().count("(mismatch)"), 2)
+ptr_tag = self._parse_pointer_tag()
+tags = self._parse_memory_tags(4)
+self.assertEqual(tags[1], ptr_tag)
+self.assertEqual(tags[2], ptr_tag)
+self.assertNotEqual(tags[0], ptr_tag)
DavidSpickett wrote:
And presumably it randomises but excludes the valid tag. So if the buffer has
tag N, it won't randomly set the granule outside the buffer to N also.
https://github.com/llvm/llvm-project/pull/160952
___
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)
vsapsai wrote: Pre-commit CI is also broken with the same error. 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] [clang] [clang-tools-extra] [compiler-rt] [libc] [libcxx] [lld] [lldb] [llvm] [mlir] [openmp] [polly] Python-related cleanups (PR #163566)
https://github.com/rossburton updated
https://github.com/llvm/llvm-project/pull/163566
>From 19f755003adf1befe663543286950fb4ac3a Mon Sep 17 00:00:00 2001
From: Ross Burton
Date: Wed, 15 Oct 2025 15:21:16 +0100
Subject: [PATCH 1/3] [cmake] Pass PYTHON_EXECUTABLE to native builds
Ensure that the nested native build uses the same python interpreter as
the main build, in case the python that CMake detects first is not the
python that the user has specified explicitly.
Original fix by Anuj Mittal .
---
llvm/cmake/modules/CrossCompile.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/cmake/modules/CrossCompile.cmake
b/llvm/cmake/modules/CrossCompile.cmake
index bfbd9cfd4063f..2a69c5133c56f 100644
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -101,6 +101,7 @@ function(llvm_create_cross_target project_name target_name
toolchain buildtype)
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TABLEGEN_FLAGS="${LLVM_TABLEGEN_FLAGS}"
+-DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}"
${build_type_flags} ${linker_flag} ${external_clang_dir} ${libc_flags}
${ARGN}
WORKING_DIRECTORY ${${project_name}_${target_name}_BUILD}
>From 2553ec4c48555e76ace2e3ce287342985fcc7793 Mon Sep 17 00:00:00 2001
From: Ross Burton
Date: Wed, 15 Oct 2025 15:04:40 +0100
Subject: [PATCH 2/3] Unify python shebangs
As per PEP-0394[1], there is no real concensus over what binary names
Python has, specifically 'python' could be Python 3, Python 2, or not
exist.
However, everyone has a python3 interpreter and the scripts are all
written for Python 3. Unify the shebangs so that the ~50% of shebangs
that use python now use python3.
[1] https://peps.python.org/pep-0394/
---
.../find-all-symbols/tool/run-find-all-symbols.py | 2 +-
clang-tools-extra/clangd/test/remote-index/pipeline_helper.py | 2 +-
clang/bindings/python/examples/cindex/cindex-dump.py| 2 +-
clang/bindings/python/examples/cindex/cindex-includes.py| 2 +-
clang/docs/tools/generate_formatted_state.py| 2 +-
clang/test/Analysis/check-analyzer-fixit.py | 2 +-
clang/test/Analysis/csv2json.py | 2 +-
clang/test/Driver/ftime-trace-sections.py | 2 +-
clang/tools/include-mapping/test.py | 2 +-
clang/tools/scan-build/bin/set-xcode-analyzer | 2 +-
clang/tools/scan-view/bin/scan-view | 2 +-
clang/tools/scan-view/share/Reporter.py | 2 +-
clang/tools/scan-view/share/startfile.py| 2 +-
clang/utils/ABITest/ABITestGen.py | 2 +-
clang/utils/CIndex/completion_logger_server.py | 2 +-
clang/utils/CaptureCmd | 2 +-
clang/utils/CmpDriver | 2 +-
clang/utils/FindSpecRefs| 2 +-
clang/utils/FuzzTest| 2 +-
clang/utils/TestUtils/deep-stack.py | 2 +-
clang/utils/analyzer/CmpRuns.py | 2 +-
clang/utils/analyzer/SATest.py | 2 +-
clang/utils/analyzer/SATestAdd.py | 2 +-
clang/utils/analyzer/SATestBuild.py | 2 +-
clang/utils/analyzer/SATestUpdateDiffs.py | 2 +-
clang/utils/analyzer/SumTimerInfo.py| 2 +-
clang/utils/analyzer/exploded-graph-rewriter.py | 2 +-
clang/utils/check_cfc/check_cfc.py | 2 +-
clang/utils/check_cfc/obj_diff.py | 2 +-
clang/utils/check_cfc/test_check_cfc.py | 2 +-
clang/utils/clangdiag.py| 2 +-
clang/utils/modfuzz.py | 2 +-
clang/utils/token-delta.py | 2 +-
clang/www/builtins.py | 2 +-
compiler-rt/lib/asan/scripts/asan_symbolize.py | 2 +-
compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py | 2 +-
compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py| 2 +-
compiler-rt/lib/sanitizer_common/scripts/sancov.py | 2 +-
cross-project-tests/debuginfo-tests/dexter/dexter.py| 2 +-
libc/AOR_v20.02/math/tools/plot.py | 2 +-
libc/utils/docgen/docgen.py | 2 +-
libcxx/test/libcxx-03/transitive_includes/to_csv.py | 2 +-
libcxx/test/libcxx/transitive_includes/to_csv.py| 2 +-
libcxx/utils/generate_abi_list.py | 2 +-
libcxx/utils/generate_escaped_output_
[Lldb-commits] [lldb] [LLDB] Add unary plus and minus to DIL (PR #155617)
@@ -21,6 +21,104 @@
namespace lldb_private::dil {
+static llvm::Expected
+GetTypeSystemFromCU(std::shared_ptr ctx) {
+ auto stack_frame = ctx->CalculateStackFrame();
+ if (!stack_frame)
+return llvm::createStringError("no stack frame in this context");
+ SymbolContext symbol_context =
+ stack_frame->GetSymbolContext(lldb::eSymbolContextCompUnit);
+ lldb::LanguageType language = symbol_context.comp_unit->GetLanguage();
+
+ symbol_context = stack_frame->GetSymbolContext(lldb::eSymbolContextModule);
+ return symbol_context.module_sp->GetTypeSystemForLanguage(language);
+}
+
+static CompilerType GetBasicType(lldb::TypeSystemSP type_system,
+ lldb::BasicType basic_type) {
+ if (type_system)
+return type_system.get()->GetBasicTypeFromAST(basic_type);
+
+ return CompilerType();
+}
+
+static lldb::ValueObjectSP
+ArrayToPointerConversion(lldb::ValueObjectSP valobj,
+ std::shared_ptr ctx) {
+ assert(valobj->IsArrayType() &&
adrian-prantl wrote:
Yes, the correct thing to do would be to return a ValueObject wrapping an
Error, although it might be even nicer to return an Expected.
https://github.com/llvm/llvm-project/pull/155617
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] update lldb-server platform help parsing (PR #162730)
cs01 wrote: Btw, I plan to make a few more pull requests to improve the API of lldb-server and the messages it prints. One for lldb-server's help itself. Another for lldb-server p's messages that it logs to stderr. And one more to hide the `--server` option and replace it with `--daemon` or `--multi-connect`, since `lldb-server --server` is repetitive and a bit unclear (IMO). https://github.com/llvm/llvm-project/pull/162730 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [gdbremote] Document MultiMemRead packet in protocol extensions (PR #162675)
@@ -2530,3 +2530,41 @@ read packet: $e0030100#b9 **Priority to Implement:** Only required for Wasm support. Necessary to show variables. + +### MultiMemRead + +Read memory from multiple memory addresses. + +There are two arguments to the request: + +* `ranges`: a list of base-16 pairs of numbers. Each pair is separated by a +`,`, as is each number in the pair. The first number of the pair denotes the +base address of the memory read, the second denotes the number of bytes to be +read. +* `options`: an optional string of options. If present, it may be empty. If +present, it is the last argument of the request. + +Both arguments must end with a `;`. + +The reply packet starts with a comma-separated list of base-16 numbers, +denoting how many bytes were read from each address, followed by a `;`, +followed by a sequence of bytes containing the memory data. The length of this +sequence must be equal to the sum of the numbers provided at the start of the +reply. + +If the stub is unable to read from any individual address, it should return a +length of "zero" for that address in the reply packet. + +A stub that supports this packet should return `MultiMemRead+` in the reply to +`qSupported`. + +``` +send packet: $MultiMemRead:ranges:100a00,4,200200,a0,40,4; +read packet: $4,0,2; felipepiovezan wrote: We have no examples of it today. It was included based on RFC feedback to allow for future extensions https://github.com/llvm/llvm-project/pull/162675 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] update lldb-server platform help text (PR #162730)
https://github.com/cs01 edited https://github.com/llvm/llvm-project/pull/162730 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [gdbremote] Document MultiMemRead packet in protocol extensions (PR #162675)
felipepiovezan wrote: > In short, this is a versioning field. If we want to do this, we might as well > stick a `version:1` key-value in the packet. We've never done this for a gdb > remote serial protocol packet, but if we think there is a need/value in doing > this, I'd say let's make it obvious what it is. I think we should remove this field entirely and let extensions be done through extra information in the reply to qSupported https://github.com/llvm/llvm-project/pull/162675 ___ 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)
@@ -477,6 +477,248 @@ std::string PlatformAndroid::GetRunAs() {
}
return run_as.str();
}
+
+// Helper function to populate process status information from
+// /proc/[pid]/status
+void PlatformAndroid::PopulateProcessStatusInfo(
+lldb::pid_t pid, ProcessInstanceInfo &process_info) {
+ // Read /proc/[pid]/status to get parent PID, UIDs, and GIDs
+ Status error;
+ auto status_adb = GetAdbClient(error);
+ if (error.Fail())
+return;
+
+ std::string status_output;
+ StreamString status_cmd;
+ status_cmd.Printf(
+ "cat /proc/%llu/status 2>/dev/null | grep -E '^(PPid|Uid|Gid):'",
+ (unsigned long long)pid);
+ Status status_error =
+ status_adb->Shell(status_cmd.GetData(), seconds(5), &status_output);
+
+ if (status_error.Fail() || status_output.empty())
+return;
+
+ llvm::SmallVector lines;
+ llvm::StringRef(status_output).split(lines, '\n');
+
+ for (llvm::StringRef line : lines) {
+line = line.trim();
+if (line.starts_with("PPid:")) {
+ llvm::StringRef ppid_str = line.substr(5).trim();
+ lldb::pid_t ppid;
+ if (llvm::to_integer(ppid_str, ppid))
+process_info.SetParentProcessID(ppid);
+} else if (line.starts_with("Uid:")) {
+ llvm::SmallVector uid_parts;
+ line.substr(4).trim().split(uid_parts, '\t', -1, false);
+ if (uid_parts.size() >= 2) {
+uint32_t uid, euid;
+if (llvm::to_integer(uid_parts[0].trim(), uid))
+ process_info.SetUserID(uid);
+if (llvm::to_integer(uid_parts[1].trim(), euid))
+ process_info.SetEffectiveUserID(euid);
+ }
+} else if (line.starts_with("Gid:")) {
+ llvm::SmallVector gid_parts;
+ line.substr(4).trim().split(gid_parts, '\t', -1, false);
+ if (gid_parts.size() >= 2) {
+uint32_t gid, egid;
+if (llvm::to_integer(gid_parts[0].trim(), gid))
+ process_info.SetGroupID(gid);
+if (llvm::to_integer(gid_parts[1].trim(), egid))
+ process_info.SetEffectiveGroupID(egid);
+ }
+}
+ }
+}
+
+// Helper function to populate command line arguments from /proc/[pid]/cmdline
+void PlatformAndroid::PopulateProcessCommandLine(
+lldb::pid_t pid, ProcessInstanceInfo &process_info) {
+ // Read /proc/[pid]/cmdline to get command line arguments
+ Status error;
+ auto cmdline_adb = GetAdbClient(error);
+ if (error.Fail())
+return;
+
+ std::string cmdline_output;
+ StreamString cmdline_cmd;
+ cmdline_cmd.Printf("cat /proc/%llu/cmdline 2>/dev/null | tr '\\000' ' '",
+ (unsigned long long)pid);
+ Status cmdline_error =
+ cmdline_adb->Shell(cmdline_cmd.GetData(), seconds(5), &cmdline_output);
+
+ if (cmdline_error.Fail() || cmdline_output.empty())
+return;
+
+ cmdline_output = llvm::StringRef(cmdline_output).trim().str();
+ if (cmdline_output.empty())
+return;
+
+ llvm::SmallVector args;
+ llvm::StringRef(cmdline_output).split(args, ' ', -1, false);
+ if (args.empty())
+return;
+
+ process_info.SetArg0(args[0]);
+ Args process_args;
+ for (size_t i = 1; i < args.size(); i++) {
+if (!args[i].empty())
+ process_args.AppendArgument(args[i]);
+ }
+ process_info.SetArguments(process_args, false);
+}
+
+// Helper function to populate architecture from /proc/[pid]/exe
+void PlatformAndroid::PopulateProcessArchitecture(
+lldb::pid_t pid, ProcessInstanceInfo &process_info) {
+ // Read /proc/[pid]/exe to get executable path for architecture detection
+ Status error;
+ auto exe_adb = GetAdbClient(error);
+ if (error.Fail())
+return;
+
+ std::string exe_output;
+ StreamString exe_cmd;
+ exe_cmd.Printf("readlink /proc/%llu/exe 2>/dev/null",
+ (unsigned long long)pid);
+ Status exe_error = exe_adb->Shell(exe_cmd.GetData(), seconds(5),
&exe_output);
+
+ if (exe_error.Fail() || exe_output.empty())
+return;
+
+ exe_output = llvm::StringRef(exe_output).trim().str();
+
+ // Determine architecture from exe path
+ ArchSpec arch;
+ if (exe_output.find("64") != std::string::npos ||
+ exe_output.find("arm64") != std::string::npos ||
+ exe_output.find("aarch64") != std::string::npos) {
+arch.SetTriple("aarch64-unknown-linux-android");
+ } else if (exe_output.find("x86_64") != std::string::npos) {
+arch.SetTriple("x86_64-unknown-linux-android");
+ } else if (exe_output.find("x86") != std::string::npos ||
+ exe_output.find("i686") != std::string::npos) {
+arch.SetTriple("i686-unknown-linux-android");
+ } else {
+// Default to armv7 for 32-bit ARM (most common on Android)
+arch.SetTriple("armv7-unknown-linux-android");
+ }
+
+ if (arch.IsValid())
+process_info.SetArchitecture(arch);
+}
+
+uint32_t
+PlatformAndroid::FindProcesses(const ProcessInstanceInfoMatch &match_info,
+ ProcessInstanceInfoList &proc_infos) {
+ proc_infos.clear();
+
+ // When LLDB is running natively on an Android device (IsHost() == true),
+ // use the pare
[Lldb-commits] [lldb] [lldb] Add type hints to gdbclientutils.py and use abstract base class (PR #162172)
@@ -242,7 +245,7 @@ def qProcessInfo(self): def qHostInfo(self): return "ptrsize:8;endian:little;" -def qEcho(self): +def qEcho(self, _: int): DavidSpickett wrote: There is another class that adds the parameter: ``` def qEcho(self, num): resp = "qEcho:" + str(num) if num >= 2: # We have launched our program self.started = True return [resp, "T13"] return resp ``` For documentation purposes, just call the parameter "num" then. All calls to qEcho( are passing a number so it should be fine to add the parameter here. 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] Delegate to ABI plugin to check if call frame addresses are valid (PR #161398)
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: None (pveras)
Changes
Specially when dealing with different address spaces, CFAs could start from
addresses like 0. For instance, Nvidia GPUs have instructions to read from
local memory that use 0-based offsets and stack memory can be referenced by
these offsets rather than global addresses. Note that ABIs could already
specify what they consider to be valid CFA values but this was never used in
these parts of the unwinder code. For most ABIs, this makes the validation more
strict, as they already used to discard 0s and then checked for alignment which
would discard 1s. There a few exceptions where 0s were possible and this makes
it less strict, like the RISCV and ARC ABIs.
@jasonmolenda Would you be the appropriate reviewer for this?
Also cc. @clayborg @walter-erquinigo
---
Full diff: https://github.com/llvm/llvm-project/pull/161398.diff
1 Files Affected:
- (modified) lldb/source/Target/RegisterContextUnwind.cpp (+19-11)
``diff
diff --git a/lldb/source/Target/RegisterContextUnwind.cpp
b/lldb/source/Target/RegisterContextUnwind.cpp
index c6d15fc6be0a6..325ddfb956c9f 100644
--- a/lldb/source/Target/RegisterContextUnwind.cpp
+++ b/lldb/source/Target/RegisterContextUnwind.cpp
@@ -52,6 +52,14 @@ static ConstString GetSymbolOrFunctionName(const
SymbolContext &sym_ctx) {
return ConstString();
}
+static bool CallFrameAddressIsValid(ABISP abi_sp, lldb::addr_t cfa) {
+ if (m_cfa == LLDB_INVALID_ADDRESS)
+return false;
+ if (abi_sp)
+return abi_sp->CallFrameAddressIsValid(cfa);
+ return cfa != 0 && cfa != 1;
+}
+
RegisterContextUnwind::RegisterContextUnwind(Thread &thread,
const SharedPtr &next_frame,
SymbolContext &sym_ctx,
@@ -448,7 +456,7 @@ void RegisterContextUnwind::InitializeNonZerothFrame() {
ReadFrameAddress(row_register_kind, row->GetAFAValue(), m_afa);
// A couple of sanity checks..
-if (m_cfa == LLDB_INVALID_ADDRESS || m_cfa == 0 || m_cfa == 1) {
+if (!CallFrameAddressIsValid(abi_sp, m_cfa)) {
UnwindLogMsg("could not find a valid cfa address");
m_frame_type = eNotAValidFrame;
return;
@@ -1847,9 +1855,11 @@ bool RegisterContextUnwind::TryFallbackUnwindPlan() {
active_row->GetCFAValue().GetValueType() !=
UnwindPlan::Row::FAValue::unspecified) {
addr_t new_cfa;
+ProcessSP process_sp = m_thread.GetProcess();
+ABISP abi_sp = process_sp ? process_sp->GetABI() : nullptr;
if (!ReadFrameAddress(m_fallback_unwind_plan_sp->GetRegisterKind(),
-active_row->GetCFAValue(), new_cfa) ||
-new_cfa == 0 || new_cfa == 1 || new_cfa == LLDB_INVALID_ADDRESS) {
+ active_row->GetCFAValue(), new_cfa) ||
+!CallFrameAddressIsValid(abi_sp, new_cfa) {
UnwindLogMsg("failed to get cfa with fallback unwindplan");
m_fallback_unwind_plan_sp.reset();
m_full_unwind_plan_sp = original_full_unwind_plan_sp;
@@ -1870,10 +1880,8 @@ bool RegisterContextUnwind::TryFallbackUnwindPlan() {
if (ReadRegisterValueFromRegisterLocation(regloc, reg_info,
reg_value)) {
new_caller_pc_value = reg_value.GetAsUInt64();
- if (ProcessSP process_sp = m_thread.GetProcess()) {
-if (ABISP abi_sp = process_sp->GetABI())
- new_caller_pc_value =
abi_sp->FixCodeAddress(new_caller_pc_value);
- }
+ if (abi_sp)
+new_caller_pc_value = abi_sp->FixCodeAddress(new_caller_pc_value);
}
}
}
@@ -1932,9 +1940,10 @@ bool
RegisterContextUnwind::ForceSwitchToFallbackUnwindPlan() {
active_row->GetCFAValue().GetValueType() !=
UnwindPlan::Row::FAValue::unspecified) {
addr_t new_cfa;
+ABISP abi_sp = m_thread.GetProcess()->GetABI();
if (!ReadFrameAddress(m_fallback_unwind_plan_sp->GetRegisterKind(),
-active_row->GetCFAValue(), new_cfa) ||
-new_cfa == 0 || new_cfa == 1 || new_cfa == LLDB_INVALID_ADDRESS) {
+ active_row->GetCFAValue(), new_cfa) ||
+!CallFrameAddressIsValid(abi_sp, new_cfa)) {
UnwindLogMsg("failed to get cfa with fallback unwindplan");
m_fallback_unwind_plan_sp.reset();
return false;
@@ -2055,8 +2064,7 @@ bool RegisterContextUnwind::ReadFrameAddress(
RegisterNumber cfa_reg(m_thread, row_register_kind,
fa.GetRegisterNumber());
if (ReadGPRValue(cfa_reg, cfa_reg_contents)) {
- if (cfa_reg_contents == LLDB_INVALID_ADDRESS || cfa_reg_contents == 0 ||
- cfa_reg_contents == 1) {
+ if (!CallFrameAddressIsValid(abi_sp, cfa_reg_contents)) {
UnwindLogMsg(
"Got an invalid CFA register value - reg %s (%d), value 0x%"
PRIx64,
cfa_reg.GetName(),
[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [libc] [libcxx] [lld] [lldb] [llvm] [mlir] [openmp] [polly] Python-related cleanups (PR #163566)
DavidSpickett wrote: > This suggests that the polly/utils scripts haven't been ran by anyone for > quite some time. Yes, this makes sense. I tried "vermin" on it and it reports the same lines as not being python3 compatible. You can exclude the Polly changes. > The PYTHON_EXECUTABLE and the shebang cleanups are entirely unrelated except > by theme, I can split them it that would make things easier. Yes please. Even if it doesn't fix your use case in itself, if it's explainable on its own, we can review it as is. https://github.com/llvm/llvm-project/pull/163566 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Delegate to ABI plugin to check if call frame addresses are valid (PR #161398)
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using `@` followed by their GitHub username. If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the [LLVM GitHub User Guide](https://llvm.org/docs/GitHub.html). You can also ask questions in a comment on this PR, on the [LLVM Discord](https://discord.com/invite/xS7Z362) or on the [forums](https://discourse.llvm.org/). https://github.com/llvm/llvm-project/pull/161398 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Refine `qWasmCallStack` documentation (PR #163803)
jasonmolenda wrote: Is it possible for a 32-bit wasm implementation? I think "Wasm list (with no delimiters) of 64-bit PC values" is making it clear that we expect 8 bytes for each address, but I wasn't sure if it's trying to distinguish between a 64-bit and 32-bit environment. https://github.com/llvm/llvm-project/pull/163803 ___ 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)
https://github.com/charles-zablit updated
https://github.com/llvm/llvm-project/pull/162509
>From 37cf46ea187afd50ce8b1eae58239aafe9b115db Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 8 Oct 2025 17:18:51 +0100
Subject: [PATCH 1/2] [lldb][windows] add support for out of PATH python.dll
resolution
---
lldb/cmake/modules/AddLLDB.cmake | 6
lldb/tools/driver/CMakeLists.txt | 4 +++
lldb/tools/driver/Driver.cpp | 49
3 files changed, 59 insertions(+)
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 28bf8d816d89a..4d2036e68704f 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -167,6 +167,12 @@ function(add_lldb_executable name)
)
target_link_libraries(${name} PRIVATE ${ARG_LINK_LIBS})
+ if(WIN32)
+list(FIND ARG_LINK_LIBS liblldb LIBLLD_INDEX)
+if(NOT LIBLLD_INDEX EQUAL -1)
+ target_link_options(${name} PRIVATE
"/DELAYLOAD:$.dll")
+endif()
+ endif()
if(CLANG_LINK_CLANG_DYLIB)
target_link_libraries(${name} PRIVATE clang-cpp)
else()
diff --git a/lldb/tools/driver/CMakeLists.txt b/lldb/tools/driver/CMakeLists.txt
index 5c0cac484cc94..941ef0d83385b 100644
--- a/lldb/tools/driver/CMakeLists.txt
+++ b/lldb/tools/driver/CMakeLists.txt
@@ -34,6 +34,10 @@ add_dependencies(lldb
${tablegen_deps}
)
+if(DEFINED LLDB_PYTHON_DLL_RELATIVE_PATH)
+ target_compile_definitions(lldb PRIVATE
LLDB_PYTHON_DLL_RELATIVE_PATH="${LLDB_PYTHON_DLL_RELATIVE_PATH}")
+endif()
+
if(LLDB_BUILD_FRAMEWORK)
# In the build-tree, we know the exact path to the framework directory.
# The installed framework can be in different locations.
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index 16cc736441b59..df31d649ada48 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -22,11 +22,15 @@
#include "lldb/Host/MainLoop.h"
#include "lldb/Host/MainLoopBase.h"
#include "lldb/Utility/Status.h"
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/ConvertUTF.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Signals.h"
+#include "llvm/Support/Windows/WindowsSupport.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
@@ -426,6 +430,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) {
+if (GetModuleFileNameW(NULL, buffer.data(), buffer.size()) < buffer.size())
+ return std::wstring(buffer.begin(), buffer.end());
+buffer.resize(buffer.size() * 2);
+ }
+ return L"";
+}
+
+// Resolve the full path of the directory defined by
+// LLDB_PYTHON_DLL_RELATIVE_PATH. If it exists, add it to the list of DLL
search
+// directories.
+void AddPythonDLLToSearchPath() {
+ std::wstring modulePath = GetPathToExecutableW();
+ if (modulePath.empty()) {
+WithColor::error() << "Unable to find python: " << GetLastError() << '\n';
+return;
+ }
+
+ SmallVector utf8Path;
+ if (sys::windows::UTF16ToUTF8(modulePath.c_str(), modulePath.length(),
+utf8Path))
+return;
+ sys::path::remove_filename(utf8Path);
+ sys::path::append(utf8Path, LLDB_PYTHON_DLL_RELATIVE_PATH);
+ sys::fs::make_absolute(utf8Path);
+
+ SmallVector widePath;
+ if (sys::windows::widenPath(utf8Path.data(), widePath))
+return;
+
+ if (sys::fs::exists(utf8Path))
+SetDllDirectoryW(widePath.data());
+}
+#endif
+
std::string EscapeString(std::string arg) {
std::string::size_type pos = 0;
while ((pos = arg.find_first_of("\"\\", pos)) != std::string::npos) {
@@ -728,6 +773,10 @@ int main(int argc, char const *argv[]) {
"~/Library/Logs/DiagnosticReports/.\n");
#endif
+#ifdef _WIN32
+ AddPythonDLLToSearchPath();
+#endif
+
// Parse arguments.
LLDBOptTable T;
unsigned MissingArgIndex;
>From 2f7a6f1bc40143dbfcef85cc903167fc0ac6e5e0 Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 8 Oct 2025 17:35:32 +0100
Subject: [PATCH 2/2] fixup! [lldb][windows] add support for out of PATH
python.dll resolution
---
lldb/tools/driver/Driver.cpp | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index df31d649ada48..d35c30d2c6aea 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -30,10 +30,13 @@
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Signals.h"
-#include "llvm/Support/Windows/WindowsSupport.h"
#include "llvm/Support/Wi
[Lldb-commits] [lldb] [lldb] Introduce ScriptedFrameProvider for real threads (PR #161870)
@@ -1439,13 +1444,133 @@ void
Thread::CalculateExecutionContext(ExecutionContext &exe_ctx) {
StackFrameListSP Thread::GetStackFrameList() {
std::lock_guard guard(m_frame_mutex);
- if (!m_curr_frames_sp)
-m_curr_frames_sp =
-std::make_shared(*this, m_prev_frames_sp, true);
+ if (!m_curr_frames_sp) {
+
+StackFrameListSP real_frames_sp =
+ std::make_shared(*this, m_prev_frames_sp, true);
+
+if (m_frame_provider_sp) {
+ lldb::ScriptedFrameProviderMergeStrategy strategy =
+ m_frame_provider_sp->GetMergeStrategy();
+
+ auto scripted_list_or_err = GetScriptedFrameList();
+ if (!scripted_list_or_err) {
+LLDB_LOG_ERROR(GetLog(LLDBLog::Thread),
+ scripted_list_or_err.takeError(),
+ "Failed to get scripted frame list: {0}");
+m_curr_frames_sp = real_frames_sp;
+return m_curr_frames_sp;
+ }
+
+ StackFrameListSP scripted_frames_sp = *scripted_list_or_err;
+ uint32_t num_real = real_frames_sp->GetNumFrames(true);
+ uint32_t num_scripted = scripted_frames_sp->GetNumFrames(false);
+
+ switch (strategy) {
+ case lldb::eScriptedFrameProviderMergeStrategyReplace: {
+m_curr_frames_sp = *scripted_list_or_err;
+return m_curr_frames_sp;
+ }
+
+ case lldb::eScriptedFrameProviderMergeStrategyReplaceByIndex: {
+// Create normal frame list first
+for (uint32_t i = 0; i < num_scripted; i++) {
+ StackFrameSP scripted_frame =
+ scripted_frames_sp->GetFrameAtIndex(i);
+ if (scripted_frame) {
+uint32_t frame_idx = scripted_frame->GetFrameIndex();
+m_curr_frames_sp->SetFrameAtIndex(frame_idx, scripted_frame);
+ }
+}
+return m_curr_frames_sp;
+ }
+
+ case lldb::eScriptedFrameProviderMergeStrategyPrepend: {
+// Add scripted frames first (indices 0 to num_scripted-1)
+for (uint32_t i = 0; i < num_scripted; i++) {
+ StackFrameSP scripted_frame = scripted_frames_sp->GetFrameAtIndex(i);
+ if (scripted_frame) {
+// Create new frame with adjusted index
+m_curr_frames_sp->SetFrameAtIndex(i, scripted_frame);
+ }
+}
+
+// Add real frames after scripted frames (shifted indices)
+for (uint32_t i = 0; i < num_real; i++) {
+ StackFrameSP real_frame = real_frames_sp->GetFrameAtIndex(i);
vogelsgesang wrote:
afaict, this materializes the complete backtrace?
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] [clang] [lldb] [llvm] [ADT] Mark StringSwitch Cases with 6+ arguments as deprecated. NFC. (PR #163405)
https://github.com/kuhar updated
https://github.com/llvm/llvm-project/pull/163405
>From 6d0d2d7171b2ebe6670c3b0b4966b4b1b42147d7 Mon Sep 17 00:00:00 2001
From: Jakub Kuderski
Date: Tue, 14 Oct 2025 10:23:32 -0400
Subject: [PATCH 1/4] [ADT] Mark StringSwitch Cases 6+ arguments as deprecated.
NFC.
Switch to the `.Cases({S0, S1, ...}, Value)` overload instead.
---
.../Core/PathSensitive/AnalysisManager.h | 4 +-
clang/lib/Basic/Targets/AVR.cpp | 30 ++--
clang/lib/Driver/Job.cpp | 31 ++--
clang/lib/Frontend/FrontendOptions.cpp| 17 +-
clang/lib/InstallAPI/HeaderFile.cpp | 2 +-
clang/lib/Lex/PPDirectives.cpp| 105 ++-
clang/lib/Sema/CheckExprLifetime.cpp | 16 +-
.../Checkers/CheckSecuritySyntaxOnly.cpp | 22 +--
.../ABI/LoongArch/ABISysV_loongarch.cpp | 13 +-
.../Plugins/ABI/RISCV/ABISysV_riscv.cpp | 19 +-
.../source/Plugins/ABI/X86/ABISysV_x86_64.cpp | 4 +-
.../Plugins/ABI/X86/ABIWindows_x86_64.cpp | 9 +-
llvm/include/llvm/ADT/StringSwitch.h | 13 +-
llvm/lib/BinaryFormat/XCOFF.cpp | 30 ++--
.../Target/RISCV/AsmParser/RISCVAsmParser.cpp | 6 +-
.../Target/RISCV/MCA/RISCVCustomBehaviour.cpp | 2 +-
.../WebAssemblyMCTypeUtilities.cpp| 2 +-
.../lib/Target/X86/AsmParser/X86AsmParser.cpp | 11 +-
.../TargetParser/ARMTargetParserCommon.cpp| 10 +-
llvm/lib/TargetParser/Triple.cpp | 167 +-
llvm/utils/TableGen/FastISelEmitter.cpp | 2 +-
21 files changed, 276 insertions(+), 239 deletions(-)
diff --git
a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
index e3cf1bac83ad0..1e87b479d1cf8 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
@@ -140,8 +140,8 @@ class AnalysisManager : public BugReporterData {
// It might be great to reuse FrontendOptions::getInputKindForExtension()
// but for now it doesn't discriminate between code and header files.
return llvm::StringSwitch(SM.getFilename(SL).rsplit('.').second)
- .Cases("c", "m", "mm", "C", "cc", "cp", true)
- .Cases("cpp", "CPP", "c++", "cxx", "cppm", true)
+ .Cases({"c", "m", "mm", "C", "cc", "cp"}, true)
+ .Cases({"cpp", "CPP", "c++", "cxx", "cppm"}, true)
.Default(false);
}
diff --git a/clang/lib/Basic/Targets/AVR.cpp b/clang/lib/Basic/Targets/AVR.cpp
index bbe7b01ca036d..2673669bc9035 100644
--- a/clang/lib/Basic/Targets/AVR.cpp
+++ b/clang/lib/Basic/Targets/AVR.cpp
@@ -420,23 +420,23 @@ static MCUInfo AVRMcus[] = {
static bool ArchHasELPM(StringRef Arch) {
return llvm::StringSwitch(Arch)
-.Cases("31", "51", "6", true)
-.Cases("102", "104", "105", "106", "107", true)
-.Default(false);
+ .Cases({"31", "51", "6"}, true)
+ .Cases({"102", "104", "105", "106", "107"}, true)
+ .Default(false);
}
static bool ArchHasELPMX(StringRef Arch) {
return llvm::StringSwitch(Arch)
-.Cases("51", "6", true)
-.Cases("102", "104", "105", "106", "107", true)
-.Default(false);
+ .Cases({"51", "6"}, true)
+ .Cases({"102", "104", "105", "106", "107"}, true)
+ .Default(false);
}
static bool ArchHasMOVW(StringRef Arch) {
return llvm::StringSwitch(Arch)
-.Cases("25", "35", "4", "5", "51", "6", true)
-.Cases("102", "103", "104", "105", "106", "107", true)
-.Default(false);
+ .Cases({"25", "35", "4", "5", "51", "6"}, true)
+ .Cases({"102", "103", "104", "105", "106", "107"}, true)
+ .Default(false);
}
static bool ArchHasLPMX(StringRef Arch) {
@@ -445,16 +445,16 @@ static bool ArchHasLPMX(StringRef Arch) {
static bool ArchHasMUL(StringRef Arch) {
return llvm::StringSwitch(Arch)
-.Cases("4", "5", "51", "6", true)
-.Cases("102", "103", "104", "105", "106", "107", true)
-.Default(false);
+ .Cases({"4", "5", "51", "6"}, true)
+ .Cases({"102", "103", "104", "105", "106", "107"}, true)
+ .Default(false);
}
static bool ArchHasJMPCALL(StringRef Arch) {
return llvm::StringSwitch(Arch)
-.Cases("3", "31", "35", "5", "51", "6", true)
-.Cases("102", "103", "104", "105", "106", "107", true)
-.Default(false);
+ .Cases({"3", "31", "35", "5", "51", "6"}, true)
+ .Cases({"102", "103", "104", "105", "106", "107"}, true)
+ .Default(false);
}
static bool ArchHas3BytePC(StringRef Arch) {
diff --git a/clang/lib/Driver/Job.cpp b/clang/lib/Driver/Job.cpp
index 880e9e396c41e..715429bcd2096 100644
--- a/clang/lib/Driver/Job.cpp
+++ b/clang/lib/Driver/Job.cpp
@@ -57,24 +57,25 @@ static bool skipArgs(const char *Flag, bool HaveCrashVFS,
int &SkipNum,
SkipNum = 2;
// These flags are all of the form -Flag and are treated as two
// argum
[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
@@ -1146,23 +1161,16 @@ def Parentheses : DiagGroup<"parentheses", // - conversion warnings for literals are on by default // - bool-to-pointer conversion warnings are on by default // - __null-to-integer conversion warnings are on by default -def Conversion : DiagGroup<"conversion", - [BoolConversion, -CharacterConversion, -ConstantConversion, -EnumConversion, -BitFieldEnumConversion, -FloatConversion, -IntConversion, -ImplicitIntConversion, -ImplicitFloatConversion, -LiteralConversion, -NonLiteralNullConversion, // (1-1)->pointer (etc) -NullConversion, // NULL->non-pointer -ObjCLiteralConversion, -SignConversion, -StringConversion]>, - DiagCategory<"Value Conversion Issue">; +def Conversion mizvekov wrote: No this is fine, if clang-formats formats it, then that's the single source of truth. Otherwise, we shouldn't have bothered adding support for formatting these files. https://github.com/llvm/llvm-project/pull/148914 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix stepping out if the return address is not allowed to stop at (PR #161982)
https://github.com/jimingham approved this pull request. We had to fix this in another place just recently, this is the right thing to do. Thanks for the test! https://github.com/llvm/llvm-project/pull/161982 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Language] Simplify SourceLanguage::GetDescription (PR #161804)
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/161804
>From 159ee47db1b9f6f609fe8b6b3e866f995d8f2e5c Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 3 Oct 2025 09:37:52 +0100
Subject: [PATCH 1/6] [lldb][Language] Simplify SourceLanguage::GetDescription
Currently we don't benefit from the user-friendly names that
`LanguageDescription` returns because we would always use
`Language::GetNameForLanguageType`. I'm not aware of a situation where
`GetDescription` should prefer the non-human readable form of the name with.
This patch removes the call to `GetNameForLanguageType`.
---
lldb/source/Target/Language.cpp | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp
index 484d9badde397..7ce85dd93f091 100644
--- a/lldb/source/Target/Language.cpp
+++ b/lldb/source/Target/Language.cpp
@@ -559,11 +559,8 @@ lldb::LanguageType SourceLanguage::AsLanguageType() const {
}
llvm::StringRef SourceLanguage::GetDescription() const {
- LanguageType type = AsLanguageType();
- if (type)
-return Language::GetNameForLanguageType(type);
return llvm::dwarf::LanguageDescription(
- (llvm::dwarf::SourceLanguageName)name);
+ static_cast(name));
}
bool SourceLanguage::IsC() const { return name == llvm::dwarf::DW_LNAME_C; }
>From 29d911d209ec3f64ce2dac02d6b996f6bd33869b Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 3 Oct 2025 10:21:15 +0100
Subject: [PATCH 2/6] fixup! handle non-standard languages
---
lldb/source/Target/Language.cpp | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp
index 7ce85dd93f091..5bdb634c29ac4 100644
--- a/lldb/source/Target/Language.cpp
+++ b/lldb/source/Target/Language.cpp
@@ -542,9 +542,21 @@ Language::Language() = default;
// Destructor
Language::~Language() = default;
+static llvm::dwarf::SourceLanguage
+ToDwarfSourceLanguage(lldb::LanguageType language_type) {
+ if (language_type < lldb::eLanguageTypeLastStandardLanguage)
+return static_cast(language_type);
+
+ switch (language_type) {
+ case eLanguageTypeMipsAssembler:
+return llvm::dwarf::DW_LANG_Mips_Assembler;
+ default:
+return llvm::dwarf::DW_LANG_hi_user;
+ }
+}
+
SourceLanguage::SourceLanguage(lldb::LanguageType language_type) {
- auto lname =
- llvm::dwarf::toDW_LNAME((llvm::dwarf::SourceLanguage)language_type);
+ auto lname = llvm::dwarf::toDW_LNAME(ToDwarfSourceLanguage(language_type));
if (!lname)
return;
name = lname->first;
>From bc4952c755862307402cfbe3c4d8e0ccaccc24b9 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 3 Oct 2025 12:47:32 +0100
Subject: [PATCH 3/6] fixup! add test
---
lldb/source/Target/Language.cpp | 5 ++-
lldb/unittests/Target/CMakeLists.txt | 1 +
lldb/unittests/Target/Language.cpp | 56
3 files changed, 60 insertions(+), 2 deletions(-)
create mode 100644 lldb/unittests/Target/Language.cpp
diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp
index 5bdb634c29ac4..fa39e57575cc4 100644
--- a/lldb/source/Target/Language.cpp
+++ b/lldb/source/Target/Language.cpp
@@ -550,9 +550,10 @@ ToDwarfSourceLanguage(lldb::LanguageType language_type) {
switch (language_type) {
case eLanguageTypeMipsAssembler:
return llvm::dwarf::DW_LANG_Mips_Assembler;
- default:
-return llvm::dwarf::DW_LANG_hi_user;
+ default: break;
}
+
+ llvm_unreachable("Unhandled language type");
}
SourceLanguage::SourceLanguage(lldb::LanguageType language_type) {
diff --git a/lldb/unittests/Target/CMakeLists.txt
b/lldb/unittests/Target/CMakeLists.txt
index 3169339ec699f..0c79675a3d890 100644
--- a/lldb/unittests/Target/CMakeLists.txt
+++ b/lldb/unittests/Target/CMakeLists.txt
@@ -2,6 +2,7 @@ add_lldb_unittest(TargetTests
ABITest.cpp
DynamicRegisterInfoTest.cpp
ExecutionContextTest.cpp
+ Language.cpp
LocateModuleCallbackTest.cpp
MemoryRegionInfoTest.cpp
MemoryTest.cpp
diff --git a/lldb/unittests/Target/Language.cpp
b/lldb/unittests/Target/Language.cpp
new file mode 100644
index 0..4de18b6d2c97b
--- /dev/null
+++ b/lldb/unittests/Target/Language.cpp
@@ -0,0 +1,56 @@
+//===-- LanguageTest.cpp
--===//
+//
+// 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
+//
+//===--===//
+
+#include "lldb/Target/Language.h"
+#include "lldb/lldb-enumerations.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+using namespace lldb;
+
+namespace {
+class LanguageTest : public ::testing::Test {};
+} // namespace
+
+TEST_F(LanguageTest, SourceLanguage_GetDescription) {
+ for (ui
[Lldb-commits] [lldb] [lldb][IRExecutionUnit] Return error on failure to resolve function address (PR #161363)
Michael137 wrote: @labath Bit of a tricky case that I missed in https://github.com/llvm/llvm-project/pull/148877 While the proposed fix works, it feels like maybe in the presence of debug-maps the flow should be slightly different. E.g., `SymbolFileDWARFDebugMap::ResolveFunctionCallLabel` could just be a plain mangled name lookup? After talking to @jasonmolenda it sounded like we usually would never want to expose the debug-map's `.o` files to anything outside `SymbolFileDWARFDebugMap`. Because all the lookups should be orchestrated through the debug-map. https://github.com/llvm/llvm-project/pull/161363 ___ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
