Skip to content

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Aug 1, 2024

Backport 7088a5e

Requested by: @DimitryAndric

@llvmbot llvmbot requested a review from JDevlieghere as a code owner August 1, 2024 09:01
@llvmbot llvmbot added this to the LLVM 19.X Release milestone Aug 1, 2024
@llvmbot
Copy link
Member Author

llvmbot commented Aug 1, 2024

@emaste What do you think about merging this PR to the release branch?

@llvmbot
Copy link
Member Author

llvmbot commented Aug 1, 2024

@llvm/pr-subscribers-lldb

Author: None (llvmbot)

Changes

Backport 7088a5e

Requested by: @DimitryAndric


Full diff: https://github.com/llvm/llvm-project/pull/101465.diff

3 Files Affected:

  • (modified) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h (+1-1)
  • (modified) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h (+1-1)
  • (modified) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h (+1-1)
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
index 89ffa617294aa..b9537e6952f6c 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
@@ -30,7 +30,7 @@ class NativeProcessFreeBSD;
 class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD {
 public:
   NativeRegisterContextFreeBSD_arm(const ArchSpec &target_arch,
-                                   NativeThreadProtocol &native_thread);
+                                   NativeThreadFreeBSD &native_thread);
 
   uint32_t GetRegisterSetCount() const override;
 
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
index 0b4a508a7d5dd..286b4fd8d8b99 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
@@ -31,7 +31,7 @@ class NativeRegisterContextFreeBSD_mips64
     : public NativeRegisterContextFreeBSD {
 public:
   NativeRegisterContextFreeBSD_mips64(const ArchSpec &target_arch,
-                                      NativeThreadProtocol &native_thread);
+                                      NativeThreadFreeBSD &native_thread);
 
   uint32_t GetRegisterSetCount() const override;
 
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
index 3df371036f915..420db822acc0f 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
@@ -31,7 +31,7 @@ class NativeRegisterContextFreeBSD_powerpc
     : public NativeRegisterContextFreeBSD {
 public:
   NativeRegisterContextFreeBSD_powerpc(const ArchSpec &target_arch,
-                                       NativeThreadProtocol &native_thread);
+                                       NativeThreadFreeBSD &native_thread);
 
   uint32_t GetRegisterSetCount() const override;
 

@DavidSpickett
Copy link
Collaborator

As the person who caused this problem in the first place, I can say the change here is just passing a more derived class instead of the base class. I know doing that works on AArch64 so it is low risk to do so for the rest, and of course lldb won't compile on those platforms without this anyway.

@tru
Copy link
Collaborator

tru commented Aug 1, 2024

@emaste @JDevlieghere what do you think? safe for backport? (it sounds that way to me).

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections from me!

… declarations (llvm#101403)

Similar to llvm#97796, fix the type of the `native_thread` parameter for the
arm, mips64 and powerpc variants of `NativeRegisterContextFreeBSD_*`.

Otherwise, this leads to compile errors similar to:

```
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.cpp:85:39: error: out-of-line definition of 'NativeRegisterContextFreeBSD_powerpc' does not match any declaration in 'lldb_private::process_freebsd::NativeRegisterContextFreeBSD_powerpc'
   85 | NativeRegisterContextFreeBSD_powerpc::NativeRegisterContextFreeBSD_powerpc(
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

(cherry picked from commit 7088a5e)
@tru tru merged commit 23f3b64 into llvm:release/19.x Aug 2, 2024
6 of 7 checks passed
Copy link

github-actions bot commented Aug 2, 2024

@DimitryAndric (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

5 participants