[Lldb-commits] [lldb] [llvm] [cmake] Prevent implicitly passing `-no_exported_symbols` (PR #87846)

2024-04-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Cyndy Ishida (cyndyishida) Changes * It is possible to setup llvm-project builds without going through `llvm/CMakeList.txt` so the fatal error handling should be smarter. * Disable option on Apple style lldb-linux builds. --- Full diff: ht

[Lldb-commits] [lldb] [llvm] [cmake] Prevent implicitly passing `-no_exported_symbols` (PR #87846)

2024-04-05 Thread Cyndy Ishida via lldb-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/87846 * It is possible to setup llvm-project builds without going through `llvm/CMakeList.txt` so the fatal error handling should be smarter. * Disable option on Apple style lldb-linux builds. >From 75949b4fae9634

[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] [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] [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,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
@@ -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
@@ -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
@@ -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
@@ -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()) { 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
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] [lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope possible into ClangExpressionParser (PR #87657)

2024-04-05 Thread Michael Buch via lldb-commits
@@ -669,15 +670,8 @@ bool ClangUserExpression::Parse(DiagnosticManager &diagnostic_manager, // Parse the expression // - Process *process = exe_ctx.GetProcessPtr(); - ExecutionContextScope *exe_scope = process; - - if (!exe_scope) -exe_scope = exe_ctx.GetTargetPtr(

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via lldb-commits
cyndyishida wrote: > FYI, it looks like this change broke `compiler-rt` build, e.g. in > https://lab.llvm.org/buildbot/#/builders/270/builds/12485 Should be resolved by: https://github.com/llvm/llvm-project/commit/fe45029dbdee6b3df2dbeaed17c9dd598ec511f2 I suspect compiler-rt may be relying

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via lldb-commits
@@ -1029,6 +1038,16 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES) +if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS) + set_p

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Slava Zakharin via lldb-commits
vzakhari wrote: FYI, it looks like this change broke `compiler-rt` build, e.g. in https://lab.llvm.org/buildbot/#/builders/270/builds/12485 https://github.com/llvm/llvm-project/pull/87684 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dave Lee via lldb-commits
@@ -1029,6 +1038,16 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES) +if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS) + set_p

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via lldb-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/87684 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 25cf279 - [cmake] Build executables with -no_exported_symbols when building Apple toolchain (#87684)

2024-04-05 Thread via lldb-commits
Author: Cyndy Ishida Date: 2024-04-05T14:41:20-07:00 New Revision: 25cf27910c3a58e71e37c3d5391235730aa7c488 URL: https://github.com/llvm/llvm-project/commit/25cf27910c3a58e71e37c3d5391235730aa7c488 DIFF: https://github.com/llvm/llvm-project/commit/25cf27910c3a58e71e37c3d5391235730aa7c488.diff

[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] [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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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] [lldb][lldb-dap] Cleanup breakpoint filters. (PR #87550)

2024-04-05 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > I would be nice if we can detect if we support Swift dynamically. Internally > in LLDB, we can ask for a TypeSystem by language using: See also how lldb/test/Shell/Process/UnsupportedLanguage.test works https://github.com/llvm/llvm-project/pull/87550 ___

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

2024-04-05 Thread Vy Nguyen via lldb-commits
@@ -36,9 +36,7 @@ DAP::DAP() {{"cpp_catch", "C++ Catch", lldb::eLanguageTypeC_plus_plus}, {"cpp_throw", "C++ Throw", lldb::eLanguageTypeC_plus_plus}, {"objc_catch", "Objective-C Catch", lldb::eLanguageTypeObjC}, - {"objc_throw", "Object

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

2024-04-05 Thread Vy Nguyen via lldb-commits
@@ -243,6 +245,8 @@ class LLDB_API SBDebugger { lldb::SBTarget GetDummyTarget(); + void SendTelemetry(SBStructuredData *entry); oontvoo wrote: Can you clarify your privacy model? We need this API because we want to be able to collect performance stats f

[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] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
https://github.com/delcypher approved this pull request. LGTM. Other than the nit about not using `FORCE` to set the CMake cache variable. https://github.com/llvm/llvm-project/pull/87684 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via lldb-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87684 >From 3ac6872328334384fa20998541fac841add767d9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 4 Apr 2024 12:08:28 -0700 Subject: [PATCH 1/4] [cmake] Build executables with -no_exported_symbols when b

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -1029,6 +1038,11 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES AND LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS)

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

2024-04-05 Thread Adrian Prantl 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 Adrian Prantl 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 Adrian Prantl 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 Adrian Prantl 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 Jonas Devlieghere 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 Jonas Devlieghere 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 Jonas Devlieghere 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 Jonas Devlieghere via lldb-commits
@@ -1868,8 +1874,28 @@ bool CommandInterpreter::HandleCommand(const char *command_line, LazyBool lazy_add_to_history, CommandReturnObject &result, bool force_re

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

2024-04-05 Thread Jonas Devlieghere 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 Jonas Devlieghere 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 Jonas Devlieghere 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 Jonas Devlieghere 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 Jonas Devlieghere 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 Jonas Devlieghere via lldb-commits
@@ -9,10 +9,12 @@ #ifndef LLDB_API_SBDEBUGGER_H #define LLDB_API_SBDEBUGGER_H +#include #include #include "lldb/API/SBDefines.h" #include "lldb/API/SBPlatform.h" +#include "third_party/llvm/llvm-project/lldb/include/lldb/API/SBStructuredData.h" JDevlie

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

2024-04-05 Thread Jonas Devlieghere 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 Jonas Devlieghere 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 Jonas Devlieghere via lldb-commits
@@ -243,6 +245,8 @@ class LLDB_API SBDebugger { lldb::SBTarget GetDummyTarget(); + void SendTelemetry(SBStructuredData *entry); JDevlieghere wrote: It seems odd to allow clients to send their own telemetry. I'd expect all telemetry you'd want to collect

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

2024-04-05 Thread Jonas Devlieghere 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 Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere commented: A bunch of time has passed since the original RFC. It would be great, and help with reviewing the PR, to have an overview of the currently proposed architecture, the different pieces and how it all fits together. I left some inline comments, but I'm n

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

2024-04-05 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere 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] [lldb][lldb-dap] Cleanup breakpoint filters. (PR #87550)

2024-04-05 Thread Vy Nguyen via lldb-commits
@@ -36,9 +36,7 @@ DAP::DAP() {{"cpp_catch", "C++ Catch", lldb::eLanguageTypeC_plus_plus}, {"cpp_throw", "C++ Throw", lldb::eLanguageTypeC_plus_plus}, {"objc_catch", "Objective-C Catch", lldb::eLanguageTypeObjC}, - {"objc_throw", "Object

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via lldb-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87684 >From 3ac6872328334384fa20998541fac841add767d9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 4 Apr 2024 12:08:28 -0700 Subject: [PATCH 1/3] [cmake] Build executables with -no_exported_symbols when b

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Jonas Devlieghere via lldb-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS JDevlieghere wrote: @delcypher I was referring to the tools in `

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

2024-04-05 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 2606c87788153bf33d854fa5c3a03e16d544c5d7 7321a9073f1ec326f53ada9f40e258c038037af2 --

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

2024-04-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Vy Nguyen (oontvoo) Changes Implement telemetry in LLDB. (See previous discussions at https://discourse.llvm.org/t/rfc-lldb-telemetry-metrics/64588) --- Patch is 48.73 KiB, truncated to 20.00 KiB below, full version: https://github.com/

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

2024-04-05 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo created https://github.com/llvm/llvm-project/pull/87815 Implement telemetry in LLDB. (See previous discussions at https://discourse.llvm.org/t/rfc-lldb-telemetry-metrics/64588) >From cdee622a6646ba5c16a3c8156a5a50a938a14b57 Mon Sep 17 00:00:00 2001 From: Vy Nguyen

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -654,6 +654,11 @@ enabled sub-projects. Nearly all of these variable names begin with Generate dSYM files and strip executables and libraries (Darwin Only). Defaults to OFF. +**LLVM_ENABLE_EXPORTED_SYMBOLS**:BOOL + When building executables, preserve symbol exports. D

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS delcypher wrote: @JDevlieghere > "tools" has a pretty specific

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
https://github.com/delcypher deleted https://github.com/llvm/llvm-project/pull/87684 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS delcypher wrote: > "tools" has a pretty specific meaning for LLV

[Lldb-commits] [clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via lldb-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS danliew-apple wrote: I'm fine with that. You could also do `LLV

[Lldb-commits] [lldb] [lldb][test] Add tests for evaluating local variables whose name clashes with Objective-C types (PR #87807)

2024-04-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes Depends on https://github.com/llvm/llvm-project/pull/87767 --- Full diff: https://github.com/llvm/llvm-project/pull/87807.diff 2 Files Affected: - (modified) lldb/test/API/lang/objcxx/objc-builtin-types

[Lldb-commits] [lldb] [lldb][test] Add tests for evaluating local variables whose name clashes with Objective-C types (PR #87807)

2024-04-05 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/87807 Depends on https://github.com/llvm/llvm-project/pull/87767 >From a0dfe20ca4d6c544d00ca4b3791fc3dff70b465e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 5 Apr 2024 12:10:09 +0100 Subject: [PATCH] [lld

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

2024-04-05 Thread via lldb-commits
@@ -36,9 +36,7 @@ DAP::DAP() {{"cpp_catch", "C++ Catch", lldb::eLanguageTypeC_plus_plus}, {"cpp_throw", "C++ Throw", lldb::eLanguageTypeC_plus_plus}, {"objc_catch", "Objective-C Catch", lldb::eLanguageTypeObjC}, - {"objc_throw", "Object

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

2024-04-05 Thread Vy Nguyen via lldb-commits
@@ -36,9 +36,7 @@ DAP::DAP() {{"cpp_catch", "C++ Catch", lldb::eLanguageTypeC_plus_plus}, {"cpp_throw", "C++ Throw", lldb::eLanguageTypeC_plus_plus}, {"objc_catch", "Objective-C Catch", lldb::eLanguageTypeObjC}, - {"objc_throw", "Object

[Lldb-commits] [lldb] [lldb] fix dead lock in TypeCategoryMap.cpp (PR #87540)

2024-04-05 Thread Jonas Devlieghere via lldb-commits
@@ -25,19 +25,25 @@ TypeCategoryMap::TypeCategoryMap(IFormatChangeListener *lst) } void TypeCategoryMap::Add(KeyType name, const TypeCategoryImplSP &entry) { - std::lock_guard guard(m_map_mutex); - m_map[name] = entry; + { +std::lock_guard guard(m_map_mutex); +m_map

[Lldb-commits] [lldb] [lldb] fix dead lock in TypeCategoryMap.cpp (PR #87540)

2024-04-05 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere requested changes to this pull request. https://github.com/llvm/llvm-project/pull/87540 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] fix dead lock in TypeCategoryMap.cpp (PR #87540)

2024-04-05 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/87540 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Don't by default enable Objecitve-C support when evaluating C++ expressions (PR #87767)

2024-04-05 Thread via lldb-commits
https://github.com/jimingham approved this pull request. LGTM. This is a reasonable strategy to limit opting in to all the ObjC runtime work, and should be understandable by users. https://github.com/llvm/llvm-project/pull/87767 ___ lldb-commits mail

[Lldb-commits] [lldb] [lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope possible into ClangExpressionParser (PR #87657)

2024-04-05 Thread via lldb-commits
@@ -669,15 +670,8 @@ bool ClangUserExpression::Parse(DiagnosticManager &diagnostic_manager, // Parse the expression // - Process *process = exe_ctx.GetProcessPtr(); - ExecutionContextScope *exe_scope = process; - - if (!exe_scope) -exe_scope = exe_ctx.GetTargetPtr(

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Don't by default enable Objecitve-C support when evaluating C++ expressions (PR #87767)

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

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Don't by default enable Objecitve-C support when evaluating C++ expressions (PR #87767)

2024-04-05 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/87767 >From f27a547ab85463f182ab63949bb6f11140a2f33f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 5 Apr 2024 11:51:47 +0100 Subject: [PATCH 1/2] [lldb][ClangExpressionParser] Don't by default enable Objec

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Don't by default enable Objecitve-C support when evaluating C++ expressions (PR #87767)

2024-04-05 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r a1f4ac7704255627ac33ad67a22be5ac030f6179...f27a547ab85463f182ab63949bb6f11140a2f33f lldb

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Don't by default enable Objecitve-C support when evaluating C++ expressions (PR #87767)

2024-04-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes This patch attempts to decouple C++ expression evaluation from Objective-C support. We've previously enabled it by default (if a runtime existed), but that meant we're opting into extra work we only need t

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Don't by default enable Objecitve-C support when evaluating C++ expressions (PR #87767)

2024-04-05 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/87767 This patch attempts to decouple C++ expression evaluation from Objective-C support. We've previously enabled it by default (if a runtime existed), but that meant we're opting into extra work we only need to d

[Lldb-commits] [lldb] [lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope possible into ClangExpressionParser (PR #87657)

2024-04-05 Thread Michael Buch via lldb-commits
@@ -669,15 +670,8 @@ bool ClangUserExpression::Parse(DiagnosticManager &diagnostic_manager, // Parse the expression // - Process *process = exe_ctx.GetProcessPtr(); - ExecutionContextScope *exe_scope = process; - - if (!exe_scope) -exe_scope = exe_ctx.GetTargetPtr(

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

2024-04-05 Thread Med Ismail Bennani via lldb-commits
medismailben 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. https://github.com/llvm/llvm-project/pull/87409 ___ lldb-commits mailing list lldb-commits@

  1   2   >