[Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 23 04:10:11 PST 2017


labath updated this revision to Diff 124064.
labath added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: mgorny.

This is a slight deviation from the initial approach. What I've done here is
that I've kept the register set indices in an os-specific form. I've done this
because it enables the parsing code in ProcessElfCore to be
architecture-agnostic -- it can just deal with OS specifics, and can just shove
any note it does not recognise to the side. These will be then parsed in the
corresponding register contexts, which can only deal with architecture
specifics, and ignore OS details, as the translation of os-specific note types
is provided by a separate lookup table.

This way, adding an register set, which is already supported on other OSes, to a
new OS, should in most cases be as simple as adding a new entry into the
register set description map.


https://reviews.llvm.org/D40133

Files:
  source/Plugins/Process/elf-core/CMakeLists.txt
  source/Plugins/Process/elf-core/ProcessElfCore.cpp
  source/Plugins/Process/elf-core/ProcessElfCore.h
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.h
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.h
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h
  source/Plugins/Process/elf-core/RegisterUtilities.cpp
  source/Plugins/Process/elf-core/RegisterUtilities.h
  source/Plugins/Process/elf-core/ThreadElfCore.cpp
  source/Plugins/Process/elf-core/ThreadElfCore.h
  source/Plugins/Process/elf-core/elf-core-enums.h
  source/Plugins/Process/minidump/ThreadMinidump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40133.124064.patch
Type: text/x-patch
Size: 33437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171123/50c351e9/attachment-0001.bin>


More information about the lldb-commits mailing list