[Lldb-commits] [lldb] ecfa01e - [lldb] on s390x fix override issue

Konrad Kleine via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 10 12:12:08 PDT 2020


Author: Konrad Kleine
Date: 2020-07-10T15:11:49-04:00
New Revision: ecfa01e956a49ed349683f1cfcfbbec423114b68

URL: https://github.com/llvm/llvm-project/commit/ecfa01e956a49ed349683f1cfcfbbec423114b68
DIFF: https://github.com/llvm/llvm-project/commit/ecfa01e956a49ed349683f1cfcfbbec423114b68.diff

LOG: [lldb] on s390x fix override issue

Summary:
This fixes an override issue by marking a function as const so that the
signature maps to the signature of the function in the base class.

This is the original error:

In file included from /root/llvm/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp:11:
/root/llvm/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h:79:10: error: 'size_t lldb_private::process_linux::NativeRegisterContextLinux_s390x::GetGPRSize()' marked 'override', but does not override
   79 |   size_t GetGPRSize() override { return sizeof(m_regs); }
      |          ^~~~~~~~~~

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D83580

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
index 69714e400113..5ed78810a18b 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
@@ -76,7 +76,7 @@ class NativeRegisterContextLinux_s390x : public NativeRegisterContextLinux {
   Status WriteFPR() override;
 
   void *GetGPRBuffer() override { return &m_regs; }
-  size_t GetGPRSize() override { return sizeof(m_regs); }
+  size_t GetGPRSize() const override { return sizeof(m_regs); }
   void *GetFPRBuffer() override { return &m_fp_regs; }
   size_t GetFPRSize() override { return sizeof(m_fp_regs); }
 


        


More information about the lldb-commits mailing list