Skip to content

[lldb][x86] Remove GCC 6 workaround#210317

Merged
DavidSpickett merged 2 commits into
llvm:mainfrom
DavidSpickett:lldb-x86gcc
Jul 17, 2026
Merged

[lldb][x86] Remove GCC 6 workaround#210317
DavidSpickett merged 2 commits into
llvm:mainfrom
DavidSpickett:lldb-x86gcc

Conversation

@DavidSpickett

Copy link
Copy Markdown
Contributor

Added by 3bea730.

We now require GCC >= 7.4 so it can be removed.

I tested a standalone reproducer with GCC 7.3 and
clang 5. Neither have the problem.

https://godbolt.org/z/3zKrT9c8s

Standalone reproducer:

 struct Base {
   Base(int) {}
 };

 struct Derived : virtual Base {
 #ifdef WORKAROUND
     Derived(int a): Base(a) {}
 #endif
   virtual void g() = 0;
 };

 struct Final : Derived {
   Final(int n) : Base(n)
 #ifdef WORKAROUND
   , Derived(n)
 #endif
   {}
   void g() override {}
 };

Added by 3bea730.

We now require GCC >= 7.4 so it can be removed.

I tested a standalone reproducer with GCC 7.3 and
clang 5. Neither have the problem.

https://godbolt.org/z/3zKrT9c8s

Standalone reproducer:
```
 struct Base {
   Base(int) {}
 };

 struct Derived : virtual Base {
 #ifdef WORKAROUND
     Derived(int a): Base(a) {}
 #endif
   virtual void g() = 0;
 };

 struct Final : Derived {
   Final(int n) : Base(n)
 #ifdef WORKAROUND
   , Derived(n)
 #endif
   {}
   void g() override {}
 };
```
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-lldb

Author: David Spickett (DavidSpickett)

Changes

Added by 3bea730.

We now require GCC >= 7.4 so it can be removed.

I tested a standalone reproducer with GCC 7.3 and
clang 5. Neither have the problem.

https://godbolt.org/z/3zKrT9c8s

Standalone reproducer:

 struct Base {
   Base(int) {}
 };

 struct Derived : virtual Base {
 #ifdef WORKAROUND
     Derived(int a): Base(a) {}
 #endif
   virtual void g() = 0;
 };

 struct Final : Derived {
   Final(int n) : Base(n)
 #ifdef WORKAROUND
   , Derived(n)
 #endif
   {}
   void g() override {}
 };

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

2 Files Affected:

  • (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp (-1)
  • (modified) lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h (-6)
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp
index 67a79566f6f6d..a7af62e89c1dc 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp
@@ -300,7 +300,6 @@ NativeRegisterContextLinux_x86::NativeRegisterContextLinux_x86(
     : NativeRegisterContextRegisterInfo(
           native_thread, CreateRegisterInfoInterface(target_arch).release()),
       NativeRegisterContextLinux(native_thread),
-      NativeRegisterContextDBReg_x86(native_thread),
       m_xstate_type(XStateType::Invalid), m_ymm_set(), m_mpx_set(),
       m_reg_info(), m_gpr_x86_64() {
   // Set up data about ranges of valid registers.
diff --git a/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h b/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h
index 2fdf5000f751c..8a2c1a1dbcbe1 100644
--- a/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h
+++ b/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h
@@ -16,12 +16,6 @@ namespace lldb_private {
 class NativeRegisterContextDBReg_x86
     : public virtual NativeRegisterContextRegisterInfo {
 public:
-  // NB: This constructor is here only because gcc<=6.5 requires a virtual base
-  // class initializer on abstract class (even though it is never used). It can
-  // be deleted once we move to gcc>=7.0.
-  NativeRegisterContextDBReg_x86(NativeThreadProtocol &thread)
-      : NativeRegisterContextRegisterInfo(thread, nullptr) {}
-
   Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
 
   Status GetWatchpointHitIndex(uint32_t &wp_index,

@DavidSpickett
DavidSpickett enabled auto-merge (squash) July 17, 2026 13:08
@DavidSpickett
DavidSpickett merged commit de4f929 into llvm:main Jul 17, 2026
11 checks passed
@DavidSpickett
DavidSpickett deleted the lldb-x86gcc branch July 17, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant