[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-02-29 Thread Alex Langford via lldb-commits
bulbazord wrote: Why not increase TypeSystem::GetNumChildren to return a size_t instead? https://github.com/llvm/llvm-project/pull/83501 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-comm

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Alex Langford via lldb-commits
bulbazord wrote: > I would almost vote to change everything to `uint64_t` except for the public > API since we can't change the API without breaking. Though I winder if we can > actually change this one: > > ``` > uint64_t SBValue::GetNumChildren(); > ``` > > Since the return value isn't mang

[Lldb-commits] [lldb] [lldb] Add ability to detect darwin host linker version to xfail tests (PR #83941)

2024-03-04 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/83941 When Apple released its new linker, it had a subtle bug that caused LLDB's TLS tests to fail. Unfortunately this means that TLS tests are not going to work on machines that have affected versions of the linker

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-05 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I'm a little disappointed but I think this is the right step to take. Thanks! https://github.com/llvm/llvm-project/pull/83501 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lis

[Lldb-commits] [lldb] [lldb] Remove unused #includes in ClangModulesDeclVendor.cpp (PR #84262)

2024-03-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/84262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Disable shell tests affected by ld64 bug (PR #84246)

2024-03-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Thanks for taking care of that! https://github.com/llvm/llvm-project/pull/84246 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-comm

[Lldb-commits] [lldb] [lldb] Add ability to detect darwin host linker version to xfail tests (PR #83941)

2024-03-06 Thread Alex Langford via lldb-commits
bulbazord wrote: > To start with option #​1, I created #84246 Just took a look, thanks for taking care of that. I'll address your feedback (or just look at what you did in the other PR) and update this tomorrow. https://github.com/llvm/llvm-project/pull/83941 _

[Lldb-commits] [lldb] [lldb] Disable shell tests affected by ld_new bug (PR #84246)

2024-03-07 Thread Alex Langford via lldb-commits
bulbazord wrote: > Called it `ld_new-bug`. If it's not the TLS bug, I wonder if the version > range is correct. The TLS bug in the new linker is explicitly from versions 1000 to 1109. If this isn't related to TLS, we'll need to confirm with the linker folks on our side. https://github.com/llv

[Lldb-commits] [lldb] [lldb] Add ability to detect darwin host linker version to xfail tests (PR #83941)

2024-03-07 Thread Alex Langford via lldb-commits
https://github.com/bulbazord updated https://github.com/llvm/llvm-project/pull/83941 >From a72d9d259b441c338399340d630ed7a64c1e228a Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Mon, 4 Mar 2024 14:17:20 -0800 Subject: [PATCH] [lldb] Add ability to detect darwin host linker version to xfai

[Lldb-commits] [lldb] Fix MSVC build issues (PR #84362)

2024-03-07 Thread Alex Langford via lldb-commits
@@ -168,8 +168,8 @@ class ConstString { // Implicitly convert \class ConstString instances to \class StringRef. operator llvm::StringRef() const { return GetStringRef(); } - // Implicitly convert \class ConstString instances to \class std::string_view. - operator std::s

[Lldb-commits] [lldb] [lldb] Add ability to detect darwin host linker version to xfail tests (PR #83941)

2024-03-07 Thread Alex Langford via lldb-commits
https://github.com/bulbazord updated https://github.com/llvm/llvm-project/pull/83941 >From 89d1c201636403bb26f12cf9681cbaf86b5c943b Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Mon, 4 Mar 2024 14:17:20 -0800 Subject: [PATCH] [lldb] Add ability to detect darwin host linker version to xfai

[Lldb-commits] [lldb] [lldb] Add ability to detect darwin host linker version to xfail tests (PR #83941)

2024-03-07 Thread Alex Langford via lldb-commits
https://github.com/bulbazord closed https://github.com/llvm/llvm-project/pull/83941 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. +1 to Adrian's suggestion. LGTM since you've addressed that now https://github.com/llvm/llvm-project/pull/85342 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/c

[Lldb-commits] [lldb] [lldb] Omit --show-globals in `help target var` (PR #85855)

2024-03-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Big fan of centralizing the options here. I had one question about automating another portion of this, but otherwise LGTM. https://github.com/llvm/llvm-project/pull/85855 ___ lldb-commits mailing list lldb-commi

[Lldb-commits] [lldb] [lldb] Omit --show-globals in `help target var` (PR #85855)

2024-03-19 Thread Alex Langford via lldb-commits
@@ -50,6 +50,11 @@ static constexpr OptionDefinition g_variable_options[] = { "Specify a summary string to use to format the variable output."}, }; +static constexpr auto g_num_frame_options = 4; bulbazord wrote: Is this number computable? Or does it nee

[Lldb-commits] [lldb] [lldb] Omit --show-globals in `help target var` (PR #85855)

2024-03-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/85855 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Omit --show-globals in `help target var` (PR #85855)

2024-03-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/85855 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Invert relationship between Process and AddressableBits (PR #85858)

2024-03-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/85858 AddressableBits is in the Utility module of LLDB. It currently directly refers to Process, which is from the Target LLDB module. This is a layering violation which concretely means that it is impossible to lin

[Lldb-commits] [lldb] [lldb] Remove process restart prompt from TestSourceManager (PR #85861)

2024-03-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/85861 In TestSourceManager, test_artificial_source_location will give the process restart prompt if you run the test individually. The reason is that we run the process twice: first using a convenience function to r

[Lldb-commits] [lldb] [lldb] Remove process restart prompt from TestSourceManager (PR #85861)

2024-03-19 Thread Alex Langford via lldb-commits
@@ -323,13 +323,13 @@ def test_artificial_source_location(self): ) self.expect( -"run", -RUN_SUCCEEDED, +"thread info", substrs=[f"{src_file}:0", "stop reason = breakpoint"] +) +self.expect( +"fra

[Lldb-commits] [lldb] [lldb] Remove process restart prompt from TestSourceManager (PR #85861)

2024-03-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord updated https://github.com/llvm/llvm-project/pull/85861 >From c24630bbccd3d53079314f7dc6393ffa27ea192f Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Tue, 19 Mar 2024 13:18:23 -0700 Subject: [PATCH 1/2] [lldb] Remove process restart prompt from TestSourceManage

[Lldb-commits] [lldb] [lldb] Remove process restart prompt from TestSourceManager (PR #85861)

2024-03-20 Thread Alex Langford via lldb-commits
https://github.com/bulbazord closed https://github.com/llvm/llvm-project/pull/85861 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Invert relationship between Process and AddressableBits (PR #85858)

2024-03-20 Thread Alex Langford via lldb-commits
https://github.com/bulbazord closed https://github.com/llvm/llvm-project/pull/85858 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystem] Enable colored AST dump (PR #86159)

2024-03-21 Thread Alex Langford via lldb-commits
bulbazord wrote: What happens if you have colors disabled in your terminal? Does this do nothing? Or does it start inserting ANSI escape codes in plain text? https://github.com/llvm/llvm-project/pull/86159 ___ lldb-commits mailing list lldb-commits@li

[Lldb-commits] [lldb] Make the correct (5 argument) form of the command definition be the primary one suggested in the docs (PR #86593)

2024-03-25 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/86593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make the correct (5 argument) form of the command definition be the primary one suggested in the docs (PR #86593)

2024-03-25 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make the correct (5 argument) form of the command definition be the primary one suggested in the docs (PR #86593)

2024-03-25 Thread Alex Langford via lldb-commits
@@ -491,34 +491,42 @@ which will work like all the natively defined lldb commands. This provides a very flexible and easy way to extend LLDB to meet your debugging requirements. To write a python function that implements a new LLDB command define the -function to take four ar

[Lldb-commits] [lldb] Make the correct (5 argument) form of the command definition be the primary one suggested in the docs (PR #86593)

2024-03-25 Thread Alex Langford via lldb-commits
@@ -491,34 +491,42 @@ which will work like all the natively defined lldb commands. This provides a very flexible and easy way to extend LLDB to meet your debugging requirements. To write a python function that implements a new LLDB command define the -function to take four ar

[Lldb-commits] [lldb] [lldb] [ObjC runtime] Don't cast to signed when left shifting (PR #86605)

2024-03-26 Thread Alex Langford via lldb-commits
@@ -3154,7 +3154,7 @@ AppleObjCRuntimeV2::TaggedPointerVendorExtended::GetClassDescriptor( << m_objc_debug_taggedpointer_ext_payload_lshift) >> m_objc_debug_taggedpointer_ext_payload_rshift); int64_t data_payload_signed

[Lldb-commits] [lldb] [lldb][nfc] Delete unused variable (PR #86740)

2024-03-26 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/86740 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] [ObjC runtime] Don't cast to signed when left shifting (PR #86605)

2024-03-27 Thread Alex Langford via lldb-commits
@@ -3154,7 +3154,7 @@ AppleObjCRuntimeV2::TaggedPointerVendorExtended::GetClassDescriptor( << m_objc_debug_taggedpointer_ext_payload_lshift) >> m_objc_debug_taggedpointer_ext_payload_rshift); int64_t data_payload_signed

[Lldb-commits] [lldb] [lldb] [ObjC runtime] Don't cast to signed when left shifting (PR #86605)

2024-03-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/86605 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Avoid deadlock by unlocking before invoking callbacks (PR #86888)

2024-03-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Makes sense to me. https://github.com/llvm/llvm-project/pull/86888 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add APFloat helper functions to Scalar class. (PR #86862)

2024-03-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. Could you add a test for these new methods in `unittests/Utility/ScalarTest.cpp`? https://github.com/llvm/llvm-project/pull/86862 ___ lldb-commits mailing list lldb-commits@lists.llv

[Lldb-commits] [lldb] [LLDB] Add APFloat helper functions to Scalar class. (PR #86862)

2024-03-28 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/86862 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add APFloat helper functions to Scalar class. (PR #86862)

2024-03-28 Thread Alex Langford via lldb-commits
bulbazord wrote: > > Could you add a test for these new methods in > > `unittests/Utility/ScalarTest.cpp`? > > Done. :-) Thank you! :) https://github.com/llvm/llvm-project/pull/86862 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/87197 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. +1 to all of Jim and Adrian's comments. High level comments: 1. I'm a little concerned about the use of assertions in this patch. I generally like assertions when they are used to assert internal consistency. It looks like yo

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. bulbazord wr

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. + lldb::addr_t GetLoadAddres

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (PR #87263)

2024-04-01 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Rewriting this has been on my backlog for a few months now. This looks better than what I had in mind. Thank you! 😄 https://github.com/llvm/llvm-project/pull/87263 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb][sbdebugger] Match progress category enum bit in Debugger.h (PR #87409)

2024-04-05 Thread Alex Langford via lldb-commits
bulbazord wrote: > Why don't we just remove the enum from SBDebugger and use the one from > Debugger instead, this will ensure the offsets are always the same. SBDebugger is public and Debugger is private, so I'm not sure how you can do this? Maybe I'm misunderstanding your suggestion... It w

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -273,6 +301,44 @@ void DebugNamesDWARFIndex::GetFullyQualifiedType( if (!isType(entry.tag())) continue; + +DWARFTypeUnit *foreign_tu = GetForeignTypeUnit(entry); +if (foreign_tu) { bulbazord wrote: nit: Merge these two lines ``` if (DWARF

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -273,6 +301,44 @@ void DebugNamesDWARFIndex::GetFullyQualifiedType( if (!isType(entry.tag())) continue; + +DWARFTypeUnit *foreign_tu = GetForeignTypeUnit(entry); +if (foreign_tu) { + // If this entry represents a foreign type unit, we need to verify t

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -34,6 +34,18 @@ DebugNamesDWARFIndex::Create(Module &module, DWARFDataExtractor debug_names, module, std::move(index_up), debug_names, debug_str, dwarf)); } + +llvm::DenseSet +DebugNamesDWARFIndex::GetTypeUnitSigs(const DebugNames &debug_names) { bul

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -693,7 +693,6 @@ llvm::DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() { if (debug_abbrev_data.GetByteSize() == 0) return nullptr; - ElapsedTime elapsed(m_parse_time); bulbazord wrote: Why remove this `ElapsedTime`? https://github.com/llvm/llvm-pr

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -273,6 +301,44 @@ void DebugNamesDWARFIndex::GetFullyQualifiedType( if (!isType(entry.tag())) continue; + +DWARFTypeUnit *foreign_tu = GetForeignTypeUnit(entry); +if (foreign_tu) { + // If this entry represents a foreign type unit, we need to verify t

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -2717,7 +2731,6 @@ void SymbolFileDWARF::FindTypes(const TypeQuery &query, TypeResults &results) { die_context = die.GetDeclContext(); else die_context = die.GetTypeLookupContext(); -assert(!die_context.empty()); bulbazord wrote: Why re

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -48,15 +60,31 @@ DebugNamesDWARFIndex::GetUnits(const DebugNames &debug_names) { return result; } +DWARFTypeUnit * +DebugNamesDWARFIndex::GetForeignTypeUnit(const DebugNames::Entry &entry) const { + std::optional type_sig = entry.getForeignTUTypeSignature(); + if (typ

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -21,9 +21,11 @@ class SymbolFileDWARFDwo; class ManualDWARFIndex : public DWARFIndex { public: ManualDWARFIndex(Module &module, SymbolFileDWARF &dwarf, - llvm::DenseSet units_to_avoid = {}) + llvm::DenseSet units_to_avoid = {}, +

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -1726,44 +1725,59 @@ lldb::ModuleSP SymbolFileDWARF::GetExternalModule(ConstString name) { return pos->second; } -DWARFDIE -SymbolFileDWARF::GetDIE(const DIERef &die_ref) { - // This method can be called without going through the symbol vendor so we - // need to lock t

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -1726,44 +1725,59 @@ lldb::ModuleSP SymbolFileDWARF::GetExternalModule(ConstString name) { return pos->second; } -DWARFDIE -SymbolFileDWARF::GetDIE(const DIERef &die_ref) { - // This method can be called without going through the symbol vendor so we - // need to lock t

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,91 @@ +// REQUIRES: lld + +// This test will make a type that will be compiled differently into two +// different .dwo files in a type unit with the same type hash, but with +// differing contents. I have discovered that the hash for the type unit is +// simply based of

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

2024-04-05 Thread Alex Langford via lldb-commits
@@ -60,8 +60,10 @@ void ManualDWARFIndex::Index() { } if (dwp_info && dwp_info->ContainsTypeUnits()) { for (size_t U = 0; U < dwp_info->GetNumUnits(); ++U) { - if (auto *tu = llvm::dyn_cast(dwp_info->GetUnitAtIndex(U))) -units_to_index.push_back(tu); +

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/87815 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -965,6 +966,14 @@ SBTarget SBDebugger::GetDummyTarget() { return sb_target; } +void SBDebugger::SendTelemetry(SBStructuredData *entry) { + if (lldb_private::Debugger *debugger = this->get()) { bulbazord wrote: We have a convention to check for `m_opaque

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: I read through the RFC briefly and skimmed the PR. Left some comments, but I'm sure this PR will change over time. +1 to all of Jonas's and Adrian's comments. https://github.com/llvm/llvm-project/pull/87815 ___

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -965,6 +966,14 @@ SBTarget SBDebugger::GetDummyTarget() { return sb_target; } +void SBDebugger::SendTelemetry(SBStructuredData *entry) { + if (lldb_private::Debugger *debugger = this->get()) { +debugger->SendClientTelemetry(entry->m_impl_up->GetObjectSP().get()); +

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -9,10 +9,12 @@ #ifndef LLDB_API_SBDEBUGGER_H #define LLDB_API_SBDEBUGGER_H +#include bulbazord wrote: Don't include this if you don't actually need it in the header. Clients shouldn't need to pay the cost of including the chrono header if it's not actua

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,237 @@ +#ifndef LLDB_CORE_TELEMETRY_H +#define LLDB_CORE_TELEMETRY_H + +#include +#include +#include +#include +#include + +#include "lldb/Interpreter/CommandReturnObject.h" +#include "lldb/Utility/StructuredData.h" +#include "lldb/lldb-forward.h" +#include "llvm/A

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -243,6 +245,8 @@ class LLDB_API SBDebugger { lldb::SBTarget GetDummyTarget(); + void SendTelemetry(SBStructuredData *entry); bulbazord wrote: If you want to combine telemetry from LLDB and clients together, why not invert the relationship? Instead of

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,237 @@ +#ifndef LLDB_CORE_TELEMETRY_H bulbazord wrote: This file needs a copyright header. https://github.com/llvm/llvm-project/pull/87815 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://li

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [RFC][LLDB] Telemetry in LLDB (PR #87815)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -0,0 +1,620 @@ + +//===-- Telemetry.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:

[Lldb-commits] [lldb] [lldb][lldb-dap] Cleanup breakpoint filters. (PR #87550)

2024-04-05 Thread Alex Langford via lldb-commits
@@ -1628,7 +1628,14 @@ void request_initialize(const llvm::json::Object &request) { body.try_emplace("supportsEvaluateForHovers", true); // Available filters or options for the setExceptionBreakpoints request. llvm::json::Array filters; + std::string triple = + std

[Lldb-commits] [lldb] Reapply "Fix error in unrecognized register name handling for "SBFram…e.register"" (#88468)" (PR #88535)

2024-04-12 Thread Alex Langford via lldb-commits
@@ -91,7 +93,17 @@ def test_get_arg_vals_for_call_stack(self): frame.GetSP(), "SP gotten as a value should equal frame's GetSP", ) - +# Test that the "register" property's flat list matches the list from +

[Lldb-commits] [lldb] Reapply "Fix error in unrecognized register name handling for "SBFram…e.register"" (#88468)" (PR #88535)

2024-04-12 Thread Alex Langford via lldb-commits
@@ -44,6 +44,16 @@ STRING_EXTENSION_OUTSIDE(SBFrame) def __init__(self, regs): self.regs = regs +def __iter__(self): +return self.get_registers() + +def get_registers(self): +

[Lldb-commits] [lldb] Reapply "Fix error in unrecognized register name handling for "SBFram…e.register"" (#88468)" (PR #88535)

2024-04-12 Thread Alex Langford via lldb-commits
@@ -44,6 +44,16 @@ STRING_EXTENSION_OUTSIDE(SBFrame) def __init__(self, regs): self.regs = regs +def __iter__(self): +return self.get_registers() + +def get_registers(self): +

[Lldb-commits] [lldb] Reapply "Fix error in unrecognized register name handling for "SBFram…e.register"" (#88468)" (PR #88535)

2024-04-12 Thread Alex Langford via lldb-commits
@@ -91,7 +93,17 @@ def test_get_arg_vals_for_call_stack(self): frame.GetSP(), "SP gotten as a value should equal frame's GetSP", ) - +# Test that the "register" property's flat list matches the list from +

[Lldb-commits] [lldb] Reapply "Fix error in unrecognized register name handling for "SBFram…e.register"" (#88468)" (PR #88535)

2024-04-12 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88535 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][ClangExpressionDeclMap][NFC] Remove unused NameSearchContext::m_found_function (PR #88724)

2024-04-15 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Seems straightforward. https://github.com/llvm/llvm-project/pull/88724 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystemClang][NFCI] Use LangOptions::setLangDefaults when creating new LangOptions (PR #88721)

2024-04-15 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Makes sense to me. https://github.com/llvm/llvm-project/pull/88721 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -684,6 +684,15 @@ Status PlatformRemoteGDBServer::RunShellCommand( signo_ptr, command_output, timeout); } +bool PlatformRemoteGDBServer::CalculateMD5(const FileSpec &file_spec, + uint64_t &l

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination, if (!source_file) return Status(source_file.takeError()); Status error; + + bool requires_upload = true; + { bulbazord wrote: Why is this all in its

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5( return false; if (response.Peek() && *response.Peek() == 'x') return false; -low = response.GetHexMaxU64(false, UINT64_MAX); -high = response.GetHexMaxU64(false, UINT64_MAX); + +

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -684,6 +684,15 @@ Status PlatformRemoteGDBServer::RunShellCommand( signo_ptr, command_output, timeout); } +bool PlatformRemoteGDBServer::CalculateMD5(const FileSpec &file_spec, + uint64_t &l

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination, if (!source_file) return Status(source_file.takeError()); Status error; + + bool requires_upload = true; + { +uint64_t dest_md5_low, dest_md5_high; +bool succ

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -1184,7 +1184,7 @@ bool Platform::IsCompatibleArchitecture(const ArchSpec &arch, Status Platform::PutFile(const FileSpec &source, const FileSpec &destination, uint32_t uid, uint32_t gid) { Log *log = GetLog(LLDBLog::Platform); - LLDB_LOGF(log, "[

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5( return false; if (response.Peek() && *response.Peek() == 'x') return false; -low = response.GetHexMaxU64(false, UINT64_MAX); -high = response.GetHexMaxU64(false, UINT64_MAX); + +

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-15 Thread Alex Langford via lldb-commits
@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5( return false; if (response.Peek() && *response.Peek() == 'x') return false; -low = response.GetHexMaxU64(false, UINT64_MAX); -high = response.GetHexMaxU64(false, UINT64_MAX); + +

[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

2024-04-16 Thread Alex Langford via lldb-commits
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination, if (!source_file) return Status(source_file.takeError()); Status error; + + bool requires_upload = true; + { bulbazord wrote: I see. I wouldn't say

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