@@ -5028,36 +5218,52 @@ int main(int argc, char *argv[]) {
#endif
// Initialize LLDB first before we do anything.
- lldb::SBDebugger::Initialize();
+ lldb::SBError error = lldb::SBDebugger::InitializeWithErrorHandling();
+ if (error.Fail()) {
+llvm::errs() << "Failed
@@ -1196,6 +1202,62 @@ def terminate(self):
self.process.wait()
self.process = None
+@classmethod
+def launch(
+cls, executable: str, /, connection=None, log_file=None, env=None
+) -> tuple[subprocess.Popen, str]:
+adaptor_en
@@ -0,0 +1,67 @@
+"""
+Test lldb-dap server integration.
+"""
+
+import os
+import tempfile
+
+import dap_server
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+import lldbdap_testcase
+
+
+class TestDAP_server(lldbdap_testcase.DAPTestCaseBase):
+
@@ -0,0 +1,67 @@
+"""
+Test lldb-dap server integration.
+"""
+
+import os
+import tempfile
+
+import dap_server
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+import lldbdap_testcase
+
+
+class TestDAP_server(lldbdap_testcase.DAPTestCaseBase):
+
@@ -1196,6 +1202,62 @@ def terminate(self):
self.process.wait()
self.process = None
+@classmethod
+def launch(
+cls, executable: str, /, connection=None, log_file=None, env=None
+) -> tuple[subprocess.Popen, str]:
+adaptor_en
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: None (cmtice)
Changes
LLDB can crash in TypeSystemClang::GetIndexOfChildMemberWithName, at a point
where it pushes an index onto the child_indexes vector, tries to call itself
recursively, then tries to pop the entry from child_indexes. Th
https://github.com/cmtice created
https://github.com/llvm/llvm-project/pull/117808
LLDB can crash in TypeSystemClang::GetIndexOfChildMemberWithName, at a point
where it pushes an index onto the child_indexes vector, tries to call itself
recursively, then tries to pop the entry from child_index
@@ -32,35 +34,44 @@ using namespace lldb_dap;
namespace lldb_dap {
-DAP::DAP(llvm::StringRef path, ReplMode repl_mode)
-: debug_adaptor_path(path), broadcaster("lldb-dap"),
- exception_breakpoints(), focus_tid(LLDB_INVALID_THREAD_ID),
- stop_at_entry(false), is_
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/116719
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -14690,6 +14690,13 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) {
}
}
+ // The result of __builtin_counted_by_ref cannot be assigned to a variable.
+ // It allows leaking and modification of bounds safety information.
+ if (IsBuiltinCountedByRef(VD->getInit())
https://github.com/AaronBallman commented:
Is there a branch up for this on https://llvm-compile-time-tracker.com/ so that
we've verified that this actually improves performance?
https://github.com/llvm/llvm-project/pull/116719
___
lldb-commits mailin
Author: Miro Bucko
Date: 2024-11-26T11:29:24-05:00
New Revision: 86f7f089ee6bcf01bf082ca802220b1143a3ade9
URL:
https://github.com/llvm/llvm-project/commit/86f7f089ee6bcf01bf082ca802220b1143a3ade9
DIFF:
https://github.com/llvm/llvm-project/commit/86f7f089ee6bcf01bf082ca802220b1143a3ade9.diff
LO
https://github.com/mbucko closed
https://github.com/llvm/llvm-project/pull/114120
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -4028,6 +4032,9 @@ void request_variables(DAP &dap, const llvm::json::Object
&request) {
dap.enable_synthetic_child_debugging,
/*is_name_duplicated=*/false, custom_name));
};
+ if (variable.GetType().IsPointerType() ||
variable.GetType().
https://github.com/compnerd updated
https://github.com/llvm/llvm-project/pull/117615
>From 16271991a157b7892cb3d0e914aac63f7659d41b Mon Sep 17 00:00:00 2001
From: Saleem Abdulrasool
Date: Mon, 25 Nov 2024 11:21:17 -0800
Subject: [PATCH] build: clean up extraneous include paths
Clean up some un
https://github.com/clayborg commented:
None of this should be needed. If we have a child value that is a pointer to a
synthetic value, and we expand that value, we should be showing the synthetic
children via the standard LLDB APIs.
In LLDB way back in the beginning, when we would expand a po
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/11
None
>From 7f36a8b8672c9a75aa7dfe6a123401ae6d789a11 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 26 Nov 2024 12:07:57 -0800
Subject: [PATCH] Add 'FindFirstSymbolWithNameAndType()' to ModuleList.
---
ll
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Miro Bucko (mbucko)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/11.diff
2 Files Affected:
- (modified) lldb/include/lldb/Core/ModuleList.h (+4)
- (modified) lldb/source/Core/ModuleList.cpp (+13)
``di
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
c71418574f1bb9e4678428901775c8b633cded09...35035cd4b8bfdbe2a0d196be7b4aa74a144f160c
lldb/
nikic wrote:
> Is there a branch up for this on https://llvm-compile-time-tracker.com/ so
> that we've verified that this actually improves performance?
Compile-time:
https://llvm-compile-time-tracker.com/compare.php?from=105b7803ea22823a2fca2a82ee843d0884e9cbf3&to=dcb3e2b6b4333556fbfa3d7a5a45
@@ -4028,6 +4032,9 @@ void request_variables(DAP &dap, const llvm::json::Object
&request) {
dap.enable_synthetic_child_debugging,
/*is_name_duplicated=*/false, custom_name));
};
+ if (variable.GetType().IsPointerType() ||
variable.GetType().
https://github.com/skuznetsov edited
https://github.com/llvm/llvm-project/pull/117755
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
skuznetsov wrote:
@clayborg This is what puzzles me, too.
As I provided the examples in the Discourse thread, it works in the CLI lldb
but not when used in lldb-dap.
It works only if it is dereferenced.
https://github.com/llvm/llvm-project/pull/117755
___
@@ -250,6 +251,13 @@ def which(program):
return None
+def pickrandomport():
+"""Returns a random open port."""
+with socket.socket() as sock:
+sock.bind(("", 0))
+return sock.getsockname()[1]
ashgti wrote:
Reverted changes to this
@@ -52,11 +51,11 @@ struct StreamDescriptor {
struct InputStream {
StreamDescriptor descriptor;
- bool read_full(std::ofstream *log, size_t length, std::string &text);
+ bool read_full(llvm::raw_ostream *log, size_t length, std::string &text);
- bool read_line(std::ofst
@@ -0,0 +1,182 @@
+//===-- Socket.h *- C++
-*-===//
ashgti wrote:
I reworked this now to use the `lldb/Host/Socket.h` and associated types.
https://github.com/llvm/llvm-project/pull/116392
https://github.com/ashgti edited
https://github.com/llvm/llvm-project/pull/116392
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/mbucko reopened
https://github.com/llvm/llvm-project/pull/114120
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/compnerd updated
https://github.com/llvm/llvm-project/pull/117615
>From 0b7645656a9a79a496438f49c7906dead1319fe7 Mon Sep 17 00:00:00 2001
From: Saleem Abdulrasool
Date: Mon, 25 Nov 2024 11:21:17 -0800
Subject: [PATCH] build: enable CONFIG mode search for LibXml2 for LLDB
The
@@ -14690,6 +14690,13 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) {
}
}
+ // The result of __builtin_counted_by_ref cannot be assigned to a variable.
+ // It allows leaking and modification of bounds safety information.
+ if (IsBuiltinCountedByRef(VD->getInit())
https://github.com/skuznetsov created
https://github.com/llvm/llvm-project/pull/117755
This bug fix for the situation that was extensively discussed at LLVM Discourse
thread: https://discourse.llvm.org/t/synthetic-data-providers-and-lldb-dap/
>From 82a3bc3aaf57f25a1041cda4082b24bd8cdf8919 Mon
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Sergey Kuznetsov (skuznetsov)
Changes
This bug fix for the situation that was extensively discussed at LLVM Discourse
thread: https://discourse.llvm.org/t/synthetic-data-providers-and-lldb-dap/
---
Full diff: https://github.com/llvm/llvm-p
https://github.com/labath created
https://github.com/llvm/llvm-project/pull/117725
In 6c7f56192fa6e689ef14d32e43a785de5692e9c0 (Sep 2011) we added code to extend
the range of the parent block if the child block is not contained within it.
Currently, this code doesn't work for (at least) two r
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Pavel Labath (labath)
Changes
In 6c7f56192fa6e689ef14d32e43a785de5692e9c0 (Sep 2011) we added code to extend
the range of the parent block if the child block is not contained within it.
Currently, this code doesn't work for (at least) two
@@ -223,6 +220,61 @@ TEST_F(MainLoopTest, ManyPendingCallbacks) {
ASSERT_TRUE(loop.Run().Success());
}
+TEST_F(MainLoopTest, CallbackWithTimeout) {
+ MainLoop loop;
+ loop.AddCallback([](MainLoopBase &loop) { loop.RequestTermination(); },
+ std::chrono::s
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Pavel Labath (labath)
Changes
The windows system APIs only take milliseconds. Make sure we round the sleep
interval (in nanoseconds) upwards.
---
Full diff: https://github.com/llvm/llvm-project/pull/117756.diff
1 Files Affected:
- (modi
https://github.com/labath created
https://github.com/llvm/llvm-project/pull/117756
The windows system APIs only take milliseconds. Make sure we round the sleep
interval (in nanoseconds) upwards.
>From 153338ddae6f6442ffbe195a98e27e812a3f3ed6 Mon Sep 17 00:00:00 2001
From: Pavel Labath
Date: T
labath wrote:
(I haven't tested it, but I'm fairly certain it should fix the problem in
https://github.com/llvm/llvm-project/pull/112895#discussion_r1858817258)
https://github.com/llvm/llvm-project/pull/117756
___
lldb-commits mailing list
lldb-commit
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
Author: Jacob Lalonde
Date: 2024-11-26T10:20:52-08:00
New Revision: 4ab298b5fbc8f48387062b2dd99ea07127c02e6b
URL:
https://github.com/llvm/llvm-project/commit/4ab298b5fbc8f48387062b2dd99ea07127c02e6b
DIFF:
https://github.com/llvm/llvm-project/commit/4ab298b5fbc8f48387062b2dd99ea07127c02e6b.diff
Jlalond wrote:
> The build succeeded!
>
> The source comment at line 82 caught my attention, though. It may imply that
> data layout is important in this struct, i.e. it should match `siginfo_t`
> returned by the OS. But this change is not guaranteeing that.
>
> Actually, the order of the fir
@@ -57,7 +57,17 @@ add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses
support in LLDB" Curse
add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in
LLDB" LibLZMA LIBLZMA_FOUND)
add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support i
@@ -223,6 +220,61 @@ TEST_F(MainLoopTest, ManyPendingCallbacks) {
ASSERT_TRUE(loop.Run().Success());
}
+TEST_F(MainLoopTest, CallbackWithTimeout) {
+ MainLoop loop;
+ loop.AddCallback([](MainLoopBase &loop) { loop.RequestTermination(); },
+ std::chrono::s
@@ -223,6 +220,61 @@ TEST_F(MainLoopTest, ManyPendingCallbacks) {
ASSERT_TRUE(loop.Run().Success());
}
+TEST_F(MainLoopTest, CallbackWithTimeout) {
+ MainLoop loop;
+ loop.AddCallback([](MainLoopBase &loop) { loop.RequestTermination(); },
+ std::chrono::s
@@ -57,7 +57,17 @@ add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses
support in LLDB" Curse
add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in
LLDB" LibLZMA LIBLZMA_FOUND)
add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support i
https://github.com/Jlalond closed
https://github.com/llvm/llvm-project/pull/117604
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -4020,6 +4020,10 @@ void request_variables(DAP &dap, const
llvm::json::Object &request) {
std::optional custom_name = {}) {
if (!child.IsValid())
return;
+if (child.IsSynthetic() && (child.GetType().IsPointerType() ||
chi
https://github.com/ashgti approved this pull request.
https://github.com/llvm/llvm-project/pull/117699
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -57,7 +57,17 @@ add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses
support in LLDB" Curse
add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in
LLDB" LibLZMA LIBLZMA_FOUND)
add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support i
https://github.com/rocallahan updated
https://github.com/llvm/llvm-project/pull/112079
>From 6d8f3ccf7b30334853e07e141f41545d68870bb8 Mon Sep 17 00:00:00 2001
From: Robert O'Callahan
Date: Fri, 19 Jul 2024 22:46:42 +1200
Subject: [PATCH] [lldb] Implement basic support for reverse-continue
This
@@ -14690,6 +14690,13 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) {
}
}
+ // The result of __builtin_counted_by_ref cannot be assigned to a variable.
+ // It allows leaking and modification of bounds safety information.
+ if (IsBuiltinCountedByRef(VD->getInit())
https://github.com/compnerd edited
https://github.com/llvm/llvm-project/pull/117615
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/rocallahan updated
https://github.com/llvm/llvm-project/pull/112079
>From 91d40f5e331b97a202208c221ef6b11784dc8ca2 Mon Sep 17 00:00:00 2001
From: Robert O'Callahan
Date: Fri, 19 Jul 2024 22:46:42 +1200
Subject: [PATCH] [lldb] Implement basic support for reverse-continue
This
https://github.com/rocallahan updated
https://github.com/llvm/llvm-project/pull/112079
>From c0904fed59e42d957e2b40698c4343fdb5582b21 Mon Sep 17 00:00:00 2001
From: Robert O'Callahan
Date: Fri, 19 Jul 2024 22:46:42 +1200
Subject: [PATCH] [lldb] Implement basic support for reverse-continue
This
https://github.com/jasonmolenda created
https://github.com/llvm/llvm-project/pull/117832
The Mach-O load commands have an LC_SYMTAB / struct symtab_command which
represents the offset of the symbol table (nlist records) and string table for
this binary. In a mach-o binary on disk, these are f
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Jason Molenda (jasonmolenda)
Changes
The Mach-O load commands have an LC_SYMTAB / struct symtab_command which
represents the offset of the symbol table (nlist records) and string table for
this binary. In a mach-o binary on disk, these ar
jasonmolenda wrote:
I have two criticisms of the patch as-is. We read the LC_SYMTAB load command
into `symtab_load_command` which has six fields, the first two being the usual
`cmd` and `cmdsize`. We use all of the next four: `ncmds`, `strsize`,
`symoff`, `stroff`. I'm taking the uses of tw
Author: Jason Molenda
Date: 2024-11-26T17:00:35-08:00
New Revision: f2129ca94c47875b5f915abc9d7dfb02a7445fe6
URL:
https://github.com/llvm/llvm-project/commit/f2129ca94c47875b5f915abc9d7dfb02a7445fe6
DIFF:
https://github.com/llvm/llvm-project/commit/f2129ca94c47875b5f915abc9d7dfb02a7445fe6.diff
https://github.com/labath created
https://github.com/llvm/llvm-project/pull/117683
It's basically true already (except for a brief time during construction). This
patch makes sure the objects are constructed with a valid parent and enforces
this in the type system, which allows us to get rid o
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Pavel Labath (labath)
Changes
It's basically true already (except for a brief time during construction). This
patch makes sure the objects are constructed with a valid parent and enforces
this in the type system, which allows us to get rid
DhruvSrivastavaX wrote:
> BTW, the main loop changes are something that you should be able to upstream
> quite easily. It sounds like the main problem is that you don't have a ppoll
> syscall, but the last round of changes means that ppoll is not actually
> necessary for its operation (the onl
https://github.com/DavidSpickett edited
https://github.com/llvm/llvm-project/pull/117683
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -399,11 +392,9 @@ size_t Block::MemorySize() const {
return mem_size;
}
-void Block::AddChild(const BlockSP &child_block_sp) {
- if (child_block_sp) {
-child_block_sp->SetParentScope(this);
-m_children.push_back(child_block_sp);
- }
+BlockSP Block::CreateChild(u
https://github.com/DavidSpickett approved this pull request.
Some small things you can address if you want but otherwise LGTM.
https://github.com/llvm/llvm-project/pull/117683
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm
@@ -43,11 +43,13 @@ class Block : public UserID, public SymbolContextScope {
typedef RangeVector RangeList;
typedef RangeList::Entry Range;
- /// Construct with a User ID \a uid, \a depth.
- ///
- /// Initialize this block with the specified UID \a uid. The \a depth in
@@ -57,7 +57,17 @@ add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses
support in LLDB" Curse
add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in
LLDB" LibLZMA LIBLZMA_FOUND)
add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support i
@@ -57,7 +57,17 @@ add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses
support in LLDB" Curse
add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in
LLDB" LibLZMA LIBLZMA_FOUND)
add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support i
https://github.com/labath created
https://github.com/llvm/llvm-project/pull/117691
Allows us to stop waiting for a connection if it doesn't come in a certain
amount of time. Right now, I'm keeping the status quo (infitnite wait) in the
"production" code, but using smaller (finite) values in te
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Pavel Labath (labath)
Changes
Allows us to stop waiting for a connection if it doesn't come in a certain
amount of time. Right now, I'm keeping the status quo (infitnite wait) in the
"production" code, but using smaller (finite) values in
@@ -543,7 +543,7 @@ lldb::ConnectionStatus
ConnectionFileDescriptor::AcceptSocket(
if (!error.Fail()) {
post_listen_callback(*listening_socket);
-error = listening_socket->Accept(accepted_socket);
+error = listening_socket->Accept(/*timeout=*/std::nullopt,
acce
@@ -399,11 +392,9 @@ size_t Block::MemorySize() const {
return mem_size;
}
-void Block::AddChild(const BlockSP &child_block_sp) {
- if (child_block_sp) {
-child_block_sp->SetParentScope(this);
-m_children.push_back(child_block_sp);
- }
+BlockSP Block::CreateChild(u
labath wrote:
FWIW, I think of MainLoop::Run as an equivalent to
[asyncio.loop.run_forever](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_forever),
which also doesn't take a timeout argument. The library does have a
`run_until_complete` method though, which could pr
https://github.com/labath created
https://github.com/llvm/llvm-project/pull/117699
It's never set to true. Also, using inheritable FDs in a multithreaded process
pretty much guarantees descriptor leaks. It's better to explicitly pass a
specific FD to a specific subprocess, which we already mos
https://github.com/mgorny approved this pull request.
Well, I don't see anything obviously wrong with it.
https://github.com/llvm/llvm-project/pull/117691
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -399,11 +392,9 @@ size_t Block::MemorySize() const {
return mem_size;
}
-void Block::AddChild(const BlockSP &child_block_sp) {
- if (child_block_sp) {
-child_block_sp->SetParentScope(this);
-m_children.push_back(child_block_sp);
- }
+BlockSP Block::CreateChild(u
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Pavel Labath (labath)
Changes
It's never set to true. Also, using inheritable FDs in a multithreaded process
pretty much guarantees descriptor leaks. It's better to explicitly pass a
specific FD to a specific subprocess, which we already m
@@ -43,11 +43,13 @@ class Block : public UserID, public SymbolContextScope {
typedef RangeVector RangeList;
typedef RangeList::Entry Range;
- /// Construct with a User ID \a uid, \a depth.
- ///
- /// Initialize this block with the specified UID \a uid. The \a depth in
mgorny wrote:
I'm not complaining, but wanted to point out it feels a bit backwards to be
adding a callback to timeout, rather than having `Run()` accept a timeout.
https://github.com/llvm/llvm-project/pull/117691
___
lldb-commits mailing list
lldb-co
@@ -43,11 +43,13 @@ class Block : public UserID, public SymbolContextScope {
typedef RangeVector RangeList;
typedef RangeList::Entry Range;
- /// Construct with a User ID \a uid, \a depth.
- ///
- /// Initialize this block with the specified UID \a uid. The \a depth in
labath wrote:
I can sort of see your point, but I also disagree with it. :)
It's true that in this case (the blocking version of Socket::Accept), a timeout
argument to MainLoop::Run would be sufficient (and probably look cleaner), but
it's not very generic. Like, imagine you had a "proper" lon
https://github.com/tuliom approved this pull request.
The build succeeded!
The source comment at line 82 caught my attention, though.
It may imply that data layout is important in this struct, i.e. it should match
`siginfo_t` returned by the OS. But this change is not guaranteeing that.
Actual
81 matches
Mail list logo