[Lldb-commits] [lldb] [lldb][test] Fix TestMultipleDebuggers test on non-x86, other small issues (PR #101169)

2024-07-31 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/101169 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] aa07282 - [lldb][test] Fix TestMultipleDebuggers test on non-x86, other small issues (#101169)

2024-07-31 Thread via lldb-commits
Author: David Spickett Date: 2024-07-31T08:37:42+01:00 New Revision: aa07282a25c3d6df04af9a4d34874cc433c9c68a URL: https://github.com/llvm/llvm-project/commit/aa07282a25c3d6df04af9a4d34874cc433c9c68a DIFF: https://github.com/llvm/llvm-project/commit/aa07282a25c3d6df04af9a4d34874cc433c9c68a.diff

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett commented: I'm not sure whether we need `LLDB_SHELL_TESTS_DISABLE_REMOTE`, can you explain how that would be used? Would I set up a build with all the other flags, do my remote testing, then set `LLDB_SHELL_TESTS_DISABLE_REMOTE=OFF` and run the shell tests loca

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

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

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
@@ -22,6 +24,55 @@ def _disallow(config, execName): config.substitutions.append((" {0} ".format(execName), warning.format(execName))) +def get_lldb_args(config, suffix=None): +lldb_args = [] +if "remote-linux" in config.available_features: +lldb_args += [

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
@@ -22,6 +24,55 @@ def _disallow(config, execName): config.substitutions.append((" {0} ".format(execName), warning.format(execName))) +def get_lldb_args(config, suffix=None): +lldb_args = [] +if "remote-linux" in config.available_features: +lldb_args += [

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
@@ -22,6 +24,55 @@ def _disallow(config, execName): config.substitutions.append((" {0} ".format(execName), warning.format(execName))) +def get_lldb_args(config, suffix=None): +lldb_args = [] +if "remote-linux" in config.available_features: +lldb_args += [

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
@@ -4,16 +4,16 @@ target create -l "ls" /bin/ls target list -# CHECK: * target #0 (ls): /bin/ls +# CHECK: * target #0 (ls): [[LS_PATH:.*]] DavidSpickett wrote: Could make this supported on Windows too if we happen to have some basic C file hanging around in

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
@@ -4,16 +4,16 @@ target create -l "ls" /bin/ls target list -# CHECK: * target #0 (ls): /bin/ls +# CHECK: * target #0 (ls): [[LS_PATH:.*]] DavidSpickett wrote: Though `/bin/ls` surely isn't going to be compatible with the remote a large percentage of the tim

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
@@ -138,7 +191,7 @@ def use_support_substitutions(config): # Set up substitutions for support tools. These tools can be overridden at the CMake # level (by specifying -DLLDB_LIT_TOOLS_DIR), installed, or as a last resort, we can use # the just-built version. -

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread David Spickett via lldb-commits
@@ -4,16 +4,16 @@ target create -l "ls" /bin/ls target list -# CHECK: * target #0 (ls): /bin/ls +# CHECK: * target #0 (ls): [[LS_PATH:.*]] DavidSpickett wrote: Do I understand correctly here that the path `/bin/ls` is given to target create, that program is

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett commented: What, if any, are the changes to how you would run lldb-server on Windows? I see a new argument here but not sure if that's only meant for lldb-server to pass to itself when it starts a child process. https://github.com/llvm/llvm-project/pull/101283

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

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

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -159,6 +159,40 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() = default; +void GDBRemoteCommunicationServerPlatform::Proc( +const lldb_private::Args &args)

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -283,54 +293,94 @@ Status PipeWindows::ReadWithTimeout(void *buf, size_t size, DWORD sys_bytes_read = size; BOOL result = ::ReadFile(m_read, buf, sys_bytes_read, &sys_bytes_read, &m_read_overlapped); - if (!result && GetLastError() != ERROR_I

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -159,6 +159,40 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() = default; +void GDBRemoteCommunicationServerPlatform::Proc( +const lldb_private::Args &args)

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -27,11 +27,13 @@ class TestLogHandler : public LogHandler { : m_stream_sp(stream_sp) {} void Emit(llvm::StringRef message) override { +std::lock_guard guard(m_mutex); DavidSpickett wrote: A mutex is now required because of the sharing of the so

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -283,54 +293,94 @@ Status PipeWindows::ReadWithTimeout(void *buf, size_t size, DWORD sys_bytes_read = size; BOOL result = ::ReadFile(m_read, buf, sys_bytes_read, &sys_bytes_read, &m_read_overlapped); - if (!result && GetLastError() != ERROR_I

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -114,6 +120,218 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static GDBRemoteCommunicationServerPlatform::PortMap gdbserver_portmap; +static std::mutex gdbserver_portmap_mutex; + +#if defined(_WIN32) +static void SpawnProcessRea

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -159,6 +159,40 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() = default; +void GDBRemoteCommunicationServerPlatform::Proc( DavidSpickett wrote

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
DavidSpickett wrote: What exactly does `lldb-server --server` mean? Because at least on Linux I see: ``` $ ./bin/lldb-server Usage: ./bin/lldb-server v[ersion] ./bin/lldb-server g[dbserver] [options] ./bin/lldb-server p[latform] [options] Invoke subcommand for additional help ``` Maybe you

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread David Spickett via lldb-commits
@@ -114,6 +120,218 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static GDBRemoteCommunicationServerPlatform::PortMap gdbserver_portmap; +static std::mutex gdbserver_portmap_mutex; + +#if defined(_WIN32) DavidSpicke

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -336,3 +336,52 @@ TEST(MinidumpYAML, ExceptionStream_ExtraParameter) { 0xab, 0xad, 0xca, 0xfe}), *ExpectedContext); } + +TEST(MinidumpYAML, MemoryRegion_64bit) { + SmallString<0> Storage; + auto ExpectedFile = toBinary(Storage, R"

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -336,3 +336,52 @@ TEST(MinidumpYAML, ExceptionStream_ExtraParameter) { 0xab, 0xad, 0xca, 0xfe}), *ExpectedContext); } + +TEST(MinidumpYAML, MemoryRegion_64bit) { + SmallString<0> Storage; + auto ExpectedFile = toBinary(Storage, R"

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -1,7 +1,7 @@ --- !minidump -Streams: +Streams: labath wrote: Please either revert these changes or put them in as a separate patch (you don't need to wait for a review on that). https://github.com/llvm/llvm-project/pull/101272 _

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -373,7 +373,6 @@ void yaml::MappingContextTraits::mapping( void yaml::MappingContextTraits::mapping( IO &IO, MemoryDescriptor_64 &Memory, BinaryRef &Content) { mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange); - mapRequiredHex(IO, "Data Size", Me

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -550,7 +588,7 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) { llvm_unreachable("Unhandled stream kind!"); } -Expected Object::create(const object::MinidumpFile &File) { +Expected Object::create(object::MinidumpFile &File) {

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I think we should slow down a bit. For consistency, and to minimize the number of ifdefs, I believe windows and non-windows paths should use as similar approaches as possible. That means I think the end state should be that the posix path also uses a fork+e

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

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

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: > What exactly does `lldb-server --server` mean? Sorry. I have updated the description with `lldb-server platform --server`. https://github.com/llvm/llvm-project/pull/101283 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -114,6 +120,218 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static GDBRemoteCommunicationServerPlatform::PortMap gdbserver_portmap; +static std::mutex gdbserver_portmap_mutex; + +#if defined(_WIN32) slydiman wr

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -27,11 +27,13 @@ class TestLogHandler : public LogHandler { : m_stream_sp(stream_sp) {} void Emit(llvm::StringRef message) override { +std::lock_guard guard(m_mutex); slydiman wrote: Probably I can separate this change to another patch. It is n

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -159,6 +159,40 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() = default; +void GDBRemoteCommunicationServerPlatform::Proc( slydiman wrote: No

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -159,6 +159,40 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() = default; +void GDBRemoteCommunicationServerPlatform::Proc( +const lldb_private::Args &args)

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -159,6 +159,40 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() = default; +void GDBRemoteCommunicationServerPlatform::Proc( +const lldb_private::Args &args)

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/101283 >From 526708c8ac09275049c9afc8e7673fc5f3d889ed Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Wed, 31 Jul 2024 05:41:21 +0400 Subject: [PATCH] [lldb] Updated lldb-server to spawn the child process and sh

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -283,54 +293,94 @@ Status PipeWindows::ReadWithTimeout(void *buf, size_t size, DWORD sys_bytes_read = size; BOOL result = ::ReadFile(m_read, buf, sys_bytes_read, &sys_bytes_read, &m_read_overlapped); - if (!result && GetLastError() != ERROR_I

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -283,54 +293,94 @@ Status PipeWindows::ReadWithTimeout(void *buf, size_t size, DWORD sys_bytes_read = size; BOOL result = ::ReadFile(m_read, buf, sys_bytes_read, &sys_bytes_read, &m_read_overlapped); - if (!result && GetLastError() != ERROR_I

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: > What, if any, are the changes to how you would run lldb-server on Windows? I > see a new argument here but not sure if that's only meant for lldb-server to > pass to itself when it starts a child process. The explanation [is here](https://github.com/llvm/llvm-project/pull/10

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -873,33 +873,29 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) { if (!section_list) return Address(); - // Find the SHT_DYNAMIC (.dynamic) section. - SectionSP dynsym_section_sp( - section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo,

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -2472,48 +2429,47 @@ size_t ObjectFileELF::ParseDynamicSymbols() { if (m_dynamic_symbols.size()) return m_dynamic_symbols.size(); - SectionList *section_list = GetSectionList(); - if (!section_list) + std::optional dynamic_data = GetDynamicData(); + if (!dynamic_d

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -873,33 +873,29 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) { if (!section_list) return Address(); - // Find the SHT_DYNAMIC (.dynamic) section. - SectionSP dynsym_section_sp( - section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo,

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,58 @@ +// REQUIRES: system-linux, native labath wrote: I would like to see a test which uses an on-disk section-header-free object file. (Maybe you could base it off of llvm/test/tools/llvm-readobj/ELF/dynamic-reloc-no-section-headers.test). The in-

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -402,6 +413,29 @@ class ObjectFileELF : public lldb_private::ObjectFile { /// .gnu_debugdata section or \c nullptr if an error occured or if there's no /// section with that name. std::shared_ptr GetGnuDebugDataObjectFile(); + + /// Get the bytes that represent the .d

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -3704,3 +3790,83 @@ ObjectFileELF::MapFileDataWritable(const FileSpec &file, uint64_t Size, return FileSystem::Instance().CreateWritableDataBuffer(file.GetPath(), Size, Offset); } + +std::optional ObjectFileELF::Get

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -3664,7 +3730,27 @@ llvm::ArrayRef ObjectFileELF::ProgramHeaders() { } DataExtractor ObjectFileELF::GetSegmentData(const ELFProgramHeader &H) { - return DataExtractor(m_data, H.p_offset, H.p_filesz); + // Try and read the program header from our cached m_data which can c

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -2550,6 +2550,21 @@ ModuleSP Process::ReadModuleFromMemory(const FileSpec &file_spec, } ModuleSP module_sp(new Module(file_spec, ArchSpec())); if (module_sp) { +if (size_to_read == 0) { + // Default to 8192 in case we can't find a memory region. + size_t

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-07-31 Thread Pavel Labath via lldb-commits
@@ -402,6 +413,29 @@ class ObjectFileELF : public lldb_private::ObjectFile { /// .gnu_debugdata section or \c nullptr if an error occured or if there's no /// section with that name. std::shared_ptr GetGnuDebugDataObjectFile(); + + /// Get the bytes that represent the .d

[Lldb-commits] [lldb] [lldb] Unify the way we get the Target in CommandObject (PR #101208)

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

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: @labath > For consistency, and to minimize the number of ifdefs, I believe windows and > non-windows paths should use as similar approaches as possible. That means I > think the end state should be that the posix path also uses a fork+exec > approach. fork+exec on non-Window

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

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

[Lldb-commits] [lldb] [lldb] Fixed lldb-server crash (TestLogHandler was not thread safe) (PR #101326)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman created https://github.com/llvm/llvm-project/pull/101326 Host::LaunchProcess() requires to SetMonitorProcessCallback. This callback is called from the child process monitor thread. We cannot control this thread anyway. lldb-server may crash if there is a logging aro

[Lldb-commits] [lldb] [lldb] Fixed lldb-server crash (TestLogHandler was not thread safe) (PR #101326)

2024-07-31 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dmitry Vasilyev (slydiman) Changes Host::LaunchProcess() requires to SetMonitorProcessCallback. This callback is called from the child process monitor thread. We cannot control this thread anyway. lldb-server may crash if there is a loggin

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

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

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Create VLAs of explicitly 0-size as ConstantArrayType (PR #100710)

2024-07-31 Thread Michael Buch via lldb-commits
Michael137 wrote: > @Michael137 This broke the windows bot: > https://lab.llvm.org/buildbot/#/builders/141/builds/1214 Should we skip it on > that platform or do you see an easy fix ? Thanks for pinging. This is the failure: ``` | error: no variable named 'f' found in this frame # `--

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/101283 >From c785238cf366746a383e74a89be7c7431cd41d3c Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Wed, 31 Jul 2024 05:41:21 +0400 Subject: [PATCH] [lldb] Updated lldb-server to spawn the child process and sh

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

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

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/101283 >From add315c8db91c4d51f9b298cc64478c0497857a5 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Wed, 31 Jul 2024 05:41:21 +0400 Subject: [PATCH] [lldb] Updated lldb-server to spawn the child process and sh

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff c35c4c72e4977258fc1da940e0470e8d0671bf07 c785238cf366746a383e74a89be7c7431cd41d3c --e

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Pavel Labath via lldb-commits
labath wrote: > @labath > > > For consistency, and to minimize the number of ifdefs, I believe windows > > and non-windows paths should use as similar approaches as possible. That > > means I think the end state should be that the posix path also uses a > > fork+exec approach. > > fork+exec

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

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

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-07-31 Thread Dmitry Vasilyev via lldb-commits
@@ -114,6 +120,218 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static GDBRemoteCommunicationServerPlatform::PortMap gdbserver_portmap; +static std::mutex gdbserver_portmap_mutex; + +#if defined(_WIN32) +static void SpawnProcessRea

[Lldb-commits] [lldb] [lldb] Fixed lldb-server crash (TestLogHandler was not thread safe) (PR #101326)

2024-07-31 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. This makes sense, though it would probably be even better to just use the real StreamLogHandler class. I think all that's needed would be to add a new constructor to it. https://github.com/llvm/llvm-project/pull/101326 _

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Create VLAs of explicitly 0-size as ConstantArrayType (PR #100710)

2024-07-31 Thread David Spickett via lldb-commits
DavidSpickett wrote: Linaro does yes, I think @omjavaid is currently dealing with that bot. https://github.com/llvm/llvm-project/pull/100710 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-

[Lldb-commits] [lldb] 93fecc2 - [lldb] Fixed lldb-server crash (TestLogHandler was not thread safe) (#101326)

2024-07-31 Thread via lldb-commits
Author: Dmitry Vasilyev Date: 2024-07-31T17:51:06+04:00 New Revision: 93fecc2577ece0329f3bbe2719bbc5b4b9b30010 URL: https://github.com/llvm/llvm-project/commit/93fecc2577ece0329f3bbe2719bbc5b4b9b30010 DIFF: https://github.com/llvm/llvm-project/commit/93fecc2577ece0329f3bbe2719bbc5b4b9b30010.dif

[Lldb-commits] [lldb] [lldb] Fixed lldb-server crash (TestLogHandler was not thread safe) (PR #101326)

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

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

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

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/101333 This is an alternative, much simpler implementation of #99305. In this version I replace the AnyModule wildcard match with a special TypeQuery flag which achieves (mostly) the same thing. It is a preparatory st

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes This is an alternative, much simpler implementation of #99305. In this version I replace the AnyModule wildcard match with a special TypeQuery flag which achieves (mostly) the same thing. It is a preparatory

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread Pavel Labath via lldb-commits
labath wrote: @Michael137, I'd appreciate it if you could give this a spin. If https://github.com/swiftlang/llvm-project/blob/ee8bc8b8d30eb99807adbcd3c1f044e00af66cdd/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp#L219-L225 is the only use of `AnyModule`, then it should be stra

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff d8b985c9490664f7ec923e59cf6c603d998179ae e87b2b24cd673584aabd00eaf6ad8fc4c0c52c98 --e

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/101333 >From e87b2b24cd673584aabd00eaf6ad8fc4c0c52c98 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 16 Jul 2024 14:18:27 + Subject: [PATCH 1/2] [lldb] Refactor TypeQuery::ContextMatches, take 2 This is an

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

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

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread Michael Buch via lldb-commits
https://github.com/Michael137 commented: Awesome, this feels much better. Thanks for doing this! I'll give this a try in the Swift plugin this week LGTM (modulo some stylistic comments). Will defer approval until I tried this with Swift https://github.com/llvm/llvm-project/pull/101333 ___

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: @Michael137 Have you tried applying the patch to swift-lldb and running the tests? https://github.com/llvm/llvm-project/pull/101333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-07-31 Thread Michael Buch via lldb-commits
Michael137 wrote: > @Michael137 Have you tried applying the patch to swift-lldb and running the > tests? Not yet, but planning to do so sometime this week https://github.com/llvm/llvm-project/pull/101333 ___ lldb-commits mailing list lldb-commits@lis

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Jacob Lalonde via lldb-commits
@@ -336,3 +336,52 @@ TEST(MinidumpYAML, ExceptionStream_ExtraParameter) { 0xab, 0xad, 0xca, 0xfe}), *ExpectedContext); } + +TEST(MinidumpYAML, MemoryRegion_64bit) { + SmallString<0> Storage; + auto ExpectedFile = toBinary(Storage, R"

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Jacob Lalonde via lldb-commits
@@ -550,7 +588,7 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) { llvm_unreachable("Unhandled stream kind!"); } -Expected Object::create(const object::MinidumpFile &File) { +Expected Object::create(object::MinidumpFile &File) {

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-07-31 Thread Jacob Lalonde via lldb-commits
@@ -136,6 +136,22 @@ static size_t layout(BlobAllocator &File, MinidumpYAML::ExceptionStream &S) { return DataEnd; } +static size_t layout(BlobAllocator &File, MinidumpYAML::Memory64ListStream &S) { + size_t BaseRVA = File.tell() + sizeof(minidump::Memory64ListHeader); --

[Lldb-commits] [lldb] [lldb] Allow mapping object file paths (PR #101361)

2024-07-31 Thread Alexandre Perez via lldb-commits
https://github.com/aperez created https://github.com/llvm/llvm-project/pull/101361 This introduces a `target.object-map` which allows us to remap module locations, much in the same way as source mapping works today. This is useful, for instance, when debugging coredumps, so we can replace some

[Lldb-commits] [lldb] [lldb] Allow mapping object file paths (PR #101361)

2024-07-31 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Alexandre Perez (aperez) Changes This introduces a `target.object-map` which allows us to remap module locations, much in the same way as source mapping works today. This is useful, for instance, when debugging coredumps, so we can replace

[Lldb-commits] [lldb] [lldb] Allow mapping object file paths (PR #101361)

2024-07-31 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 12189f800585ab459afa20b4f159db93ae474b57...5221c6f267fffd811c6dd39dbbcc211e2a93739c lldb/

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread Vladislav Dzhidzhoev via lldb-commits
@@ -138,7 +191,7 @@ def use_support_substitutions(config): # Set up substitutions for support tools. These tools can be overridden at the CMake # level (by specifying -DLLDB_LIT_TOOLS_DIR), installed, or as a last resort, we can use # the just-built version. -

[Lldb-commits] [lldb] [lldb] Allow mapping object file paths (PR #101361)

2024-07-31 Thread Alexandre Perez via lldb-commits
https://github.com/aperez updated https://github.com/llvm/llvm-project/pull/101361 >From 132b6fb0808385494a71c99533d7281420b743bd Mon Sep 17 00:00:00 2001 From: Alexandre Perez Date: Wed, 31 Jul 2024 09:38:38 -0700 Subject: [PATCH] [lldb] Allow mapping object file paths --- lldb/include/lldb/

[Lldb-commits] [lldb] [lldb] Unify the way we get the Target in CommandObject (PR #101208)

2024-07-31 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/101208 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 8398ad9 - [lldb] Unify the way we get the Target in CommandObject (#101208)

2024-07-31 Thread via lldb-commits
Author: Jonas Devlieghere Date: 2024-07-31T09:57:10-07:00 New Revision: 8398ad9cb21736dc57ee4dd766bd0859ef9bd000 URL: https://github.com/llvm/llvm-project/commit/8398ad9cb21736dc57ee4dd766bd0859ef9bd000 DIFF: https://github.com/llvm/llvm-project/commit/8398ad9cb21736dc57ee4dd766bd0859ef9bd000.d

[Lldb-commits] [lldb] Add a StackFrameRecognizer for the Darwin specific abort_with_payload… (PR #101365)

2024-07-31 Thread via lldb-commits
https://github.com/jimingham created https://github.com/llvm/llvm-project/pull/101365 This is used by various system routines (the capabilities checker and dyld to name a few) to add extra color to an abort. This patch adds a frame recognizer so people can easily see the details, and also ad

[Lldb-commits] [lldb] Add a StackFrameRecognizer for the Darwin specific abort_with_payload… (PR #101365)

2024-07-31 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (jimingham) Changes This is used by various system routines (the capabilities checker and dyld to name a few) to add extra color to an abort. This patch adds a frame recognizer so people can easily see the details, and also adds the

[Lldb-commits] [lldb] Add a StackFrameRecognizer for the Darwin specific abort_with_payload… (PR #101365)

2024-07-31 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 80c0e8d572d3b1c34d66faffc42bcfc9432583ec...5b2cf0ab7e382e41ff3dfe88e4d7e35ddc99afd5 lldb/

[Lldb-commits] [lldb] Add a StackFrameRecognizer for the Darwin specific abort_with_payload… (PR #101365)

2024-07-31 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 80c0e8d572d3b1c34d66faffc42bcfc9432583ec 5b2cf0ab7e382e41ff3dfe88e4d7e35ddc99afd5 --e

[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

2024-07-31 Thread Vladislav Dzhidzhoev via lldb-commits
dzhidzhoev wrote: > I'm not sure whether we need `LLDB_SHELL_TESTS_DISABLE_REMOTE`, can you > explain how that would be used? > > Would I set up a build with all the other flags, do my remote testing, then > set `LLDB_SHELL_TESTS_DISABLE_REMOTE=OFF` and run the shell tests locally, > using th

[Lldb-commits] [lldb] 9fe455f - [lldb] Add constant value mode for RegisterLocation in UnwindPlans (#100624)

2024-07-31 Thread via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2024-07-31T10:25:31-07:00 New Revision: 9fe455fd0c7d6f2107b33b37c04bbd3b12fe65b3 URL: https://github.com/llvm/llvm-project/commit/9fe455fd0c7d6f2107b33b37c04bbd3b12fe65b3 DIFF: https://github.com/llvm/llvm-project/commit/9fe455fd0c7d6f2107b33b37c04bbd3b1

[Lldb-commits] [lldb] [lldb] Add constant value mode for RegisterLocation in UnwindPlans (PR #100624)

2024-07-31 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/100624 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add a StackFrameRecognizer for the Darwin specific abort_with_payload… (PR #101365)

2024-07-31 Thread via lldb-commits
https://github.com/jimingham updated https://github.com/llvm/llvm-project/pull/101365 >From 5b2cf0ab7e382e41ff3dfe88e4d7e35ddc99afd5 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 30 Jul 2024 09:32:24 -0700 Subject: [PATCH 1/2] Add a StackFrameRecognizer for the Darwin specific abort_wit

[Lldb-commits] [lldb] [lldb] Change Module to have a concrete UnwindTable, update (PR #101130)

2024-07-31 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. This makes sense to me. LGTM if Jim is happy. https://github.com/llvm/llvm-project/pull/101130 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[Lldb-commits] [lldb] Add a StackFrameRecognizer for the Darwin specific abort_with_payload… (PR #101365)

2024-07-31 Thread via lldb-commits
https://github.com/jimingham updated https://github.com/llvm/llvm-project/pull/101365 >From 5b2cf0ab7e382e41ff3dfe88e4d7e35ddc99afd5 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 30 Jul 2024 09:32:24 -0700 Subject: [PATCH 1/3] Add a StackFrameRecognizer for the Darwin specific abort_wit

[Lldb-commits] [lldb] [lldb] Change Module to have a concrete UnwindTable, update (PR #101130)

2024-07-31 Thread via lldb-commits
https://github.com/jimingham approved this pull request. LGTM I like that you also changed "Update" to "ModuleWasUpdated", that's more accurate. `m_initialized` isn't quite the right name, it means "needs work" not "initialized" which sounds like it should happen once. If you can think of a be

[Lldb-commits] [lldb] [lldb] Allow mapping object file paths (PR #101361)

2024-07-31 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good! This will be very useful for core files. https://github.com/llvm/llvm-project/pull/101361 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] 0a01e8f - [lldb] Allow mapping object file paths (#101361)

2024-07-31 Thread via lldb-commits
Author: Alexandre Perez Date: 2024-07-31T10:57:40-07:00 New Revision: 0a01e8ff530ab15277aa9fad5361297d7b55e247 URL: https://github.com/llvm/llvm-project/commit/0a01e8ff530ab15277aa9fad5361297d7b55e247 DIFF: https://github.com/llvm/llvm-project/commit/0a01e8ff530ab15277aa9fad5361297d7b55e247.dif

[Lldb-commits] [lldb] [lldb] Allow mapping object file paths (PR #101361)

2024-07-31 Thread Alexandre Perez via lldb-commits
https://github.com/aperez closed https://github.com/llvm/llvm-project/pull/101361 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

  1   2   >