jasonmolenda wrote:
After debugging, updating, and testing on aarch64-unbuntu, x86_64-macos, and
arm64-macos, I have created a new PR with this commit plus an additional commit
to fix the issues I found on the different platforms.
https://github.com/llvm/llvm-project/pull/83663
jasonmolenda wrote:
I think I'm going open a new PR with the base class address masking added to
the patch. I think having these API and the unwritten caveat is "they may be
no-ops if you're using an ABI that doesn't do FixAddress" is going to confuse
people. I still want to investigate why
jasonmolenda wrote:
It does occur to me that I'm going to need to only run this API test on targets
which have a FixAddress method in their ABI, the base class own't do it. Maybe
it should have a base class impl that can be overridden, and use the Process
masks if they are set. (they're all
jasonmolenda wrote:
Temporarily reverted this change while I investigate why the tests failed on
all the linux bots (lldb-x86_64-debian, lldb-arm-ubuntu, lldb-aarch64-ubuntu),
I'll build up in a VM and debug.
https://github.com/llvm/llvm-project/pull/83095
https://github.com/jasonmolenda closed
https://github.com/llvm/llvm-project/pull/83095
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/9] [lldb] Add SBProcess methods for get/set/use address
https://github.com/JDevlieghere approved this pull request.
LGTM but please fix the formatting issue before merging.
https://github.com/llvm/llvm-project/pull/83095
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/8] [lldb] Add SBProcess methods for get/set/use address
https://github.com/jasonmolenda edited
https://github.com/llvm/llvm-project/pull/83095
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -33,18 +33,26 @@ void AddressableBits::SetHighmemAddressableBits(
m_high_memory_addr_bits = highmem_addressing_bits;
}
+addr_t AddressableBits::AddressableBitToMask(uint32_t addressable_bits) {
+ assert(addressable_bits <= sizeof(addr_t) * 8);
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/7] [lldb] Add SBProcess methods for get/set/use address
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/6] [lldb] Add SBProcess methods for get/set/use address
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/5] [lldb] Add SBProcess methods for get/set/use address
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 86f6caa562255f81b93e72a501a926b17f5ad244
dceaef27675b724309f353aa22999563cf036cd3 --
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/4] [lldb] Add SBProcess methods for get/set/use address
@@ -1255,6 +1255,95 @@ lldb::SBFileSpec SBProcess::GetCoreFile() {
return SBFileSpec(core_file);
}
+addr_t SBProcess::GetAddressMask(AddressMaskType type,
+ AddressMaskRange addr_range) {
+ LLDB_INSTRUMENT_VA(this, type, addr_range);
+
@@ -407,6 +407,118 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -33,18 +33,26 @@ void AddressableBits::SetHighmemAddressableBits(
m_high_memory_addr_bits = highmem_addressing_bits;
}
+addr_t AddressableBits::AddressableBitToMask(uint32_t addressable_bits) {
+ assert(addressable_bits <= sizeof(addr_t) * 8);
@@ -1255,6 +1255,95 @@ lldb::SBFileSpec SBProcess::GetCoreFile() {
return SBFileSpec(core_file);
}
+addr_t SBProcess::GetAddressMask(AddressMaskType type,
+ AddressMaskRange addr_range) {
+ LLDB_INSTRUMENT_VA(this, type, addr_range);
+
@@ -407,6 +407,118 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
hawkinsw wrote:
> Thanks for the second round of feedback @hawkinsw . Let me try to read the
> Doxygen docs a little more closely tonight and see if the references I threw
> in there might actually do what I hoped they would. I briefly looked at the
> Doxygen docs to see the Grouping feature
@@ -1255,6 +1255,95 @@ lldb::SBFileSpec SBProcess::GetCoreFile() {
return SBFileSpec(core_file);
}
+addr_t SBProcess::GetAddressMask(AddressMaskType type,
+ AddressMaskRange addr_range) {
+ LLDB_INSTRUMENT_VA(this, type, addr_range);
@@ -1255,6 +1255,95 @@ lldb::SBFileSpec SBProcess::GetCoreFile() {
return SBFileSpec(core_file);
}
+addr_t SBProcess::GetAddressMask(AddressMaskType type,
+ AddressMaskRange addr_range) {
+ LLDB_INSTRUMENT_VA(this, type, addr_range);
+
jasonmolenda wrote:
Thanks for the second round of feedback @hawkinsw . Let me try to read the
Doxygen docs a little more closely tonight and see if the references I threw in
there might actually do what I hoped they would. I briefly looked at the
Doxygen docs to see the Grouping feature
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/3] [lldb] Add SBProcess methods for get/set/use address
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
https://github.com/hawkinsw commented:
As I said before, I really appreciate you doing such in-depth documentation. I
hope these little suggestions help!
https://github.com/llvm/llvm-project/pull/83095
___
lldb-commits mailing list
@@ -407,6 +407,117 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// \{
+ /// \group Mask Address Methods
+ ///
+ /// \a type
+ /// All of the methods in this group take \a type argument
+ ///
https://github.com/hawkinsw edited
https://github.com/llvm/llvm-project/pull/83095
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
jasonmolenda wrote:
Thanks so much for reading through these @DavidSpickett and @hawkinsw !
@adrian-prantl and @JDevlieghere suggested using a doxygen group for this set
of methods and having the long definitions of `type` and `addr_range` a single
time, referring back to them from the
https://github.com/jasonmolenda updated
https://github.com/llvm/llvm-project/pull/83095
>From dae16776e8c97158e8965e4d0e950cd2ce836f75 Mon Sep 17 00:00:00 2001
From: Jason Molenda
Date: Mon, 26 Feb 2024 18:05:27 -0800
Subject: [PATCH 1/2] [lldb] Add SBProcess methods for get/set/use address
@@ -407,6 +407,129 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// Get the current address mask that can be applied to addresses
+ /// before reading from memory.
+ ///
+ /// \param[in] type
+ ///
https://github.com/hawkinsw edited
https://github.com/llvm/llvm-project/pull/83095
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -407,6 +407,129 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// Get the current address mask that can be applied to addresses
+ /// before reading from memory.
+ ///
+ /// \param[in] type
+ ///
https://github.com/hawkinsw commented:
I really appreciate the thorough documentation you wrote for these new
functions. Because there is so much overlap in the documentation between the
functions, could we refactor it somehow (not sure how?) so that any future
change could be more easily
@@ -407,6 +407,129 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// Get the current address mask that can be applied to addresses
+ /// before reading from memory.
+ ///
+ /// \param[in] type
+ ///
@@ -407,6 +407,129 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// Get the current address mask that can be applied to addresses
+ /// before reading from memory.
+ ///
+ /// \param[in] type
+ ///
@@ -407,6 +407,129 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// Get the current address mask that can be applied to addresses
+ /// before reading from memory.
+ ///
+ /// \param[in] type
+ ///
@@ -407,6 +407,129 @@ class LLDB_API SBProcess {
/// the process isn't loaded from a core file.
lldb::SBFileSpec GetCoreFile();
+ /// Get the current address mask that can be applied to addresses
+ /// before reading from memory.
+ ///
+ /// \param[in] type
+ ///
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Jason Molenda (jasonmolenda)
Changes
I'm reviving a patch from phabracator, https://reviews.llvm.org/D155905 which
was approved but I wasn't thrilled with all the API I was adding to SBProcess
for all of the address mask types / memory
https://github.com/jasonmolenda created
https://github.com/llvm/llvm-project/pull/83095
I'm reviving a patch from phabracator, https://reviews.llvm.org/D155905 which
was approved but I wasn't thrilled with all the API I was adding to SBProcess
for all of the address mask types / memory
53 matches
Mail list logo