[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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): +

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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): +

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [LLDB] Fix crash in TypeSystemClang::GetIndexofChildMemberWithName. (PR #117808)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [LLDB] Fix crash in TypeSystemClang::GetIndexofChildMemberWithName. (PR #117808)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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_

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Aaron Ballman via lldb-commits
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

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Aaron Ballman via 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())

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Aaron Ballman via lldb-commits
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

[Lldb-commits] [lldb] 86f7f08 - Fix return value of 'PluginManager::RegisterPlugin()'. (#114120)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] Fix return value of 'PluginManager::RegisterPlugin()'. (PR #114120)

2024-11-26 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread Walter Erquinigo via 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().

[Lldb-commits] [lldb] build: enable CONFIG mode search for LibXml2 for LLDB (PR #117615)

2024-11-26 Thread Saleem Abdulrasool via lldb-commits
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

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread Greg Clayton via lldb-commits
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

[Lldb-commits] [lldb] Add 'FindFirstSymbolWithNameAndType()' to ModuleList. (PR #117777)

2024-11-26 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add 'FindFirstSymbolWithNameAndType()' to ModuleList. (PR #117777)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread via lldb-commits
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/

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Nikita Popov via lldb-commits
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

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread Sergey Kuznetsov via 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().

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread Sergey Kuznetsov via lldb-commits
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

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread Sergey Kuznetsov via 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 ___

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] Fix return value of 'PluginManager::RegisterPlugin()'. (PR #114120)

2024-11-26 Thread Miro Bucko via 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

[Lldb-commits] [lldb] build: enable CONFIG mode search for LibXml2 for LLDB (PR #117615)

2024-11-26 Thread Saleem Abdulrasool via 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

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread via 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())

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread Sergey Kuznetsov via lldb-commits
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

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Handle improperly nested blocks differently (PR #117725)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Handle improperly nested blocks differently (PR #117725)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Add timed callbacks to the MainLoop class (PR #112895)

2024-11-26 Thread Pavel Labath via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Fix premature MainLoop wakeup on windows (PR #117756)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Fix premature MainLoop wakeup on windows (PR #117756)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Fix premature MainLoop wakeup on windows (PR #117756)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] 4ab298b - [LLDB][ThreadELFCore] Set all the properties of ELFLinuxSigInfo to a non build dependent size (#117604)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [LLDB][ThreadELFCore] Set all the properties of ELFLinuxSigInfo to a non build dependent size (PR #117604)

2024-11-26 Thread Jacob Lalonde via lldb-commits
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

[Lldb-commits] [lldb] build: enable CONFIG mode search for LibXml2 for LLDB (PR #117615)

2024-11-26 Thread Saleem Abdulrasool via 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

[Lldb-commits] [lldb] [lldb] Add timed callbacks to the MainLoop class (PR #112895)

2024-11-26 Thread David Spickett via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Add timed callbacks to the MainLoop class (PR #112895)

2024-11-26 Thread David Spickett via lldb-commits
@@ -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

[Lldb-commits] [lldb] build: enable CONFIG mode search for LibXml2 for LLDB (PR #117615)

2024-11-26 Thread Evan Wilde via 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

[Lldb-commits] [lldb] [LLDB][ThreadELFCore] Set all the properties of ELFLinuxSigInfo to a non build dependent size (PR #117604)

2024-11-26 Thread Jacob Lalonde via lldb-commits
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

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-11-26 Thread Walter Erquinigo via 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

[Lldb-commits] [lldb] [lldb] Remove child_process_inherit from the socket classes (PR #117699)

2024-11-26 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] build: enable CONFIG mode search for LibXml2 for LLDB (PR #117615)

2024-11-26 Thread Saleem Abdulrasool via 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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-11-26 Thread Robert O'Callahan via lldb-commits
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

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Bill Wendling via 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())

[Lldb-commits] [lldb] build: remove extraneous search paths for LibXml2 (PR #117615)

2024-11-26 Thread Saleem Abdulrasool via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-11-26 Thread Robert O'Callahan via 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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-11-26 Thread Robert O'Callahan via lldb-commits
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

[Lldb-commits] [lldb] [lldb][Mach-O] Handle shared cache binaries correctly (PR #117832)

2024-11-26 Thread Jason Molenda via lldb-commits
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

[Lldb-commits] [lldb] [lldb][Mach-O] Handle shared cache binaries correctly (PR #117832)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb][Mach-O] Handle shared cache binaries correctly (PR #117832)

2024-11-26 Thread Jason Molenda via lldb-commits
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

[Lldb-commits] [lldb] f2129ca - [lldb][NFC] Whitespace fix for mis-indented block

2024-11-26 Thread Jason Molenda via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [clang] [lldb] [llvm] Extending LLDB to work on AIX (PR #102601)

2024-11-26 Thread Dhruv Srivastava via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread David Spickett via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread David Spickett via 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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread David Spickett via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread David Spickett via lldb-commits
@@ -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

[Lldb-commits] [lldb] build: enable CONFIG mode search for LibXml2 for LLDB (PR #117615)

2024-11-26 Thread David Spickett via 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

[Lldb-commits] [lldb] build: enable CONFIG mode search for LibXml2 for LLDB (PR #117615)

2024-11-26 Thread David Spickett via 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

[Lldb-commits] [lldb] [lldb] Add timeout argument to Socket::Accept (PR #117691)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Add timeout argument to Socket::Accept (PR #117691)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Add timeout argument to Socket::Accept (PR #117691)

2024-11-26 Thread Pavel Labath via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread Pavel Labath via 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

[Lldb-commits] [lldb] [lldb] Add timeout argument to Socket::Accept (PR #117691)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Remove child_process_inherit from the socket classes (PR #117699)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Add timeout argument to Socket::Accept (PR #117691)

2024-11-26 Thread Michał Górny via lldb-commits
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/

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread David Spickett via 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

[Lldb-commits] [lldb] [lldb] Remove child_process_inherit from the socket classes (PR #117699)

2024-11-26 Thread via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread David Spickett via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Add timeout argument to Socket::Accept (PR #117691)

2024-11-26 Thread Michał Górny via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Make sure Blocks always have a parent (PR #117683)

2024-11-26 Thread Pavel Labath via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Add timeout argument to Socket::Accept (PR #117691)

2024-11-26 Thread Pavel Labath via lldb-commits
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

[Lldb-commits] [lldb] [LLDB][ThreadELFCore] Set all the properties of ELFLinuxSigInfo to a non build dependent size (PR #117604)

2024-11-26 Thread Tulio Magno Quites Machado Filho via lldb-commits
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