[Lldb-commits] [lldb] Fix type lookup bug where wrong decl context was being used for a DIE. (PR #94846)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,69 @@ +""" labath wrote: +1 https://github.com/llvm/llvm-project/pull/94846 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix type lookup bug where wrong decl context was being used for a DIE. (PR #94846)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,69 @@ +""" +Test the SBModule and SBTarget type lookup APIs to find multiple types. +""" + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TypeFindFirstTestCase(TestBase): +def test_find_first_type(self): +

[Lldb-commits] [lldb] Fix type lookup bug where wrong decl context was being used for a DIE. (PR #94846)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -491,6 +491,18 @@ static void GetTypeLookupContextImpl(DWARFDIE die, case DW_TAG_base_type: push_ctx(CompilerContextKind::Builtin, name); break; +// If any of the tags below appear in the parent chain, stop the decl +// context and return. Prior to

[Lldb-commits] [lldb] Fix type lookup bug where wrong decl context was being used for a DIE. (PR #94846)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,69 @@ +""" +Test the SBModule and SBTarget type lookup APIs to find multiple types. +""" + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TypeFindFirstTestCase(TestBase): +def test_find_first_type(self): +

[Lldb-commits] [lldb] [lldb] Adjust the for loop condition to prevent unintended increments in ExpandRLE (NFC) (PR #94844)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -1316,6 +1316,7 @@ std::string GDBRemoteCommunication::ExpandRLE(std::string packet) { } else { decoded.push_back(*c); } +c++; labath wrote: How does this prevent an out of bounds access? If I understand the problem correctly, the right

[Lldb-commits] [lldb] [lldb] Fix redundant condition in compression type check (NFC) (PR #94841)

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

[Lldb-commits] [lldb] [lldb] Remove redundant condition in watch mask check (NFC) (PR #94842)

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

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -1741,45 +1741,61 @@ lldb::ModuleSP SymbolFileDWARF::GetExternalModule(ConstString name) { return pos->second; } -DWARFDIE -SymbolFileDWARF::GetDIE(const DIERef _ref) { - // This method can be called without going through the symbol vendor so we - // need to lock the

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -85,6 +86,31 @@ class DebugNamesDWARFIndex : public DWARFIndex { DWARFUnit *GetNonSkeletonUnit(const DebugNames::Entry ) const; DWARFDIE GetDIE(const DebugNames::Entry ) const; + + /// Checks if an entry is a foreign TU and fetch the type unit. + /// + /// This

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -48,20 +60,84 @@ DebugNamesDWARFIndex::GetUnits(const DebugNames _names) { return result; } +std::optional +DebugNamesDWARFIndex::IsForeignTypeUnit(const DebugNames::Entry ) const { + std::optional type_sig = entry.getForeignTUTypeSignature(); + if

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -48,20 +60,84 @@ DebugNamesDWARFIndex::GetUnits(const DebugNames _names) { return result; } +std::optional +DebugNamesDWARFIndex::IsForeignTypeUnit(const DebugNames::Entry ) const { + std::optional type_sig = entry.getForeignTUTypeSignature(); + if

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,202 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,202 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-10 Thread Pavel Labath via lldb-commits
labath wrote: > The code looks good, a few nits in comments. > > @labath: did we resolve the port race condition testing issue? We really > don't want this to be a flaky test on overloaded systems. It would be nice to > make sure this is solid before getting this in. The current version of

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-10 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,202 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb] Skip declaration DIEs in the debug_names index (PR #94744)

2024-06-07 Thread Pavel Labath via lldb-commits
labath wrote: I should add that I'm pretty sure the index entries pointing to signature declaration DIEs were not the cause of crashes in @ZequanWu CLs, after creating the test case (what I think is the worst possible situation) and stepping through the code, I realized that these DIEs would

[Lldb-commits] [lldb] [lldb] Skip declaration DIEs in the debug_names index (PR #94744)

2024-06-07 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/94744 This makes sure we try to process declaration DIEs that are erroneously present in the index. Until bd5c6367bd7, clang was emitting index entries for declaration DIEs with DW_AT_signature attributes. This makes

[Lldb-commits] [lldb] [lldb] Fix TestModuleLoadedNotifys API test to work correctly on most of Linux targets (PR #94672)

2024-06-07 Thread Pavel Labath via lldb-commits
@@ -118,6 +118,6 @@ def test_launch_notifications(self): # On Linux we get events for ld.so, [vdso], the binary and then all libraries. avg_solibs_added_per_event = round( -float(total_solibs_added) / float(total_modules_added_events) +

[Lldb-commits] [lldb] [lldb] Split ValueObject::CreateChildAtIndex into two functions (PR #94455)

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

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-06-06 Thread Pavel Labath via lldb-commits
@@ -2345,11 +2345,6 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; - ParsedDWARFTypeAttributes attrs(die); labath wrote: In case anyone's wondering, Putting this check back in would prevent the crash from

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-06-06 Thread Pavel Labath via lldb-commits
labath wrote: PSA: I've reverted Zequan's patch due to other bugs, so this change is now uncommitted again. Since this could go in as a separate change, I'm going to recreate a patch for it tomorrow (running out of time today), including the fix from #94400, if someone doesn't beat me to it.

[Lldb-commits] [lldb] 7fdbc30 - Revert "[lldb][DebugNames] Only skip processing of DW_AT_declarations for class/union types"

2024-06-06 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-06-06T16:08:58Z New Revision: 7fdbc30b445286f03203e16d0be067c25c6f0df0 URL: https://github.com/llvm/llvm-project/commit/7fdbc30b445286f03203e16d0be067c25c6f0df0 DIFF: https://github.com/llvm/llvm-project/commit/7fdbc30b445286f03203e16d0be067c25c6f0df0.diff LOG:

[Lldb-commits] [lldb] de3f1b6 - [lldb] Test case for the bug in #92328

2024-06-06 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-06-06T16:10:22Z New Revision: de3f1b6d68ab8a0e827db84b328803857a4f60df URL: https://github.com/llvm/llvm-project/commit/de3f1b6d68ab8a0e827db84b328803857a4f60df DIFF: https://github.com/llvm/llvm-project/commit/de3f1b6d68ab8a0e827db84b328803857a4f60df.diff LOG:

[Lldb-commits] [lldb] [lldb] Split ValueObject::CreateChildAtIndex into two functions (PR #94455)

2024-06-05 Thread Pavel Labath via lldb-commits
@@ -488,66 +488,85 @@ void ValueObject::SetNumChildren(uint32_t num_children) { m_children.SetChildrenCount(num_children); } -ValueObject *ValueObject::CreateChildAtIndex(size_t idx, - bool synthetic_array_member, -

[Lldb-commits] [lldb] [lldb] Split ValueObject::CreateChildAtIndex into two functions (PR #94455)

2024-06-05 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/94455 >From d3d666886d6397bb031a3ad88f147fb9b1e2b3ed Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 5 Jun 2024 10:21:10 + Subject: [PATCH] [lldb] Split ValueObject::CreateChildAtIndex into two functions

[Lldb-commits] [lldb] [lldb] Split ValueObject::CreateChildAtIndex into two functions (PR #94455)

2024-06-05 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/94455 The the function is doing two fairly different things, depending on how it is called. While this allows for some code reuse, it also makes it hard to override it correctly. Possibly for this reason

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-05 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,202 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-05 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,202 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-05 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,202 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-06-05 Thread Pavel Labath via lldb-commits
labath wrote: > > FWIW, I think this feature would be more useful and easier to implement if > > there was just a single setting called "connection url" or something, which > > accepted all of the usual lldb connection urls (unix-abstract-connect://, > > listen://, ...). > > Since a simple

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-06-04 Thread Pavel Labath via lldb-commits
labath wrote: (Zequan is OOO for three weeks, I can take over this (tomorrow) if needed.) https://github.com/llvm/llvm-project/pull/92328 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

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

[Lldb-commits] [lldb] [lldb] Add documentation for the max_children argument (PR #94192)

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

[Lldb-commits] [lldb] [lldb] Fixed TestEchoCommands.test running on a remote target (PR #94127)

2024-06-04 Thread Pavel Labath via lldb-commits
labath wrote: > > > * LLDB_PLATFORM_URL > > > > > > Is that an environment variable or a cmake variable? I don't see a single > > instance of that string in the entire lldb source tree. Are you sure that's > > not some downstream feature? > > Sorry for the confusion, the PR for the remote

[Lldb-commits] [lldb] [lldb] Improve identification of Dlang mangled names (PR #93881)

2024-06-04 Thread Pavel Labath via lldb-commits
labath wrote: > Fix is #94196. > > There isn't anything to log really, the function just didn't have a symbol on > Windows. AIUI, symtabs just aren't a thing on windows. You either have debug info, or you have the exported symbols (aka .dynsym). There's no inbetween state.

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

2024-06-03 Thread Pavel Labath via lldb-commits
@@ -768,3 +768,63 @@ TEST(DWARFExpression, ExtensionsDWO) { testExpressionVendorExtensions(dwo_module_sp, *dwo_dwarf_unit); } + +TEST_F(DWARFExpressionMockProcessTest, DW_OP_piece_file_addr) { + struct MockTarget : Target { labath wrote: The code I linked

[Lldb-commits] [lldb] [lldb] Fixed TestEchoCommands.test running on a remote target (PR #94127)

2024-06-03 Thread Pavel Labath via lldb-commits
labath wrote: > * LLDB_PLATFORM_URL Is that an environment variable or a cmake variable? I don't see a single instance of that string in the entire lldb source tree. Are you sure that's not some downstream feature? https://github.com/llvm/llvm-project/pull/94127

[Lldb-commits] [lldb] d00731c - [lldb] s/assertEquals/assertEqual in TestDAP_variables_children

2024-06-03 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-06-03T11:23:51+02:00 New Revision: d00731cb7fcc91047531069e029964a39935a5bb URL: https://github.com/llvm/llvm-project/commit/d00731cb7fcc91047531069e029964a39935a5bb DIFF: https://github.com/llvm/llvm-project/commit/d00731cb7fcc91047531069e029964a39935a5bb.diff

[Lldb-commits] [lldb] [lldb] Fixed TestEchoCommands.test running on a remote target (PR #94127)

2024-06-03 Thread Pavel Labath via lldb-commits
labath wrote: I'd like to try this myself. How can I configure my build to run this sort of thing? https://github.com/llvm/llvm-project/pull/94127 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb] Use packaging module instead of pkg_resources (PR #93712)

2024-06-03 Thread Pavel Labath via lldb-commits
labath wrote: > > That said, using a package designed (AIUI) for python versions for parsing > > versions of gcc/clang does strike me as somewhat... unusual, even if it > > does work, so _**maybe**_ there is case to be made for writing something > > custom (I'm not sure if we really need

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

2024-06-03 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Can't say I'm thrilled by the addition of a random virtual method, but I don't want to stand in the way. I'll just note that there is an alternative - in the form of writing a minimal real target in assembly. In fact, I think

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

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

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

2024-06-03 Thread Pavel Labath via lldb-commits
@@ -768,3 +768,63 @@ TEST(DWARFExpression, ExtensionsDWO) { testExpressionVendorExtensions(dwo_module_sp, *dwo_dwarf_unit); } + +TEST_F(DWARFExpressionMockProcessTest, DW_OP_piece_file_addr) { + struct MockTarget : Target { labath wrote: You could

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

2024-06-03 Thread Pavel Labath via lldb-commits
@@ -2153,26 +2152,42 @@ bool DWARFExpression::Evaluate( } break; - case Value::ValueType::FileAddress: - case Value::ValueType::HostAddress: -if (error_ptr) { - lldb::addr_t addr =

[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

2024-06-03 Thread Pavel Labath via lldb-commits
@@ -768,3 +768,63 @@ TEST(DWARFExpression, ExtensionsDWO) { testExpressionVendorExtensions(dwo_module_sp, *dwo_dwarf_unit); } + +TEST_F(DWARFExpressionMockProcessTest, DW_OP_piece_file_addr) { + struct MockTarget : Target { +MockTarget(Debugger , const ArchSpec _arch,

[Lldb-commits] [lldb] [lldb] Avoid (unlimited) GetNumChildren calls when printing values (PR #93946)

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

[Lldb-commits] [lldb] [lldb] Add documentation for the max_children argument (PR #94192)

2024-06-03 Thread Pavel Labath via lldb-commits
@@ -930,40 +930,55 @@ be implemented by the Python class): class SyntheticChildrenProvider: def __init__(self, valobj, internal_dict): - this call should initialize the Python object using valobj as the variable to provide synthetic children for - def

[Lldb-commits] [lldb] [lldb] Avoid (unlimited) GetNumChildren calls when printing values (PR #93946)

2024-06-03 Thread Pavel Labath via lldb-commits
labath wrote: > This seems reasonable. However, I note that on the page where we show how to > write synthetic child providers, we say: > > def num_children(self): this call should return the number of children that > you want your object to have > > That's actually not true - we pass the

[Lldb-commits] [lldb] [lldb] Avoid (unlimited) GetNumChildren calls when printing values (PR #93946)

2024-06-03 Thread Pavel Labath via lldb-commits
@@ -442,16 +443,19 @@ lldb::Format FormatManager::GetSingleItemFormat(lldb::Format vector_format) { } bool FormatManager::ShouldPrintAsOneLiner(ValueObject ) { + TargetSP target_sp = valobj.GetTargetSP(); // if settings say no oneline whatsoever - if

[Lldb-commits] [lldb] [lldb] Avoid (unlimited) GetNumChildren calls when printing values (PR #93946)

2024-06-03 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/93946 >From 1e25ef1cc5ff4d12a3e5b85c8ea7cd30a3e0908e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 31 May 2024 10:06:19 + Subject: [PATCH 1/2] [lldb] Avoid (unlimited) GetNumChildren calls when printing

[Lldb-commits] [lldb] [lldb] Add documentation for the max_children argument (PR #94192)

2024-06-03 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/94192 None >From 8bb7817d913cd8843fe8c90dcd7c8b70a0366994 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 3 Jun 2024 09:58:47 +0200 Subject: [PATCH] [lldb] Add documentation for the max_children argument ---

[Lldb-commits] [lldb] [lldb][test] Disable PIE for some API tests (PR #93808)

2024-06-03 Thread Pavel Labath via lldb-commits
@@ -3,4 +3,8 @@ # C_SOURCES := b.c # EXE := b.out +ifndef PIE + LDFLAGS := -no-pie labath wrote: Setting LD_EXTRAS is the typical way to pass linker flags from here (the same for other files) https://github.com/llvm/llvm-project/pull/93808

[Lldb-commits] [lldb] [lldb][test] Disable PIE for some API tests (PR #93808)

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

[Lldb-commits] [lldb] [lldb][test] Disable PIE for some API tests (PR #93808)

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

[Lldb-commits] [lldb] [lldb][test] Disable PIE for some API tests (PR #93808)

2024-06-03 Thread Pavel Labath via lldb-commits
labath wrote: > > Ok, I see now. It's an ld.bfd vs ld.lld thing. You probably have your clang > > configured to use lld. LLD does not put relocation addends into the data > > section (on both arm and intel). ld.bfd does, which is why this sort of > > happens to work there. Was your intention

[Lldb-commits] [lldb] [lldb][test] Add --target-os argument to dotest.py (PR #93887)

2024-06-03 Thread Pavel Labath via lldb-commits
labath wrote: Agreed. The reason code is looking like it does is because at some point in (now, pretty distant) past it was possible to `cd` into the test directory, type `make` and get the test binary out. Among other problems, this has caused duplicate code for determining various

[Lldb-commits] [lldb] [lldb] Fixed TestEchoCommands.test running on a remote target (PR #94127)

2024-06-03 Thread Pavel Labath via lldb-commits
labath wrote: I'm somewhat surprised to see this. I haven't been keeping track of all of the latest developments, but do I understand correctly that this implies that we support running (all?) shell tests on a remote system? https://github.com/llvm/llvm-project/pull/94127

[Lldb-commits] [lldb] [lldb] Avoid (unlimited) GetNumChildren calls when printing values (PR #93946)

2024-05-31 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/93946 >From 1e25ef1cc5ff4d12a3e5b85c8ea7cd30a3e0908e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 31 May 2024 10:06:19 + Subject: [PATCH] [lldb] Avoid (unlimited) GetNumChildren calls when printing

[Lldb-commits] [lldb] [lldb] Avoid (unlimited) GetNumChildren calls when printing values (PR #93946)

2024-05-31 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/93946 For some data formatters, even getting the number of children can be an expensive operations (e.g., needing to walk a linked list to determine the number of elements). This is then wasted work when we know we

[Lldb-commits] [lldb] [lldb][test] Disable PIE for some API tests (PR #93808)

2024-05-31 Thread Pavel Labath via lldb-commits
labath wrote: Ok, I see now. It's an ld.bfd vs ld.lld thing. You probably have your clang configured to use lld. LLD does not put relocation addends into the data section (on both arm and intel). ld.bfd does, which is why this sort of happens to work there. Was your intention to test with

[Lldb-commits] [lldb] [lldb][test] Add --sysroot argument to dotest.py (PR #93885)

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

[Lldb-commits] [lldb] [lldb][test] Add --target-os argument to dotest.py (PR #93887)

2024-05-31 Thread Pavel Labath via lldb-commits
labath wrote: Would it be possible to pass this automatically from the python process? Basically set `OS` to the value of `lldbplatformutil.getPlatform()` ? We could keep the existing exception for Android, although I don't think that anyone tests Android these days (your PRs sort of

[Lldb-commits] [lldb] [lldb][test] Add --make argument to dotest.py (PR #93883)

2024-05-31 Thread Pavel Labath via lldb-commits
@@ -40,7 +40,9 @@ def getMake(self, test_subdir, test_name): """Returns the invocation for GNU make. The first argument is a tuple of the relative path to the testcase and its filename stem.""" -if platform.system() == "FreeBSD" or

[Lldb-commits] [lldb] [lldb][test] Add --make argument to dotest.py (PR #93883)

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

[Lldb-commits] [lldb] [lldb][test] Add --make argument to dotest.py (PR #93883)

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

[Lldb-commits] [lldb] [lldb] Use packaging module instead of pkg_resources (PR #93712)

2024-05-31 Thread Pavel Labath via lldb-commits
labath wrote: > @labath Does your ✅ mean the > [debian](https://lab.llvm.org/buildbot/#/builders/68) bot has this package > installed? Affirmative. > Did a bit of digging around; it looks like at the very least the Arch Linux > python package and the Python docker container don't contain

[Lldb-commits] [lldb] [lldb][test] Add flags useful for remote cross-platform testing to dotest.py (PR #93800)

2024-05-30 Thread Pavel Labath via lldb-commits
labath wrote: It might be better to split this up per flag. For example, I don't see any issues with the --make flag, but I would like to understand more about why you need the --os flag (like, how it differs/why can't that be deduced from the platform name?) The sysroot arg is probably also

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-30 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb][test] Disable PIE for some API tests (PR #93808)

2024-05-30 Thread Pavel Labath via lldb-commits
labath wrote: What do the failures look like? I tried to force -pie on some of the tests that you modified, and I couldn't get them to fail. Is this somehow specific to remote execution? https://github.com/llvm/llvm-project/pull/93808 ___

[Lldb-commits] [lldb] [lldb] Fix 'session save' command on Windows (PR #93833)

2024-05-30 Thread Pavel Labath via lldb-commits
@@ -61,8 +61,14 @@ def test_session_save(self): self.assertFalse(res.Succeeded()) raw += self.raw_transcript_builder(cmd, res) -tf = tempfile.NamedTemporaryFile() -output_file = tf.name +fd, output_file = tempfile.mkstemp()

[Lldb-commits] [lldb] [lldb] Fixed the TestGdbRemotePlatformFile test running on a remote target (PR #93832)

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

[Lldb-commits] [lldb] a2bcb93 - [lldb] Attempt to fix TestCompletion on macos

2024-05-30 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-30T15:28:13Z New Revision: a2bcb932f3130c3c18ceb06872da9002f6845c4b URL: https://github.com/llvm/llvm-project/commit/a2bcb932f3130c3c18ceb06872da9002f6845c4b DIFF: https://github.com/llvm/llvm-project/commit/a2bcb932f3130c3c18ceb06872da9002f6845c4b.diff LOG:

[Lldb-commits] [lldb] [lldb] Fixed the TestDebuggerAPI test running on a remote target (PR #93829)

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

[Lldb-commits] [lldb] [lldb] Fixed the TestGdbRemoteLibrariesSvr4Support test running on a remote target (PR #93825)

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

[Lldb-commits] [lldb] [lldb] Fix module name tab completion (PR #93458)

2024-05-30 Thread Pavel Labath via lldb-commits
labath wrote: > Mind taking a look @labath ? I think I know how to fix this, just a sec. https://github.com/llvm/llvm-project/pull/93458 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb/DWARF] Follow DW_AT_signature when computing type contexts (PR #93675)

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

[Lldb-commits] [lldb] [lldb] Fix module name tab completion (PR #93458)

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

[Lldb-commits] [lldb] [lldb-dap] Don't call GetNumChildren on non-indexed synthetic variables (PR #93534)

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

[Lldb-commits] [lldb] [lldb] Use packaging module instead of pkg_resources (PR #93712)

2024-05-30 Thread Pavel Labath via lldb-commits
@@ -1,6 +1,6 @@ # System modules from functools import wraps -from pkg_resources import packaging +from packaging.version import parse labath wrote: ```suggestion from packaging import version ``` `parse` sounds too generic to be imported by base name alone

[Lldb-commits] [lldb] [lldb] Use packaging module instead of pkg_resources (PR #93712)

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

[Lldb-commits] [lldb] [lldb] Use packaging module instead of pkg_resources (PR #93712)

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

[Lldb-commits] [lldb] c7acca1 - [lldb] Fix collisions between two breakpad tests

2024-05-30 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-30T07:16:22Z New Revision: c7acca1cb06f3850590363fb729a3c03a43170dd URL: https://github.com/llvm/llvm-project/commit/c7acca1cb06f3850590363fb729a3c03a43170dd DIFF: https://github.com/llvm/llvm-project/commit/c7acca1cb06f3850590363fb729a3c03a43170dd.diff LOG:

[Lldb-commits] [lldb] [lldb] Remove DWARFDebugInfo DIERef footguns (PR #92894)

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

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-29 Thread Pavel Labath via lldb-commits
labath wrote: > @labath baseline for just attaching is approximately `3 s` for LLDB and `2.5 > s`. Baselines for attaching _and_ stopping at the breakpoint are in the > `break only` rows of the table. Thanks. I think this resolves my concerns about this patch. If we do find a particularly

[Lldb-commits] [lldb] [lldb/DWARF] Follow DW_AT_signature when computing type contexts (PR #93675)

2024-05-29 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/93675 This is necessary to correctly resolve the context within types, as the name of the type is only present in the type unit. (The DWARFYAML enthusiasm didn't last long, as it does not support type units. It can

[Lldb-commits] [lldb] [lldb/DWARF] Refactor DWARFDIE::Get{Decl, TypeLookup}Context (PR #93291)

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

[Lldb-commits] [lldb] [lldb/DWARF] Refactor DWARFDIE::Get{Decl, TypeLookup}Context (PR #93291)

2024-05-29 Thread Pavel Labath via lldb-commits
labath wrote: Good idea. I've added one quick test. I'll add more as I work on these functions further. PTAL https://github.com/llvm/llvm-project/pull/93291 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb/DWARF] Refactor DWARFDIE::Get{Decl, TypeLookup}Context (PR #93291)

2024-05-29 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/93291 >From 8463c2433609216499fe5d04c3397a3113071a49 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 24 May 2024 10:17:40 + Subject: [PATCH 1/2] [lldb/DWARF] Refactor DWARFDIE::Get{Decl,TypeLookup}Context

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-29 Thread Pavel Labath via lldb-commits
labath wrote: > Discussed with Pavel, I applied this change to #92328 so we can ensure the > DIEs from the index is always definition DIEs and avoid duplicate/expensive > checks later. To elaborate, I suggested Zequan does this, because I think there's consensus that this is a good way to

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-29 Thread Pavel Labath via lldb-commits
labath wrote: > I have a follow up question. It sounds like you've answered it yourself. :) With this kind of debug info, lldb would think this refers to a global entity and return it for queries like `::InnerState`. Without that entry, lldb will (correctly) look up the context in the DIE

[Lldb-commits] [lldb] [lldb] Remove DWARFDebugInfo DIERef footguns (PR #92894)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -195,17 +195,17 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( if (!ref) continue; -DWARFUnit *cu = m_debug_info.GetUnit(*ref); -if (!cu || !cu->Supports_DW_AT_APPLE_objc_complete_type()) { - incomplete_types.push_back(*ref); - continue; -

[Lldb-commits] [lldb] [lldb] Remove DWARFDebugInfo DIERef footguns (PR #92894)

2024-05-29 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/92894 >From e416051b09147b1083765795f711bb972e42a893 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 20 May 2024 14:51:52 + Subject: [PATCH] [lldb] Remove DWARFDebugInfo DIERef footguns DWARFDebugInfo

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,27 @@ +""" +Test that we can set up software breakpoint even if we failed to decode and execute instruction +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , labath wrote: Doesn't this return the size of

[Lldb-commits] [lldb] [lldb-dap] Add timestamps to protocol logs (PR #93540)

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

[Lldb-commits] [lldb] [lldb/DWARF] Bypass the compres^Wconstruction of DIERefs in debug_names (PR #93296)

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

[Lldb-commits] [lldb] [lldb/DWARF] Bypass the compres^Wconstruction of DIERefs in debug_names (PR #93296)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -183,27 +181,22 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( llvm::function_ref callback) { // Keep a list of incomplete types as fallback for when we don't find the // complete type. - DIEArray incomplete_types; + std::vector incomplete_types;

<    1   2   3   4   5   6   7   8   9   10   >