[Lldb-commits] [lldb] [lldb] Use if-with-initializer pattern in SBTarget (NFC) (PR #141284)

2025-05-23 Thread Alex Langford via lldb-commits
@@ -1219,45 +1191,42 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file, LLDB_INSTRUMENT_VA(this, source_file, matching_names, new_bps); SBError sberr; - TargetSP target_sp(GetSP()); - if (!target_sp) { -sberr.SetErrorString( -"Brea

[Lldb-commits] [lldb] [lldb] Use if-with-initializer pattern in SBTarget (NFC) (PR #141284)

2025-05-23 Thread Alex Langford via lldb-commits
@@ -1266,25 +1235,22 @@ lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file, LLDB_INSTRUMENT_VA(this, dest_file, bkpt_list, append); SBError sberr; - TargetSP target_sp(GetSP()); - if (!target_sp) { -sberr.SetErrorString("BreakpointWriteToFile calle

[Lldb-commits] [lldb] [lldb] Use if-with-initializer pattern in SBTarget (NFC) (PR #141284)

2025-05-23 Thread Alex Langford via lldb-commits
@@ -208,41 +204,37 @@ SBStructuredData SBTarget::GetStatistics(SBStatisticsOptions options) { LLDB_INSTRUMENT_VA(this); SBStructuredData data; - TargetSP target_sp(GetSP()); - if (!target_sp) + if (TargetSP target_sp = GetSP()) { +std::string json_str = +ll

[Lldb-commits] [lldb] [lldb] Use if-with-initializer pattern in SBTarget (NFC) (PR #141284)

2025-05-23 Thread Alex Langford via lldb-commits
@@ -2393,62 +2329,54 @@ lldb::addr_t SBTarget::GetStackRedZoneSize() { bool SBTarget::IsLoaded(const SBModule &module) const { LLDB_INSTRUMENT_VA(this, module); - TargetSP target_sp(GetSP()); - if (!target_sp) -return false; - - ModuleSP module_sp(module.GetSP()); -

[Lldb-commits] [lldb] [lldb] Use if-with-initializer pattern in SBTarget (NFC) (PR #141284)

2025-05-23 Thread Alex Langford via lldb-commits
@@ -208,41 +204,37 @@ SBStructuredData SBTarget::GetStatistics(SBStatisticsOptions options) { LLDB_INSTRUMENT_VA(this); SBStructuredData data; - TargetSP target_sp(GetSP()); - if (!target_sp) + if (TargetSP target_sp = GetSP()) { +std::string json_str = +ll

[Lldb-commits] [lldb] [lldb/cmake] Don't call llvm_process_sources (PR #141217)

2025-05-23 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/141217 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][headers] Create script to fix up versioning (PR #141116)

2025-05-22 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: There is functionality in `lldb/scripts/framework-header-fix.sh` that does the same thing. Can you remove this functionality from that script too? https://github.com/llvm/llvm-project/pull/141116 ___ lldb-commit

[Lldb-commits] [lldb] [lldb/cmake] Remove special handling of OBJECT libraries (PR #141066)

2025-05-22 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Beautiful https://github.com/llvm/llvm-project/pull/141066 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-21 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.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: Ap

[Lldb-commits] [lldb] [lldb] Use llvm::unique (NFC) (PR #139910)

2025-05-15 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Makes sense. `std::unique` doesn't invalidate the end iterator, so I believe this should be ok. https://github.com/llvm/llvm-project/pull/139910 ___ lldb-commits mailing list lldb-commits@lists.

[Lldb-commits] [lldb] [lldb] Use std::optional::value_or (NFC) (PR #140011)

2025-05-15 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/140011 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-14 Thread Alex Langford via lldb-commits
bulbazord wrote: > Pushed again to address David's comments and remove most of the FIXMEs. > There's one FIXME I've kept in for now: > > ``` > // FIXME: SB class server references are stored as non-const references so > // that we can actually change them as needed. If a parameter is marked > /

[Lldb-commits] [lldb] [lldb][cmake] Set `CMAKE_OSX_SYSROOT` when building debugserver with CMake 4 (PR #138020)

2025-05-14 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/138020 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Simplify a string comparison (NFC) (PR #139932)

2025-05-14 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/139932 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix typos in documentation (PR #139839)

2025-05-13 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/139839 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb] Use std:::string::find with std::string_view (NFC) (PR #139679)

2025-05-13 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/139679 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-12 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-12 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb] Remove redundant calls to std::unique_ptr::get (NFC) (PR #139428)

2025-05-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/139428 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-09 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb] Don't create instance of `SymbolFileDWARFDebugMap` for non-Mach-O files (PR #139170)

2025-05-08 Thread Alex Langford via lldb-commits
bulbazord wrote: +1 to Jonas's comment. Plugins ideally don't depend on each other and they should strive to fail gracefully if they depend on a specific plugin instance that's not available. I recognize that many plugins depend on each other today, but I don't think we should be adding more d

[Lldb-commits] [lldb] [lldb]Make `list` command work with headers when possible. (PR #139002)

2025-05-08 Thread Alex Langford via lldb-commits
@@ -1170,10 +1171,41 @@ class CommandObjectSourceList : public CommandObjectParsed { if (m_options.num_lines == 0) m_options.num_lines = 10; const uint32_t column = 0; + + // Headers aren't always in the DWARF but if they have +

[Lldb-commits] [lldb] [lldb]Make `list` command work with headers when possible. (PR #139002)

2025-05-08 Thread Alex Langford via lldb-commits
@@ -0,0 +1,58 @@ +## Test that `list header.h:` works correctly when header is available. +## +# REQUIRES: x86 bulbazord wrote: Why does this test require x86? https://github.com/llvm/llvm-project/pull/139002 ___ lldb

[Lldb-commits] [lldb] [lldb] Use -Wno-documentation-deprecated-sync if available (PR #138909)

2025-05-07 Thread Alex Langford via lldb-commits
@@ -16,6 +16,15 @@ if (CXX_SUPPORTS_DOCUMENTATION) PRIVATE -Wdocumentation) endif() +# Apply -Wno-documentation-deprecated-sync while we migrate away from +# report_fatal_error in llvm/include/llvm/Support/ErrorHandling.h +# and llvm/include/llvm/Support/Error.h. -

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.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: Ap

[Lldb-commits] [lldb] [lldb][docs] Update instructions to build standalone (PR #137383)

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

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,540 @@ +#include "RPCBindingsHarnessEmitter.h" bulbazord wrote: This file will need a license header. https://github.com/llvm/llvm-project/pull/138031 ___ lldb-commits mailing list lldb-commits@lists.llvm.or

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Given that I wrote some of this code, it looks mostly good to me 😄 Note that this has a dependency on the emitters so this probably shouldn't land quite yet. I commented on some of the FIXMEs because I think now is the time to really address them. It woul

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

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

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.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: Ap

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,107 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rp

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,107 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rp

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,94 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rpc

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
bulbazord wrote: > > But there's no lldb-rpc client built into lldb, right? Because that would > > be my first instinct to try. > > Not directly in lldb itself as the `lldb-rpc-client` binary is a separate > build object. To add to this, LLDBRPC's API should be *almost* the same as LLDB's. Th

[Lldb-commits] [lldb] lldb: fix crash on FreeBSD/powerpc64le (PR #138331)

2025-05-02 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/138331 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream Python scripts (PR #138028)

2025-05-02 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Thanks for adding tests. Please let others take a look before merging. https://github.com/llvm/llvm-project/pull/138028 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llv

[Lldb-commits] [lldb] [lldb] Upgrade ExtractIndexFromString to use llvm::Expected (PR #138297)

2025-05-02 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: I like the idea of this PR (big fan of `llvm::Expected`) but the way this is implemented contains an anti-pattern IMO. Specifically, all callers consume the error from `ExtractIndexFromString` only to then create a similar but different error string afte

[Lldb-commits] [lldb] [lldb][cmake] Set `CMAKE_OSX_SYSROOT` when building debugserver with CMake 4 (PR #138020)

2025-05-02 Thread Alex Langford via lldb-commits
@@ -154,6 +154,19 @@ endif() add_definitions(-DLLDB_USE_OS_LOG) +if(CMAKE_OSX_SYSROOT) + set(${MIG_SYSROOT} CMAKE_OSX_SYSROOT) bulbazord wrote: Shouldn't this be `set(MIG_SYSROOT ${CMAKE_OSX_SYSROOT})`? Does this work as-is? https://github.com/llvm/llvm-pr

[Lldb-commits] [lldb] [LLDB][NFC] Remove unneeded conditional (PR #138321)

2025-05-02 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Ignoring whitespace, this is a pretty tiny change that makes sense. https://github.com/llvm/llvm-project/pull/138321 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.o

[Lldb-commits] [lldb] [LLDB][SBSaveCoreOptions] Add new API to expose the expected core size in bytes (PR #138169)

2025-05-01 Thread Alex Langford via lldb-commits
@@ -145,6 +145,28 @@ SaveCoreOptions::GetThreadsToSave() const { return thread_collection; } +uint64_t SaveCoreOptions::GetCurrentSizeInBytes(Status &error) { bulbazord wrote: Suggestion: `llvm::Expected`. Callers will be forced to handle the error instead

[Lldb-commits] [lldb] [LLDB][SBSaveCoreOptions] Add new API to expose the expected core size in bytes (PR #138169)

2025-05-01 Thread Alex Langford via lldb-commits
@@ -119,6 +119,19 @@ class LLDB_API SBSaveCoreOptions { /// an empty collection will be returned. SBThreadCollection GetThreadsToSave() const; + /// Get the current total number of bytes the core is expected to be but not bulbazord wrote: Suggestion: `

[Lldb-commits] [lldb] [LLDB][SBSaveCoreOptions] Add new API to expose the expected core size in bytes (PR #138169)

2025-05-01 Thread Alex Langford via lldb-commits
@@ -119,6 +119,19 @@ class LLDB_API SBSaveCoreOptions { /// an empty collection will be returned. SBThreadCollection GetThreadsToSave() const; + /// Get the current total number of bytes the core is expected to be but not bulbazord wrote: Suggestion: `

[Lldb-commits] [lldb] [lldb][cmake] Add clang resource dir to LLDB shell tests config (PR #136761)

2025-04-30 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I'm alright with this https://github.com/llvm/llvm-project/pull/136761 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][cmake] Add clang resource dir to LLDB shell tests config (PR #136761)

2025-04-29 Thread Alex Langford via lldb-commits
@@ -1,6 +1,12 @@ add_custom_target(lldb-shell-test-deps) set_target_properties(lldb-shell-test-deps PROPERTIES FOLDER "LLDB/Tests") add_dependencies(lldb-shell-test-deps lldb-test-depends) +if(LLDB_BUILT_STANDALONE) + get_target_property(CLANG_RESOURCE_DIR clang-resource-heade

[Lldb-commits] [lldb] [lldb][cmake] Add clang resource dir to LLDB shell tests config (PR #136761)

2025-04-29 Thread Alex Langford via lldb-commits
@@ -1,6 +1,12 @@ add_custom_target(lldb-shell-test-deps) set_target_properties(lldb-shell-test-deps PROPERTIES FOLDER "LLDB/Tests") add_dependencies(lldb-shell-test-deps lldb-test-depends) +if(LLDB_BUILT_STANDALONE) + get_target_property(CLANG_RESOURCE_DIR clang-resource-heade

[Lldb-commits] [lldb] [lldb][cmake] Add clang resource dir to LLDB shell tests config (PR #136761)

2025-04-29 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. Looking better, but I don't think the shell test's CMake file is the right place to calculate the resource directory. It's already calculated in `LLDBStandalone`. I think we should hoist this logic into LLDB's configuration m

[Lldb-commits] [lldb] [lldb][cmake] Add clang resource dir to LLDB shell tests config (PR #136761)

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

[Lldb-commits] [lldb] [lldb][docs] Update instructions to build standalone (PR #137383)

2025-04-29 Thread Alex Langford via lldb-commits
@@ -210,6 +210,7 @@ Clang. Then we build the ``ALL`` target with ninja: :: $ cmake -B /path/to/llvm-build -G Ninja \ + -DCMAKE_BUILD_TYPE=[] \ -DLLVM_ENABLE_PROJECTS=clang \ [] /path/to/llvm-project/llvm bulbazord wrote: Right

[Lldb-commits] [lldb] [lldb][docs] Update instructions to build standalone (PR #137383)

2025-04-28 Thread Alex Langford via lldb-commits
@@ -210,6 +210,7 @@ Clang. Then we build the ``ALL`` target with ninja: :: $ cmake -B /path/to/llvm-build -G Ninja \ + -DCMAKE_BUILD_TYPE=[] \ -DLLVM_ENABLE_PROJECTS=clang \ [] /path/to/llvm-project/llvm bulbazord wrote: I thi

[Lldb-commits] [lldb] [lldb][cmake] Add clang resource dir to LLDB shell tests config (PR #136761)

2025-04-25 Thread Alex Langford via lldb-commits
@@ -1,6 +1,8 @@ add_custom_target(lldb-shell-test-deps) set_target_properties(lldb-shell-test-deps PROPERTIES FOLDER "LLDB/Tests") add_dependencies(lldb-shell-test-deps lldb-test-depends) +get_target_property(clang_resource_headers_dir clang-resource-headers INTERFACE_INCLUDE_

[Lldb-commits] [lldb] [lldb] Synchronize access to m_statusline in the Debugger (PR #134759)

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

[Lldb-commits] [lldb] [lldb] Synchronize access to m_statusline in the Debugger (PR #134759)

2025-04-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. https://github.com/llvm/llvm-project/pull/134759 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reapply "[lldb] Remove UnwindPlan::Row shared_ptrs (https://github.com/llvm/llvm-project/pull/132370)" (PR #134821)

2025-04-08 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. 🫡 https://github.com/llvm/llvm-project/pull/134821 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Synchronize access to m_statusline in the Debugger (PR #134759)

2025-04-07 Thread Alex Langford via lldb-commits
@@ -391,8 +392,13 @@ bool Debugger::SetTerminalWidth(uint64_t term_width) { if (auto handler_sp = m_io_handler_stack.Top()) handler_sp->TerminalSizeChanged(); - if (m_statusline) -m_statusline->TerminalSizeChanged(); + + { +// This might get called from a signa

[Lldb-commits] [lldb] [lldb] Synchronize access to m_statusline in the Debugger (PR #134759)

2025-04-07 Thread Alex Langford via lldb-commits
@@ -391,8 +392,13 @@ bool Debugger::SetTerminalWidth(uint64_t term_width) { if (auto handler_sp = m_io_handler_stack.Top()) handler_sp->TerminalSizeChanged(); - if (m_statusline) -m_statusline->TerminalSizeChanged(); + + { +// This might get called from a signa

[Lldb-commits] [lldb] [LLDB][NFC] Move CPlusPlusLanguage methods used in Core/Module.cpp to a separated module to break lldb-server dependencies (PR #132274)

2025-04-04 Thread Alex Langford via lldb-commits
bulbazord wrote: > That said, I don't think this code should be here (and I think Alex would > agree). I do agree with this. > > I was referring more to the other items on the list. I assumed, it seems > > incorrectly, that Alex's patch would fix the dependency in the mangler. It > > seems l

[Lldb-commits] [lldb] [lldb] Combine disassembler gtest binaries for efficiency (PR #133539)

2025-03-29 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. One minor suggestion. Otherwise lgtm https://github.com/llvm/llvm-project/pull/133539 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lld

[Lldb-commits] [lldb] [lldb] Combine disassembler gtest binaries for efficiency (PR #133539)

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

[Lldb-commits] [lldb] [lldb] Combine disassembler gtest binaries for efficiency (PR #133539)

2025-03-28 Thread Alex Langford via lldb-commits
@@ -1,11 +1,32 @@ +set(disas_srcs "") + if("ARM" IN_LIST LLVM_TARGETS_TO_BUILD) - add_subdirectory(ARM) + set(disas_srcs ${disas_srcs} bulbazord wrote: Suggestion: use `list(APPEND disas_srcs ...)` to more clearly express the intent that you're collecting a l

[Lldb-commits] [lldb] [lldb] Expose the Target API mutex through the SB API (PR #133295)

2025-03-28 Thread Alex Langford via lldb-commits
@@ -0,0 +1,59 @@ +//===-- SBMutexTest.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [lldb] Expose the Target API mutex through the SB API (PR #133295)

2025-03-28 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM, though you might want to wait for Pavel's review since this was his suggestion originally. https://github.com/llvm/llvm-project/pull/133295 ___ lldb-commits mailing list lldb-commits@lists

[Lldb-commits] [lldb] [lldb] Expose the Target API mutex through the SB API (PR #133295)

2025-03-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,48 @@ +//===-- SBMutex.h +//--===// +// +// 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] Expose the Target API mutex through the SB API (PR #133295)

2025-03-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,48 @@ +//===-- SBMutex.h +//--===// +// +// 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] Expose the Target API mutex through the SB API (PR #133295)

2025-03-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,59 @@ +//===-- SBMutex.cpp bulbazord wrote: Broken header https://github.com/llvm/llvm-project/pull/133295 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[Lldb-commits] [lldb] [lldb] Expose the Target API mutex through the SB API (PR #133295)

2025-03-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,48 @@ +//===-- SBMutex.h +//--===// +// +// 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] Expose the Target API mutex through the SB API (PR #133295)

2025-03-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,59 @@ +//===-- SBMutex.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] Expose the Target API mutex through the SB API (PR #133295)

2025-03-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,48 @@ +//===-- SBMutex.h bulbazord wrote: Header messed up https://github.com/llvm/llvm-project/pull/133295 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[Lldb-commits] [lldb] [lldb] Expose the Target API mutex through the SB API (PR #133295)

2025-03-27 Thread Alex Langford via lldb-commits
@@ -1692,6 +1692,22 @@ class Target : public std::enable_shared_from_this, } }; +/// The private implementation backing SBLock. +class APILock { +public: + APILock(std::shared_ptr mutex_sp) + : m_mutex(std::move(mutex_sp)), m_lock(*m_mutex) {} + + void Lock() { m_loc

[Lldb-commits] [lldb] [lldb] Remove UnwindPlan::Row shared_ptrs (PR #132370)

2025-03-25 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. This seems ok to me. I think a good follow-up might be to stop handing out row pointers in case somebody tries to store one in the future. The pointers won't be stable as the vector resizes, but rows in unique_ptrs seems like a poor use

[Lldb-commits] [lldb] [LLDB][NFC] Move CPlusPlusLanguage methods used in Core/Module.cpp to a separated module to break lldb-server dependencies (PR #132274)

2025-03-25 Thread Alex Langford via lldb-commits
bulbazord wrote: I'm similarly confused about how moving these method definitions into a separate CU makes a difference. +1 to Jonas's suggestion, properly refactoring Module to use language plugins. For reference, I attempted this a few years ago (albeit on Apple's swift fork) and had troubl

[Lldb-commits] [lldb] Fix a bug copying the stop hooks from the dummy target. (PR #129340)

2025-02-28 Thread Alex Langford via lldb-commits
@@ -26,10 +26,15 @@ def test_stop_hooks_step_out(self): self.step_out_test() def test_stop_hooks_after_expr(self): -"""Test that a stop hook fires when hitting a breakpoint -that runs an expression""" +"""Test that a stop hook fires when hit

[Lldb-commits] [lldb] [lldb][Mach-O] Read dyld_all_image_infos addr from `main bin spec` LC_NOTE (PR #127156)

2025-02-17 Thread Alex Langford via lldb-commits
@@ -5669,6 +5673,10 @@ bool ObjectFileMachO::GetCorefileMainBinaryInfo(addr_t &value, type = eBinaryTypeStandalone; typestr = "standalone"; break; + case 4: +type = eBinaryTypeUserAllImageInfos; +typestr = "u

[Lldb-commits] [lldb] [lldb] Synchronize Debugger's stdout and stderr at the StreamFile level (PR #126630)

2025-02-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Overall looks fine, kind of terrified of the number of unguarded `fprintf` calls in Editline, but maybe it's fine? https://github.com/llvm/llvm-project/pull/126630 ___ lldb-commits mailing list lldb-commits@list

[Lldb-commits] [lldb] [lldb] Synchronize Debugger's stdout and stderr at the StreamFile level (PR #126630)

2025-02-10 Thread Alex Langford via lldb-commits
@@ -393,7 +394,7 @@ void Editline::MoveCursor(CursorLocation from, CursorLocation to) { int fromLine = GetLineIndexForLocation(from, editline_cursor_row); int toLine = GetLineIndexForLocation(to, editline_cursor_row); if (toLine != fromLine) { -fprintf(m_output_file,

[Lldb-commits] [lldb] [lldb] Synchronize Debugger's stdout and stderr at the StreamFile level (PR #126630)

2025-02-10 Thread Alex Langford via lldb-commits
@@ -7574,7 +7574,9 @@ IOHandlerCursesGUI::IOHandlerCursesGUI(Debugger &debugger) void IOHandlerCursesGUI::Activate() { IOHandler::Activate(); if (!m_app_ap) { -m_app_ap = std::make_unique(GetInputFILE(), GetOutputFILE()); +m_app_ap = std::make_unique( --

[Lldb-commits] [lldb] [lldb] Synchronize Debugger's stdout and stderr at the StreamFile level (PR #126630)

2025-02-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/126630 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Assert on invalid default {S, U}Int64 (NFC) (PR #126590)

2025-02-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/126590 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Assert on invalid default {S, U}Int64 (NFC) (PR #126590)

2025-02-10 Thread Alex Langford via lldb-commits
@@ -68,11 +68,10 @@ class OptionValueSInt64 : public Cloneable { } bool SetDefaultValue(int64_t value) { -if (value >= m_min_value && value <= m_max_value) { - m_default_value = value; - return true; -} -return false; +assert(value >= m_min_value

[Lldb-commits] [lldb] [lldb] Add a test for terminal dimensions (PR #126598)

2025-02-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/126598 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a test for terminal dimensions (PR #126598)

2025-02-10 Thread Alex Langford via lldb-commits
@@ -0,0 +1,22 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test.lldbpexpect import PExpectTest + + +class TerminalDimensionsTest(PExpectTest): +NO_DEBUG_INFO_TESTCASE = True

[Lldb-commits] [lldb] [lldb][sbapi] Namespace CommandReturnObjectCallbackResult in SBDefines (PR #126606)

2025-02-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Other types are prefixed with the lldb namespace as well, LGTM! https://github.com/llvm/llvm-project/pull/126606 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/c

[Lldb-commits] [lldb] [lldb] Implement a statusline in LLDB (PR #121860)

2025-02-07 Thread Alex Langford via lldb-commits
bulbazord wrote: > Rebased & fixed the existing tests. Looks like `lldb/test/API/functionalities/progress_reporting/TestTrimmedProgressReporting.py` was deleted entirely. Was this intentional? https://github.com/llvm/llvm-project/pull/121860 ___ lld

[Lldb-commits] [lldb] [lldb/Host] Add ability to open URLs on macOS (PR #125893)

2025-02-05 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/125893 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Make SBProgress move-only (PR #124843)

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

[Lldb-commits] [lldb] [lldb] Make SBProgress move-only (PR #124843)

2025-01-28 Thread Alex Langford via lldb-commits
@@ -59,6 +63,9 @@ class LLDB_API SBProgress { lldb_private::Progress &ref() const; private: + SBProgress(const SBProgress &rhs) = delete; bulbazord wrote: SBStream does this to enforce no copying. :) https://github.com/llvm/llvm-project/pull/124843 __

[Lldb-commits] [lldb] [lldb] Make SBProgress move-only (PR #124843)

2025-01-28 Thread Alex Langford via lldb-commits
https://github.com/bulbazord closed https://github.com/llvm/llvm-project/pull/124843 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Make SBProgress move-only (PR #124843)

2025-01-28 Thread Alex Langford via lldb-commits
@@ -51,6 +51,10 @@ class LLDB_API SBProgress { SBProgress(const char *title, const char *details, uint64_t total_units, SBDebugger &debugger); +#ifndef SWIG bulbazord wrote: This is a header guard that prevents SWIG from processing the move con

[Lldb-commits] [lldb] [lldb] Update API headers for SBProgress (PR #124836)

2025-01-28 Thread Alex Langford via lldb-commits
https://github.com/bulbazord closed https://github.com/llvm/llvm-project/pull/124836 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Make SBProgress move-only (PR #124843)

2025-01-28 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/124843 I wanted to clarify the semantics around SBProgress. Given the nature of Progress events, copying seems like the wrong idea. Making SBProgress move-only (like SBStream) seems like the better choice here. >Fr

  1   2   3   4   5   6   7   8   9   10   >