[Lldb-commits] [lldb] [lldb][Linux] Moving APIs from HostInfoLinux to HostInfoPosix (PR #119694)

2024-12-17 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX edited https://github.com/llvm/llvm-project/pull/119694 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Linux] Moving APIs from HostInfoLinux to HostInfoPosix (PR #119694)

2024-12-17 Thread Dhruv Srivastava via lldb-commits
@@ -139,8 +177,53 @@ FileSpec HostInfoPosix::GetDefaultShell() { return FileSpec("/bin/sh"); } +FileSpec HostInfoPosix::GetProgramFileSpec() { + static FileSpec g_program_filespec; + + if (!g_program_filespec) { +char exe_path[PATH_MAX]; +ssize_t len = readlink("/p

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
https://github.com/rocallahan updated https://github.com/llvm/llvm-project/pull/112079 >From b021a56268c74010eae017d2d1169ab8b79978b3 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 17 Dec 2024 23:40:34 + Subject: [PATCH 1/9] [lldb] Move thread-notification setup to happen later

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
rocallahan wrote: > (The precommit test failures look real though) Indeed. The problem was in `ThreadList::WillResume()`, which is a tricky function that my changes made even trickier. The basic problem is that we make execution direction depend on the state of the thread plans and which threa

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
https://github.com/rocallahan updated https://github.com/llvm/llvm-project/pull/112079 >From 0c9f80e8d0e925cc75e6ef2696955e2a60782689 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 17 Dec 2024 23:40:34 + Subject: [PATCH 1/9] Move thread-notification setup to happen later and ch

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -0,0 +1,185 @@ +import logging +import os +import os.path +import random + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +import lldbgdbserverutils +from lldbsuite.support import seven + + +class GDBProxyTestBase(TestBase): +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -199,6 +199,20 @@ uint64_t GDBRemoteCommunicationClient::GetRemoteMaxPacketSize() { return m_max_packet_size; } +bool GDBRemoteCommunicationClient::GetReverseContinueSupported() { + if (m_supports_reverse_continue == eLazyBoolCalculate) { +GetRemoteQSupported(); +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -0,0 +1,151 @@ +import lldb +import time +import unittest +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +from lldbsuite.test.gdbclientutils import * +from lldbsuite.test.lldbreverse import ReverseTestBase +from lldbsuite.test import lldbutil +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -608,19 +594,47 @@ bool ThreadList::WillResume() { } bool need_to_resume = true; - if (run_me_only_list.GetSize(false) == 0) { +*direction = m_process.GetBaseDirection(); +// We've determined the direction so now we can determine which +// threads need to

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -583,6 +583,14 @@ SBError SBProcess::Continue() { return sb_error; } +SBError SBProcess::ContinueInDirection(RunDirection direction) { + ProcessSP process_sp(GetSP()); + if (process_sp) { +process_sp->SetBaseDirection(direction); + } rocallahan wro

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -0,0 +1,185 @@ +import logging +import os +import os.path +import random + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +import lldbgdbserverutils +from lldbsuite.support import seven + + +class GDBProxyTestBase(TestBase): +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -0,0 +1,185 @@ +import logging +import os +import os.path +import random + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +import lldbgdbserverutils +from lldbsuite.support import seven + + +class GDBProxyTestBase(TestBase): +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -115,14 +115,18 @@ class ThreadList : public ThreadCollection { /// If a thread can "resume" without having to resume the target, it /// will return false for WillResume, and then the process will not be /// restarted. + /// Sets *direction to the run direction of the

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
@@ -1104,9 +1104,15 @@ class Process : public std::enable_shared_from_this, /// \see Thread:Resume() /// \see Thread:Step() /// \see Thread:Suspend() - virtual Status DoResume() { -return Status::FromErrorStringWithFormatv( -"error: {0} does not support resu

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Robert O'Callahan via lldb-commits
https://github.com/rocallahan updated https://github.com/llvm/llvm-project/pull/112079 >From 0c9f80e8d0e925cc75e6ef2696955e2a60782689 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 17 Dec 2024 23:40:34 + Subject: [PATCH 1/9] Move thread-notification setup to happen later and ch

[Lldb-commits] [lldb] [lldb][NFC] Defer python init until ScriptInterpreter is created (PR #105757)

2024-12-17 Thread Daniel Xu via lldb-commits
danobi wrote: Hi @JDevlieghere, we hit this issue again recently. We're wondering if we have a path forward for landing this fix. https://github.com/llvm/llvm-project/pull/105757 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.

[Lldb-commits] [lldb] [WIP][lldb][DWARFASTParserClang] Eagerly search definitions for Objective-C classes (PR #119860)

2024-12-17 Thread Michael Buch via lldb-commits
Michael137 wrote: > > I think the way it's currently written doesn't handle the case where we > > call ParseStructureLikeDIE with a forward declaration, and then later on > > with a definition DIE. For C++ structures we handle that by updating the > > UniqueTypeMap with the definition DIE, etc

[Lldb-commits] [lldb] [WIP][lldb][DWARFASTParserClang] Eagerly search definitions for Objective-C classes (PR #119860)

2024-12-17 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > I think the way it's currently written doesn't handle the case where we call > ParseStructureLikeDIE with a forward declaration, and then later on with a > definition DIE. For C++ structures we handle that by updating the > UniqueTypeMap with the definition DIE, etc. We'll pr

[Lldb-commits] [lldb] [lldb] Add missing operations to GetOpcodeDataSize (PR #120163)

2024-12-17 Thread Adrian Prantl via lldb-commits
@@ -307,6 +308,8 @@ static lldb::offset_t GetOpcodeDataSize(const DataExtractor &data, case DW_OP_regx:// 0x90 1 ULEB128 register case DW_OP_fbreg: // 0x91 1 SLEB128 offset case DW_OP_piece: // 0x93 1 ULEB128 size of piece addressed + cas

[Lldb-commits] [lldb] [llvm] [lldb][telemetry] Implement LLDB Telemetry (part 1) (PR #119716)

2024-12-17 Thread Vy Nguyen via lldb-commits
@@ -0,0 +1,338 @@ + +//===-- 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] [llvm] [lldb][telemetry] Implement LLDB Telemetry (part 1) (PR #119716)

2024-12-17 Thread Vy Nguyen via lldb-commits
@@ -0,0 +1,338 @@ + +//===-- Telemetry.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] Improve error reporting in GetLocation_DW_OP_addr (PR #120162)

2024-12-17 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/120162 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add missing operations to GetOpcodeDataSize (PR #120163)

2024-12-17 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/120163 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add missing operations to GetOpcodeDataSize (PR #120163)

2024-12-17 Thread Adrian Prantl via lldb-commits
@@ -269,6 +269,7 @@ static lldb::offset_t GetOpcodeDataSize(const DataExtractor &data, // All opcodes that have a single ULEB (signed or unsigned) argument case DW_OP_addrx: // 0xa1 1 ULEB128 index + case DW_OP_constx: // 0xa2 1 ULEB128 index -

[Lldb-commits] [lldb] [llvm] [lldb][telemetry] Implement LLDB Telemetry (part 1) (PR #119716)

2024-12-17 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 36c34ec967c28c77406fe85ef3237a167a243763 23dd58e37826a1ba300b7eb887104c46ab92c0f9 --e

[Lldb-commits] [lldb] [llvm] [lldb][telemetry] Implement LLDB Telemetry (part 1) (PR #119716)

2024-12-17 Thread Vy Nguyen via lldb-commits
@@ -0,0 +1,338 @@ + +//===-- 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] [llvm] [lldb][telemetry] Implement LLDB Telemetry (part 1) (PR #119716)

2024-12-17 Thread Vy Nguyen via lldb-commits
@@ -0,0 +1,309 @@ +//===-- Telemetry.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:

[Lldb-commits] [lldb] [llvm] [lldb][telemetry] Implement LLDB Telemetry (part 1) (PR #119716)

2024-12-17 Thread Vy Nguyen via lldb-commits
@@ -0,0 +1,338 @@ + +//===-- Telemetry.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb][test] Add test-coverage for DW_AT_APPLE_objc_complete_type parsing (PR #120279)

2024-12-17 Thread Michael Buch via lldb-commits
Michael137 wrote: [`TestHiddenIvars.py`](https://github.com/llvm/llvm-project/blob/d2e7ee77d33e8b3be3b1d4e9bc5bc4c60b62b554/lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py) looks like it intended to test the same codepath, but it passes cleanly with and without the calls to `FindComplet

[Lldb-commits] [lldb] [lldb][test] Add test-coverage for DW_AT_APPLE_objc_complete_type parsing (PR #120279)

2024-12-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes When given a DIE for an Objective-C interface (which doesn't have a `DW_AT_APPLE_objc_complete_type`), the `DWARFASTParserClang` will try to find the DIE which corresponds to the implementation to complete

[Lldb-commits] [lldb] [lldb][test] Add test-coverage for DW_AT_APPLE_objc_complete_type parsing (PR #120279)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/120279 When given a DIE for an Objective-C interface (which doesn't have a `DW_AT_APPLE_objc_complete_type`), the `DWARFASTParserClang` will try to find the DIE which corresponds to the implementation to complete t

[Lldb-commits] [lldb] [LLDB] Add external progress bit category (PR #120171)

2024-12-17 Thread Jacob Lalonde via lldb-commits
@@ -106,9 +107,15 @@ void Progress::ReportProgress() { if (completed < m_prev_completed) return; // An overflow in the m_completed counter. Just ignore these events. + // Change the category bit if we're an internal or external progress. + uint32_t progress_category_b

[Lldb-commits] [clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/120154 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 9fc54c0 - [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (#120154)

2024-12-17 Thread via lldb-commits
Author: Michael Buch Date: 2024-12-17T16:40:10Z New Revision: 9fc54c0e8049553a30c17a3698445d58800916c9 URL: https://github.com/llvm/llvm-project/commit/9fc54c0e8049553a30c17a3698445d58800916c9 DIFF: https://github.com/llvm/llvm-project/commit/9fc54c0e8049553a30c17a3698445d58800916c9.diff LOG:

[Lldb-commits] [lldb] [LLDB] Add external progress bit category (PR #120171)

2024-12-17 Thread Jonas Devlieghere via lldb-commits
@@ -195,10 +195,10 @@ enum Format { ///< character arrays that can contain non printable ///< characters eFormatAddressInfo,///< Describe what an address points to (func + offset - ///< with file/line,

[Lldb-commits] [lldb] [LLDB] Add external progress bit category (PR #120171)

2024-12-17 Thread Jonas Devlieghere via lldb-commits
@@ -1357,6 +1357,7 @@ enum DebuggerBroadcastBit { eBroadcastBitError = (1 << 2), eBroadcastSymbolChange = (1 << 3), eBroadcastBitProgressCategory = (1 << 4), + eBroadcastBitExternalProgressCategory = (1 << 5), JDevlieghere wrote: You'll also need to add

[Lldb-commits] [lldb] [LLDB] Add external progress bit category (PR #120171)

2024-12-17 Thread Jonas Devlieghere via lldb-commits
@@ -149,6 +156,9 @@ class Progress { /// The "completed" value of the last reported event. std::optional m_prev_completed; + + /// The origin of this progress event. + ProgressOrigin m_origin; JDevlieghere wrote: Pavel const'ified the things that cannot

[Lldb-commits] [lldb] [LLDB] Add external progress bit category (PR #120171)

2024-12-17 Thread Jonas Devlieghere via lldb-commits
@@ -106,9 +107,15 @@ void Progress::ReportProgress() { if (completed < m_prev_completed) return; // An overflow in the m_completed counter. Just ignore these events. + // Change the category bit if we're an internal or external progress. + uint32_t progress_category_b

[Lldb-commits] [lldb] [LLDB] Add external progress bit category (PR #120171)

2024-12-17 Thread Jonas Devlieghere via lldb-commits
@@ -21,6 +21,12 @@ namespace lldb_private { +/// Enum to indicate the origin of a progress event, internal or external. +enum class ProgressOrigin : uint8_t { + eLLDBInternal = 0, + eExternal = 1, JDevlieghere wrote: Let's go with `eInternal` and `eExterna

[Lldb-commits] [clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-17 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/120154 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2024-12-17 Thread Dhruv Srivastava via lldb-commits
DhruvSrivastavaX wrote: Okay, let me then focus on other areas till we are actually able to build this PR. Will come back to this once we have some base build-ability on AIX. https://github.com/llvm/llvm-project/pull/118160 ___ lldb-commits mailing li

[Lldb-commits] [lldb] [lldb] Store *signed* ranges in lldb_private::Block (PR #120224)

2024-12-17 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. Fine assuming no one puts part of a function > 2GB before its entry point. Seems unlikely given that no one tried to put anything > 4GB after the entry point either. LGTM. https://github.com/llvm/llvm-project/pull/120224 ___

[Lldb-commits] [clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/120154 >From b4c56cb11feb10a153edfd1aff8d53e43f7bb7db Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 16 Dec 2024 22:27:08 + Subject: [PATCH 1/2] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forw

[Lldb-commits] [lldb] [lldb][DWARF] Remove obsolete calls to Supports_DW_AT_APPLE_objc_complete_type and DW_AT_decl_file_attributes_are_invalid (PR #120226)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/120226 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] f176388 - [lldb][DWARF] Remove obsolete calls to Supports_DW_AT_APPLE_objc_complete_type and DW_AT_decl_file_attributes_are_invalid (#120226)

2024-12-17 Thread via lldb-commits
Author: Michael Buch Date: 2024-12-17T13:32:25Z New Revision: f1763888bb96c9c4069d8d06908337196556 URL: https://github.com/llvm/llvm-project/commit/f1763888bb96c9c4069d8d06908337196556 DIFF: https://github.com/llvm/llvm-project/commit/f1763888bb96c9c4069d8d06908337196556.diff LOG:

[Lldb-commits] [lldb] [lldb][DWARF] Remove obsolete calls to Supports_DW_AT_APPLE_objc_complete_type and DW_AT_decl_file_attributes_are_invalid (PR #120226)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/120226 >From c48e53626dd7a54d3b78c86cb2667be4009411a2 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 17 Dec 2024 12:16:54 + Subject: [PATCH 1/2] [lldb] Remove references to llvm-gcc --- .../Plugins/Sym

[Lldb-commits] [lldb] [lldb] Remove references to llvm-gcc (PR #120225)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/120225 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] e0a79ee - [lldb] Remove references to llvm-gcc (#120225)

2024-12-17 Thread via lldb-commits
Author: Michael Buch Date: 2024-12-17T13:23:13Z New Revision: e0a79eeca27b894bca6aa3f5dfdd8f1ac6644381 URL: https://github.com/llvm/llvm-project/commit/e0a79eeca27b894bca6aa3f5dfdd8f1ac6644381 DIFF: https://github.com/llvm/llvm-project/commit/e0a79eeca27b894bca6aa3f5dfdd8f1ac6644381.diff LOG:

[Lldb-commits] [lldb] [WIP][lldb][DWARFASTParserClang] Eagerly search definitions for Objective-C classes (PR #119860)

2024-12-17 Thread Michael Buch via lldb-commits
Michael137 wrote: On second thought, this is more a bug in the `-gmodules` debug-info generation than it is in LLDB. The changes to how we fetch the definitions for structures just exposed it. Put up a patch so `-gmodules` doesn't drop the `DW_AT_APPLE_runtime_class` from the forward declarati

[Lldb-commits] [lldb] [lldb] Store *signed* ranges in lldb_private::Block (PR #120224)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -12,6 +12,29 @@ using namespace lldb_private; +TEST(RangeVector, SignedBaseType) { + using RangeVector = RangeVector; + using Entry = RangeVector::Entry; + + RangeVector V; + V.Append(10, 5); + V.Append(-3, 6); + V.Append(-10, 3); + V.Sort(); + EXPECT_THAT(V, +

[Lldb-commits] [lldb] [lldb] Remove references to llvm-gcc (PR #120225)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/120225 >From c48e53626dd7a54d3b78c86cb2667be4009411a2 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 17 Dec 2024 12:16:54 + Subject: [PATCH 1/2] [lldb] Remove references to llvm-gcc --- .../Plugins/Sym

[Lldb-commits] [lldb] [lldb] Store *signed* ranges in lldb_private::Block (PR #120224)

2024-12-17 Thread David Spickett via lldb-commits
@@ -12,6 +12,29 @@ using namespace lldb_private; +TEST(RangeVector, SignedBaseType) { + using RangeVector = RangeVector; + using Entry = RangeVector::Entry; + + RangeVector V; + V.Append(10, 5); + V.Append(-3, 6); + V.Append(-10, 3); + V.Sort(); + EXPECT_THAT(V, +

[Lldb-commits] [lldb] [lldb][DWARF] Remove obsolete calls to Supports_DW_AT_APPLE_objc_complete_type and DW_AT_decl_file_attributes_are_invalid (PR #120226)

2024-12-17 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. I would expect that plain gcc also does not support DW_AT_APPLE_objc_complete_type, but I also don't see anyone stepping in to support gcc-produced objc debug info. https://github.com/llvm/llvm-project/pull/120226 __

[Lldb-commits] [lldb] [lldb] Remove references to llvm-gcc (PR #120225)

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

[Lldb-commits] [lldb] [lldb][DWARF] Remove obsolete calls to Supports_DW_AT_APPLE_objc_complete_type and DW_AT_decl_file_attributes_are_invalid (PR #120226)

2024-12-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes Depends on https://github.com/llvm/llvm-project/pull/120225 With `llvm-gcc` support being removed from LLDB, these APIs are now trivial and can be removed too. --- Full diff: https://github.com/llvm/llvm-p

[Lldb-commits] [lldb] [lldb][DWARF] Remove obsolete calls to Supports_DW_AT_APPLE_objc_complete_type and DW_AT_decl_file_attributes_are_invalid (PR #120226)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/120226 Depends on https://github.com/llvm/llvm-project/pull/120225 With `llvm-gcc` support being removed from LLDB, these APIs are now trivial and can be removed too. >From c48e53626dd7a54d3b78c86cb2667be4009411a2

[Lldb-commits] [lldb] 794cd81 - [lldb][DWARFASTParserClang][ObjC] Remove workaround for old ObjC DWARF (#120218)

2024-12-17 Thread via lldb-commits
Author: Michael Buch Date: 2024-12-17T12:35:28Z New Revision: 794cd814ee0260c094b98e453c89faf5a1a1df01 URL: https://github.com/llvm/llvm-project/commit/794cd814ee0260c094b98e453c89faf5a1a1df01 DIFF: https://github.com/llvm/llvm-project/commit/794cd814ee0260c094b98e453c89faf5a1a1df01.diff LOG:

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][ObjC] Remove workaround for old ObjC DWARF (PR #120218)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/120218 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove references to llvm-gcc (PR #120225)

2024-12-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes The `llvm-gcc` front-end has been EOL'd at least since 2011 (based on some `git` archeology). And Clang/LLVM has been removing references to it ever since. This patch removes the remaining references to it

[Lldb-commits] [lldb] [lldb] Remove references to llvm-gcc (PR #120225)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/120225 The `llvm-gcc` front-end has been EOL'd at least since 2011 (based on some `git` archeology). And Clang/LLVM has been removing references to it ever since. This patch removes the remaining references to it f

[Lldb-commits] [lldb] [lldb] Store *signed* ranges in lldb_private::Block (PR #120224)

2024-12-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes This is to support functions whose entry points aren't their lowest address (https://discourse.llvm.org/t/rfcish-support-for-discontinuous-functions/83244). The alternative is to keep blocks relative to the low

[Lldb-commits] [lldb] [lldb] Store *signed* ranges in lldb_private::Block (PR #120224)

2024-12-17 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/120224 This is to support functions whose entry points aren't their lowest address (https://discourse.llvm.org/t/rfcish-support-for-discontinuous-functions/83244). The alternative is to keep blocks relative to the lowes

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][ObjC] Remove workaround for old ObjC DWARF (PR #120218)

2024-12-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/120218 With all the recent versions of Clang that I tested, ObjC forward declarations like ``` @class ForwardObjcClass; ``` don't emit the kind of DWARF that this workaround was put in place for. Also, zero-sized s

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][ObjC] Remove workaround for old ObjC DWARF (PR #120218)

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

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][ObjC] Remove workaround for old ObjC DWARF (PR #120218)

2024-12-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes With all the recent versions of Clang that I tested, ObjC forward declarations like ``` @class ForwardObjcClass; ``` don't emit the kind of DWARF that this workaround was put in place for. Also, zero-sized

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][ObjC] Remove workaround for old ObjC DWARF (PR #120218)

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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
labath wrote: (The precommit test failures look real though) https://github.com/llvm/llvm-project/pull/112079 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,151 @@ +import lldb +import time +import unittest +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +from lldbsuite.test.gdbclientutils import * +from lldbsuite.test.lldbreverse import ReverseTestBase +from lldbsuite.test import lldbutil +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,185 @@ +import logging +import os +import os.path +import random + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +import lldbgdbserverutils +from lldbsuite.support import seven + + +class GDBProxyTestBase(TestBase): +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -608,19 +594,47 @@ bool ThreadList::WillResume() { } bool need_to_resume = true; - if (run_me_only_list.GetSize(false) == 0) { +*direction = m_process.GetBaseDirection(); +// We've determined the direction so now we can determine which +// threads need to

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,185 @@ +import logging +import os +import os.path +import random + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +import lldbgdbserverutils +from lldbsuite.support import seven + + +class GDBProxyTestBase(TestBase): +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -583,6 +583,14 @@ SBError SBProcess::Continue() { return sb_error; } +SBError SBProcess::ContinueInDirection(RunDirection direction) { + ProcessSP process_sp(GetSP()); + if (process_sp) { +process_sp->SetBaseDirection(direction); + } labath wrote:

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,185 @@ +import logging +import os +import os.path +import random + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.gdbclientutils import * +import lldbgdbserverutils +from lldbsuite.support import seven + + +class GDBProxyTestBase(TestBase): +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -115,14 +115,18 @@ class ThreadList : public ThreadCollection { /// If a thread can "resume" without having to resume the target, it /// will return false for WillResume, and then the process will not be /// restarted. + /// Sets *direction to the run direction of the

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -199,6 +199,20 @@ uint64_t GDBRemoteCommunicationClient::GetRemoteMaxPacketSize() { return m_max_packet_size; } +bool GDBRemoteCommunicationClient::GetReverseContinueSupported() { + if (m_supports_reverse_continue == eLazyBoolCalculate) { +GetRemoteQSupported(); +

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: The test harness looks (mostly) good to me. https://github.com/llvm/llvm-project/pull/112079 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -1104,9 +1104,15 @@ class Process : public std::enable_shared_from_this, /// \see Thread:Resume() /// \see Thread:Step() /// \see Thread:Suspend() - virtual Status DoResume() { -return Status::FromErrorStringWithFormatv( -"error: {0} does not support resu

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Make workaround for the Dynamic loader issue (PR #120166)

2024-12-17 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Marking a file as being generated by lldb makes sense, but given that there's no way (is there?) to reserve a flag bit for lldb, and the flag bits are a relatively scarce commodity (there's 64 of them total, how many are free right now?). What would you sa

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Make workaround for the Dynamic loader issue (PR #120166)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -45,6 +45,10 @@ llvm::ArrayRef MinidumpParser::GetData() { m_data_sp->GetByteSize()); } +const llvm::minidump::Header *MinidumpParser::GetHeader() const { + return reinterpret_cast(m_file.get()); labath wrote: This looks w

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Make workaround for the Dynamic loader issue (PR #120166)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -453,10 +456,12 @@ MinidumpParser::FindMemoryRange(lldb::addr_t addr) { if (!GetStream(StreamType::Memory64List).empty()) { llvm::Error err = llvm::Error::success(); -for (const auto &memory_desc : GetMinidumpFile().getMemory64List(err)) { - if (memory_desc.

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Make workaround for the Dynamic loader issue (PR #120166)

2024-12-17 Thread Pavel Labath via lldb-commits
@@ -32,6 +32,10 @@ LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); struct Header { static constexpr uint32_t MagicSignature = 0x504d444d; // PMDM static constexpr uint16_t MagicVersion = 0xa793; + // We set all the high bits flag to indicate this is from LLDB. + // We don't wan

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Make workaround for the Dynamic loader issue (PR #120166)

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