[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

2024-06-06 Thread Alex Langford via lldb-commits
@@ -3,7 +3,7 @@ # RUN: mkdir -p %t.dir # RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test # RUN: %lldb -b -o 'command script import lldb.macosx.crashlog' \ -# RUN: -o 'crashlog -a -i -s -t %t.dir/multithread-test %S/Inputs/interacti

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,30 @@ +from typing_extensions import override +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class CommandOverrideCallback(TestBase): +def setUp(self): +TestBase.setUp(self

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-06 Thread Alex Langford via lldb-commits
@@ -1099,6 +1099,19 @@ static void LLDBSwigPythonCallPythonSBDebuggerTerminateCallback(lldb::user_id_t } } +static bool LLDBSwigPythonCallPythonSBCommandInterpreterSetCommandOverrideCallback(void *baton, const char **argv) { + bool b = false; bulbazord w

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,30 @@ +from typing_extensions import override +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class CommandOverrideCallback(TestBase): +def setUp(self): +TestBase.setUp(self

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-06 Thread Alex Langford via lldb-commits
@@ -476,6 +475,32 @@ template <> bool SetNumberFromPyObject(double &number, PyObject *obj) { $1 = $1 || PyCallable_Check(reinterpret_cast($input)); } +%typemap(in) (lldb::CommandOverrideCallback callback, void *baton) { + if (!($input == Py_None || +PyCallable_Chec

[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)

2024-06-06 Thread Alex Langford via lldb-commits
@@ -476,6 +475,32 @@ template <> bool SetNumberFromPyObject(double &number, PyObject *obj) { $1 = $1 || PyCallable_Check(reinterpret_cast($input)); } +%typemap(in) (lldb::CommandOverrideCallback callback, void *baton) { + if (!($input == Py_None || +PyCallable_Chec

[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/94671 The summary already includes other size information, e.g. total debug info size in bytes. The only other way I can get this information is by dumping all statistics which can be quite large. Adding it to the s

[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

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

[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Alex Langford via lldb-commits
bulbazord wrote: Ah, I see there was a test for this that I missed. I've gotten an email about it, taking a look now. ``` Failed Tests (1): lldb-api :: functionalities/stats_api/TestStatisticsAPI.py ``` https://github.com/llvm/llvm-project/pull/94671 _

[Lldb-commits] [lldb] [lldb] Fix TestStatisticsAPI after 9293fc798152 (PR #94683)

2024-06-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/94683 None >From fe74a42c27731098c00f563d2f080e07003d888e Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Thu, 6 Jun 2024 13:47:50 -0700 Subject: [PATCH] [lldb] Fix TestStatisticsAPI after 9293fc798152 --- .../

[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Alex Langford via lldb-commits
bulbazord wrote: Fix: https://github.com/llvm/llvm-project/pull/94683 https://github.com/llvm/llvm-project/pull/94671 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

2024-06-10 Thread Alex Langford via lldb-commits
@@ -1794,8 +1803,36 @@ def SymbolicateCrashLogs(debugger, command_args, result, is_command): result.SetError(str(e)) return +# To avoid breaking existing users, we should keep supporting legacy flags +# even if we don't use them / advertise them anymor

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

2024-06-10 Thread Alex Langford via lldb-commits
@@ -1794,8 +1803,36 @@ def SymbolicateCrashLogs(debugger, command_args, result, is_command): result.SetError(str(e)) return +# To avoid breaking existing users, we should keep supporting legacy flags +# even if we don't use them / advertise them anymor

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

2024-06-10 Thread Alex Langford via lldb-commits
@@ -1821,31 +1858,24 @@ def SymbolicateCrashLogs(debugger, command_args, result, is_command): print(debugger.GetVersionString()) return -if options.debug: -print("command_args = %s" % command_args) -print("options", options) -print(

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

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

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

2024-06-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: LGTM in general, a few more comments but otherwise this is looking pretty good https://github.com/llvm/llvm-project/pull/94575 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

2024-06-10 Thread Alex Langford via lldb-commits
@@ -1794,8 +1802,35 @@ def SymbolicateCrashLogs(debugger, command_args, result, is_command): result.SetError(str(e)) return +# To avoid breaking existing users, we should keep supporting legacy flags +# even if we don't use them / advertise them anymor

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

2024-06-10 Thread Alex Langford via lldb-commits
@@ -1821,31 +1856,24 @@ def SymbolicateCrashLogs(debugger, command_args, result, is_command): print(debugger.GetVersionString()) return -if options.debug: -print("command_args = %s" % command_args) -print("options", options) -print(

[Lldb-commits] [lldb] [lldb/crashlog] Make interactive mode the new default (PR #94575)

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

[Lldb-commits] [lldb] [lldb][ConstString] Prevent GetString from constructing a std::string with a nullptr (PR #95175)

2024-06-11 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM to avoid the UB, I wouldn't block this because of a complex existential question. In general though, I don't really see the point in being able to convert a `ConstString` into a `std::string`? The whole point is that it uniques the

[Lldb-commits] [lldb] [lldb][swig] Refactor callback typemaps and functions (PR #95318)

2024-06-12 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Is this just moving code around? The summary says what you're doing but not why, what's the motivation? https://github.com/llvm/llvm-project/pull/95318 ___ lldb-commits mailing list lldb-commits@lists.llvm.org h

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

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

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-14 Thread Alex Langford via lldb-commits
@@ -209,6 +209,14 @@ class LLDB_API SBProcess { lldb::addr_t ReadPointerFromMemory(addr_t addr, lldb::SBError &error); + lldb::SBAddressRangeList + FindRangesInMemory(const void *buf, uint64_t size, SBAddressRangeList &ranges, + uint32_t alignment, ui

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-14 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Sorry for coming in a bit late here, I know this has been in review for a while. I didn't look at this in great detail, but I did look at the changes you're making to the SBAPI. Can you change the reference parameters that are input-only to be marked `co

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-14 Thread Alex Langford via lldb-commits
@@ -209,6 +209,14 @@ class LLDB_API SBProcess { lldb::addr_t ReadPointerFromMemory(addr_t addr, lldb::SBError &error); + lldb::SBAddressRangeList + FindRangesInMemory(const void *buf, uint64_t size, SBAddressRangeList &ranges, bulbazord wrote: Could you

[Lldb-commits] [lldb] [lldb] Fix the semantics of SupportFile equivalence (PR #95606)

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

[Lldb-commits] [lldb] [LLDB] Remove the redundent increment of 'properties' variable (PR #95675)

2024-06-17 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. I think you can probably just remove the check for `properties` value entirely. This is the first property that may be printed, so it will never be greater than 0. I think this will work: ``` stream.Printf(" ( arch="); ``` Th

[Lldb-commits] [lldb] [lldb] Parse and display register field enums (PR #95768)

2024-06-24 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: I'm a bit late to the party, I was out sick last week. :p I think I understand this change and it looks fine to me overall. One thing I noticed is that a lot of things that could be considered errors are only written to the logs and then are silently glos

[Lldb-commits] [lldb] [lldb] Parse and display register field enums (PR #95768)

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

[Lldb-commits] [lldb] [lldb] Parse and display register field enums (PR #95768)

2024-06-24 Thread Alex Langford via lldb-commits
@@ -4179,21 +4179,124 @@ struct GdbServerTargetInfo { RegisterSetMap reg_set_map; }; -static std::vector ParseFlagsFields(XMLNode flags_node, - unsigned size) { +static FieldEnum::Enumerators ParseEnumEvalues(const XML

[Lldb-commits] [lldb] [lldb][LibCxx] Move incorrect nullptr check (PR #96635)

2024-06-25 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Oh, yeah, that makes a lot more sense. https://github.com/llvm/llvm-project/pull/96635 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[Lldb-commits] [lldb] [lldb][test] Set target OS for API tests in case of remote testing (PR #96654)

2024-06-25 Thread Alex Langford via lldb-commits
@@ -97,6 +101,9 @@ def finalize_build_dictionary(dictionary): dictionary = {} dictionary["OS"] = "Android" dictionary["PIE"] = 1 +elif target_is_remote_linux(): +dictionary = dictionary or {} bulbazord wrote: Suggestion:

[Lldb-commits] [lldb] Fix test assertions in TestDAP_stepInTargets.py (PR #96687)

2024-06-25 Thread Alex Langford via lldb-commits
bulbazord wrote: One option might be to change the test to match against some list of expected strings. I'm not super familiar with this test but as Jeffrey said this could be OS/Platform dependent. https://github.com/llvm/llvm-project/pull/96687 ___

[Lldb-commits] [lldb] Fix flake in TestZerothFrame.py (PR #96685)

2024-06-25 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. Instead of assuming the thread's index or index ID, it might be a good idea to have a little helper method that can look through the inferior's threads to find the thread with the property that we care about. In this case, we'

[Lldb-commits] [lldb] Fix flake in TestZerothFrame.py (PR #96685)

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

[Lldb-commits] [lldb] [lldb] Construct SmallVector with ArrayRef (NFC) (PR #102793)

2024-08-12 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Thanks! https://github.com/llvm/llvm-project/pull/102793 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Makes sense to me and the change looks good. Feel free to move this out of draft mode :) https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.l

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -258,6 +258,7 @@ class TargetProperties : public Properties { bool GetDebugUtilityExpression() const; + bulbazord wrote: nit: spurious newline https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -3193,6 +3193,14 @@ bool Target::SetSectionUnloaded(const lldb::SectionSP §ion_sp, void Target::ClearAllLoadedSections() { m_section_load_history.Clear(); } +lldb_private::SummaryStatistics& Target::GetSummaryStatisticsForProvider(lldb_private::ConstString summary_provi

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][OSX] Add a fallback support exe directory (PR #103458)

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

[Lldb-commits] [lldb] [LLDB][OSX] Add a fallback support exe directory (PR #103458)

2024-08-13 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. lgtm, one small suggestion https://github.com/llvm/llvm-project/pull/103458 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][OSX] Add a fallback support exe directory (PR #103458)

2024-08-13 Thread Alex Langford via lldb-commits
@@ -144,16 +150,22 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) { #endif } else { // Find the bin path relative to the lib path where the cmake-based -// OS X .dylib lives. This is not going to work if the bin and lib -// dir are not

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

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

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,77 @@ +//===-- RealpathPrefixes.h --*- C++ -*-===// +// +// 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] Realpath symlinks for breakpoints (PR #102223)

2024-08-13 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Interesting. I left a few minor comments, I think Jim and Greg got a lot of the edge cases and bulky feedback out of the way already. :) https://github.com/llvm/llvm-project/pull/102223 ___ lldb-commits mailing

[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

2024-08-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,77 @@ +//===-- RealpathPrefixes.h --*- C++ -*-===// +// +// 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] [clang] [lldb] Use CLANG_RESOURCE_DIR more consistently (PR #103388)

2024-08-13 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. The LLDB changes look good to me. I can't speak for the clang portions but fwiw I think they look ok too. https://github.com/llvm/llvm-project/pull/103388 ___ lldb-commits mailing list lldb-comm

[Lldb-commits] [lldb] [lldb] Remove Phabricator usernames from Code Owners file (PR #102590)

2024-08-14 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Seems ok to me. I don't see what we gain from having a map from Phabricator name to contributor information for just maintainers, many changes are were made by people not on this list. https://github.com/llvm/llvm-project/pull/102590 ___

[Lldb-commits] [lldb] [lldb] Remove Phabricator usernames from Code Owners file (PR #102590)

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

[Lldb-commits] [lldb] [LLDB] Add AST node classes, functions, etc. for Data Inspection Lang… (PR #95738)

2024-08-14 Thread Alex Langford via lldb-commits
@@ -0,0 +1,459 @@ +//===-- DILAST.h *- C++ -*-===// +// +// 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] Fix windows debug build after 9d07f43 (PR #104896)

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

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-20 Thread Alex Langford via lldb-commits
@@ -17,6 +17,7 @@ #include "lldb/lldb-private-forward.h" #include "lldb/lldb-public.h" +#include <_types/_uint16_t.h> bulbazord wrote: Is this header portable? If you want access to `uint16_t` I'd recommend including `cinttypes` instead. https://github.com/

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-20 Thread Alex Langford via lldb-commits
@@ -278,6 +278,29 @@ class CommandObjectFrameSelect : public CommandObjectParsed { if (frame_idx == UINT32_MAX) frame_idx = 0; + // If moving up/down by one, skip over hidden frames. + if (*m_options.relative_frame_offset == 1 || + *m_options.

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-20 Thread Alex Langford via lldb-commits
@@ -40,8 +41,49 @@ static ConstString g_coro_frame = ConstString("__coro_frame"); char CPPLanguageRuntime::ID = 0; +/// A frame recognizer that is installed to hide libc++ implementation +/// details from the backtrace. +class LibCXXFrameRecognizer : public StackFrameRecogni

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-20 Thread Alex Langford via lldb-commits
@@ -40,8 +41,49 @@ static ConstString g_coro_frame = ConstString("__coro_frame"); char CPPLanguageRuntime::ID = 0; +/// A frame recognizer that is installed to hide libc++ implementation +/// details from the backtrace. +class LibCXXFrameRecognizer : public StackFrameRecogni

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

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

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

2024-08-20 Thread Alex Langford via lldb-commits
@@ -1316,6 +1316,7 @@ std::string GDBRemoteCommunication::ExpandRLE(std::string packet) { } else { decoded.push_back(*c); } +c++; bulbazord wrote: Having the `c++` here is equivalent to having it in the "increment" portion of the for loop c

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

2024-08-20 Thread Alex Langford via lldb-commits
@@ -1316,6 +1316,7 @@ std::string GDBRemoteCommunication::ExpandRLE(std::string packet) { } else { bulbazord wrote: I can't comment on it for some reason, but above this else is an `else if (*c == 0x7d)`. That block also does `*++c`, which will also go out

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Add selectable memory regions to SBSaveCore (PR #105442)

2024-08-21 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: I didn't look at all the implementation details, but the SBAPI stuff looks fine. I don't see anything that will cause trouble down the line. Thanks! https://github.com/llvm/llvm-project/pull/105442 ___ lldb-comm

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Add selectable memory regions to SBSaveCore (PR #105442)

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

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Add selectable memory regions to SBSaveCore (PR #105442)

2024-08-21 Thread Alex Langford via lldb-commits
@@ -90,6 +93,16 @@ bool SBSaveCoreOptions::RemoveThread(lldb::SBThread thread) { return m_opaque_up->RemoveThread(thread.GetSP()); } + +lldb::SBError SBSaveCoreOptions::AddMemoryRegionToSave(const SBMemoryRegionInfo ®ion) { + LLDB_INSTRUMENT_VA(this, region); + // Current

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Add selectable memory regions to SBSaveCore (PR #105442)

2024-08-21 Thread Alex Langford via lldb-commits
@@ -7,6 +7,9 @@ //===--===// #include "lldb/API/SBSaveCoreOptions.h" +#include "lldb/API/SBError.h" +#include "lldb/API/SBFileSpec.h" bulbazord wrote: SBFileSpec is unused right? Shouldn't n

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Add selectable memory regions to SBSaveCore (PR #105442)

2024-08-21 Thread Alex Langford via lldb-commits
@@ -80,6 +80,17 @@ class LLDB_API SBSaveCoreOptions { /// \return True if the thread was removed, false if it was not in the list. bool RemoveThread(lldb::SBThread thread); + /// Add a memory region to save in the core file. + /// + /// \param region The memory region t

[Lldb-commits] [lldb] [lldb][aix] Updating XCOFF, PPC entry in LLDB ArchSpec (PR #105523)

2024-08-21 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. This one looks very straightforward. I haven't been involved in any of the earlier discussions about AIX support so please wait for more involved folks to also take a look. https://github.com/llvm/llvm-project/pull/105523 ___

[Lldb-commits] [lldb] [lldb/Interpreter] Introduce `ScriptedStopHook{, Python}Interface` & make use of it (PR #105449)

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

[Lldb-commits] [lldb] [llvm] [Docs] Use cacheable myst_heading_slug_func value (PR #104847)

2024-08-26 Thread Alex Langford via lldb-commits
bulbazord wrote: I don't know much about the documentation but I added the two people who touch it more frequently than anyone else. https://github.com/llvm/llvm-project/pull/104847 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lis

[Lldb-commits] [lldb] [lldb] Cleanup dyld_process_t after constructing SharedCacheInfo (PR #106157)

2024-08-26 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/106157 Without calling `dyld_process_dispose`, LLDB will leak the memory associated with the `dyld_process_t`. rdar://134738265 >From 62bd1e90ea84cfb7bd6d18529918be544d036221 Mon Sep 17 00:00:00 2001 From: Alex Lan

[Lldb-commits] [lldb] [lldb] Cleanup dyld_process_t after constructing SharedCacheInfo (PR #106157)

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

[Lldb-commits] [lldb] [lldb] unique_ptr-ify some GetUserExpression APIs. (PR #106034)

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

[Lldb-commits] [lldb] [lldb] Turn lldb_private::Status into a value type. (PR #106163)

2024-08-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I haven't reviewed every single file but the ones I did look at look straightforward and correct. The changes to `Status` itself I feel positively about. I agree with the direction that this takes `Status` in. https://github.com/llvm/llv

[Lldb-commits] [lldb] [lldb] Deal with SupportFiles in SourceManager (NFC) (PR #106740)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -769,20 +769,26 @@ class CommandObjectBreakpointSet : public CommandObjectParsed { private: bool GetDefaultFile(Target &target, FileSpec &file, CommandReturnObject &result) { -uint32_t default_line; // First use the Source Manager's default

[Lldb-commits] [lldb] [lldb] Deal with SupportFiles in SourceManager (NFC) (PR #106740)

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

[Lldb-commits] [lldb] [lldb] Deal with SupportFiles in SourceManager (NFC) (PR #106740)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -159,22 +158,31 @@ class SourceManager { size_t DisplayMoreWithLineNumbers(Stream *s, uint32_t count, bool reverse, const SymbolContextList *bp_locs = nullptr); - bool SetDefaultFileAndLine(const FileSpec &file_spec, uint32_t line); +

[Lldb-commits] [lldb] [lldb] Deal with SupportFiles in SourceManager (NFC) (PR #106740)

2024-08-30 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM overall, I looked at the previous PR to get some context. https://github.com/llvm/llvm-project/pull/106740 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cg

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -96,7 +96,7 @@ class LLDB_API SBValueList { std::unique_ptr m_opaque_up; - void SetError(const lldb_private::Status &status); + void SetError(lldb_private::Status &&status); bulbazord wrote: This also breaks ABI. https://github.com/llvm/llvm-project/

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -97,7 +97,7 @@ class LLDB_API SBError { friend class lldb_private::ScriptInterpreter; friend class lldb_private::python::SWIGBridge; - SBError(const lldb_private::Status &error); + SBError(lldb_private::Status &&error); bulbazord wrote: This breaks A

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -37,49 +39,75 @@ class raw_ostream; using namespace lldb; using namespace lldb_private; -Status::Status() {} +char MachKernelError::ID; +char Win32Error::ID; +char ExpressionError::ID; + +namespace { +/// A std::error_code category for eErrorTypeGeneric. +class GenericCateg

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -107,7 +107,7 @@ class LLDB_API SBError { lldb_private::Status &ref(); - void SetError(const lldb_private::Status &lldb_error); + void SetError(lldb_private::Status &&lldb_error); bulbazord wrote: This also breaks ABI. https://github.com/llvm/llvm-pr

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -22,13 +22,14 @@ class ValueListImpl { public: ValueListImpl() = default; - ValueListImpl(const ValueListImpl &rhs) = default; + ValueListImpl(const ValueListImpl &rhs) bulbazord wrote: This may be an ABI break if compilers generate different code or s

[Lldb-commits] [lldb] [lldb] Include checksum in source cache dump (PR #106773)

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

[Lldb-commits] [lldb] [lldb] Do not use LC_FUNCTION_STARTS data to determine symbol size as symbols are created (PR #106791)

2024-08-30 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/106791 Summary: This improves the performance of ObjectFileMacho::ParseSymtab by removing eager and expensive work in favor of doing it later in a less-expensive fashion. Experiment: My goal was to understand LLDB's

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -22,13 +22,14 @@ class ValueListImpl { public: ValueListImpl() = default; - ValueListImpl(const ValueListImpl &rhs) = default; + ValueListImpl(const ValueListImpl &rhs) bulbazord wrote: Actually you're right here, ValueListImpl is an implementation det

[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

2024-08-30 Thread Alex Langford via lldb-commits
@@ -97,7 +97,7 @@ class LLDB_API SBError { friend class lldb_private::ScriptInterpreter; friend class lldb_private::python::SWIGBridge; - SBError(const lldb_private::Status &error); + SBError(lldb_private::Status &&error); bulbazord wrote: I have no con

[Lldb-commits] [lldb] [lldb] Do not use LC_FUNCTION_STARTS data to determine symbol size as symbols are created (PR #106791)

2024-09-04 Thread Alex Langford via lldb-commits
bulbazord wrote: > OK, I see in `Symtab::InitAddressIndexes` we go through the symbol table and > calculate the sizes of any entries that don't have a size based on the next > symbol, or the end of the section. > > A little further in ObjectFileMachO::ParseSymtab when we add any > LC_FUNCTION

[Lldb-commits] [lldb] [lldb] Fix a format string in ClangASTSource (PR #107325)

2024-09-04 Thread Alex Langford via lldb-commits
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/107325 Without this, LLDB asserts when enabling the expression logs. >From 622c5b636d1a505f1ea3f68540db28061d8606ce Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Wed, 4 Sep 2024 16:02:20 -0700 Subject: [PATCH]

[Lldb-commits] [lldb] [lldb] Fix a format string in ClangASTSource (PR #107325)

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

[Lldb-commits] [lldb] [lldb] Do not use LC_FUNCTION_STARTS data to determine symbol size as symbols are created (PR #106791)

2024-09-11 Thread Alex Langford via lldb-commits
https://github.com/bulbazord updated https://github.com/llvm/llvm-project/pull/106791 >From ae9d2e4fdfe9eb15f37c2b27da1b1f239d018391 Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Fri, 30 Aug 2024 12:49:33 -0700 Subject: [PATCH] [lldb] Do not use LC_FUNCTION_STARTS data to determine symbol

[Lldb-commits] [lldb] [lldb] Emit signpost intervals for progress events (NFC) (PR #108498)

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

[Lldb-commits] [lldb] [lldb] Do not use LC_FUNCTION_STARTS data to determine symbol size as symbols are created (PR #106791)

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

[Lldb-commits] [lldb] Fix command escape bug in lldb-dap (PR #72902)

2023-11-20 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM. It may be a good idea to move these APIs over to use std::optional instead of taking a default value so we can use 'value_or' instead of having to write logic to handle the default value through a parameter. https://github.com/llvm

[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (PR #73393)

2023-11-26 Thread Alex Langford via lldb-commits
@@ -817,8 +817,7 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) { if (line && line != LLDB_INVALID_LINE_NUMBER) object.try_emplace("line", line); bulbazord wrote: >From the [DAP >specification](https://microsoft.github.io/debug-adapter-p

[Lldb-commits] [lldb] [lldb] Improve error message for script commands when there's no interpreter (PR #73321)

2023-11-26 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I think overall this is a better error message. I think "mode" probably refers to the configuration LLDB was built with (e.g. `LLDB_ENABLE_PYTHON`) but that's really unhelpful for developers actually using LLDB. This message has been aro

[Lldb-commits] [lldb] [lldb][test] Remove `reason` from `unittest2.expectedFailure` usage (PR #73028)

2023-11-26 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: I suppose we don't really lose anything by moving away from `expectedFailure` from decorators? Is it worth deleting the custom decorator that we have as well? 😄 https://github.com/llvm/llvm-project/pull/73028 ___

[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (PR #73393)

2023-11-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Lgtm thanks! https://github.com/llvm/llvm-project/pull/73393 ___ 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 CompilerType class (second try). (PR #73472)

2023-11-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/73472 ___ 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 CompilerType class (second try). (PR #73472)

2023-11-27 Thread Alex Langford via lldb-commits
@@ -302,6 +303,256 @@ bool CompilerType::IsBeingDefined() const { return false; } +bool CompilerType::IsSmartPtrType() const { + // These regular expressions cover shared, unique and weak pointers both from + // stdlibc++ and libc+++. + + static llvm::Regex k_libcxx_std_u

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