[Lldb-commits] [PATCH] D12791: Complete register kind naming cleanups in lldb -- required touching all register table definitions

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 10 20:42:52 PDT 2015


jasonmolenda created this revision.
jasonmolenda added a subscriber: lldb-commits.
jasonmolenda set the repository for this revision to rL LLVM.

This change removes the last vestiges of where we refer to eh_frame register numbers as "gcc", calling them "eh_frame" consistently across the lldb source base.  

This fixes the incorrect partial rename I did recently of "gdb" into "stabs".  I wasn't sure what "gdb" was meant to indicate -- it is meant to indicate the register numbering scheme used by the gdb Remote Protocol stub program to refer to registers.  It's not correct to call this the "gdb" register numbering scheme though - we could be talking over kdp or it could be a core file debug session.  So I've renamed all of these to "Plugin Process" register numbers.

The Plugin Process register numbers in lldb's register tables are generally undefined.  When we start the Process communication, we will query what register numbers should be used (e.g. by qRegisterInfo packets, or the qXfer:features:read:target.xml packet) to refer to different registers when communicating with that remote stub.  If we were going to set the Process Plugin register numbers to anything inside lldb, it would be the index numbers of the registers in the table.

We had several definitions of "gdb register numbers" in different tables across lldb.  I removed all of these - they are meaningless.

The one other type of register number we use are "lldb" register numbers.  These numbers should start at 0 and increase through to the last register that is defined for a given architecture/target.  

I'll be making another change after this is committed to allow the Process Plugin register numbers to be noncontiguous.  I'm trying to make lldb work with a JTAG device that advertises these noncontiguous register numbers are we've currently got some assumptions in lldb that Process Plugin regnums are contiguous.  lldb registers can be assumed to be contiguous, but not Process Plugin regnums.

This is a bit of a large patch but the changes are general mechanical in nature.  It may break the build for Windows or another OS - I've only been testing the build on macosx.  If anyone can give the patch a build over the next few days and let me know if there are problems, I'd appreciate it.

Repository:
  rL LLVM

http://reviews.llvm.org/D12791

Files:
  include/lldb/Target/RegisterContext.h
  include/lldb/lldb-enumerations.h
  source/Core/EmulateInstruction.cpp
  source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
  source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
  source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
  source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
  source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
  source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
  source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
  source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
  source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
  source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
  source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
  source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
  source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
  source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
  source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
  source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
  source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
  source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
  source/Plugins/Process/Utility/RegisterContextDummy.cpp
  source/Plugins/Process/Utility/RegisterContextHistory.cpp
  source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
  source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
  source/Plugins/Process/Utility/RegisterContext_mips.h
  source/Plugins/Process/Utility/RegisterContext_powerpc.h
  source/Plugins/Process/Utility/RegisterContext_x86.h
  source/Plugins/Process/Utility/RegisterInfos_arm.h
  source/Plugins/Process/Utility/RegisterInfos_arm64.h
  source/Plugins/Process/Utility/RegisterInfos_i386.h
  source/Plugins/Process/Utility/RegisterInfos_mips.h
  source/Plugins/Process/Utility/RegisterInfos_mips64.h
  source/Plugins/Process/Utility/RegisterInfos_powerpc.h
  source/Plugins/Process/Utility/RegisterInfos_x86_64.h
  source/Plugins/Process/Windows/Live/x64/RegisterContextWindows_x64.cpp
  source/Plugins/Process/Windows/Live/x86/RegisterContextWindows_x86.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  source/Symbol/CompactUnwindInfo.cpp
  source/Symbol/DWARFCallFrameInfo.cpp
  source/Utility/ARM64_Stabs_Registers.h
  source/Utility/ARM64_ehframe_Registers.h
  source/Utility/ARM_Stabs_Registers.h
  source/Utility/ARM_ehframe_Registers.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12791.34526.patch
Type: text/x-patch
Size: 777056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150911/0a4d351e/attachment-0001.bin>


More information about the lldb-commits mailing list