[all-commits] [llvm/llvm-project] 6c4553: Remove code duplication from RegisterContextPOSIX_*

Muhammad Omair Javaid via All-commits all-commits at lists.llvm.org
Wed Jun 17 13:03:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c45532908bacc0cf569bcad74f6e04e1e2a6c61
      https://github.com/llvm/llvm-project/commit/6c45532908bacc0cf569bcad74f6e04e1e2a6c61
  Author: Muhammad Omair Javaid <omair.javaid at linaro.org>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M lldb/include/lldb/Target/RegisterContext.h
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
    M lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
    M lldb/source/Target/RegisterContext.cpp

  Log Message:
  -----------
  Remove code duplication from RegisterContextPOSIX_*

Summary:
This patch aims to remove multiple copies of GetByteOrder() and ConvertRegisterKindToRegisterNumber used in various versions of RegisterContextPOSIX_*.

Both register implementations are move to RegisterContext class which is parent of RegisterContextPOSIX_* classes.

Built and tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabihf targets.

Reviewers: labath

Reviewed By: labath

Subscribers: wuzish, nemanjai, kristof.beyls, kbarton, atanasyan, lldb-commits

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




More information about the All-commits mailing list