[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

2024-05-07 Thread Pavel Labath via lldb-commits
@@ -467,7 +465,7 @@ size_t UnwindAssemblyInstEmulation::WriteMemory( m_pushed_regs[reg_num] = addr; const int32_t offset = addr - m_initial_sp; m_curr_row->SetRegisterLocationToAtCFAPlusOffset(reg_num, offset, -

[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

2024-05-07 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/91321 A leaf function may not store the link register to stack, but we it can still end up being a non-zero frame if it gets interrupted by a signal. Currently, we were unable to unwind past this function because we

[Lldb-commits] [lldb] [lldb] Make SBType::GetDirectNestedType (mostly) work with typedefs (PR #91189)

2024-05-06 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/91189 >From 7de5cfcc3016a9e49e289e1009bcf4cc68aa445e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 6 May 2024 11:30:59 + Subject: [PATCH] [lldb] Make SBType::GetDirectNestedType (mostly) work with

[Lldb-commits] [lldb] [lldb] Make SBType::GetDirectNestedType (mostly) work with typedefs (PR #91189)

2024-05-06 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/91189 The implementation is straight-forward, but comes with a big disclaimer. See #91186 for details. >From 62f1917a75b4db82470cf5b2721097e6757d5dfb Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 6 May 2024

[Lldb-commits] [lldb] [lldb] Use Python script to generate SBLanguages.h (PR #90753)

2024-05-06 Thread Pavel Labath via lldb-commits
@@ -20,9 +20,19 @@ if(LLDB_ENABLE_LUA) set(lldb_lua_wrapper ${lua_bindings_dir}/LLDBWrapLua.cpp) endif() -lldb_tablegen(../../include/lldb/API/SBLanguages.h -gen-lldb-sbapi-dwarf-enum - SOURCE ${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def - TARGET

[Lldb-commits] [lldb] [lldb] Add SBType::GetByteAlign (PR #90960)

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

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

2024-05-06 Thread Pavel Labath via lldb-commits
@@ -1667,13 +1791,40 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext , } if (dwarf->GetUniqueDWARFASTTypeMap().Find( -unique_typename, die, unique_decl, attrs.byte_size.value_or(-1), -*unique_ast_entry_up)) { +

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

2024-05-06 Thread Pavel Labath via lldb-commits
@@ -154,6 +154,27 @@ static bool TagIsRecordType(dw_tag_t tag) { } } +static bool +IsForwardDeclaration(const lldb_private::plugin::dwarf::DWARFDIE , labath wrote: This shouldn't be necessary here, as this file has `using namespace

[Lldb-commits] [lldb] [lldb] fix step in AArch64 trampoline (PR #90783)

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

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

2024-05-03 Thread Pavel Labath via lldb-commits
labath wrote: > Is any of it testable? Good question. Though this is mostly meant to be "NFC" (with very large quotes), I can imagine us doing something like forcing the parsing of a specific type (`type lookup ` ?), and then checking that the module ast (`image dump ast`) does *not* contain

[Lldb-commits] [lldb] [lldb] Add SBType::GetByteAlign (PR #90960)

2024-05-03 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/90960 >From f6b47d2763b8217c329c6c5762ed75420ab3579b Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 3 May 2024 11:18:15 + Subject: [PATCH] [lldb] Add SBType::GetByteAlign lldb already mostly(*) tracks this

[Lldb-commits] [lldb] [lldb] Add SBType::GetByteAlign (PR #90960)

2024-05-03 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/90960 lldb already mostly(*) tracks this information. This just makes it available to the SB users. (*) It does not do that for typedefs right now see llvm.org/pr90958 >From 738c13a680b945a0aea1dc762e7122b5ce5608ad

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

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -60,6 +60,12 @@ class DWARFASTParser { virtual ConstString GetDIEClassTemplateParams(const DWARFDIE ) = 0; + // Return true if we found the definition DIE for it. is_forward_declaration + // is set to true if the parameter die is a declaration. + virtual bool +

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

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -1921,38 +1970,33 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext , GetClangASTImporter().SetRecordLayout(record_decl, layout); } } -} else if (clang_type_was_created) { - // Start the definition if the class is not

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

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -108,6 +108,9 @@ class DWARFASTParserClang : public lldb_private::plugin::dwarf::DWARFASTParser { lldb_private::ConstString GetDIEClassTemplateParams( const lldb_private::plugin::dwarf::DWARFDIE ) override; labath wrote: delete

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

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -1921,38 +1970,33 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext , GetClangASTImporter().SetRecordLayout(record_decl, layout); } } -} else if (clang_type_was_created) { - // Start the definition if the class is not

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

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -1632,6 +1669,96 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE ) { return qualified_name; } +bool DWARFASTParserClang::FindDefinitionDIE(const DWARFDIE , +bool _forward_declaration) { labath

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

2024-05-03 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Modulo comments, this makes sense to me (as much as that can ever be said about this code), but it could definitely use a second (third?) pair of eyes. Michael, what do you make of this? https://github.com/llvm/llvm-project/pull/90663

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

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -249,11 +270,10 @@ static void ForcefullyCompleteType(CompilerType type) { /// This function serves a similar purpose as RequireCompleteType above, but it /// avoids completing the type if it is not immediately necessary. It only /// ensures we _can_ complete the type

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

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

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

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -1632,6 +1669,96 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE ) { return qualified_name; } labath wrote: I am bothered by this name. I would expect that something called `FindDefinitionDIE` returns a DWARFDIE (or something along

[Lldb-commits] [lldb] [lldb] Fixed unresolved test lldb-api python_api/debugger/TestDebuggerAPI.py on x86_64 host (PR #90580)

2024-05-03 Thread Pavel Labath via lldb-commits
labath wrote: FWIW, I agree with @bulbazord. If the user specifies an explicit platform in the CreateTarget function, that platform should really take precedence over anything else. (If it were up to me, I would not even attempt matching other platforms in this case (and just refuse to create

[Lldb-commits] [lldb] [lldb] Fix Scalar::GetData for non-multiple-of-8-bits values (PR #90846)

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

[Lldb-commits] [lldb] f8fedfb - [lldb] Fix TestSharedLibStrippedSymbols for #90622

2024-05-03 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-03T06:30:49Z New Revision: f8fedfb6802173372ec923f99f31d4af810fbcb0 URL: https://github.com/llvm/llvm-project/commit/f8fedfb6802173372ec923f99f31d4af810fbcb0 DIFF: https://github.com/llvm/llvm-project/commit/f8fedfb6802173372ec923f99f31d4af810fbcb0.diff LOG:

[Lldb-commits] [lldb] LLDB Debuginfod tests and a fix or two (PR #90622)

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

[Lldb-commits] [lldb] LLDB Debuginfod tests and a fix or two (PR #90622)

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,183 @@ +import os +import shutil +import tempfile + +import lldb +from lldbsuite.test.decorators import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * + + +""" +Test support for the DebugInfoD network symbol acquisition protocol.

[Lldb-commits] [lldb] LLDB Debuginfod tests and a fix or two (PR #90622)

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,183 @@ +import os +import shutil +import tempfile + +import lldb +from lldbsuite.test.decorators import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * + + +""" +Test support for the DebugInfoD network symbol acquisition protocol.

[Lldb-commits] [lldb] LLDB Debuginfod tests and a fix or two (PR #90622)

2024-05-03 Thread Pavel Labath via lldb-commits
@@ -44,6 +44,10 @@ lldb_build_intel_pt = '@LLDB_BUILD_INTEL_PT@' if lldb_build_intel_pt == '1': config.enabled_plugins.append('intel-pt') +llvm_enable_curl = '@LLVM_ENABLE_CURL@' labath wrote: Emulating the curses dependency approach would probably be

[Lldb-commits] [lldb] LLDB Debuginfod tests and a fix or two (PR #90622)

2024-05-03 Thread Pavel Labath via lldb-commits
labath wrote: f8fedfb6802173372ec923f99f31d4af810fbcb0 ought to fix `TestSharedLibStrippedSymbols.py`. The rest might be due to the test being too strict with what it expects of a UUID. https://github.com/llvm/llvm-project/pull/90622 ___

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

2024-05-02 Thread Pavel Labath via lldb-commits
@@ -1654,6 +1660,99 @@ bool SymbolFileDWARF::CompleteType(CompilerType _type) { return false; } +DWARFDIE SymbolFileDWARF::FindDefinitionDIE(const DWARFDIE ) { + auto def_die_it = GetDeclarationDIEToDefinitionDIE().find(die.GetDIE()); + if (def_die_it !=

[Lldb-commits] [lldb] [lldb] fix step in AArch64 trampoline (PR #90783)

2024-05-02 Thread Pavel Labath via lldb-commits
labath wrote: > So no need to change the structure of this PR, but do correct me if any of my > assumptions are incorrect there. The `DynamicLoaderPOSIXDYLD` is only used on ELF systems anyway (we might as well rename it do `DynamicLoaderELF`), so this actually lines up fairly well.

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

2024-05-02 Thread Pavel Labath via lldb-commits
@@ -1654,6 +1660,99 @@ bool SymbolFileDWARF::CompleteType(CompilerType _type) { return false; } +DWARFDIE SymbolFileDWARF::FindDefinitionDIE(const DWARFDIE ) { + auto def_die_it = GetDeclarationDIEToDefinitionDIE().find(die.GetDIE()); + if (def_die_it !=

[Lldb-commits] [lldb] [lldb] Fix Scalar::GetData for non-multiple-of-8-bits values (PR #90846)

2024-05-02 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/90846 >From 258654adb8ae34626e58c35f04e1b63fa9100f4a Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 2 May 2024 10:49:13 + Subject: [PATCH] [lldb] Fix Scalar::GetData for non-multiple-of-8-bits values It

[Lldb-commits] [lldb] [lldb] Fix Scalar::GetData for non-multiple-of-8-bits values (PR #90846)

2024-05-02 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/90846 It was aligning the byte size down. Now it aligns up. This manifested itself as SBTypeStaticField::GetConstantValue returning a zero-sized value for `bool` fields (because clang represents bool as a 1-bit

[Lldb-commits] [lldb] [lldb] fix step in AArch64 trampoline (PR #90783)

2024-05-02 Thread Pavel Labath via lldb-commits
@@ -506,9 +506,29 @@ DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(Thread , Target = thread.GetProcess()->GetTarget(); const ModuleList = target.GetImages(); - images.FindSymbolsWithNameAndType(sym_name, eSymbolTypeCode, target_symbols); - if

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

2024-05-02 Thread Pavel Labath via lldb-commits
@@ -533,9 +540,16 @@ class SymbolFileDWARF : public SymbolFileCommon { NameToOffsetMap m_function_scope_qualified_name_map; std::unique_ptr m_ranges; UniqueDWARFASTTypeMap m_unique_ast_type_map; + // A map from DIE to lldb_private::Type. For record type, the key might

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

2024-05-02 Thread Pavel Labath via lldb-commits
@@ -533,9 +540,16 @@ class SymbolFileDWARF : public SymbolFileCommon { NameToOffsetMap m_function_scope_qualified_name_map; std::unique_ptr m_ranges; UniqueDWARFASTTypeMap m_unique_ast_type_map; + // A map from DIE to lldb_private::Type. For record type, the key might

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

2024-05-02 Thread Pavel Labath via lldb-commits
@@ -1654,6 +1660,99 @@ bool SymbolFileDWARF::CompleteType(CompilerType _type) { return false; } +DWARFDIE SymbolFileDWARF::FindDefinitionDIE(const DWARFDIE ) { + auto def_die_it = GetDeclarationDIEToDefinitionDIE().find(die.GetDIE()); + if (def_die_it !=

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

2024-05-02 Thread Pavel Labath via lldb-commits
@@ -1631,13 +1631,19 @@ bool SymbolFileDWARF::CompleteType(CompilerType _type) { return true; } - DWARFDIE dwarf_die = GetDIE(die_it->getSecond()); + DWARFDIE dwarf_die = FindDefinitionDIE(GetDIE(die_it->getSecond())); if (dwarf_die) { // Once we start

[Lldb-commits] [lldb] [LLDB][ELF] Fix section unification to not just use names. (PR #90099)

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

[Lldb-commits] [lldb] [LLDB][ELF] Fix section unification to not just use names. (PR #90099)

2024-04-29 Thread Pavel Labath via lldb-commits
labath wrote: > > I saw that, but a textual test is definitely preferable, particularly after > > the linux xz fiasco. This wouldn't be the first test binary in our repo, > > but in this case, I think it actually adds a lot of value, since yaml2obj > > operates on the same level as what you

[Lldb-commits] [lldb] [LLDB][ELF] Fix section unification to not just use names. (PR #90099)

2024-04-29 Thread Pavel Labath via lldb-commits
@@ -1854,6 +1854,49 @@ class VMAddressProvider { }; } +namespace { + // We have to do this because ELF doesn't have section IDs, and also + // doesn't require section names to be unique. (We use the section index + // for section IDs, but that isn't guaranteed to be the

[Lldb-commits] [lldb] [LLDB][ELF] Fix section unification to not just use names. (PR #90099)

2024-04-26 Thread Pavel Labath via lldb-commits
labath wrote: > > [this](https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/yaml2obj/ELF/duplicate-section-names.yaml) > > test seems to indicate that's possible (the trick appears to me in `(n)` > > name tag suffixes). Can you give that a shot? > > I've actually just included a

[Lldb-commits] [lldb] [LLDB][ELF] Fix section unification to not just use names. (PR #90099)

2024-04-26 Thread Pavel Labath via lldb-commits
@@ -1854,6 +1854,49 @@ class VMAddressProvider { }; } +namespace { + // We have to do this because ELF doesn't have section IDs, and also + // doesn't require section names to be unique. (We use the section index + // for section IDs, but that isn't guaranteed to be the

[Lldb-commits] [lldb] [LLDB][ELF] Fix section unification to not just use names. (PR #90099)

2024-04-26 Thread Pavel Labath via lldb-commits
labath wrote: > > Can we add a test for this with obj2yaml? > > Not sure what you're thinking here. We can't use `yaml2obj` to generate an > object with this problem because that tool assumes symbols are in a uniquely > named section

[Lldb-commits] [lldb] 0d56d88 - [lldb] Update eh-frame-dwarf-unwind-abort.test for a change in llvm assembler

2024-04-26 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-04-26T07:13:33Z New Revision: 0d56d88d9fc48f1b97a641422ee23cc6eabcd6ef URL: https://github.com/llvm/llvm-project/commit/0d56d88d9fc48f1b97a641422ee23cc6eabcd6ef DIFF: https://github.com/llvm/llvm-project/commit/0d56d88d9fc48f1b97a641422ee23cc6eabcd6ef.diff LOG:

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

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

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

2024-04-24 Thread Pavel Labath via lldb-commits
@@ -325,6 +330,79 @@ lldb::SBTypeMemberFunction SBType::GetMemberFunctionAtIndex(uint32_t idx) { return sb_func_type; } +SBTypeStaticField::SBTypeStaticField() { LLDB_INSTRUMENT_VA(this); } + +SBTypeStaticField::SBTypeStaticField(lldb_private::CompilerDecl decl) +:

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

2024-04-24 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/89730 >From 091db4a89de2678fbdcc2db3051f34eeb8cc0cf2 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 23 Apr 2024 08:50:31 + Subject: [PATCH 1/3] [lldb] Add SB API to access static constexpr member values

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

2024-04-23 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/89730 >From 091db4a89de2678fbdcc2db3051f34eeb8cc0cf2 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 23 Apr 2024 08:50:31 + Subject: [PATCH 1/2] [lldb] Add SB API to access static constexpr member values

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

2024-04-23 Thread Pavel Labath via lldb-commits
@@ -1156,6 +1159,10 @@ CompilerType TypeSystemClang::GetTypeForDecl(ObjCInterfaceDecl *decl) { return GetType(getASTContext().getObjCInterfaceType(decl)); } +CompilerType TypeSystemClang::GetTypeForDecl(clang::ValueDecl *value_decl) { labath wrote:

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

2024-04-23 Thread Pavel Labath via lldb-commits
@@ -27,6 +27,7 @@ class Task { enum E : unsigned char {} e; union U { } u; +static constexpr long static_constexpr_field = 47; labath wrote: Good idea. https://github.com/llvm/llvm-project/pull/89730

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

2024-04-23 Thread Pavel Labath via lldb-commits
@@ -107,6 +107,35 @@ class SBTypeMemberFunction { lldb::TypeMemberFunctionImplSP m_opaque_sp; }; +class LLDB_API SBTypeStaticField { +public: + SBTypeStaticField(); + + SBTypeStaticField(const lldb::SBTypeStaticField ); + lldb::SBTypeStaticField =(const

[Lldb-commits] [lldb] [lldb] Add SB API to access static constexpr member values (PR #89730)

2024-04-23 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/89730 The main change is the addition of a new SBTypeStaticField class, representing a static member of a class. It can be retrieved created through SBType::GetStaticFieldWithName. It contains several methods

[Lldb-commits] [lldb] dbcfb43 - [lldb/test] Rename a function

2024-04-23 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-04-23T09:11:58Z New Revision: dbcfb434a9c7fea194c7b1f7f04f0947f88dbc85 URL: https://github.com/llvm/llvm-project/commit/dbcfb434a9c7fea194c7b1f7f04f0947f88dbc85 DIFF: https://github.com/llvm/llvm-project/commit/dbcfb434a9c7fea194c7b1f7f04f0947f88dbc85.diff LOG:

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

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

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-19 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/89183 >From 80ba4f24cdfe8b5f2aa44a016ea69ad08f56d558 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 18 Apr 2024 07:34:45 + Subject: [PATCH 1/2] [lldb] Make SBType::FindDirectNestedType work with expression

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-19 Thread Pavel Labath via lldb-commits
labath wrote: > @Michael137 suggested that I check that performance of `FindDirectNestedType` > doesn't regress (at least for my use case), since I have custom > instrumentation in my formatter. I can confirm that 3 versions of this > function (#68705, #74786, and this PR) exhibit the same

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-19 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/89183 >From 80ba4f24cdfe8b5f2aa44a016ea69ad08f56d558 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 18 Apr 2024 07:34:45 + Subject: [PATCH 1/2] [lldb] Make SBType::FindDirectNestedType work with expression

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-18 Thread Pavel Labath via lldb-commits
labath wrote: > > > One thing I'd like to get feedback on is whether this should be looking > > > into base classes. The discussion on the original PR focuses on lexically > > > nested types, but going through base classes (following usual language > > > rules) is another form of nesting.

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-18 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/89183 >From 80ba4f24cdfe8b5f2aa44a016ea69ad08f56d558 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 18 Apr 2024 07:34:45 + Subject: [PATCH] [lldb] Make SBType::FindDirectNestedType work with expression

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-18 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/89183 >From c24f35cb4f568c42da9a11c7d91cfbaf7bf2f59e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 18 Apr 2024 07:34:45 + Subject: [PATCH] [lldb] Make SBType::FindDirectNestedType work with expression

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-18 Thread Pavel Labath via lldb-commits
labath wrote: In terms of #68705, I think this will fix the issue where the data formatter works on `frame var foo` but not `expr -- foo`. At least that's the problem I ran into when trying to use this in my own formatter.. One thing I'd like to get feedback on is whether this should be

[Lldb-commits] [lldb] [lldb] Make SBType::FindDirectNestedType work with expression ASTs (PR #89183)

2024-04-18 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/89183 The types we get out of expressions will not have an associated symbol file, so the current method of looking up the type will fail. Instead, I plumb the query through the TypeSystem class. This correctly finds

[Lldb-commits] [lldb] 3c721b9 - Revert "[lldb] Fix evaluation of expressions with static initializers (#89063)"

2024-04-18 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-04-18T07:30:18Z New Revision: 3c721b90d363bf73b78467f6e86c879235bac1b2 URL: https://github.com/llvm/llvm-project/commit/3c721b90d363bf73b78467f6e86c879235bac1b2 DIFF: https://github.com/llvm/llvm-project/commit/3c721b90d363bf73b78467f6e86c879235bac1b2.diff LOG:

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

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

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Pavel Labath via lldb-commits
@@ -572,9 +572,14 @@ ModuleSP DynamicLoaderPOSIXDYLD::LoadInterpreterModule() { ModuleSpec module_spec(file, target.GetArchitecture()); if (ModuleSP module_sp = target.GetOrCreateModule(module_spec, -true /* notify */))

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Pavel Labath via lldb-commits
labath wrote: So, could the fix be as simple as passing notify=false in the first call ? https://github.com/llvm/llvm-project/pull/88792 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb] Fix evaluation of expressions with static initializers (PR #89063)

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

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Pavel Labath via lldb-commits
labath wrote: > > > > why not just call ModulesDidLoad and delegate this (and possibly other > > > > binary-just-loaded) behaviors to it? > > > > > > > > > That's what I did first, but it breaks the test > > > `TestModuleLoadedNotifys.ModuleLoadedNotifysTestCase.test_launch_notifications` >

[Lldb-commits] [lldb] [lldb] Fix evaluation of expressions with static initializers (PR #89063)

2024-04-17 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/89063 After 281d71604f418eb952e967d9dc4b26241b7f96a, llvm generates 32-bit relocations, which overflow when we load these objects into high memory. Interestingly, setting the code model to "large" does not help here

[Lldb-commits] [lldb] [lldb/linux] Make sure the process continues running after a detach (PR #88494)

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

[Lldb-commits] [lldb] [lldb/linux] Make sure the process continues running after a detach (PR #88494)

2024-04-16 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,48 @@ +#include "pseudo_barrier.h" +#include +#include +#include +#include +#include +#include + +pseudo_barrier_t barrier; + +constexpr size_t nthreads = 5; +volatile bool wait_for_debugger_flag = true; + +void break_here() {} + +void tfunc() { +

[Lldb-commits] [lldb] [lldb/linux] Make sure the process continues running after a detach (PR #88494)

2024-04-16 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,59 @@ +""" +Test that the process continues running after we detach from it. +""" + +import lldb +import time +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-16 Thread Pavel Labath via lldb-commits
labath wrote: > > why not just call ModulesDidLoad and delegate this (and possibly other > > binary-just-loaded) behaviors to it? > > That's what I did first, but it breaks the test > `TestModuleLoadedNotifys.ModuleLoadedNotifysTestCase.test_launch_notifications` > because of extra

[Lldb-commits] [lldb] [lldb/linux] Make sure the process continues running after a detach (PR #88494)

2024-04-12 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/88494 >From c6b2c5e58321e72155b8c45cd3591487c1cafacf Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 6 Apr 2024 17:51:12 + Subject: [PATCH] [lldb/linux] Make sure the process continues running after a

[Lldb-commits] [lldb] [lldb/linux] Make sure the process continues running after a detach (PR #88494)

2024-04-12 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/88494 >From 8a9837bd306377ec44efdb8a4ff25f0132496cc0 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 6 Apr 2024 17:51:12 + Subject: [PATCH] [lldb/linux] Make sure the process continues running after a

[Lldb-commits] [lldb] [lldb/linux] Make sure the process continues running after a detach (PR #88494)

2024-04-12 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/88494 Whenever an inferior thread stops, lldb-server sends a SIGSTOP to all other threads in the process to force them to stop as well. If those threads stop on their own before they get a signal, this SIGSTOP will

[Lldb-commits] [lldb] 78b00c1 - Revert "[lldb] Improve maintainability and readability for ValueObject methods (#75865)"

2024-01-23 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-01-24T07:12:52Z New Revision: 78b00c116be8b3b53ff13552e31eb305b11cb169 URL: https://github.com/llvm/llvm-project/commit/78b00c116be8b3b53ff13552e31eb305b11cb169 DIFF: https://github.com/llvm/llvm-project/commit/78b00c116be8b3b53ff13552e31eb305b11cb169.diff LOG:

[Lldb-commits] [lldb] Ensure that the executable module is ModuleList[0] (PR #78360)

2024-01-18 Thread Pavel Labath via lldb-commits
labath wrote: > Will the value of ObjectFile::GetType ever be meaningful, then? It's partially meaningful. eTypeCoreFile, eTypeObjectFile and eTypeExecutable (when it is set) should mean what they say. The problem is with eTypeSharedLibrary (and to a lesser degree with eTypeDebugInfo). Just

[Lldb-commits] [lldb] Ensure that the executable module is ModuleList[0] (PR #78360)

2024-01-17 Thread Pavel Labath via lldb-commits
labath wrote: The problem is that linux/elf does not really have hard line between shared libraries, (position-independent) executables and the dynamic linker. they all have `e_type = ET_DYN` in their header. It is possible to create a shared library that can also be executed (unless one is

[Lldb-commits] [lldb] 15311d5 - [lldb] Skip TestExecutableFirst.test_executable_is_first_before_run on ELF

2024-01-17 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-01-17T10:36:44Z New Revision: 15311d5822f5fcaf53bc7cfc728ad2b477a430e4 URL: https://github.com/llvm/llvm-project/commit/15311d5822f5fcaf53bc7cfc728ad2b477a430e4 DIFF: https://github.com/llvm/llvm-project/commit/15311d5822f5fcaf53bc7cfc728ad2b477a430e4.diff LOG:

[Lldb-commits] [lldb] 14268ad - [lldb] Skip part of TestDataFormatterAdv (#72233)

2024-01-15 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-01-15T12:49:24Z New Revision: 14268ad2a2ea0b3bbe6b767d67ace1d0ae992a6d URL: https://github.com/llvm/llvm-project/commit/14268ad2a2ea0b3bbe6b767d67ace1d0ae992a6d DIFF: https://github.com/llvm/llvm-project/commit/14268ad2a2ea0b3bbe6b767d67ace1d0ae992a6d.diff LOG:

[Lldb-commits] [lldb] [lldb] Fix a quirk in SBValue::GetDescription (PR #75793)

2023-12-19 Thread Pavel Labath via lldb-commits
labath wrote: Fixed by https://github.com/llvm/llvm-project/pull/75908. https://github.com/llvm/llvm-project/pull/75793 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix TestSBValueSynthetic on windows (PR #75908)

2023-12-19 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/75908 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix TestSBValueSynthetic on windows (PR #75908)

2023-12-19 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/75908 >From b8dbd31b95058f8098f9ef57c540a1635a9a1fde Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 19 Dec 2023 09:37:20 +0100 Subject: [PATCH 1/2] [lldb] Fix TestSBValueSynthetic on windows We don't have a

[Lldb-commits] [lldb] [lldb] Fix TestSBValueSynthetic on windows (PR #75908)

2023-12-19 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/75908 We don't have a std::vector formatter on windows, so use a custom formatter in this test to avoid relying on std::vector. >From b8dbd31b95058f8098f9ef57c540a1635a9a1fde Mon Sep 17 00:00:00 2001 From: Pavel

[Lldb-commits] [lldb] [lldb] Fix a quirk in SBValue::GetDescription (PR #75793)

2023-12-18 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/75793 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix a quirk in SBValue::GetDescription (PR #75793)

2023-12-18 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/75793 The function was using the default version of ValueObject::Dump, which has a default of using the synthetic-ness of the top-level value for determining whether to print _all_ values as synthetic. This resulted

[Lldb-commits] [lldb] d4c3c28 - [lldb] Fix Process::SyncIOHandler

2023-09-08 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-09-08T10:17:16+02:00 New Revision: d4c3c2872ff6acd75ee3e0083fa62b2a1cc5310c URL: https://github.com/llvm/llvm-project/commit/d4c3c2872ff6acd75ee3e0083fa62b2a1cc5310c DIFF: https://github.com/llvm/llvm-project/commit/d4c3c2872ff6acd75ee3e0083fa62b2a1cc5310c.diff

[Lldb-commits] [lldb] b71ac7e - [lldb/test] Fix command-disassemble-mixed.c

2023-07-18 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-07-18T10:17:09+02:00 New Revision: b71ac7eea4c5851203432dde94241d56301a9398 URL: https://github.com/llvm/llvm-project/commit/b71ac7eea4c5851203432dde94241d56301a9398 DIFF: https://github.com/llvm/llvm-project/commit/b71ac7eea4c5851203432dde94241d56301a9398.diff

[Lldb-commits] [lldb] afe8f20 - Revert "[lldb] Rate limit progress reports -- different approach [WIP-ish]"

2023-06-16 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-06-16T09:09:56+02:00 New Revision: afe8f20bb8dd1808cae542eb7ba0fc11a7886918 URL: https://github.com/llvm/llvm-project/commit/afe8f20bb8dd1808cae542eb7ba0fc11a7886918 DIFF: https://github.com/llvm/llvm-project/commit/afe8f20bb8dd1808cae542eb7ba0fc11a7886918.diff

[Lldb-commits] [lldb] 244fcec - [lldb] Fix MainLoopTest for changes in D152712

2023-06-16 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-06-16T09:05:27+02:00 New Revision: 244fcecb90fa7a3fb710ca5768d3bae9af5868cc URL: https://github.com/llvm/llvm-project/commit/244fcecb90fa7a3fb710ca5768d3bae9af5868cc DIFF: https://github.com/llvm/llvm-project/commit/244fcecb90fa7a3fb710ca5768d3bae9af5868cc.diff

[Lldb-commits] [lldb] c308534 - [lldb] Rate limit progress reports -- different approach [WIP-ish]

2023-06-16 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-06-16T08:28:29+02:00 New Revision: c30853460da7446f92bc1e516f9cbe2c5df6e136 URL: https://github.com/llvm/llvm-project/commit/c30853460da7446f92bc1e516f9cbe2c5df6e136 DIFF: https://github.com/llvm/llvm-project/commit/c30853460da7446f92bc1e516f9cbe2c5df6e136.diff

[Lldb-commits] [lldb] 09ba7b6 - [lldb] Add a sleep to TestObjectFileJSON

2023-04-14 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-04-14T14:37:32+02:00 New Revision: 09ba7b605327812cfcec4f3c01d7fc232dee651d URL: https://github.com/llvm/llvm-project/commit/09ba7b605327812cfcec4f3c01d7fc232dee651d DIFF: https://github.com/llvm/llvm-project/commit/09ba7b605327812cfcec4f3c01d7fc232dee651d.diff

[Lldb-commits] [lldb] e289b53 - [lldb] Remove unused functions from RegisterContextLinux_x86

2023-04-05 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-04-05T20:16:48+02:00 New Revision: e289b53f4d9bffd71613d6f91747bf9bda0ae352 URL: https://github.com/llvm/llvm-project/commit/e289b53f4d9bffd71613d6f91747bf9bda0ae352 DIFF: https://github.com/llvm/llvm-project/commit/e289b53f4d9bffd71613d6f91747bf9bda0ae352.diff

[Lldb-commits] [lldb] af9e1fa - [lldb] Detach the child process when stepping over a fork

2023-04-05 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-04-05T13:25:43+02:00 New Revision: af9e1fa178433653eb3d36c42cad016449873cfc URL: https://github.com/llvm/llvm-project/commit/af9e1fa178433653eb3d36c42cad016449873cfc DIFF: https://github.com/llvm/llvm-project/commit/af9e1fa178433653eb3d36c42cad016449873cfc.diff

[Lldb-commits] [lldb] 933d3ee - [lldb] Drop RegisterInfoInterface::GetDynamicRegisterInfo

2023-04-05 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-04-05T13:25:43+02:00 New Revision: 933d3ee60007f5798319cad05b981cb265578ba0 URL: https://github.com/llvm/llvm-project/commit/933d3ee60007f5798319cad05b981cb265578ba0 DIFF: https://github.com/llvm/llvm-project/commit/933d3ee60007f5798319cad05b981cb265578ba0.diff

[Lldb-commits] [lldb] e64cc75 - [lldb-server/linux] Use waitpid(-1) to collect inferior events

2023-03-30 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-03-30T12:48:36+02:00 New Revision: e64cc756819d567f453467bf7cc16599ad296fdd URL: https://github.com/llvm/llvm-project/commit/e64cc756819d567f453467bf7cc16599ad296fdd DIFF: https://github.com/llvm/llvm-project/commit/e64cc756819d567f453467bf7cc16599ad296fdd.diff

[Lldb-commits] [lldb] 0165b73 - [lldb] Relax expectation on TestMainThreadExit

2023-03-21 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2023-03-21T11:26:32+01:00 New Revision: 0165b73be37c2330ae196799cb3d93445532072b URL: https://github.com/llvm/llvm-project/commit/0165b73be37c2330ae196799cb3d93445532072b DIFF: https://github.com/llvm/llvm-project/commit/0165b73be37c2330ae196799cb3d93445532072b.diff

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