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

2024-05-30 Thread Michael Buch via lldb-commits
Michael137 wrote: I'll revert this for now. Let me know if you need help reproducing the failure https://github.com/llvm/llvm-project/pull/92014 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[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

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

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: FYI, the `TestAddressRange` tests are failing on the macOS buildbots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/4764/execution/node/97/log/ ``` == FAIL:

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

2024-05-29 Thread David Spickett via lldb-commits
DavidSpickett wrote: The tests were hitting a deadlock trying to kill the test process in async debug mode. So I've just changed it to sync mode, as I didn't see any reason to be async here. It's a symptom of something greater I expect but I don't have time to dig into it at the moment.

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

2024-05-29 Thread David Spickett via lldb-commits
DavidSpickett wrote: The new tests are flaky on Windows on Arm, I'm looking into it. 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

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

2024-05-28 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed 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

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

2024-05-28 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. 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

[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

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

2024-05-25 Thread Greg Clayton via lldb-commits
https://github.com/clayborg 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

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

2024-05-25 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,27 @@ +%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-25 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. On nit in the getitem python, but looks good! Thanks for all of the changes. https://github.com/llvm/llvm-project/pull/92014 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[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

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

2024-05-23 Thread Alex Langford 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:

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

2024-05-23 Thread Greg Clayton 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:

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

2024-05-23 Thread Greg Clayton 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-23 Thread Greg Clayton 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:

[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:

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

2024-05-21 Thread Alex Langford 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:

[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

[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:

[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:

[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`

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

2024-05-21 Thread Alex Langford 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:

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

2024-05-21 Thread Alex Langford via lldb-commits
@@ -0,0 +1,103 @@ +//===-- 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:

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

2024-05-21 Thread Alex Langford 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:

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

2024-05-21 Thread Alex Langford 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:

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

2024-05-21 Thread Alex Langford 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:

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

2024-05-21 Thread Alex Langford 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:

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

2024-05-21 Thread Alex Langford 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:

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

2024-05-21 Thread Alex Langford via lldb-commits
@@ -0,0 +1,11 @@ +%extend lldb::SBAddressRange { +#ifdef SWIGPYTHON +%pythoncode%{ + def __repr__(self): +import lldb bulbazord wrote: Why does this import lldb? Shouldn't it already be imported? https://github.com/llvm/llvm-project/pull/92014

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

2024-05-21 Thread Alex Langford 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 Alex Langford 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-20 Thread Greg Clayton via lldb-commits
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const { static_cast(m_base_addr.GetSection().get()), m_base_addr.GetOffset(), GetByteSize()); } + +bool AddressRange::GetDescription(Stream *s, Target *target) const { + const char *file_name

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

2024-05-20 Thread Greg Clayton 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:

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

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,216 @@ +""" +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 =

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

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const { static_cast(m_base_addr.GetSection().get()), m_base_addr.GetOffset(), GetByteSize()); } + +bool AddressRange::GetDescription(Stream *s, Target *target) const { + const char *file_name

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

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const { static_cast(m_base_addr.GetSection().get()), m_base_addr.GetOffset(), GetByteSize()); } + +bool AddressRange::GetDescription(Stream *s, Target *target) const { + const char *file_name

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

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. See inlined comments as the `SBAddressRange::GetDescription()` could have crashed if we had an address with a no section and we did supply a valid target. So changes needed: - add a test for a SBAddressRange object that is

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

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg 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

[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

[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 =

[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:

[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

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

2024-05-17 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r c675a58edec6d1a876a0d0e7d261f74764855b38...939d42eba9f88d90ac72782415640bbab360645c

[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

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

2024-05-16 Thread Alex Langford via lldb-commits
https://github.com/bulbazord 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

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

2024-05-16 Thread Alex Langford via lldb-commits
https://github.com/bulbazord 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

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

2024-05-16 Thread Alex Langford via lldb-commits
@@ -0,0 +1,58 @@ +//===-- 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:

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

2024-05-16 Thread Alex Langford via lldb-commits
@@ -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; +}; bulbazord wrote:

[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

[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

[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

[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

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

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

[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 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

[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 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

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

2024-05-16 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:

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

2024-05-15 Thread Greg Clayton 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:

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

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

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

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

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

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

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

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

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

2024-05-15 Thread Miro Bucko via lldb-commits
@@ -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().

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

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

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

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

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

2024-05-15 Thread Alex Langford via lldb-commits
@@ -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; +}; bulbazord wrote:

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

2024-05-15 Thread Alex Langford via lldb-commits
@@ -0,0 +1,58 @@ +//===-- 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:

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

2024-05-14 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,78 @@ +//===-- 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:

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

2024-05-14 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,58 @@ +//===-- 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:

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

2024-05-14 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,13 @@ +%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-14 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,13 @@ +%extend lldb::SBAddressRangeList { clayborg wrote: If we add a method to SBAddressRangeList: ``` bool GetDescription(lldb::SBStream ); ``` Then we can add this to this file: ``` STRING_EXTENSION_OUTSIDE(SBAddressRangeList) ``` And then we can

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

2024-05-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: We might want SBAddressRange and SBAddressRangeList to have methods: ``` bool GetDescription(lldb::SBStream ); ``` Then make sure we add stuff to the .i files so python `str()` calls this. We do this in many other classes.

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

2024-05-14 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,13 @@ +%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-14 Thread Greg Clayton via lldb-commits
clayborg 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

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

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

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

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

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

2024-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,63 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,63 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,63 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,3 @@ +#include + +int main() { std::cout << "Hello World!" << std::endl; } clayborg wrote: No need to use here right? I would just do a simpler `main`: ``` int main() { return 0; } ``` (remove `#include` and use of `std::cout`). This will reduce

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,130 @@ + +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -219,6 +219,16 @@ lldb::SBAddress SBBlock::GetRangeEndAddress(uint32_t idx) { return sb_addr; } +lldb::SBAddressRange SBBlock::GetRangeAtIndex(uint32_t idx) { + LLDB_INSTRUMENT_VA(this, idx); + + lldb::SBAddressRange sb_range; + if (m_opaque_ptr) { +

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,58 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,78 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,78 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -52,6 +53,8 @@ class LLDB_API SBBlock { lldb::SBAddress GetRangeEndAddress(uint32_t idx); + lldb::SBAddressRange GetRangeAtIndex(uint32_t idx); + clayborg wrote: Use `SBAddressRangeList` here: ``` SBAddressRangeList GetRanges(); ```

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,78 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,58 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,63 @@ +//===-- 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:

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

2024-05-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg 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

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

2024-05-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. 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

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

2024-05-13 Thread Alex Langford via lldb-commits
bulbazord 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? https://github.com/llvm/llvm-project/pull/92014

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

2024-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,130 @@ + bulbazord wrote: remove stray line https://github.com/llvm/llvm-project/pull/92014 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2024-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,130 @@ + +//===-- 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:

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

2024-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,63 @@ +//===-- 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:

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

2024-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,124 @@ +""" +Test SBAddressRange APIs. +""" + +import lldb +from lldbsuite.test.lldbtest import * + + +class AddressRangeTestCase(TestBase): +NO_DEBUG_INFO_TESTCASE = True + +def test_address_range_default(self): +"""Testing default constructor.""" +

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

2024-05-13 Thread Alex Langford via lldb-commits
@@ -0,0 +1,58 @@ +//===-- 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:

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

2024-05-13 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. 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

  1   2   >