@@ -2835,6 +2835,34 @@ void PruneThreadPlans();
AddressRanges &matches, size_t alignment,
size_t max_matches);
+ template
+ lldb::addr_t FindInMemoryGeneric(IT &&iterator, lldb::addr_t low,
+
@@ -2835,6 +2835,34 @@ void PruneThreadPlans();
AddressRanges &matches, size_t alignment,
size_t max_matches);
+ template
+ lldb::addr_t FindInMemoryGeneric(IT &&iterator, lldb::addr_t low,
+
@@ -33,6 +34,23 @@ class PostMortemProcess : public Process {
FileSpec GetCoreFile() const override { return m_core_file; }
protected:
+ typedef lldb_private::Range FileRange;
+ typedef lldb_private::RangeDataVector
+ VMRangeToFileOffset;
+ typedef lldb_private::Rang
mbucko wrote:
> Thinking about this some more here are my thoughts: both
> `ObjectFile::PeekData` and `PostMoretemProcess::PeekMemory` should have a way
> to say "I am not implemented". Using either a llvm::Expected or
> std::optional. If `ObjectFile::PeekData` returns unimplemented, we need t
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/92014
Summary:
This adds new SB API calls and classes to allow a user of the SB API to obtain
an address range from SBFunction and SBBlock.
Test Plan:
Reviewers: clayborg
Subscribers: lldb-commits
Tasks:
Tags:
>Fr
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From ec177a0cf8c4816f86ab47e77f29e3fdf37323fd Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
@@ -242,6 +244,12 @@ class AddressRange {
lldb::addr_t m_byte_size = 0; ///< The size in bytes of this address range.
};
+// Forward-declarable wrapper.
+class AddressRanges : public std::vector {
+public:
+ using std::vector::vector;
+};
mbucko wrote:
I f
mbucko wrote:
> I forgot to ask, what is the motivation behind this change? Is there
> something you can't do with the SBAPI right now or that is better expressed
> with SBAddressRange and SBAddressRangeList?
Yes, I want to add the following API:
lldb::SBError SBProcess::FindInMemory(const SB
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 4255281194148b59dab6928b59f8bc7df93ca10e Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From f857042f377e107310b5cddfb4fcaed57706b5cc Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
@@ -52,6 +53,8 @@ class LLDB_API SBBlock {
lldb::SBAddress GetRangeEndAddress(uint32_t idx);
+ lldb::SBAddressRange GetRangeAtIndex(uint32_t idx);
+
mbucko wrote:
Currently Block doesn't have GetRanges() function but it does have
GetRangeAtIndex().
Would
@@ -44,6 +45,8 @@ class LLDB_API SBFunction {
lldb::SBAddress GetEndAddress();
+ lldb::SBAddressRange GetRange();
+
mbucko wrote:
GetRange() is just a forwarded function from lldb_private::Function::GetRange()
https://github.com/llvm/llvm-project/pull/92
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From c28e0952a8c422a6dcadae0b2dce8f31a45c8d06 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 44871da2279dc2fe001584f0cd41dc9b76b43fbd Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko edited https://github.com/llvm/llvm-project/pull/92014
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,102 @@
+//===-- SBAddressRange.cpp
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From dc84f8b94c2500b3c1caf2b0c053069989cfc082 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From a169c0fd5bd599c8f4dc77555616a2bd5b967647 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
@@ -0,0 +1,139 @@
+//===-- SBAddressRangeList.cpp
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 18c711d13a82a1c2559700c6b23d9300b0e5275b Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
@@ -44,6 +45,8 @@ class LLDB_API SBFunction {
lldb::SBAddress GetEndAddress();
+ lldb::SBAddressRange GetRange();
+
mbucko wrote:
Or did you want me to return SBAddressRangeList which will always contain only
one SBAddressRange unless SBFunction ever cha
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 750414bde848902d3fe471e84912020a1f67d193 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 1be2c95ae31621c6f5df72159f35b938318f9ed7 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 939d42eba9f88d90ac72782415640bbab360645c Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 0d8a110b922fde8e0439391f87a117c1d82913c4 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
@@ -0,0 +1,102 @@
+//===-- SBAddressRange.cpp
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,215 @@
+"""
+Test SBAddressRange APIs.
+"""
+
+import lldb
+from lldbsuite.test.lldbtest import *
+
+
+class AddressRangeTestCase(TestBase):
+NO_DEBUG_INFO_TESTCASE = True
+
+def setUp(self):
+TestBase.setUp(self)
+
+self.build()
+exe = s
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From b29f3fcea87c3ce7cf65de14dc924f1862c63098 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
@@ -0,0 +1,11 @@
+%extend lldb::SBAddressRange {
+#ifdef SWIGPYTHON
+%pythoncode%{
+ def __repr__(self):
+import lldb
mbucko wrote:
it's not, produces the following error:
`NameError: name 'lldb' is not defined`
https://github.com/llvm/llvm-proj
@@ -0,0 +1,28 @@
+%extend lldb::SBAddressRangeList {
+#ifdef SWIGPYTHON
+%pythoncode%{
+def __len__(self):
+ '''Return the number of address ranges in a lldb.SBAddressRangeList
object.'''
+ return self.GetSize()
+
+def __iter__(self):
+ '''Iterate over
@@ -0,0 +1,28 @@
+%extend lldb::SBAddressRangeList {
+#ifdef SWIGPYTHON
+%pythoncode%{
+def __len__(self):
+ '''Return the number of address ranges in a lldb.SBAddressRangeList
object.'''
+ return self.GetSize()
+
+def __iter__(self):
+ '''Iterate over
@@ -0,0 +1,54 @@
+//===-- SBAddressRangeList.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
@@ -0,0 +1,91 @@
+//===-- SBAddressRangeList.cpp
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From bcca8420736283bf564cf86e1442f023ba63b9e9 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
@@ -0,0 +1,65 @@
+//===-- SBAddressRange.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
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From 74ddb1e1cf40a388c1d57145fed3953ee4a5eab7 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/92014
>From a436c3faf4017b0c84b45046f6eedef9229d3e1d Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Fri, 10 May 2024 12:42:03 -0700
Subject: [PATCH] Add AddressRange to SB API
Summary:
This adds new SB API calls and c
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/93688
Summary:
Moving CommandObjectMemoryFind::FastSearch() to Process::FindInMemory(). Plan
to expose FindInMemory as public API in SBProcess.
Test Plan:
ninja check-lldb
Reviewers: clayborg
Subscribers:
Tasks:
lld
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/93688
>From 6e461bef5a7f3bda3ff413168b3cc2a26b41cdb0 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Wed, 29 May 2024 06:38:22 -0700
Subject: [PATCH] [nfc][lldb] Move FastSearch from CommandObjectMemoryFind to
Process
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/93710
Summary:
Test Plan:
ninja check-lldb
Reviewers:
clayborg
Subscribers:
Tasks:
Tags:
>From b6c70ac7b4c479fcdeb5d5c8b06da5a16ae468c4 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Wed, 29 May 2024 10:28:16 -07
mbucko wrote:
If the a.out is not there then the address was not resolved, I will investigate.
https://github.com/llvm/llvm-project/pull/92014
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lld
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/93836
Summary:
This adds new SB API calls and classes to allow a user of the SB API to obtain
an address range from SBFunction and SBBlock. This is a second attempt to land
the reverted PR #92014.
Test Plan:
llvm-lit
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/93871
Summary:
Test llvm-project/lldb/test/API/python_api/address_range/TestAddressRange.py is
failing on Windows due adding a carriage return character at the end of line.
Original PR is #93836.
Test Plan:
llvm-lit -
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/93871
>From afcd5a2524fc27cab2ff55ffba06cc19c62bbc4e Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Thu, 30 May 2024 13:04:17 -0700
Subject: [PATCH] [lldb][test] Fix failing test TestAddressRange.py
Summary:
Test llvm
https://github.com/mbucko closed https://github.com/llvm/llvm-project/pull/93710
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
mbucko wrote:
No longer needed, failing tests were due to local version override
https://github.com/llvm/llvm-project/pull/93710
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/94494
Test Plan:
llvm-lit llvm-project/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
>From 0d1eb164ab12773cb574de6066b717fd4c4c9e31 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Wed, 5 Jun 2024 09:03:38 -07
mbucko wrote:
> Would this affect other calls to `collect_console` too? Do we usually look
> for a particular string? If so, would it make sense to change the function
> (rather than this particular call site) or have a little helper?
The problem is that the console hasn't had enough time to c
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/95007
Test Plan:
llvm-lit
llvm-project/lldb/test/API/python_api/find_in_memory/TestFindInMemory.py
llvm-project/lldb/test/API/python_api/find_in_memory/TestFindRangesInMemory.py
Reviewers: clayborg
Tasks: lldb
>Fro
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From cfe6230a93d9689e465588f8c4a01fe06861501e Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/94494
>From ea050132f653a908eeefecd647431a0ed65e2cc0 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Wed, 5 Jun 2024 09:03:38 -0700
Subject: [PATCH] Fix flaky TestDAP_console test.
Test Plan:
llvm-lit llvm-project/lldb
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/94494
>From 5e92ee56b2b278b3ddad04cfdb1f440d3568389c Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Wed, 5 Jun 2024 09:03:38 -0700
Subject: [PATCH] Fix flaky TestDAP_console test.
Test Plan:
llvm-lit llvm-project/lldb
@@ -0,0 +1,31 @@
+import lldb
+
+SINGLE_INSTANCE_PATTERN = "there_is_only_one_of_me"
+DOUBLE_INSTANCE_PATTERN = "there_is_exactly_two_of_me"
+
+
+def GetAddressRanges(test_base):
+mem_regions = test_base.process.GetMemoryRegions()
+test_base.assertTrue(len(mem_regions) > 0
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From e5b3bf115ff60e2892ccfae387877c205ec659f9 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/94494
>From 39c8c9aa1cc45fd4cfd16fe841f65a4d1cb08cf4 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Wed, 5 Jun 2024 09:03:38 -0700
Subject: [PATCH] Fix flaky TestDAP_console test.
Test Plan:
llvm-lit llvm-project/lldb
mbucko wrote:
> Thanks. LGTM!
Would you be able to Merge it in?
https://github.com/llvm/llvm-project/pull/94494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/mbucko closed https://github.com/llvm/llvm-project/pull/94494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -810,6 +809,65 @@ const char *SBProcess::GetBroadcasterClass() {
return ConstString(Process::GetStaticBroadcasterClass()).AsCString();
}
+lldb::SBAddressRangeList
+SBProcess::FindRangesInMemory(const void *buf, uint64_t size,
+ SBAddressRangeL
@@ -2007,6 +2007,124 @@ size_t Process::ReadMemory(addr_t addr, void *buf,
size_t size, Status &error) {
}
}
+void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr,
+ const uint8_t *buf, size_t size,
+
@@ -0,0 +1,31 @@
+import lldb
+
+SINGLE_INSTANCE_PATTERN = "there_is_only_one_of_me"
+DOUBLE_INSTANCE_PATTERN = "there_is_exactly_two_of_me"
+
+
+def GetAddressRanges(test_base):
mbucko wrote:
Why not just store them all on stack and only use one region to search
@@ -810,6 +809,65 @@ const char *SBProcess::GetBroadcasterClass() {
return ConstString(Process::GetStaticBroadcasterClass()).AsCString();
}
+lldb::SBAddressRangeList
+SBProcess::FindRangesInMemory(const void *buf, uint64_t size,
+ SBAddressRangeL
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From a5335c87ed7e04b8b6d74cf5f166bfcdd9f723e6 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From 02345eaea4eab488234d0dccd437676279b065e6 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From 42ec0dd50ea037c832e38541204d3a911577cfab Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From 3a580b40d41575eb35c6fc3f465a628196299373 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From 6255aeca48a2ccd97d519a22632443f2f76d3773 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
@@ -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
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From 71866d9a1f1b646021d56b576ddc74863ed3cb76 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From 42e974f26798e013f13f75af164286ec2a69f539 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From b9b8d8d918076ba9133103cb9ce7328d5e872d32 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/95997
None
>From 786e94dae236eafb71c2f001f48ed17651abd3e3 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 18 Jun 2024 14:35:55 -0700
Subject: [PATCH] [lldb] Fix SBAddressRange validation checks.
---
lldb/source/
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From bae5474315a8a9053033c90237e1eacd9e56e39c Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
mbucko wrote:
> This class behaves quite differently from other SB API classes. Normally, the
> opaque pointer can be cleared to release the potentially more resource heavy
> private counterpart. `AddressRange` is a pretty simple class, so I understand
> that it makes things easier if we guara
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95997
>From 59c382f0b06d632c05baeb357c0390a2423932fc Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 18 Jun 2024 14:35:55 -0700
Subject: [PATCH] [lldb] Fix SBAddressRange validation checks.
---
lldb/source/API/SB
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95997
>From ca4dcf373b0617ab588ee804e3d28f8d311da06a Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 18 Jun 2024 14:35:55 -0700
Subject: [PATCH] [lldb] Fix SBAddressRange validation checks.
---
lldb/include/lldb/
@@ -2800,6 +2809,10 @@ void PruneThreadPlans();
virtual size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
Status &error) = 0;
+ void DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr,
+ const uin
@@ -64,7 +64,7 @@ bool SBAddressRange::operator!=(const SBAddressRange &rhs) {
void SBAddressRange::Clear() {
LLDB_INSTRUMENT_VA(this);
- m_opaque_up.reset();
+ m_opaque_up->Clear();
mbucko wrote:
correct
https://github.com/llvm/llvm-project/pull/95007
_
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95997
>From 3ba6a550cb4731b9754646665e18fcdc6e255bd4 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 18 Jun 2024 14:35:55 -0700
Subject: [PATCH] [lldb] Fix SBAddressRange validation checks.
---
lldb/include/lldb/
https://github.com/mbucko closed https://github.com/llvm/llvm-project/pull/95997
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From 26e19d848937564ae74cf9c42e2ee51a224c3133 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf,
size_t size, Status &error) {
}
}
+void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr,
+ const uint8_t *buf, size_t size,
+
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/95007
>From ad93faf460e37bd717dc0ab9070af774c24b1ade Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
Test Plan:
l
https://github.com/mbucko closed 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
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/96511
Tests added in #95007.
>From 4f5588a6928080833a428fc7e1356a807a333a0e Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Mon, 24 Jun 2024 09:15:36 -0700
Subject: [PATCH] [lldb] Fix TestFind(Ranges)InMemory.py tests.
https://github.com/mbucko edited https://github.com/llvm/llvm-project/pull/96511
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/96565
None
>From b19c3daa8eb513eac9de77f9348b25035bdd9697 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Mon, 24 Jun 2024 17:54:05 -0400
Subject: [PATCH] [lldb] Fix tests for FindInMemory SB API introduced in
#95007.
https://github.com/mbucko closed https://github.com/llvm/llvm-project/pull/96565
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/mbucko created
https://github.com/llvm/llvm-project/pull/96569
This is a second attempt to land #95007
Test Plan:
llvm-lit
llvm-project/lldb/test/API/python_api/find_in_memory/TestFindInMemory.py
llvm-project/lldb/test/API/python_api/find_in_memory/TestFindRangesInMemory.py
https://github.com/mbucko updated
https://github.com/llvm/llvm-project/pull/96569
>From 6b1720e9e93d20eecbade7d63d8c2ae5e671c440 Mon Sep 17 00:00:00 2001
From: Miro Bucko
Date: Tue, 4 Jun 2024 12:01:48 -0700
Subject: [PATCH] [lldb][API] Add Find(Ranges)InMemory() to Process SB API
This is a se
https://github.com/mbucko closed https://github.com/llvm/llvm-project/pull/96569
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
@@ -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
https://github.com/mbucko requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/102708
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
@@ -408,3 +410,23 @@ llvm::json::Value DebuggerStats::ReportStatistics(
return std::move(global_stats);
}
+
+llvm::json::Value SummaryStatistics::ToJSON() const {
+ json::Object body {{
+ {"invocationCount", GetSummaryCount()},
+ {"totalTime", GetTotalTime()},
+
@@ -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
mbucko wrote:
> It just so happens that I got a `memory find` bug today, which made me
> realize just how broken the current behavior is -- it will effectively abort
> the search as soon as it runs into any unreadable block of memory (plus it
> also reads one byte at a time, which makes it exc
mbucko wrote:
> > That being said, if there is something we can do to this PR to make it easy
> > for you (Pavel) to implement this feature, we can make those changes. Like
> > I think it would be fair to change all `PeekMemory/DoPeekMemory` over a
> > virtual `ReadMemory/DoReadMemory` that re
https://github.com/mbucko approved this pull request.
Just a couple of small things
https://github.com/llvm/llvm-project/pull/102708
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/mbucko edited
https://github.com/llvm/llvm-project/pull/102708
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
1 - 100 of 153 matches
Mail list logo