[Lldb-commits] [lldb] [LLDB] Reapply SBSaveCore Add Memory List (PR #107937)

2024-09-11 Thread Miro Bucko via lldb-commits
@@ -0,0 +1,86 @@ +//===-- CoreFileMemoryRanges.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [LLDB] Reapply SBSaveCore Add Memory List (PR #107937)

2024-09-11 Thread Miro Bucko via lldb-commits
@@ -0,0 +1,86 @@ +//===-- CoreFileMemoryRanges.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [LLDB] Reapply SBSaveCore Add Memory List (PR #107937)

2024-09-11 Thread Miro Bucko via lldb-commits
@@ -0,0 +1,50 @@ +//===-- CoreFileMemoryRanges.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [LLDB] Reapply SBSaveCore Add Memory List (PR #107937)

2024-09-11 Thread Miro Bucko via lldb-commits
@@ -0,0 +1,86 @@ +//===-- CoreFileMemoryRanges.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [LLDB] Reapply SBSaveCore Add Memory List (PR #107937)

2024-09-11 Thread Miro Bucko via lldb-commits
@@ -450,6 +450,8 @@ class RangeDataVector { void Append(const Entry &entry) { m_entries.emplace_back(entry); } + void Append(B &&b, S &&s, T &&t) { m_entries.emplace_back(Entry(b, s, t)); } mbucko wrote: why not just name then base, size, data? Then the r

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-28 Thread Miro Bucko via lldb-commits
mbucko wrote: Closing this PR in favor of #104193 https://github.com/llvm/llvm-project/pull/102536 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-28 Thread Miro Bucko via lldb-commits
https://github.com/mbucko closed https://github.com/llvm/llvm-project/pull/102536 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-26 Thread Miro Bucko via lldb-commits
mbucko wrote: > Let me know if you guys don't want this patch in. I will closed it and apply > it to our local branch. @jasonmolenda @labath @labath just a friendly ping https://github.com/llvm/llvm-project/pull/102536 ___ lldb-commits mailing list l

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

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

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

2024-08-21 Thread Miro Bucko via lldb-commits
@@ -449,6 +449,10 @@ class RangeDataVector { ~RangeDataVector() = default; void Append(const Entry &entry) { m_entries.emplace_back(entry); } + + void Append(const B&& b, const S&& s, const T&& t) { mbucko wrote: Cannot have const rvalue reference. You

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-19 Thread Miro Bucko via lldb-commits
@@ -4028,6 +4046,161 @@ void request_disassemble(const llvm::json::Object &request) { response.try_emplace("body", std::move(body)); g_dap.SendJSON(llvm::json::Value(std::move(response))); } + +// "ReadMemoryRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" },

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-19 Thread Miro Bucko via lldb-commits
@@ -691,6 +691,19 @@ def request_disassemble( for inst in instructions: self.disassembled_instructions[inst["address"]] = inst +def request_read_memory(self, memoryReference, offset, count): mbucko wrote: for consistency this should be

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-19 Thread Miro Bucko via lldb-commits
mbucko wrote: Let me know if you guys don't want this patch in. I will closed it and apply it to our local branch. https://github.com/llvm/llvm-project/pull/102536 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

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

2024-08-15 Thread Miro Bucko via lldb-commits
@@ -174,6 +177,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-15 Thread Miro Bucko via lldb-commits
@@ -174,6 +177,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-15 Thread Miro Bucko via 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

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

2024-08-15 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-14 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-13 Thread Miro Bucko via lldb-commits
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

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

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

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

2024-08-12 Thread Miro Bucko via lldb-commits
@@ -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()}, +

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

2024-08-12 Thread Miro Bucko via lldb-commits
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

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

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

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

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

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

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

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-09 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-09 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-09 Thread Miro Bucko via lldb-commits
@@ -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, +

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-08 Thread Miro Bucko via lldb-commits
@@ -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, +

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

2024-06-24 Thread Miro Bucko via lldb-commits
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

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

2024-06-24 Thread Miro Bucko via lldb-commits
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

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

2024-06-24 Thread Miro Bucko via 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

[Lldb-commits] [lldb] [lldb] Fix tests for FindInMemory SB API introduced in #95007. (PR #96565)

2024-06-24 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Fix tests for FindInMemory SB API introduced in #95007. (PR #96565)

2024-06-24 Thread Miro Bucko via 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.

[Lldb-commits] [lldb] [lldb] Fix failing TestFind(Ranges)InMemory.py tests. (PR #96511)

2024-06-24 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Fix failing TestFind(Ranges)InMemory.py tests. (PR #96511)

2024-06-24 Thread Miro Bucko via 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.

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

2024-06-24 Thread Miro Bucko via lldb-commits
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

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

2024-06-21 Thread Miro Bucko via lldb-commits
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

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

2024-06-21 Thread Miro Bucko via lldb-commits
@@ -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, +

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

2024-06-21 Thread Miro Bucko via 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

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

2024-06-21 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

2024-06-20 Thread Miro Bucko via lldb-commits
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/

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

2024-06-20 Thread Miro Bucko via lldb-commits
@@ -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 _

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

2024-06-20 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

2024-06-20 Thread Miro Bucko via lldb-commits
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/

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

2024-06-20 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

2024-06-20 Thread Miro Bucko via lldb-commits
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

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

2024-06-20 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

2024-06-18 Thread Miro Bucko via lldb-commits
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/

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

2024-06-18 Thread Miro Bucko via lldb-commits
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

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

2024-06-18 Thread Miro Bucko via lldb-commits
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

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

2024-06-18 Thread Miro Bucko via lldb-commits
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

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

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

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

2024-06-17 Thread Miro Bucko via lldb-commits
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

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

2024-06-13 Thread Miro Bucko via lldb-commits
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

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

2024-06-13 Thread Miro Bucko via lldb-commits
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

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

2024-06-13 Thread Miro Bucko via lldb-commits
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

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

2024-06-13 Thread Miro Bucko via lldb-commits
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

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

2024-06-13 Thread Miro Bucko via 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

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

2024-06-12 Thread Miro Bucko via lldb-commits
@@ -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

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

2024-06-12 Thread Miro Bucko via lldb-commits
@@ -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, +

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

2024-06-12 Thread Miro Bucko via 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

[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

2024-06-11 Thread Miro Bucko via 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

[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

2024-06-10 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

2024-06-10 Thread Miro Bucko via lldb-commits
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

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

2024-06-10 Thread Miro Bucko via lldb-commits
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

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

2024-06-10 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

2024-06-10 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

2024-06-10 Thread Miro Bucko via lldb-commits
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

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

2024-06-10 Thread Miro Bucko via lldb-commits
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

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

2024-06-10 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

2024-06-05 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

2024-06-05 Thread Miro Bucko via 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

[Lldb-commits] [lldb] [lldb][test] Fix formatter tests for clang version 15 (PR #93710)

2024-06-04 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb][test] Fix formatter tests for clang version 15 (PR #93710)

2024-06-04 Thread Miro Bucko via 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

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

2024-05-30 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb][test] Fix failing test TestAddressRange.py (PR #93871)

2024-05-30 Thread Miro Bucko via lldb-commits
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 -

[Lldb-commits] [lldb] [lldb] Add AddressRange to SB API (PR #93836)

2024-05-30 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-29 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [lldb][test] Fix formatter tests for clang version 15 (PR #93710)

2024-05-29 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [nfc][lldb] Move FastSearch from CommandObjectMemoryFind to Process (PR #93688)

2024-05-29 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] [nfc][lldb] Move FastSearch from CommandObjectMemoryFind to Process (PR #93688)

2024-05-29 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-28 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-24 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-21 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-21 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-21 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-21 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-21 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-21 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-21 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-20 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-17 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-17 Thread Miro Bucko via 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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-17 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-17 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-16 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-16 Thread Miro Bucko via lldb-commits
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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-16 Thread Miro Bucko via lldb-commits
@@ -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

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-16 Thread Miro Bucko via lldb-commits
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

  1   2   >