[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > This looks great overall! Could you split this PR into two? One with the > refactoring and another one with the new features? That would make reviewing > easier Yes, I already split it out: https://github.com/llvm/llvm-project/pull/80753 is the refactor pr. I'll rebase this

[Lldb-commits] [lldb] [llvm] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-13 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/80753 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: just ping me when this PR is rebased https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] d58c128 - [lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753)

2024-02-13 Thread via lldb-commits
Author: Zequan Wu Date: 2024-02-13T11:38:02-05:00 New Revision: d58c128bc42b8a9cc45516ba9fe9e6a3c322d7b3 URL: https://github.com/llvm/llvm-project/commit/d58c128bc42b8a9cc45516ba9fe9e6a3c322d7b3 DIFF: https://github.com/llvm/llvm-project/commit/d58c128bc42b8a9cc45516ba9fe9e6a3c322d7b3.diff LOG

[Lldb-commits] [lldb] [llvm] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/80753 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/81541 >From a2d28693da09a569b49bc39a4743e302b2479d87 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 13 Feb 2024 11:55:33 -0500 Subject: [PATCH] [lldb-dap] Add support for data breakpoint. This implements functio

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > just ping me when this PR is rebased Rebased. https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -895,6 +906,32 @@ def request_setFunctionBreakpoints(self, names, condition=None, hitCondition=Non } return self.send_recv(command_dict) +def request_dataBreakpointInfo(self, variablesReference, name): +args_dict = {"variablesReference": variabl

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo edited https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo commented: Amazing stuff! I've been wanting this for a while. I left some minor comments. https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.o

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Walter Erquinigo via lldb-commits
@@ -2591,6 +2594,248 @@ void request_setFunctionBreakpoints(const llvm::json::Object &request) { g_dap.SendJSON(llvm::json::Value(std::move(response))); } +// "DataBreakpointInfoRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +/

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Walter Erquinigo via lldb-commits
@@ -2591,6 +2594,248 @@ void request_setFunctionBreakpoints(const llvm::json::Object &request) { g_dap.SendJSON(llvm::json::Value(std::move(response))); } +// "DataBreakpointInfoRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +/

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-02-13 Thread David Blaikie via lldb-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case Template

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-02-13 Thread Andrey Ali Khan Bolshakov via lldb-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case Template

[Lldb-commits] [lldb] 502a88b - [lldb][NFCI] Add header guard to PlatformRemoteAppleXR.h (#81565)

2024-02-13 Thread via lldb-commits
Author: Alex Langford Date: 2024-02-13T10:13:35-08:00 New Revision: 502a88bae799694d0ed90e1839cd7a0aacb6bc9d URL: https://github.com/llvm/llvm-project/commit/502a88bae799694d0ed90e1839cd7a0aacb6bc9d DIFF: https://github.com/llvm/llvm-project/commit/502a88bae799694d0ed90e1839cd7a0aacb6bc9d.diff

[Lldb-commits] [lldb] [lldb][NFCI] Add header guard to PlatformRemoteAppleXR.h (PR #81565)

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

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread Alex Langford via lldb-commits
@@ -825,6 +806,56 @@ StopInfoSP StopInfoMachException::CreateStopReasonWithMachException( break; } - return StopInfoSP(new StopInfoMachException(thread, exc_type, exc_data_count, - exc_code, exc_sub_code)); + return StopInf

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Makes sense to me! https://github.com/llvm/llvm-project/pull/81573 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread Alex Langford via lldb-commits
@@ -79,6 +79,11 @@ class StopInfo : public std::enable_shared_from_this { virtual bool IsValidForOperatingSystemThread(Thread &thread) { return true; } + /// A Continue operation can result in a false stop event + /// before any execution has happened in certain cases on

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

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

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread via lldb-commits
https://github.com/jimingham edited https://github.com/llvm/llvm-project/pull/81573 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread via lldb-commits
@@ -79,6 +79,11 @@ class StopInfo : public std::enable_shared_from_this { virtual bool IsValidForOperatingSystemThread(Thread &thread) { return true; } + /// A Continue operation can result in a false stop event + /// before any execution has happened in certain cases on

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread via lldb-commits
@@ -79,6 +79,11 @@ class StopInfo : public std::enable_shared_from_this { virtual bool IsValidForOperatingSystemThread(Thread &thread) { return true; } + /// A Continue operation can result in a false stop event + /// before any execution has happened in certain cases on

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread via lldb-commits
@@ -1226,6 +1227,7 @@ class Thread : public std::enable_shared_from_this, friend class StackFrameList; friend class StackFrame; friend class OperatingSystem; + friend class StopInfoMachException; jimingham wrote: Why is this necessary? GetPreviousFram

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread via lldb-commits
@@ -825,6 +806,56 @@ StopInfoSP StopInfoMachException::CreateStopReasonWithMachException( break; } - return StopInfoSP(new StopInfoMachException(thread, exc_type, exc_data_count, - exc_code, exc_sub_code)); + return StopInf

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread via lldb-commits
https://github.com/jimingham requested changes to this pull request. This looks good. You're being careful to do as narrow as possible a check for the buggy behavior. Handling this when the private StopInfo is great, that renders it a non-event in the higher level ShouldStop negotiations, whi

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread via lldb-commits
https://github.com/jimingham edited https://github.com/llvm/llvm-project/pull/81573 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] a04c636 - Don't count all the frames just to skip the current inlined ones. (#80918)

2024-02-13 Thread via lldb-commits
Author: jimingham Date: 2024-02-13T11:06:32-08:00 New Revision: a04c6366b156f508cdf84a32ef4484b53a6dabee URL: https://github.com/llvm/llvm-project/commit/a04c6366b156f508cdf84a32ef4484b53a6dabee DIFF: https://github.com/llvm/llvm-project/commit/a04c6366b156f508cdf84a32ef4484b53a6dabee.diff LOG

[Lldb-commits] [lldb] Don't count all the frames just to skip the current inlined ones. (PR #80918)

2024-02-13 Thread via lldb-commits
https://github.com/jimingham closed https://github.com/llvm/llvm-project/pull/80918 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Store proper integer bitwidth in Scalar Type (PR #81451)

2024-02-13 Thread Alex Langford via lldb-commits
bulbazord wrote: > > This uses `DataExtractor::GetMaxU64` which already does this under the > > hood. What does this do that isn't already being done? It may help if you > > add a test case to show what you are trying to fix. > > @clayborg @bulbazord The problem with GetMaxU64 is that it alway

[Lldb-commits] [lldb] Don't cause a premature UpdateIfNeeded when checking in SBValue::GetSP (PR #80222)

2024-02-13 Thread via lldb-commits
https://github.com/jimingham closed https://github.com/llvm/llvm-project/pull/80222 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Don't cause a premature UpdateIfNeeded when checking in SBValue::GetSP (PR #80222)

2024-02-13 Thread via lldb-commits
jimingham wrote: I thought I had some clever idea that made me think this would be sufficient. But on further thought, I think I was just delusional. I'll have to think about this some more. https://github.com/llvm/llvm-project/pull/80222 ___ lldb-

[Lldb-commits] [lldb] a69ecb2 - Add the ability to define a Python based command that uses CommandObjectParsed (#70734)

2024-02-13 Thread via lldb-commits
Author: jimingham Date: 2024-02-13T11:09:47-08:00 New Revision: a69ecb2420f644e31f18fcc61a07b3ca627e8939 URL: https://github.com/llvm/llvm-project/commit/a69ecb2420f644e31f18fcc61a07b3ca627e8939 DIFF: https://github.com/llvm/llvm-project/commit/a69ecb2420f644e31f18fcc61a07b3ca627e8939.diff LOG

[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

2024-02-13 Thread via lldb-commits
https://github.com/jimingham closed https://github.com/llvm/llvm-project/pull/70734 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][NFCI] Remove CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

2024-02-13 Thread Alex Langford via lldb-commits
bulbazord wrote: ping @clayborg How does this look now? https://github.com/llvm/llvm-project/pull/79901 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread via lldb-commits
https://github.com/jeffreytan81 edited https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread via lldb-commits
https://github.com/jeffreytan81 ready_for_review https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (jeffreytan81) Changes We got user reporting lldb crash while the debuggee is calling vfork() concurrently from multiple threads. The crash happens because the current implementation can only handle single vfork, vforkdone protocol t

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +""" +Make sure that the concurrent vfork() from multiple threads works correctly. +""" + + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * + + +class TestConcurrentVFork(Test

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/81564 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +""" +Make sure that the concurrent vfork() from multiple threads works correctly. +""" + + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * + + +class TestConcurrentVFork(Test

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +""" +Make sure that the concurrent vfork() from multiple threads works correctly. +""" + + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * + + +class TestConcurrentVFork(Test

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,45 @@ +#include +#include +#include +#include + clayborg wrote: Might be a good idea to create a global `std::vector` and a mutex to protect it. And any child processes that get forked get added to this vector. So maybe add: ``` std::mutex g_chil

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -120,15 +120,25 @@ bool NativeThreadLinux::GetStopReason(ThreadStopInfo &stop_info, case eStateCrashed: case eStateExited: case eStateSuspended: - case eStateUnloaded: + case eStateUnloaded: { if (log) LogThreadStopInfo(*log, m_stop_info, "m_stop_info in

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -5681,7 +5684,10 @@ void ProcessGDBRemote::DidVForkDone() { void ProcessGDBRemote::DidExec() { // If we are following children, vfork is finished by exec (rather than // vforkdone that is submitted for parent). - if (GetFollowForkMode() == eFollowChild) -m_vfork_in_

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,45 @@ +#include +#include +#include +#include + +int call_vfork() { + printf("Before vfork\n"); + + pid_t child_pid = vfork(); + + if (child_pid == -1) { +// Error handling +perror("vfork"); +return 1; + } else if (child_pid == 0) { +// This code

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -5670,8 +5673,8 @@ void ProcessGDBRemote::DidVFork(lldb::pid_t child_pid, lldb::tid_t child_tid) { } void ProcessGDBRemote::DidVForkDone() { - assert(m_vfork_in_progress); - m_vfork_in_progress = false; + --m_vfork_in_progress; + assert(m_vfork_in_progress >= 0); -

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -301,7 +301,8 @@ class ProcessGDBRemote : public Process, using FlashRange = FlashRangeVector::Entry; FlashRangeVector m_erased_flash_ranges; - bool m_vfork_in_progress; + // Number of vfork in process. + int m_vfork_in_progress; clayborg wrote: Do

[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,45 @@ +#include +#include +#include +#include + +int call_vfork() { + printf("Before vfork\n"); + + pid_t child_pid = vfork(); + + if (child_pid == -1) { +// Error handling +perror("vfork"); +return 1; + } else if (child_pid == 0) { +// This code

[Lldb-commits] [lldb] [lldb][test] Switch LLDB API tests from vendored unittest2 to unittest (PR #79945)

2024-02-13 Thread Jordan Rupprecht via lldb-commits
https://github.com/rupprecht updated https://github.com/llvm/llvm-project/pull/79945 >From ff9ef2f1dba9b2227916c16ebf7c11810e67a1dd Mon Sep 17 00:00:00 2001 From: Jordan Rupprecht Date: Mon, 29 Jan 2024 19:07:36 -0800 Subject: [PATCH 1/6] Blanket unittest2 -> unittest replacement (excluding do

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/81541 >From a2d28693da09a569b49bc39a4743e302b2479d87 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 13 Feb 2024 11:55:33 -0500 Subject: [PATCH 1/2] [lldb-dap] Add support for data breakpoint. This implements fun

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo approved this pull request. https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2591,6 +2594,248 @@ void request_setFunctionBreakpoints(const llvm::json::Object &request) { g_dap.SendJSON(llvm::json::Value(std::move(response))); } +// "DataBreakpointInfoRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +/

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2591,6 +2594,248 @@ void request_setFunctionBreakpoints(const llvm::json::Object &request) { g_dap.SendJSON(llvm::json::Value(std::move(response))); } +// "DataBreakpointInfoRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +/

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
ZequanWu wrote: I updated to add support for setting data breakpoint with expression. If `variablesReference` is 0 or not provided, interpret `name` as `${number of bytes}@${expression}` to set data breakpoint at the given expression because the spec https://microsoft.github.io/debug-adapter-

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: I think using @ is fine, but we can revisit it later if we see any issues. https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[Lldb-commits] [lldb] [lldb][NFCI] Remove CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -1666,33 +1646,52 @@ class CommandObjectProcessHandle : public CommandObjectParsed { // the user's options. ProcessSP process_sp = target.GetProcessSP(); -int stop_action = -1; // -1 means leave the current setting alone -int pass_action = -1; // -1 mea

[Lldb-commits] [lldb] f0b271e - Temporarily disable the TestAddParsedCommand.py while I figure out

2024-02-13 Thread Jim Ingham via lldb-commits
Author: Jim Ingham Date: 2024-02-13T13:16:30-08:00 New Revision: f0b271e4ebd2180f497694838ec9db0b2fd8ab4b URL: https://github.com/llvm/llvm-project/commit/f0b271e4ebd2180f497694838ec9db0b2fd8ab4b DIFF: https://github.com/llvm/llvm-project/commit/f0b271e4ebd2180f497694838ec9db0b2fd8ab4b.diff LO

[Lldb-commits] [lldb] 91f4a84 - [lldb][DWARFIndex] Use IDX_parent to implement GetFullyQualifiedType query (#79932)

2024-02-13 Thread via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2024-02-13T13:20:49-08:00 New Revision: 91f4a84a1504e718e4f4d4eef5db7713dc30a030 URL: https://github.com/llvm/llvm-project/commit/91f4a84a1504e718e4f4d4eef5db7713dc30a030 DIFF: https://github.com/llvm/llvm-project/commit/91f4a84a1504e718e4f4d4eef5db7713d

[Lldb-commits] [lldb] [lldb][DWARFIndex] Use IDX_parent to implement GetFullyQualifiedType query (PR #79932)

2024-02-13 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/79932 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Store proper integer bitwidth in Scalar Type (PR #81451)

2024-02-13 Thread Greg Clayton via lldb-commits
clayborg wrote: > > This uses `DataExtractor::GetMaxU64` which already does this under the > > hood. What does this do that isn't already being done? It may help if you > > add a test case to show what you are trying to fix. > > @clayborg @bulbazord The problem with GetMaxU64 is that it always

[Lldb-commits] [lldb] [lldb] Store proper integer bitwidth in Scalar Type (PR #81451)

2024-02-13 Thread Greg Clayton via lldb-commits
clayborg wrote: What code is taking a scalar and then trying to byte swap it after it has been created? https://github.com/llvm/llvm-project/pull/81451 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-13 Thread Vlad Serebrennikov via lldb-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/81666 This patch attempts to fix lookup in class template specialization that have an integral non-type template parameter of non-int type. unsigned 3 might be printed as `3` or `3U` depending on PrintingPolicy. This

[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-13 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Vlad Serebrennikov (Endilll) Changes This patch attempts to fix lookup in class template specialization that have an integral non-type template parameter of non-int type. unsigned 3 might be printed as `3` or `3U` depending on PrintingPoli

[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-13 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 fb48fd18c240574841378defacadff34238089bb bf92dc89858668518a5d842eac34bdf1b3eaade2 --

[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-13 Thread Vlad Serebrennikov via lldb-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81666 >From bf92dc89858668518a5d842eac34bdf1b3eaade2 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 14 Feb 2024 00:26:09 +0300 Subject: [PATCH 1/2] [lldb] Fix `FindDirectNestedType` not working with class

[Lldb-commits] [lldb] [lldb] Support custom printf formatting for variables (PR #81196)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/81196 >From 81a2034ff2b41e30a1f5b82c86b4d5d4c429ed52 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 8 Feb 2024 13:59:12 -0800 Subject: [PATCH 1/2] [lldb] Support custom printf formatting for variables --- lld

[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-13 Thread Vlad Serebrennikov via lldb-commits
Endilll wrote: This PR is a draft because new test, which is simplified `llvm::PointerIntPair` and `llvm::PointerIntPairInfo`, doesn't pass even with the proposed fix. https://github.com/llvm/llvm-project/pull/81666 ___ lldb-commits mailing list lldb-

[Lldb-commits] [lldb] [lldb] Support custom printf formatting for variables (PR #81196)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione ready_for_review https://github.com/llvm/llvm-project/pull/81196 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 8c56e78 - [lldb-dap] Add support for data breakpoint. (#81541)

2024-02-13 Thread via lldb-commits
Author: Zequan Wu Date: 2024-02-13T16:38:56-05:00 New Revision: 8c56e78ec531f0e2460213c20fff869b6b7add99 URL: https://github.com/llvm/llvm-project/commit/8c56e78ec531f0e2460213c20fff869b6b7add99 DIFF: https://github.com/llvm/llvm-project/commit/8c56e78ec531f0e2460213c20fff869b6b7add99.diff LOG

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -561,6 +561,46 @@ void EventThreadFunction() { } } +lldb::SBValue FindVariable(uint64_t variablesReference, llvm::StringRef name) { + lldb::SBValue variable; + if (lldb::SBValueList *top_scope = GetTopLevelScope(variablesReference)) { +bool is_duplicated_variable_na

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Greg Clayton via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] 5b38615 - [lldb][test] Switch LLDB API tests from vendored unittest2 to unittest (#79945)

2024-02-13 Thread via lldb-commits
Author: Jordan Rupprecht Date: 2024-02-13T16:19:41-06:00 New Revision: 5b386158aacac4b41126983a5379d36ed413d0ea URL: https://github.com/llvm/llvm-project/commit/5b386158aacac4b41126983a5379d36ed413d0ea DIFF: https://github.com/llvm/llvm-project/commit/5b386158aacac4b41126983a5379d36ed413d0ea.di

[Lldb-commits] [lldb] [lldb][test] Switch LLDB API tests from vendored unittest2 to unittest (PR #79945)

2024-02-13 Thread Jordan Rupprecht via lldb-commits
https://github.com/rupprecht closed https://github.com/llvm/llvm-project/pull/79945 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-13 Thread Michael Buch via lldb-commits
@@ -150,6 +150,23 @@ def test(self): invalid_type = task_type.FindDirectNestedType(None) self.assertFalse(invalid_type) +# Check that FindDirectNestedType works with types from AST +pointer = frame0.FindVariable("pointer") +pointer_type

[Lldb-commits] [lldb] [lldb] Support custom printf formatting for variables (PR #81196)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/81196 >From 81a2034ff2b41e30a1f5b82c86b4d5d4c429ed52 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 8 Feb 2024 13:59:12 -0800 Subject: [PATCH 1/3] [lldb] Support custom printf formatting for variables --- lld

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/81680 Followup fixes to resolve comments in https://github.com/llvm/llvm-project/pull/81541 >From f9c509c519c9937d2e2de5098c4241e936187527 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 13 Feb 2024 17:41:26 -05

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-13 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Zequan Wu (ZequanWu) Changes Followup fixes to resolve comments in https://github.com/llvm/llvm-project/pull/81541 --- Full diff: https://github.com/llvm/llvm-project/pull/81680.diff 1 Files Affected: - (modified) lldb/tools/lldb-dap/ll

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -561,6 +561,46 @@ void EventThreadFunction() { } } +lldb::SBValue FindVariable(uint64_t variablesReference, llvm::StringRef name) { + lldb::SBValue variable; + if (lldb::SBValueList *top_scope = GetTopLevelScope(variablesReference)) { +bool is_duplicated_variable_na

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione created https://github.com/llvm/llvm-project/pull/81681 None >From 35a48898e20ba45db829dbf137d88a8417dd4d7c Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Tue, 13 Feb 2024 14:43:33 -0800 Subject: [PATCH] [lldb] Add comment on cross printing of summary/value ---

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dave Lee (kastiglione) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/81681.diff 1 Files Affected: - (modified) lldb/source/Core/ValueObject.cpp (+1) ``diff diff --git a/lldb/source/Core/ValueObject.cpp b/ll

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/81681 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/81681 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/81681 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread Dave Lee via lldb-commits
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/81681 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread via lldb-commits
jimingham wrote: That did deserve a comment. To be pedantic, in the second branch you try `value/location` if no summary, but what you have is fine. https://github.com/llvm/llvm-project/pull/81681 ___ lldb-commits mailing list lldb-commits@lists.llvm

[Lldb-commits] [lldb] [lldb] Add comment on cross printing of summary/value (PR #81681)

2024-02-13 Thread via lldb-commits
https://github.com/jimingham approved this pull request. https://github.com/llvm/llvm-project/pull/81681 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Detect a Darwin kernel issue and work around it (PR #81573)

2024-02-13 Thread Jason Molenda via lldb-commits
https://github.com/jasonmolenda updated https://github.com/llvm/llvm-project/pull/81573 >From 177a242271c99ed3fec4c5f211cd6d07c6d88488 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Mon, 12 Feb 2024 21:34:13 -0800 Subject: [PATCH 1/2] [lldb] Detect a Darwin kernel issue and work around it

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Nico Weber via lldb-commits
@@ -52,5 +52,6 @@ executable("lldb-dap") { "RunInTerminal.cpp", "SourceBreakpoint.cpp", "lldb-dap.cpp", +"Watchpoint.cpp" nico wrote: Please don't update gn build files if you don't use the gn build. There's a bot that is able to do it most of

  1   2   >