[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData JSON Array parsing (PR #101929)

2024-08-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/101929 >From 18fcfda3baadceca0ec666bd86948baf991f8800 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 7 Aug 2024 00:17:36 -0700 Subject: [PATCH] [lldb/API] Fix SBStructuredData support any JSON type

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData JSON Array parsing (PR #101929)

2024-08-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > Shouldn't any valid JSON be acceptable? A dictionary, array, string, number, > "true", "false", or "null"? Sure, fixed that @clayborg :) https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commi

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/101929 >From cfceebbf9ffa7abe1eadcb5fade88f3eb359757c Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 7 Aug 2024 00:20:12 -0700 Subject: [PATCH] [lldb/API] Fix SBStructuredData support any JSON type

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -336,3 +336,89 @@ 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-08-07 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I can see you struggled to get this to work, and I appreciate the effort you put in. I think some of the inline comments could make this flow better. https://github.com/llvm/llvm-project/pull/101272 ___ lldb-commit

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

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

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -494,6 +528,32 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) { } return std::make_unique(std::move(Ranges)); } + case StreamKind::Memory64List: { +// Error, unlike expected is true in failure state +Error Err = Error::su

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -336,3 +336,89 @@ 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-08-07 Thread Pavel Labath via lldb-commits
@@ -154,3 +155,33 @@ MinidumpFile::create(MemoryBufferRef Source) { return std::unique_ptr( new MinidumpFile(Source, Hdr, *ExpectedStreams, std::move(StreamMap))); } + +Expected> labath wrote: Instead of returning another error inside the `Expected`, m

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -336,3 +336,89 @@ 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-08-07 Thread Pavel Labath via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -494,6 +528,32 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) { } return std::make_unique(std::move(Ranges)); } + case StreamKind::Memory64List: { +// Error, unlike expected is true in failure state +Error Err = Error::su

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -336,3 +336,89 @@ 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-08-07 Thread Pavel Labath via lldb-commits
@@ -336,3 +336,89 @@ 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-08-07 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/101272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Change lldb's breakpoint handling behavior (PR #96260)

2024-08-07 Thread Pavel Labath via lldb-commits
labath wrote: > I haven't found the mechanism that an armv7 lldb-server would report > `reason:trace` when it emulated the current instruction, put a breakpoint on > the next instruction we'll execute, and 'continued' the thread when we > resume. But I might have just missed something in Proce

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -110,6 +110,23 @@ class MyRandomClass: self.assertTrue(my_random_class) self.assertEqual(my_random_class.payload, MyRandomClass.payload) +example_arr = [1, 2.3, "4", {"5": False}] +arr_str = json.dumps(example_arr) +s.Clear() +

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -110,6 +110,23 @@ class MyRandomClass: self.assertTrue(my_random_class) self.assertEqual(my_random_class.payload, MyRandomClass.payload) +example_arr = [1, 2.3, "4", {"5": False}] +arr_str = json.dumps(example_arr) +s.Clear() +

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-07 Thread Pavel Labath via lldb-commits
labath wrote: > I'd also love to hear other people opinion on extending platforms through > ScriptedPlatform (cc @labath @jimingham @JDevlieghere ) I think that having the ability to forward operations to existing platform instances would be very useful. If you look at PlatformQemuUser, most o

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I could of high-level comments, I don't want to get too involved in the design of this feature. https://github.com/llvm/llvm-project/pull/102223 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lis

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

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

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +//===-- RealpathPrefixes.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,66 @@ +//===-- RealpathPrefixes.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

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

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/102296 This is a follow-up to https://github.com/llvm/llvm-project/pull/102161 where we changed the `GetMetadata`/`SetMetadata` APIs to pass `ClangASTMetadata` by-value, instead of `ClangASTMetadata *`, which wasn'

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

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

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

2024-08-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes This is a follow-up to https://github.com/llvm/llvm-project/pull/102161 where we changed the `GetMetadata`/`SetMetadata` APIs to pass `ClangASTMetadata` by-value, instead of `ClangASTMetadata *`, which was

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM, thanks! So the actual problem is that the ASTImporter will only copy over the definition to the destination decl if the source decl `isCompleteDefinition`. So then when we tried to add the typedef decl to the `CXXRecordDecl` that

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

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

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,49 @@ +// REQUIRES: system-linux, native labath wrote: This test still requires linux a bunch of system dependencies. Here's a self-contained version that can be run anywhere (just run the input through yaml2obj and give it to lldb). I took `test/to

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -3704,3 +3802,88 @@ 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-08-07 Thread Pavel Labath via lldb-commits
@@ -3802,9 +3817,9 @@ std::optional ObjectFileELF::GetDynstrData() { // the section. if (Section *dynstr = section_list->FindSectionByID(header->sh_link).get()) { - DataExtractor data; +DataExtractor data; if (ReadSec

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -788,7 +808,10 @@ Type::GetTypeScopeAndBasename(llvm::StringRef name) { switch (pos.value()) { case ':': if (prev_is_colon && template_depth == 0) { -result.scope.push_back(name.slice(name_begin, pos.index() - 1)); +llvm::StringRef scope_name =

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -145,10 +159,16 @@ bool TypeQuery::ContextMatches( ++pat; } - // Skip over any remaining module entries if we were asked to do that. - while (GetIgnoreModules() && ctx != ctx_end && - ctx->kind == CompilerContextKind::Module) -++ctx; + // Skip over any

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -266,6 +269,11 @@ class TypeQuery { bool GetIgnoreModules() const { return (m_options & e_ignore_modules) != 0; } void SetIgnoreModules() { m_options &= ~e_ignore_modules; } + bool GetStrictNamespaces() const { +return (m_options & e_strict_namespaces) != 0; + } +

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

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

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-07 Thread Pavel Labath via lldb-commits
labath wrote: > LGTM, thanks! > > So the actual problem is that the ASTImporter will only copy over the > definition to the destination decl if the source decl `isCompleteDefinition`. > So then when we tried to add the typedef decl to the `CXXRecordDecl` that the > ASTImporter created for `A`

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102296 >From 45c8f9534ec0ddc50c825fa7a3d048746b74360c Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 11:03:25 +0100 Subject: [PATCH 1/2] [lldb][TypeSystem] Pass ClangASTMetadata by-value when cre

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/102111 >From c6936f3d5d0592babe9082e867b179af594c447b Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 6 Aug 2024 09:51:20 +0200 Subject: [PATCH 1/3] [lldb] Better matching of types in anonymous namespaces This p

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -111,4 +115,22 @@ TEST(Type, CompilerContextPattern) { Matches(std::vector{make_class("C")})); EXPECT_THAT((std::vector{make_namespace("NS"), make_class("C")}), Not(Matches(std::vector{make_any_type("C")}))); + + EXPECT_THAT((std::vector{make_n

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-07 Thread Michael Buch via lldb-commits
Michael137 wrote: > > LGTM, thanks! > > So the actual problem is that the ASTImporter will only copy over the > > definition to the destination decl if the source decl > > `isCompleteDefinition`. So then when we tried to add the typedef decl to > > the `CXXRecordDecl` that the ASTImporter crea

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-07 Thread Pavel Labath via lldb-commits
labath wrote: You're right -- I misremembered. I thought the DefinitionData is set when completing the definition, but happens when the definition is started. In that case, yes, the crash happened because the ast importer didn't copy over the definition data, but then tried to access it when a

[Lldb-commits] [lldb] 3ac5f5e - [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (#102296)

2024-08-07 Thread via lldb-commits
Author: Michael Buch Date: 2024-08-07T13:05:45+01:00 New Revision: 3ac5f5e1fc189d0cca169a409199fdaec13112d1 URL: https://github.com/llvm/llvm-project/commit/3ac5f5e1fc189d0cca169a409199fdaec13112d1 DIFF: https://github.com/llvm/llvm-project/commit/3ac5f5e1fc189d0cca169a409199fdaec13112d1.diff

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

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

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Latest test additions LGTM, thanks! https://github.com/llvm/llvm-project/pull/102111 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lld

[Lldb-commits] [lldb] f05efd0 - [lldb][ClangExpressionParser][NFC] Remove unused local vars

2024-08-07 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2024-08-07T13:39:52+01:00 New Revision: f05efd034c0993c7aa606bfbaaf575d94d75b43f URL: https://github.com/llvm/llvm-project/commit/f05efd034c0993c7aa606bfbaaf575d94d75b43f DIFF: https://github.com/llvm/llvm-project/commit/f05efd034c0993c7aa606bfbaaf575d94d75b43f.diff

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -44,6 +47,14 @@ using namespace llvm; // option descriptors for getopt_long_only() +#ifdef _WIN32 +typedef pipe_t fd_t; +#define kInvalidFD (LLDB_INVALID_PIPE) labath wrote: Lets make this a real constant (not a macro). https://github.com/llvm/llvm-proje

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

2024-08-07 Thread Pavel Labath via lldb-commits
https://github.com/labath 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 (PR #101283)

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -254,6 +445,65 @@ int main_platform(int argc, char *argv[]) { lldb_private::Args inferior_arguments; inferior_arguments.SetArguments(argc, const_cast(argv)); + if (fd != kInvalidFD) { +// Child process will handle the connection and exit. +Log *log = GetLog(LLD

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -114,6 +126,175 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static void client_handle(GDBRemoteCommunicationServerPlatform &platform, + const lldb_private::Args &args) { + if (!platform.IsConnected())

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -114,6 +126,175 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static void client_handle(GDBRemoteCommunicationServerPlatform &platform, + const lldb_private::Args &args) { + if (!platform.IsConnected())

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -60,6 +71,7 @@ static struct option g_long_options[] = { {"max-gdbserver-port", required_argument, nullptr, 'M'}, {"socket-file", required_argument, nullptr, 'f'}, {"server", no_argument, &g_server, 1}, +{"fd", required_argument, nullptr, 'd'}, --

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -114,6 +126,175 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static void client_handle(GDBRemoteCommunicationServerPlatform &platform, + const lldb_private::Args &args) { + if (!platform.IsConnected())

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

2024-08-07 Thread Pavel Labath via lldb-commits
@@ -114,6 +126,175 @@ static Status save_socket_id_to_file(const std::string &socket_id, return status; } +static void client_handle(GDBRemoteCommunicationServerPlatform &platform, + const lldb_private::Args &args) { + if (!platform.IsConnected())

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

2024-08-07 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I actually quite like this. I think we should further merge the platform specific code into one place (which, among other things, will reduce the total number of ifdefs to ~one, and put all of the socket handling code next to each other), but apart from tha

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/102309 This patch changes the way we initialize `BuiltinHeadersInSystemModules` which is one of the flags controlling Clang's behaviour when the Darwin module is split into more fine-grained modules. The ClangExpre

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes This patch changes the way we initialize `BuiltinHeadersInSystemModules` which is one of the flags controlling Clang's behaviour when the Darwin module is split into more fine-grained modules. The ClangExp

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102309 >From 3dfbfc759f61827f010f4a65241c8464c5815484 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 12:46:24 +0100 Subject: [PATCH] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModule

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

2024-08-07 Thread Pavel Labath via lldb-commits
labath wrote: Also, if any of this code is not tested (outside of running the entire test suite in the remote mode) we should add a dedicated test for it. A quick search found at least one (test/API/tools/lldb-server/TestGdbRemoteCompletion.py) test which would appear to exercise this, but may

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread via lldb-commits
@@ -0,0 +1,66 @@ +//===-- RealpathPrefixes.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/102223 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/102223 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/102223 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/102223 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-07 Thread Dmitri Gribenko via lldb-commits
gribozavr wrote: ## On resugaring bodies of function template instantiations > I just don't think that can be something we can always enable, as that would > make some examples of source code take exponentially more time and memory to > compile. We keep track of propagated and inferred nullab

[Lldb-commits] [lldb] [llvm] [llvm]Added lib/Telemetry (PR #98528)

2024-08-07 Thread Vy Nguyen via lldb-commits
oontvoo wrote: > I've made one pass over the PR. I think this would be easier to review if it > was split into multiple patches: > > * core llvm infrastructure > * core lldb infrastructure > * ~one patch per event type > > I think the biggest hurdle will be finding someone to approve the ad

[Lldb-commits] [lldb] 12fa4b1 - [lldb] Make sure that a `Progress` "completed" update is always reported at destruction (#102097)

2024-08-07 Thread via lldb-commits
Author: royitaqi Date: 2024-08-07T07:58:34-07:00 New Revision: 12fa4b17dcededbd14abfc3ae72f1b798349e847 URL: https://github.com/llvm/llvm-project/commit/12fa4b17dcededbd14abfc3ae72f1b798349e847 DIFF: https://github.com/llvm/llvm-project/commit/12fa4b17dcededbd14abfc3ae72f1b798349e847.diff LOG:

[Lldb-commits] [lldb] [lldb] Make sure that a `Progress` "completed" update is always reported at destruction (PR #102097)

2024-08-07 Thread via lldb-commits
https://github.com/royitaqi closed https://github.com/llvm/llvm-project/pull/102097 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb]Implement LLDB Telemetry (PR #98528)

2024-08-07 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo edited https://github.com/llvm/llvm-project/pull/98528 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb]Implement LLDB Telemetry (PR #98528)

2024-08-07 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo edited https://github.com/llvm/llvm-project/pull/98528 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. Thanks, this LGTM, next step should be to replace the use of `include_directories` with `DW_AT_APPLE_sdk`. https://github.com/llvm/llvm-project/pull/102309 ___ lldb-commits mailing list lldb

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102309 >From 3dfbfc759f61827f010f4a65241c8464c5815484 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 12:46:24 +0100 Subject: [PATCH 1/2] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemMo

[Lldb-commits] [lldb] [llvm] [lldb]Implement LLDB Telemetry (PR #98528)

2024-08-07 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo edited https://github.com/llvm/llvm-project/pull/98528 ___ 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 (PR #101283)

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

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

2024-08-07 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: @labath I have added the class SharedSocket. I have implemented all the recommendations. Note we have the buildbot for cross tests (Windows x64/Linux x64 host and Linux Aarch64 target). So everything is tested. Hope 1191 API tests run with this lldb-server are enough. https://

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102309 >From 3dfbfc759f61827f010f4a65241c8464c5815484 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 12:46:24 +0100 Subject: [PATCH 1/3] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemMo

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

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

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/102111 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Greg Clayton via lldb-commits
@@ -134,6 +134,20 @@ bool TypeQuery::ContextMatches( if (ctx == ctx_end) return false; // Pattern too long. +if (ctx->kind == CompilerContextKind::Namespace && ctx->name.IsEmpty()) { clayborg wrote: Do we need to check for `"(anonymous namespace

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Greg Clayton via lldb-commits
@@ -440,12 +440,6 @@ static void GetTypeLookupContextImpl(DWARFDIE die, continue; } -// If there is no name, then there is no need to look anything up for this -// DIE. -const char *name = die.GetName(); -if (!name || !name[0]) - return; - --

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: This patch relies on "(anonymous namespace)" being removed from the compiler contexts to work. What is the user types any of: ``` (lldb) type lookup "(anonymous namespace)::A" (lldb) script lldb.target.FindFirstType("(anonymous namespace)::A"); (lldb) scrip

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Greg Clayton via lldb-commits
@@ -788,7 +808,13 @@ Type::GetTypeScopeAndBasename(llvm::StringRef name) { switch (pos.value()) { case ':': if (prev_is_colon && template_depth == 0) { -result.scope.push_back(name.slice(name_begin, pos.index() - 1)); +llvm::StringRef scope_name =

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

2024-08-07 Thread Jacob Lalonde via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

2024-08-07 Thread Jacob Lalonde via lldb-commits
@@ -132,6 +140,95 @@ class MinidumpFile : public Binary { size_t Stride; }; + /// Class the provides an iterator over the memory64 memory ranges. Only the + /// the first descriptor is validated as readable beforehand. + class Memory64Iterator { + public: +static

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

2024-08-07 Thread Jacob Lalonde via lldb-commits
@@ -336,3 +336,89 @@ 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-08-07 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond edited https://github.com/llvm/llvm-project/pull/101272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-08-07 Thread Jacob Lalonde via lldb-commits
Jlalond wrote: @labath Implemented almost all of your feedback, once again I appreciate the in depth review. The only functional thing I did not change was the assertion in the iterator constructor that the first element is readable. https://github.com/llvm/llvm-project/pull/101272 ___

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/101929 >From 424d331c65b35992475e4b5fda6b72e12a2e2bbd Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 7 Aug 2024 11:11:27 -0700 Subject: [PATCH] [lldb/API] Fix SBStructuredData support any JSON type

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Ian Anderson via lldb-commits
ian-twilightcoder wrote: This really isn't the right approach. `BuiltinHeadersInSystemModules` isn't the only important default that the driver sets up. Can we change the invocation setup to use clang::createInvocation or clang::CompilerInvocation::CreateFromArgs or clang::BuildCompilation? Or

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Ian Anderson via lldb-commits
@@ -259,6 +259,27 @@ bool XcodeSDK::SupportsSwift() const { } } +bool XcodeSDK::SDKSupportsBuiltinModules(const llvm::Triple &target_triple, ian-twilightcoder wrote: This function got changed in https://github.com/llvm/llvm-project/pull/102239 https://gith

[Lldb-commits] [lldb] 5855237 - [lldb/API] Fix SBStructuredData support any JSON type (#101929)

2024-08-07 Thread via lldb-commits
Author: Med Ismail Bennani Date: 2024-08-07T11:21:27-07:00 New Revision: 585523750e2bbe374d1cb3bf4ff9d53de29b9593 URL: https://github.com/llvm/llvm-project/commit/585523750e2bbe374d1cb3bf4ff9d53de29b9593 DIFF: https://github.com/llvm/llvm-project/commit/585523750e2bbe374d1cb3bf4ff9d53de29b9593.

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)

2024-08-07 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben closed https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

  1   2   >