[Lldb-commits] [lldb] [LLDB] Finish implementing support for DW_FORM_data16 (PR #106799)

2024-09-02 Thread Pavel Labath via lldb-commits
labath wrote: > Sadly, I haven't figured out a good way to test this. `test/Shell/SymbolFile/DWARF/x86/DW_AT_const_value.s` tests various encodings of DW_AT_const_value. It doesn't do DW_FORM_data16, most likely because it was not working at the time. You can add another case to the file to e

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -38,6 +38,12 @@ endif() include(LLDBConfig) include(AddLLDB) +# This has been added to keep the AIX build isolated for now. +# It will need to be modified later. +if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + add_definitions("-D__AIX__") labath wrote:

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/106910 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: So, how different is AIX from linux? Should we be treating it as a flavour of linux. E.g., have HostInfoAIX derive from HostInfoLinux instead of copying it ? https://github.com/llvm/llvm-project/pull/106910 ___ lld

[Lldb-commits] [lldb] [lldb] fix(lldb/**.py): fix invalid escape sequences (PR #94034)

2024-09-02 Thread Eisuke Kawashima via lldb-commits
https://github.com/e-kwsm updated https://github.com/llvm/llvm-project/pull/94034 >From 92802878826c1bb0413373d1b05a7c52c8bc8c48 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Sat, 11 May 2024 02:39:21 +0900 Subject: [PATCH] fix(lldb/**.py): fix invalid escape sequences --- lldb/exampl

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Dhruv Srivastava via lldb-commits
DhruvSrivastavaX wrote: > So, how different is AIX from linux? Should we be treating it as a flavour of > linux. E.g., have HostInfoAIX derive from HostInfoLinux instead of copying it > ? AIX is UNIX based but its very different from Linux, so it cannot be treated as a flavour of Linux. For

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Dhruv Srivastava via lldb-commits
@@ -38,6 +38,12 @@ endif() include(LLDBConfig) include(AddLLDB) +# This has been added to keep the AIX build isolated for now. +# It will need to be modified later. +if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + add_definitions("-D__AIX__") DhruvSrivasta

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/106774 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -174,33 +233,91 @@ const char *Status::AsCString(const char *default_error_str) const { // Clear the error and any cached error string that it might contain. void Status::Clear() { - m_code = 0; - m_type = eErrorTypeInvalid; - m_string.clear(); + if (m_error) +LLDB

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -96,16 +124,44 @@ Status Status::FromErrorStringWithFormat(const char *format, ...) { return Status(string); } -llvm::Error Status::ToError() const { - if (Success()) -return llvm::Error::success(); - if (m_type == ErrorType::eErrorTypePOSIX) -return llvm::erro

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -174,33 +233,91 @@ const char *Status::AsCString(const char *default_error_str) const { // Clear the error and any cached error string that it might contain. void Status::Clear() { - m_code = 0; - m_type = eErrorTypeInvalid; - m_string.clear(); + if (m_error) +LLDB

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Two high-level comments: - I think that the `FromError`/`clone` changes would be better of as a separate patch(es). I have no problem with the changes themselves, but I think it'd be better to separate the meat of this patch from the mechanical renaming. The

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -97,7 +97,7 @@ class LLDB_API SBError { friend class lldb_private::ScriptInterpreter; friend class lldb_private::python::SWIGBridge; - SBError(const lldb_private::Status &error); + SBError(lldb_private::Status &&error); labath wrote: Changing the arg

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -38,6 +38,12 @@ endif() include(LLDBConfig) include(AddLLDB) +# This has been added to keep the AIX build isolated for now. +# It will need to be modified later. +if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + add_definitions("-D__AIX__") labath wrote:

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Pavel Labath via lldb-commits
labath wrote: > AIX specific tweaks That's exactly what I'm worried about. I have seen the full PR, and while I haven't compared it side by side with linux, I did have a very strong sense of deja-vu when viewing it. So if like 80% of the code is going to be the same, then we should figure out

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Dhruv Srivastava via lldb-commits
@@ -38,6 +38,12 @@ endif() include(LLDBConfig) include(AddLLDB) +# This has been added to keep the AIX build isolated for now. +# It will need to be modified later. +if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + add_definitions("-D__AIX__") DhruvSrivasta

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX edited https://github.com/llvm/llvm-project/pull/106910 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX edited https://github.com/llvm/llvm-project/pull/106910 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] gdb rsp file error pass fix (PR #106950)

2024-09-02 Thread via lldb-commits
https://github.com/dlav-sc created https://github.com/llvm/llvm-project/pull/106950 This patch fixes a error code parsing of gdb remote protocol response messages to File-I/O command. >From 1f853519a648c2ebe3b2b26f9d51cacd2820be87 Mon Sep 17 00:00:00 2001 From: Daniil Avdeev Date: Tue, 23 Jul

[Lldb-commits] [lldb] [lldb] gdb rsp file error pass fix (PR #106950)

2024-09-02 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (dlav-sc) Changes This patch fixes a error code parsing of gdb remote protocol response messages to File-I/O command. --- Full diff: https://github.com/llvm/llvm-project/pull/106950.diff 1 Files Affected: - (modified) lldb/source/

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Dhruv Srivastava via lldb-commits
DhruvSrivastavaX wrote: Thank you for your feedback; I understand the concern about potential code duplication. Indeed, components like `PlatformAIX, HostInfoAIX, and NativeProcess/Thread` do share significant similarities with their Linux counterparts. However, several other components, such

[Lldb-commits] [lldb] [llvm] [lldb][RISCV] function calls support in lldb expressions (PR #99336)

2024-09-02 Thread via lldb-commits
https://github.com/dlav-sc updated https://github.com/llvm/llvm-project/pull/99336 >From fb4e062d33c105591d8fb46d72dd64181880bdcd Mon Sep 17 00:00:00 2001 From: Daniil Avdeev Date: Thu, 11 Jul 2024 11:21:36 + Subject: [PATCH 1/6] [lldb][RISCV] add jitted function calls to ABI Function call

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread David Spickett via lldb-commits
@@ -38,6 +38,12 @@ endif() include(LLDBConfig) include(AddLLDB) +# This has been added to keep the AIX build isolated for now. +# It will need to be modified later. +if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + add_definitions("-D__AIX__") DavidSpickett

[Lldb-commits] [lldb] [lldb] gdb rsp file error pass fix (PR #106950)

2024-09-02 Thread David Spickett via lldb-commits
DavidSpickett wrote: And this error is what exactly, what did we previously do and what does this PR now make us do? I'm of course wondering if this can be tested too but let's be clear what's being fixed first and I'll see whether it can be added to some existing tests. https://github.com/ll

[Lldb-commits] [lldb] [lldb] Fix some tests that fail with system libstdc++ (PR #106885)

2024-09-02 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/106885 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 Thread via lldb-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/106919 >From 539d44a522e9e0563079ddbefb59e1b4b4caaca6 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Sun, 1 Sep 2024 17:26:11 +0100 Subject: [PATCH 1/5] [lldb-dap] Make environment option an object --- lldb/tools/

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/106955 The existing function already used the MainLoop class, which allows one to wait on multiple events at once. It needed to do this in order to wait for v4 and v6 connections simultaneously. However, since it was c

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes The existing function already used the MainLoop class, which allows one to wait on multiple events at once. It needed to do this in order to wait for v4 and v6 connections simultaneously. However, since it was

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-09-02 Thread Pavel Labath via lldb-commits
labath wrote: What I meant was something like [this](https://github.com/llvm/llvm-project/pull/106955). Basically, keep the socket code inside the socket class, but make it asynchronous. This way you can listen for as many sockets (and other things) as you like. It shouldn't be necessary to d

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -1641,6 +1641,10 @@ NativeProcessLinux::GetSoftwareBreakpointTrapOpcode(size_t size_hint) { Status NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) { + Log *log = GetLog(POSIXLog::Memory);

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes DavidSpickett wrote: I don't mind the terminology but perhaps add ` with holes (inaccessible pages)` to help anyone who is skimming through this. So they only have to read the

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( size_t bytes_read = 0; Status error = m_current_process->ReadMemoryWithoutTrap( read_addr, &buf[0], byte_count, bytes_read); - if (error.Fail()) { -LLDB_LOGF(log, - "GDBRem

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * + + +class MemoryHolesTestCase(TestBase): +NO_

[Lldb-commits] [lldb] [lldb] Fix some tests that fail with system libstdc++ (PR #106885)

2024-09-02 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Let's see what happens. We did this because these tests were failing on macOS CI, but I never fully figured out what was happening here. Will keep an eye out on the macOS bots https://github.com/llvm/llvm-project/pull/106885 ___

[Lldb-commits] [lldb] [lldb] Fix some tests that fail with system libstdc++ (PR #106885)

2024-09-02 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/106885 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AIX] Taking Linux Host Info header's base for AIX (PR #106910)

2024-09-02 Thread Pavel Labath via lldb-commits
labath wrote: I'm not saying we should merge everything. I'm just talking about the classes you're introducing in this PR (HostInfo, etc.) What are the linux vs. aix differences there? https://github.com/llvm/llvm-project/pull/106910 ___ lldb-commit

[Lldb-commits] [lldb] [lldb] gdb rsp file error pass fix (PR #106950)

2024-09-02 Thread via lldb-commits
dlav-sc wrote: > And this error is what exactly, what did we previously do and what does this > PR now make us do? > > I'm of course wondering if this can be tested too but let's be clear what's > being fixed first and I'll see whether it can be added to some existing tests. In my case lldb-s

[Lldb-commits] [lldb] [lldb] Fix some tests that fail with system libstdc++ (PR #106885)

2024-09-02 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/106885 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * + + +class MemoryHolesTestCase(TestBase): +NO_

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -1641,6 +1641,10 @@ NativeProcessLinux::GetSoftwareBreakpointTrapOpcode(size_t size_hint) { Status NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) { + Log *log = GetLog(POSIXLog::Memory);

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( size_t bytes_read = 0; Status error = m_current_process->ReadMemoryWithoutTrap( read_addr, &buf[0], byte_count, bytes_read); - if (error.Fail()) { -LLDB_LOGF(log, - "GDBRem

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes labath wrote: Done. https://github.com/llvm/llvm-project/pull/106532 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * + + +class MemoryHolesTestCase(TestBase): +NO_

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/106532 >From 610757ced98139d3d10451dcca195692b0c2d832 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 29 Aug 2024 12:26:01 +0200 Subject: [PATCH 1/3] [lldb/linux] Make truncated reads work Previously, we were re

[Lldb-commits] [lldb] [lldb] Fix some tests that fail with system libstdc++ (PR #106885)

2024-09-02 Thread Michael Buch via lldb-commits
Michael137 wrote: We should probably skip the `USE_LIBCPP` tests in the cases where a libc++ is nowhere available. Don't think that'd be easy to do at the Makefile level, but possibly lldb-dotest? https://github.com/llvm/llvm-project/pull/106885 ___

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( size_t bytes_read = 0; Status error = m_current_process->ReadMemoryWithoutTrap( read_addr, &buf[0], byte_count, bytes_read); - if (error.Fail()) { -LLDB_LOGF(log, - "GDBRem

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106532 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: @labath > Basically, keep the socket code inside the socket class, but make it > asynchronous. This way you can listen for as many sockets (and other things) > as you like. It shouldn't be necessary to do the socket handling stuff > externally. > > I haven't looked into exact

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: > I don't like the idea of making Acceptor responsible for multiple ports for > the same reason I did not want to do that for TCPSocket -- it's complicated > and inflexible. Note Acceptor is used ONLY in lldb-platform.cpp We can use the Accept() for the second port in the secon

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 Thread via lldb-commits
Da-Viper wrote: @vogelsgesang I am not sure if it possible to use a dict for sourceMaps since a source can map to multiple destination see test https://github.com/llvm/llvm-project/blob/a9c71d36655bd188521c74ce7834983e8c2a86cc/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py#L

[Lldb-commits] [clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-09-02 Thread via lldb-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/106505 >From adb4a0eb00972811343ff05eac6977512f01970a Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 29 Aug 2024 09:43:56 +0200 Subject: [PATCH 1/2] Rename Sanitizer Coverage => Coverage Sanitizer This is s

[Lldb-commits] [clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-09-02 Thread via lldb-commits
@@ -257,7 +257,7 @@ General purpose options A semicolon list of arguments to pass when running the libc++ benchmarks using the ``check-cxx-benchmarks`` rule. By default we run the benchmarks for a very short amount of time, - since the primary use of ``check-cxx-benchma

[Lldb-commits] [lldb] [lldb][NFC] Move few static helpers to the class Socket and make them public (PR #106640)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath requested changes to this pull request. I don't think this is a good change. https://github.com/llvm/llvm-project/pull/106640 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[Lldb-commits] [lldb] [lldb][NFC] Move few static helpers to the class Socket and make them public (PR #106640)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: > I don't think this is a good change. What exactly is wrong here? Is that code good duplicated in Socket.cpp and TCPSocket.cpp? ``` #if defined(_WIN32) bool success = closesocket(m_socket) == 0; #else bool success = ::close(m_socket) == 0; #endif ``` SetLastError(Status &e

[Lldb-commits] [lldb] [lldb] gdb rsp file error pass fix (PR #106950)

2024-09-02 Thread via lldb-commits
https://github.com/dlav-sc updated https://github.com/llvm/llvm-project/pull/106950 >From 1480b5554d3d65fc96b7c2cbb628eaec4123d209 Mon Sep 17 00:00:00 2001 From: Daniil Avdeev Date: Tue, 23 Jul 2024 11:04:12 + Subject: [PATCH] [lldb] gdb rsp file error pass fix This patch fixes a error cod

[Lldb-commits] [lldb] 181cc75 - [lldb/linux] Make truncated reads work (#106532)

2024-09-02 Thread via lldb-commits
Author: Pavel Labath Date: 2024-09-02T14:44:18+02:00 New Revision: 181cc75ea8be70e3fa7145456e1bf2331e0bc5e4 URL: https://github.com/llvm/llvm-project/commit/181cc75ea8be70e3fa7145456e1bf2331e0bc5e4 DIFF: https://github.com/llvm/llvm-project/commit/181cc75ea8be70e3fa7145456e1bf2331e0bc5e4.diff

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/106532 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Support partial memory reads on windows (PR #106981)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/106981 ReadProcessMemory will not perform the read if part of the memory is unreadable (and even though the API has a `number_of_bytes_read` argument). To make this work, I explicitly inspect the memory region being re

[Lldb-commits] [lldb] [lldb] Support partial memory reads on windows (PR #106981)

2024-09-02 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes ReadProcessMemory will not perform the read if part of the memory is unreadable (and even though the API has a `number_of_bytes_read` argument). To make this work, I explicitly inspect the memory region being

[Lldb-commits] [lldb] [lldb][NFC] Move few static helpers to the class Socket and make them public (PR #106640)

2024-09-02 Thread Pavel Labath via lldb-commits
labath wrote: Moving the common API (deduplicating) into the `Socket` class is fine. Making it public is not. There shouldn't be a reason to make e.g. `GetLastError` public, because noone should be making raw socket calls. https://github.com/llvm/llvm-project/pull/106640 __

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
https://github.com/dzhidzhoev updated https://github.com/llvm/llvm-project/pull/102185 >From e40ca68a934d0595ebc6c07010a4f6a814fa026f Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev Date: Sat, 27 Jul 2024 02:39:32 +0200 Subject: [PATCH 01/11] [lldb][test] Improve toolchain detection in Mak

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
@@ -96,16 +98,119 @@ def getArchSpec(self, architecture): """ return ["ARCH=" + architecture] if architecture else [] -def getCCSpec(self, compiler): +def getToolchainSpec(self, compiler): """ -Helper function to return the key-value st

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
@@ -96,16 +98,119 @@ def getArchSpec(self, architecture): """ return ["ARCH=" + architecture] if architecture else [] -def getCCSpec(self, compiler): +def getToolchainSpec(self, compiler): """ -Helper function to return the key-value st

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
@@ -96,16 +98,119 @@ def getArchSpec(self, architecture): """ return ["ARCH=" + architecture] if architecture else [] -def getCCSpec(self, compiler): +def getToolchainSpec(self, compiler): """ -Helper function to return the key-value st

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
@@ -213,7 +229,7 @@ endif LIMIT_DEBUG_INFO_FLAGS = NO_LIMIT_DEBUG_INFO_FLAGS = MODULE_DEBUG_INFO_FLAGS = -ifneq (,$(findstring clang,$(CC))) +ifeq ($(CCC), clang) dzhidzhoev wrote: Renamed it https://github.com/llvm/llvm-project/pull/102185 __

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 Thread via lldb-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/106919 >From d2bddca1753b4c960895f51d7eb80b6efa7dc986 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Sun, 1 Sep 2024 17:26:11 +0100 Subject: [PATCH] [lldb-dap] Make environment option an object --- .../tools/lldb-

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 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 87d904871fe96a01dfa1f254ca2a7639de67960c...d2bddca1753b4c960895f51d7eb80b6efa7dc986 lldb/

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
@@ -96,16 +98,120 @@ def getArchSpec(self, architecture): """ return ["ARCH=" + architecture] if architecture else [] -def getCCSpec(self, compiler): +def getToolchainSpec(self, compiler): """ -Helper function to return the key-value st

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Pavel Labath via lldb-commits
labath wrote: > @labath > > > Basically, keep the socket code inside the socket class, but make it > > asynchronous. This way you can listen for as many sockets (and other > > things) as you like. It shouldn't be necessary to do the socket handling > > stuff externally. > > I haven't looked i

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
https://github.com/dzhidzhoev updated https://github.com/llvm/llvm-project/pull/102185 >From e40ca68a934d0595ebc6c07010a4f6a814fa026f Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev Date: Sat, 27 Jul 2024 02:39:32 +0200 Subject: [PATCH 01/12] [lldb][test] Improve toolchain detection in Mak

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 Thread via lldb-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/106919 >From d2bddca1753b4c960895f51d7eb80b6efa7dc986 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Sun, 1 Sep 2024 17:26:11 +0100 Subject: [PATCH 1/2] [lldb-dap] Make environment option an object --- .../tools/l

[Lldb-commits] [lldb] [lldb][NFC] Move few static helpers to the class Socket and make them public (PR #106640)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: It is necesary for Acceptor in #104238. 90% of this Acceptor contains the code from TCPSocket and TCPSocket has only cosmetics changes. m_listen_sockets used in Accept() must be initialized and stored somewhere. I think the best place for m_listen_sockets is TCPSocket and I prop

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
https://github.com/dzhidzhoev edited https://github.com/llvm/llvm-project/pull/102185 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Vladislav Dzhidzhoev via lldb-commits
https://github.com/dzhidzhoev edited https://github.com/llvm/llvm-project/pull/102185 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix and speedup the `memory find` command (PR #104193)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/104193 >From ecd84ae96fd59eeb4a2bb47d80980d861dc042d1 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 14 Aug 2024 19:58:27 +0200 Subject: [PATCH] [lldb] Fix and speedup the `memory find` command This patch fixes

[Lldb-commits] [lldb] [lldb] Fix and speedup the `memory find` command (PR #104193)

2024-09-02 Thread Pavel Labath via lldb-commits
labath wrote: Rebased on top of #106532. The test should pass reliably now (the windows part depends on #106981). https://github.com/llvm/llvm-project/pull/104193 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[Lldb-commits] [lldb] [lldb] Fix and speedup the `memory find` command (PR #104193)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/104193 >From ecd84ae96fd59eeb4a2bb47d80980d861dc042d1 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 14 Aug 2024 19:58:27 +0200 Subject: [PATCH 1/2] [lldb] Fix and speedup the `memory find` command This patch f

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/106955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
@@ -95,6 +96,40 @@ TEST_P(SocketTest, TCPListen0ConnectAccept) { &socket_b_up); } +TEST_P(SocketTest, TCPMainLoopAccept) { + const bool child_processes_inherit = false; + auto listen_socket_up = + std::make_unique(true, child_processes_inheri

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman approved this pull request. Ok, let's move on this way. But fix the test. https://github.com/llvm/llvm-project/pull/106955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/106955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/106955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Support partial memory reads on windows (PR #106981)

2024-09-02 Thread David Spickett via lldb-commits
@@ -276,16 +276,29 @@ Status ProcessDebugger::ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, LLDB_LOG(log, "attempting to read {0} bytes from address {1:x}", size, vm_addr); - HostProcess process = m_session_data->m_debugger->GetProcess(); + lldb::pro

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 Thread via lldb-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/106919 >From d2bddca1753b4c960895f51d7eb80b6efa7dc986 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Sun, 1 Sep 2024 17:26:11 +0100 Subject: [PATCH 1/3] [lldb-dap] Make environment option an object --- .../tools/l

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
@@ -254,67 +255,60 @@ void TCPSocket::CloseListenSockets() { m_listen_sockets.clear(); } -Status TCPSocket::Accept(Socket *&conn_socket) { - Status error; - if (m_listen_sockets.size() == 0) { -error = Status::FromErrorString("No open listening sockets!"); -return

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman requested changes to this pull request. BTW, I have figured out a side effect. MainLoopWindows uses events created by WSACreateEvent(). WSACreateEvent() creates the `manual-reset` event. But WSAResetEvent() is used only for m_trigger_event. All other events (READ, A

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/106955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/106955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap][test] Fix: Typo in unresolved test (PR #107030)

2024-09-02 Thread via lldb-commits
https://github.com/Da-Viper created https://github.com/llvm/llvm-project/pull/107030 There is a typo in an assertion that causes the instruction break-point test to be unresolved >From 988aab74b0438724f06106453f0c0730ca4068f4 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Tue, 3 Sep 2024

[Lldb-commits] [lldb] [lldb-dap][test] Fix: Typo in unresolved test (PR #107030)

2024-09-02 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (Da-Viper) Changes There is a typo in an assertion that causes the instruction break-point test to be unresolved --- Full diff: https://github.com/llvm/llvm-project/pull/107030.diff 1 Files Affected: - (modified) lldb/test/API/t

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 Thread Adrian Vogelsgesang via lldb-commits
@@ -1831,7 +1831,13 @@ lldb::SBError LaunchProcess(const llvm::json::Object &request) { launch_info.SetArguments(MakeArgv(args).data(), true); // Pass any environment variables along that the user specified. - auto envs = GetStrings(arguments, "env"); + auto envMap =

[Lldb-commits] [lldb] Make env and source map dictionaries #95137 (PR #106919)

2024-09-02 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: > I am not sure if it possible to use a dict for sourceMaps since a source can > map to multiple destination see test Interestingly, CodeLLDB also uses an object, see https://github.com/vadimcn/codelldb/blob/v1.10.0/MANUAL.md#source-path-remapping. Probably they just don't

[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/106955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Updated TCPSocket to listen multiple ports on the same single thread (PR #104797)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman closed https://github.com/llvm/llvm-project/pull/104797 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/104238 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-09-02 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: I have updated this patch based on #106955 to see how it will look and work. https://github.com/llvm/llvm-project/pull/104238 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb

[Lldb-commits] [lldb] [lldb-dap][test] Fix: Typo in unresolved test (PR #107030)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/107030 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap][test] Fix: Typo in unresolved test (PR #107030)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/107030 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 7d7d2d2 - [lldb-dap][test] Fix: Typo in unresolved test (#107030)

2024-09-02 Thread via lldb-commits
Author: Da-Viper Date: 2024-09-03T08:37:59+02:00 New Revision: 7d7d2d2b54172f97300c02ec80bb568d35403cce URL: https://github.com/llvm/llvm-project/commit/7d7d2d2b54172f97300c02ec80bb568d35403cce DIFF: https://github.com/llvm/llvm-project/commit/7d7d2d2b54172f97300c02ec80bb568d35403cce.diff LOG:

[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -96,16 +98,120 @@ def getArchSpec(self, architecture): """ return ["ARCH=" + architecture] if architecture else [] -def getCCSpec(self, compiler): +def getToolchainSpec(self, compiler): """ -Helper function to return the key-value st

  1   2   >