[Lldb-commits] [lldb] r203667 - Moved various RegisterContext files from Process/POSIX to Process/Utility for easier sharing.
Virgile Bello
virgile.bello at gmail.com
Wed Mar 12 09:04:30 PDT 2014
Author: xen2
Date: Wed Mar 12 11:04:29 2014
New Revision: 203667
URL: http://llvm.org/viewvc/llvm-project?rev=203667&view=rev
Log:
Moved various RegisterContext files from Process/POSIX to Process/Utility for easier sharing.
Fix Windows build by adding JITLoaderGDB and ProcessElfCore.
RegisterContext: fixes for Windows build: sizeof(GPR::register) didn't work, switched to sizeof(((GPR*)NULL)->register).
Added:
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContext_mips64.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
- copied, changed from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h
Removed:
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h
Modified:
lldb/trunk/lib/Makefile
lldb/trunk/source/CMakeLists.txt
lldb/trunk/source/Plugins/JITLoader/CMakeLists.txt
lldb/trunk/source/Plugins/Makefile
lldb/trunk/source/Plugins/Process/CMakeLists.txt
lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt
lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.h
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.h
lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h
lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
Modified: lldb/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lib/Makefile?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/lib/Makefile (original)
+++ lldb/trunk/lib/Makefile Wed Mar 12 11:04:29 2014
@@ -109,6 +109,12 @@ ifeq ($(HOST_OS),Linux)
lldbPluginJITLoaderGDB.a
endif
+ifeq ($(HOST_OS),MingW)
+ USEDLIBS += lldbHostWindows.a \
+ lldbPluginProcessElfCore.a \
+ lldbPluginJITLoaderGDB.a
+endif
+
ifneq (,$(filter $(HOST_OS), FreeBSD GNU/kFreeBSD))
USEDLIBS += lldbHostFreeBSD.a \
lldbPluginProcessPOSIX.a \
Modified: lldb/trunk/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Wed Mar 12 11:04:29 2014
@@ -92,6 +92,8 @@ endif ()
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
list(APPEND LLDB_USED_LIBS
lldbHostWindows
+ lldbPluginProcessElfCore
+ lldbPluginJITLoaderGDB
Ws2_32
)
endif ()
Modified: lldb/trunk/source/Plugins/JITLoader/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/JITLoader/CMakeLists.txt?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/JITLoader/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/JITLoader/CMakeLists.txt Wed Mar 12 11:04:29 2014
@@ -1,3 +1,3 @@
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "Linux")
+if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory(GDB)
endif()
Modified: lldb/trunk/source/Plugins/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Makefile?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Makefile (original)
+++ lldb/trunk/source/Plugins/Makefile Wed Mar 12 11:04:29 2014
@@ -40,6 +40,11 @@ DIRS += Process/elf-core
DIRS += JITLoader/GDB
endif
+ifeq ($(HOST_OS),MingW)
+DIRS += Process/elf-core
+DIRS += JITLoader/GDB
+endif
+
ifneq (,$(filter $(HOST_OS), FreeBSD GNU/kFreeBSD))
DIRS += Process/FreeBSD Process/POSIX
DIRS += Process/elf-core
Modified: lldb/trunk/source/Plugins/Process/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/CMakeLists.txt?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/CMakeLists.txt Wed Mar 12 11:04:29 2014
@@ -6,6 +6,8 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "FreeB
add_subdirectory(FreeBSD)
add_subdirectory(POSIX)
add_subdirectory(elf-core)
+elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
+ add_subdirectory(elf-core)
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(MacOSX-Kernel)
endif()
Modified: lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt Wed Mar 12 11:04:29 2014
@@ -2,6 +2,7 @@ set(LLVM_NO_RTTI 1)
include_directories(.)
include_directories(../POSIX)
+include_directories(../Utility)
add_lldb_library(lldbPluginProcessLinux
ProcessLinux.cpp
Modified: lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt Wed Mar 12 11:04:29 2014
@@ -10,13 +10,6 @@ add_lldb_library(lldbPluginProcessPOSIX
ProcessMessage.cpp
ProcessPOSIX.cpp
ProcessPOSIXLog.cpp
- RegisterContextPOSIX_mips64.cpp
- RegisterContextPOSIX_x86.cpp
RegisterContextPOSIXProcessMonitor_mips64.cpp
RegisterContextPOSIXProcessMonitor_x86.cpp
- RegisterContextFreeBSD_i386.cpp
- RegisterContextFreeBSD_mips64.cpp
- RegisterContextFreeBSD_x86_64.cpp
- RegisterContextLinux_i386.cpp
- RegisterContextLinux_x86_64.cpp
)
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp (removed)
@@ -1,88 +0,0 @@
-//===-- RegisterContextFreeBSD_i386.cpp ------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include "RegisterContextPOSIX_x86.h"
-#include "RegisterContextFreeBSD_i386.h"
-
-using namespace lldb_private;
-using namespace lldb;
-
-// http://svnweb.freebsd.org/base/head/sys/x86/include/reg.h
-struct GPR
-{
- uint32_t fs;
- uint32_t es;
- uint32_t ds;
- uint32_t edi;
- uint32_t esi;
- uint32_t ebp;
- uint32_t isp;
- uint32_t ebx;
- uint32_t edx;
- uint32_t ecx;
- uint32_t eax;
- uint32_t trapno;
- uint32_t err;
- uint32_t eip;
- uint32_t cs;
- uint32_t eflags;
- uint32_t esp;
- uint32_t ss;
- uint32_t gs;
-};
-
-struct dbreg {
- uint32_t dr[8]; /* debug registers */
- /* Index 0-3: debug address registers */
- /* Index 4-5: reserved */
- /* Index 6: debug status */
- /* Index 7: debug control */
-};
-
-
-#define DR_SIZE sizeof(uint32_t)
-#define DR_OFFSET(reg_index) \
- (LLVM_EXTENSION offsetof(dbreg, dr[reg_index]))
-
-//---------------------------------------------------------------------------
-// Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
-//---------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_I386_STRUCT
-#include "RegisterInfos_i386.h"
-#undef DECLARE_REGISTER_INFOS_I386_STRUCT
-
-RegisterContextFreeBSD_i386::RegisterContextFreeBSD_i386(const ArchSpec &target_arch) :
- RegisterInfoInterface(target_arch)
-{
-}
-
-RegisterContextFreeBSD_i386::~RegisterContextFreeBSD_i386()
-{
-}
-
-size_t
-RegisterContextFreeBSD_i386::GetGPRSize()
-{
- return sizeof(GPR);
-}
-
-const RegisterInfo *
-RegisterContextFreeBSD_i386::GetRegisterInfo()
-{
- switch (m_target_arch.GetCore())
- {
- case ArchSpec::eCore_x86_32_i386:
- case ArchSpec::eCore_x86_32_i486:
- case ArchSpec::eCore_x86_32_i486sx:
- return g_register_infos_i386;
- default:
- assert(false && "Unhandled target architecture.");
- return NULL;
- }
-}
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h (removed)
@@ -1,29 +0,0 @@
-//===-- RegisterContextFreeBSD_i386.h ---------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextFreeBSD_i386_H_
-#define liblldb_RegisterContextFreeBSD_i386_H_
-
-#include "RegisterContextPOSIX.h"
-
-class RegisterContextFreeBSD_i386
- : public RegisterInfoInterface
-{
-public:
- RegisterContextFreeBSD_i386(const lldb_private::ArchSpec &target_arch);
- virtual ~RegisterContextFreeBSD_i386();
-
- size_t
- GetGPRSize();
-
- const lldb_private::RegisterInfo *
- GetRegisterInfo();
-};
-
-#endif
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp (removed)
@@ -1,90 +0,0 @@
-//===-- RegisterContextFreeBSD_mips64.cpp ----------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include <vector>
-#include "RegisterContextPOSIX_mips64.h"
-#include "RegisterContextFreeBSD_mips64.h"
-
-using namespace lldb_private;
-using namespace lldb;
-
-// http://svnweb.freebsd.org/base/head/sys/mips/include/regnum.h
-typedef struct _GPR
-{
- uint64_t zero;
- uint64_t r1;
- uint64_t r2;
- uint64_t r3;
- uint64_t r4;
- uint64_t r5;
- uint64_t r6;
- uint64_t r7;
- uint64_t r8;
- uint64_t r9;
- uint64_t r10;
- uint64_t r11;
- uint64_t r12;
- uint64_t r13;
- uint64_t r14;
- uint64_t r15;
- uint64_t r16;
- uint64_t r17;
- uint64_t r18;
- uint64_t r19;
- uint64_t r20;
- uint64_t r21;
- uint64_t r22;
- uint64_t r23;
- uint64_t r24;
- uint64_t r25;
- uint64_t r26;
- uint64_t r27;
- uint64_t gp;
- uint64_t sp;
- uint64_t r30;
- uint64_t ra;
- uint64_t sr;
- uint64_t mullo;
- uint64_t mulhi;
- uint64_t badvaddr;
- uint64_t cause;
- uint64_t pc;
- uint64_t ic;
- uint64_t dummy;
-} GPR;
-
-//---------------------------------------------------------------------------
-// Include RegisterInfos_mips64 to declare our g_register_infos_mips64 structure.
-//---------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_MIPS64_STRUCT
-#include "RegisterInfos_mips64.h"
-#undef DECLARE_REGISTER_INFOS_MIPS64_STRUCT
-
-RegisterContextFreeBSD_mips64::RegisterContextFreeBSD_mips64(const ArchSpec &target_arch) :
- RegisterInfoInterface(target_arch)
-{
-}
-
-RegisterContextFreeBSD_mips64::~RegisterContextFreeBSD_mips64()
-{
-}
-
-size_t
-RegisterContextFreeBSD_mips64::GetGPRSize()
-{
- return sizeof(GPR);
-}
-
-const RegisterInfo *
-RegisterContextFreeBSD_mips64::GetRegisterInfo()
-{
- assert (m_target_arch.GetCore() == ArchSpec::eCore_mips64);
- return g_register_infos_mips64;
-}
-
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h (removed)
@@ -1,29 +0,0 @@
-//===-- RegisterContextFreeBSD_mips64.h -------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextFreeBSD_mips64_H_
-#define liblldb_RegisterContextFreeBSD_mips64_H_
-
-#include "RegisterContextPOSIX.h"
-
-class RegisterContextFreeBSD_mips64:
- public RegisterInfoInterface
-{
-public:
- RegisterContextFreeBSD_mips64(const lldb_private::ArchSpec &target_arch);
- virtual ~RegisterContextFreeBSD_mips64();
-
- size_t
- GetGPRSize();
-
- const lldb_private::RegisterInfo *
- GetRegisterInfo();
-};
-
-#endif
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp (removed)
@@ -1,126 +0,0 @@
-//===-- RegisterContextFreeBSD_x86_64.cpp ----------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include <vector>
-#include "RegisterContextPOSIX_x86.h"
-#include "RegisterContextFreeBSD_i386.h"
-#include "RegisterContextFreeBSD_x86_64.h"
-
-using namespace lldb_private;
-using namespace lldb;
-
-// http://svnweb.freebsd.org/base/head/sys/x86/include/reg.h
-typedef struct _GPR
-{
- uint64_t r15;
- uint64_t r14;
- uint64_t r13;
- uint64_t r12;
- uint64_t r11;
- uint64_t r10;
- uint64_t r9;
- uint64_t r8;
- uint64_t rdi;
- uint64_t rsi;
- uint64_t rbp;
- uint64_t rbx;
- uint64_t rdx;
- uint64_t rcx;
- uint64_t rax;
- uint32_t trapno;
- uint16_t fs;
- uint16_t gs;
- uint32_t err;
- uint16_t es;
- uint16_t ds;
- uint64_t rip;
- uint64_t cs;
- uint64_t rflags;
- uint64_t rsp;
- uint64_t ss;
-} GPR;
-
-struct dbreg {
- uint64_t dr[16]; /* debug registers */
- /* Index 0-3: debug address registers */
- /* Index 4-5: reserved */
- /* Index 6: debug status */
- /* Index 7: debug control */
- /* Index 8-15: reserved */
-};
-
-#define DR_SIZE sizeof(uint64_t)
-#define DR_OFFSET(reg_index) \
- (LLVM_EXTENSION offsetof(dbreg, dr[reg_index]))
-
-
-//---------------------------------------------------------------------------
-// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64 structure.
-//---------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_X86_64_STRUCT
-#include "RegisterInfos_x86_64.h"
-#undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
-
-static const RegisterInfo *
-GetRegisterInfo_i386(const lldb_private::ArchSpec& arch)
-{
- static std::vector<lldb_private::RegisterInfo> g_register_infos;
-
- // Allocate RegisterInfo only once
- if (g_register_infos.empty())
- {
- // Copy the register information from base class
- std::unique_ptr<RegisterContextFreeBSD_i386> reg_interface(new RegisterContextFreeBSD_i386 (arch));
- const RegisterInfo *base_info = reg_interface->GetRegisterInfo();
- g_register_infos.insert(g_register_infos.end(), &base_info[0], &base_info[k_num_registers_i386]);
-
- //---------------------------------------------------------------------------
- // Include RegisterInfos_x86_64 to update the g_register_infos structure
- // with x86_64 offsets.
- //---------------------------------------------------------------------------
- #define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
- #include "RegisterInfos_x86_64.h"
- #undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
- }
-
- return &g_register_infos[0];
-}
-
-RegisterContextFreeBSD_x86_64::RegisterContextFreeBSD_x86_64(const ArchSpec &target_arch) :
- RegisterInfoInterface(target_arch)
-{
-}
-
-RegisterContextFreeBSD_x86_64::~RegisterContextFreeBSD_x86_64()
-{
-}
-
-size_t
-RegisterContextFreeBSD_x86_64::GetGPRSize()
-{
- return sizeof(GPR);
-}
-
-const RegisterInfo *
-RegisterContextFreeBSD_x86_64::GetRegisterInfo()
-{
- switch (m_target_arch.GetCore())
- {
- case ArchSpec::eCore_x86_32_i386:
- case ArchSpec::eCore_x86_32_i486:
- case ArchSpec::eCore_x86_32_i486sx:
- return GetRegisterInfo_i386 (m_target_arch);
- case ArchSpec::eCore_x86_64_x86_64:
- return g_register_infos_x86_64;
- default:
- assert(false && "Unhandled target architecture.");
- return NULL;
- }
-}
-
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h (removed)
@@ -1,29 +0,0 @@
-//===-- RegisterContextFreeBSD_x86_64.h -------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextFreeBSD_x86_64_H_
-#define liblldb_RegisterContextFreeBSD_x86_64_H_
-
-#include "RegisterContextPOSIX.h"
-
-class RegisterContextFreeBSD_x86_64:
- public RegisterInfoInterface
-{
-public:
- RegisterContextFreeBSD_x86_64(const lldb_private::ArchSpec &target_arch);
- virtual ~RegisterContextFreeBSD_x86_64();
-
- size_t
- GetGPRSize();
-
- const lldb_private::RegisterInfo *
- GetRegisterInfo();
-};
-
-#endif
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp (removed)
@@ -1,126 +0,0 @@
-//===-- RegisterContextLinux_i386.cpp --------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include "RegisterContextPOSIX_x86.h"
-#include "RegisterContextLinux_i386.h"
-
-using namespace lldb_private;
-using namespace lldb;
-
-struct GPR
-{
- uint32_t ebx;
- uint32_t ecx;
- uint32_t edx;
- uint32_t esi;
- uint32_t edi;
- uint32_t ebp;
- uint32_t eax;
- uint32_t ds;
- uint32_t es;
- uint32_t fs;
- uint32_t gs;
- uint32_t orig_ax;
- uint32_t eip;
- uint32_t cs;
- uint32_t eflags;
- uint32_t esp;
- uint32_t ss;
-};
-
-struct FPR_i386
-{
- uint16_t fctrl; // FPU Control Word (fcw)
- uint16_t fstat; // FPU Status Word (fsw)
- uint16_t ftag; // FPU Tag Word (ftw)
- uint16_t fop; // Last Instruction Opcode (fop)
- union
- {
- struct
- {
- uint64_t fip; // Instruction Pointer
- uint64_t fdp; // Data Pointer
- } x86_64;
- struct
- {
- uint32_t fioff; // FPU IP Offset (fip)
- uint32_t fiseg; // FPU IP Selector (fcs)
- uint32_t fooff; // FPU Operand Pointer Offset (foo)
- uint32_t foseg; // FPU Operand Pointer Selector (fos)
- } i386;
- } ptr;
- uint32_t mxcsr; // MXCSR Register State
- uint32_t mxcsrmask; // MXCSR Mask
- MMSReg stmm[8]; // 8*16 bytes for each FP-reg = 128 bytes
- XMMReg xmm[8]; // 8*16 bytes for each XMM-reg = 128 bytes
- uint32_t padding[56];
-};
-
-struct UserArea
-{
- GPR regs; // General purpose registers.
- int32_t fpvalid; // True if FPU is being used.
- FPR_i386 i387; // FPU registers.
- uint32_t tsize; // Text segment size.
- uint32_t dsize; // Data segment size.
- uint32_t ssize; // Stack segment size.
- uint32_t start_code; // VM address of text.
- uint32_t start_stack; // VM address of stack bottom (top in rsp).
- int32_t signal; // Signal causing core dump.
- int32_t reserved; // Unused.
- uint32_t ar0; // Location of GPR's.
- uint32_t fpstate; // Location of FPR's. Should be a FXSTATE *, but this
- // has to be 32-bits even on 64-bit systems.
- uint32_t magic; // Identifier for core dumps.
- char u_comm[32]; // Command causing core dump.
- uint32_t u_debugreg[8]; // Debug registers (DR0 - DR7).
-};
-
-#define DR_SIZE sizeof(UserArea::u_debugreg[0])
-#define DR_0_OFFSET 0xFC
-#define DR_OFFSET(reg_index) \
- (DR_0_OFFSET + (reg_index * 4))
-#define FPR_SIZE(reg) sizeof(((FPR_i386*)NULL)->reg)
-
-//---------------------------------------------------------------------------
-// Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
-//---------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_I386_STRUCT
-#include "RegisterInfos_i386.h"
-#undef DECLARE_REGISTER_INFOS_I386_STRUCT
-
-RegisterContextLinux_i386::RegisterContextLinux_i386(const ArchSpec &target_arch) :
- RegisterInfoInterface(target_arch)
-{
-}
-
-RegisterContextLinux_i386::~RegisterContextLinux_i386()
-{
-}
-
-size_t
-RegisterContextLinux_i386::GetGPRSize()
-{
- return sizeof(GPR);
-}
-
-const RegisterInfo *
-RegisterContextLinux_i386::GetRegisterInfo()
-{
- switch (m_target_arch.GetCore())
- {
- case ArchSpec::eCore_x86_32_i386:
- case ArchSpec::eCore_x86_32_i486:
- case ArchSpec::eCore_x86_32_i486sx:
- return g_register_infos_i386;
- default:
- assert(false && "Unhandled target architecture.");
- return NULL;
- }
-}
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h (removed)
@@ -1,29 +0,0 @@
-//===-- RegisterContextLinux_i386.h -----------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextLinux_i386_H_
-#define liblldb_RegisterContextLinux_i386_H_
-
-#include "RegisterContextPOSIX.h"
-
-class RegisterContextLinux_i386
- : public RegisterInfoInterface
-{
-public:
- RegisterContextLinux_i386(const lldb_private::ArchSpec &target_arch);
- virtual ~RegisterContextLinux_i386();
-
- size_t
- GetGPRSize();
-
- const lldb_private::RegisterInfo *
- GetRegisterInfo();
-};
-
-#endif
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp (removed)
@@ -1,139 +0,0 @@
-//===-- RegisterContextLinux_x86_64.cpp ------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include <vector>
-#include "RegisterContextPOSIX_x86.h"
-#include "RegisterContextLinux_i386.h"
-#include "RegisterContextLinux_x86_64.h"
-
-using namespace lldb_private;
-using namespace lldb;
-
-typedef struct _GPR
-{
- uint64_t r15;
- uint64_t r14;
- uint64_t r13;
- uint64_t r12;
- uint64_t rbp;
- uint64_t rbx;
- uint64_t r11;
- uint64_t r10;
- uint64_t r9;
- uint64_t r8;
- uint64_t rax;
- uint64_t rcx;
- uint64_t rdx;
- uint64_t rsi;
- uint64_t rdi;
- uint64_t orig_ax;
- uint64_t rip;
- uint64_t cs;
- uint64_t rflags;
- uint64_t rsp;
- uint64_t ss;
- uint64_t fs_base;
- uint64_t gs_base;
- uint64_t ds;
- uint64_t es;
- uint64_t fs;
- uint64_t gs;
-} GPR;
-
-struct UserArea
-{
- GPR gpr; // General purpose registers.
- int32_t fpvalid; // True if FPU is being used.
- int32_t pad0;
- FXSAVE i387; // General purpose floating point registers (see FPR for extended register sets).
- uint64_t tsize; // Text segment size.
- uint64_t dsize; // Data segment size.
- uint64_t ssize; // Stack segment size.
- uint64_t start_code; // VM address of text.
- uint64_t start_stack; // VM address of stack bottom (top in rsp).
- int64_t signal; // Signal causing core dump.
- int32_t reserved; // Unused.
- int32_t pad1;
- uint64_t ar0; // Location of GPR's.
- FXSAVE* fpstate; // Location of FPR's.
- uint64_t magic; // Identifier for core dumps.
- char u_comm[32]; // Command causing core dump.
- uint64_t u_debugreg[8]; // Debug registers (DR0 - DR7).
- uint64_t error_code; // CPU error code.
- uint64_t fault_address; // Control register CR3.
-};
-
-#define DR_SIZE sizeof(UserArea::u_debugreg[0])
-#define DR_OFFSET(reg_index) \
- (LLVM_EXTENSION offsetof(UserArea, u_debugreg[reg_index]))
-
-//---------------------------------------------------------------------------
-// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64 structure.
-//---------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_X86_64_STRUCT
-#include "RegisterInfos_x86_64.h"
-#undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
-
-static const RegisterInfo *
-GetRegisterInfo_i386(const lldb_private::ArchSpec &arch)
-{
- static std::vector<lldb_private::RegisterInfo> g_register_infos;
-
- // Allocate RegisterInfo only once
- if (g_register_infos.empty())
- {
- // Copy the register information from base class
- std::unique_ptr<RegisterContextLinux_i386> reg_interface(new RegisterContextLinux_i386 (arch));
- const RegisterInfo *base_info = reg_interface->GetRegisterInfo();
- g_register_infos.insert(g_register_infos.end(), &base_info[0], &base_info[k_num_registers_i386]);
-
- //---------------------------------------------------------------------------
- // Include RegisterInfos_x86_64 to update the g_register_infos structure
- // with x86_64 offsets.
- //---------------------------------------------------------------------------
- #define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
- #include "RegisterInfos_x86_64.h"
- #undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
- }
-
- return &g_register_infos[0];
-}
-
-RegisterContextLinux_x86_64::RegisterContextLinux_x86_64(const ArchSpec &target_arch) :
- RegisterInfoInterface(target_arch)
-{
-}
-
-RegisterContextLinux_x86_64::~RegisterContextLinux_x86_64()
-{
-}
-
-size_t
-RegisterContextLinux_x86_64::GetGPRSize()
-{
- return sizeof(GPR);
-}
-
-const RegisterInfo *
-RegisterContextLinux_x86_64::GetRegisterInfo()
-{
- switch (m_target_arch.GetCore())
- {
- case ArchSpec::eCore_x86_32_i386:
- case ArchSpec::eCore_x86_32_i486:
- case ArchSpec::eCore_x86_32_i486sx:
- return GetRegisterInfo_i386 (m_target_arch);
- case ArchSpec::eCore_x86_64_x86_64:
- return g_register_infos_x86_64;
- default:
- assert(false && "Unhandled target architecture.");
- return NULL;
- }
-}
-
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h (removed)
@@ -1,29 +0,0 @@
-//===-- RegisterContextLinux_x86_64.h ---------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextLinux_x86_64_H_
-#define liblldb_RegisterContextLinux_x86_64_H_
-
-#include "RegisterContextPOSIX.h"
-
-class RegisterContextLinux_x86_64
- : public RegisterInfoInterface
-{
-public:
- RegisterContextLinux_x86_64(const lldb_private::ArchSpec &target_arch);
- virtual ~RegisterContextLinux_x86_64();
-
- size_t
- GetGPRSize();
-
- const lldb_private::RegisterInfo *
- GetRegisterInfo();
-};
-
-#endif
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h (removed)
@@ -1,98 +0,0 @@
-//===-- RegisterContextPOSIX.h --------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextPOSIX_H_
-#define liblldb_RegisterContextPOSIX_H_
-
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-#include "lldb/Core/ArchSpec.h"
-#include "lldb/Target/RegisterContext.h"
-
-//------------------------------------------------------------------------------
-/// @class POSIXBreakpointProtocol
-///
-/// @brief Extends RegisterClass with a few virtual operations useful on POSIX.
-class POSIXBreakpointProtocol
-{
-public:
- POSIXBreakpointProtocol()
- { m_watchpoints_initialized = false; }
- virtual ~POSIXBreakpointProtocol() {}
-
- /// Updates the register state of the associated thread after hitting a
- /// breakpoint (if that make sense for the architecture). Default
- /// implementation simply returns true for architectures which do not
- /// require any update.
- ///
- /// @return
- /// True if the operation succeeded and false otherwise.
- virtual bool UpdateAfterBreakpoint() = 0;
-
- /// Determines the index in lldb's register file given a kernel byte offset.
- virtual unsigned
- GetRegisterIndexFromOffset(unsigned offset) = 0;
-
- // Checks to see if a watchpoint specified by hw_index caused the inferior
- // to stop.
- virtual bool
- IsWatchpointHit (uint32_t hw_index) = 0;
-
- // Resets any watchpoints that have been hit.
- virtual bool
- ClearWatchpointHits () = 0;
-
- // Returns the watchpoint address associated with a watchpoint hardware
- // index.
- virtual lldb::addr_t
- GetWatchpointAddress (uint32_t hw_index) = 0;
-
- virtual bool
- IsWatchpointVacant (uint32_t hw_index) = 0;
-
- virtual bool
- SetHardwareWatchpointWithIndex (lldb::addr_t addr, size_t size,
- bool read, bool write,
- uint32_t hw_index) = 0;
-
- // From lldb_private::RegisterContext
- virtual uint32_t
- NumSupportedHardwareWatchpoints () = 0;
-
- // Force m_watchpoints_initialized to TRUE
- void
- ForceWatchpointsInitialized () {m_watchpoints_initialized = true;}
-
-protected:
- bool m_watchpoints_initialized;
-};
-
-//------------------------------------------------------------------------------
-/// @class RegisterInfoInterface
-///
-/// @brief RegisterInfo interface to patch RegisterInfo structure for archs.
-class RegisterInfoInterface
-{
-public:
- RegisterInfoInterface(const lldb_private::ArchSpec& target_arch) : m_target_arch(target_arch) {}
- virtual ~RegisterInfoInterface () {}
-
- virtual size_t
- GetGPRSize () = 0;
-
- virtual const lldb_private::RegisterInfo *
- GetRegisterInfo () = 0;
-
-public:
- lldb_private::ArchSpec m_target_arch;
-};
-
-#endif // #ifndef liblldb_RegisterContextPOSIX_H_
-
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.h?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.h Wed Mar 12 11:04:29 2014
@@ -10,7 +10,7 @@
#ifndef liblldb_RegisterContextPOSIXProcessMonitor_mips64_H_
#define liblldb_RegisterContextPOSIXProcessMonitor_mips64_H_
-#include "Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h"
class RegisterContextPOSIXProcessMonitor_mips64:
public RegisterContextPOSIX_mips64,
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.h?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.h Wed Mar 12 11:04:29 2014
@@ -10,7 +10,7 @@
#ifndef liblldb_RegisterContextPOSIXProcessMonitor_x86_H_
#define liblldb_RegisterContextPOSIXProcessMonitor_x86_H_
-#include "Plugins/Process/POSIX/RegisterContextPOSIX_x86.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX_x86.h"
class RegisterContextPOSIXProcessMonitor_x86_64:
public RegisterContextPOSIX_x86,
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp (removed)
@@ -1,238 +0,0 @@
-//===-- RegisterContextPOSIX_mips64.cpp -------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstring>
-#include <errno.h>
-#include <stdint.h>
-
-#include "lldb/Core/DataBufferHeap.h"
-#include "lldb/Core/DataExtractor.h"
-#include "lldb/Core/RegisterValue.h"
-#include "lldb/Core/Scalar.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Host/Endian.h"
-#include "llvm/Support/Compiler.h"
-
-#include "ProcessPOSIX.h"
-#include "RegisterContextPOSIX_mips64.h"
-#include "Plugins/Process/elf-core/ProcessElfCore.h"
-
-using namespace lldb_private;
-using namespace lldb;
-
-static const
-uint32_t g_gpr_regnums[] =
-{
- gpr_zero_mips64,
- gpr_r1_mips64,
- gpr_r2_mips64,
- gpr_r3_mips64,
- gpr_r4_mips64,
- gpr_r5_mips64,
- gpr_r6_mips64,
- gpr_r7_mips64,
- gpr_r8_mips64,
- gpr_r9_mips64,
- gpr_r10_mips64,
- gpr_r11_mips64,
- gpr_r12_mips64,
- gpr_r13_mips64,
- gpr_r14_mips64,
- gpr_r15_mips64,
- gpr_r16_mips64,
- gpr_r17_mips64,
- gpr_r18_mips64,
- gpr_r19_mips64,
- gpr_r20_mips64,
- gpr_r21_mips64,
- gpr_r22_mips64,
- gpr_r23_mips64,
- gpr_r24_mips64,
- gpr_r25_mips64,
- gpr_r26_mips64,
- gpr_r27_mips64,
- gpr_gp_mips64,
- gpr_sp_mips64,
- gpr_r30_mips64,
- gpr_ra_mips64,
- gpr_sr_mips64,
- gpr_mullo_mips64,
- gpr_mulhi_mips64,
- gpr_badvaddr_mips64,
- gpr_cause_mips64,
- gpr_pc_mips64,
- gpr_ic_mips64,
- gpr_dummy_mips64
-};
-
-// Number of register sets provided by this context.
-enum
-{
- k_num_register_sets = 1
-};
-
-static const RegisterSet
-g_reg_sets_mips64[k_num_register_sets] =
-{
- { "General Purpose Registers", "gpr", k_num_gpr_registers_mips64, g_gpr_regnums },
-};
-
-bool RegisterContextPOSIX_mips64::IsGPR(unsigned reg)
-{
- return reg <= k_num_gpr_registers_mips64; // GPR's come first.
-}
-
-bool
-RegisterContextPOSIX_mips64::IsFPR(unsigned reg)
-{
- // XXX
- return false;
-}
-
-RegisterContextPOSIX_mips64::RegisterContextPOSIX_mips64(Thread &thread,
- uint32_t concrete_frame_idx,
- RegisterInfoInterface *register_info)
- : RegisterContext(thread, concrete_frame_idx)
-{
- m_register_info_ap.reset(register_info);
-
- // elf-core yet to support ReadFPR()
- ProcessSP base = CalculateProcess();
- if (base.get()->GetPluginName() == ProcessElfCore::GetPluginNameStatic())
- return;
-}
-
-RegisterContextPOSIX_mips64::~RegisterContextPOSIX_mips64()
-{
-}
-
-void
-RegisterContextPOSIX_mips64::Invalidate()
-{
-}
-
-void
-RegisterContextPOSIX_mips64::InvalidateAllRegisters()
-{
-}
-
-unsigned
-RegisterContextPOSIX_mips64::GetRegisterOffset(unsigned reg)
-{
- assert(reg < k_num_registers_mips64 && "Invalid register number.");
- return GetRegisterInfo()[reg].byte_offset;
-}
-
-unsigned
-RegisterContextPOSIX_mips64::GetRegisterSize(unsigned reg)
-{
- assert(reg < k_num_registers_mips64 && "Invalid register number.");
- return GetRegisterInfo()[reg].byte_size;
-}
-
-size_t
-RegisterContextPOSIX_mips64::GetRegisterCount()
-{
- size_t num_registers = k_num_registers_mips64;
- return num_registers;
-}
-
-size_t
-RegisterContextPOSIX_mips64::GetGPRSize()
-{
- return m_register_info_ap->GetGPRSize();
-}
-
-const RegisterInfo *
-RegisterContextPOSIX_mips64::GetRegisterInfo()
-{
- // Commonly, this method is overridden and g_register_infos is copied and specialized.
- // So, use GetRegisterInfo() rather than g_register_infos in this scope.
- return m_register_info_ap->GetRegisterInfo ();
-}
-
-const RegisterInfo *
-RegisterContextPOSIX_mips64::GetRegisterInfoAtIndex(size_t reg)
-{
- if (reg < k_num_registers_mips64)
- return &GetRegisterInfo()[reg];
- else
- return NULL;
-}
-
-size_t
-RegisterContextPOSIX_mips64::GetRegisterSetCount()
-{
- size_t sets = 0;
- for (size_t set = 0; set < k_num_register_sets; ++set)
- {
- if (IsRegisterSetAvailable(set))
- ++sets;
- }
-
- return sets;
-}
-
-const RegisterSet *
-RegisterContextPOSIX_mips64::GetRegisterSet(size_t set)
-{
- if (IsRegisterSetAvailable(set))
- return &g_reg_sets_mips64[set];
- else
- return NULL;
-}
-
-const char *
-RegisterContextPOSIX_mips64::GetRegisterName(unsigned reg)
-{
- assert(reg < k_num_registers_mips64 && "Invalid register offset.");
- return GetRegisterInfo()[reg].name;
-}
-
-lldb::ByteOrder
-RegisterContextPOSIX_mips64::GetByteOrder()
-{
- // Get the target process whose privileged thread was used for the register read.
- lldb::ByteOrder byte_order = eByteOrderInvalid;
- Process *process = CalculateProcess().get();
-
- if (process)
- byte_order = process->GetByteOrder();
- return byte_order;
-}
-
-bool
-RegisterContextPOSIX_mips64::IsRegisterSetAvailable(size_t set_index)
-{
- size_t num_sets = k_num_register_sets;
-
- return (set_index < num_sets);
-}
-
-// Used when parsing DWARF and EH frame information and any other
-// object file sections that contain register numbers in them.
-uint32_t
-RegisterContextPOSIX_mips64::ConvertRegisterKindToRegisterNumber(uint32_t kind,
- uint32_t num)
-{
- const uint32_t num_regs = GetRegisterCount();
-
- assert (kind < kNumRegisterKinds);
- for (uint32_t reg_idx = 0; reg_idx < num_regs; ++reg_idx)
- {
- const RegisterInfo *reg_info = GetRegisterInfoAtIndex (reg_idx);
-
- if (reg_info->kinds[kind] == num)
- return reg_idx;
- }
-
- return LLDB_INVALID_REGNUM;
-}
-
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h (removed)
@@ -1,138 +0,0 @@
-//===-- RegisterContextPOSIX_mips64.h ---------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextPOSIX_mips64_H_
-#define liblldb_RegisterContextPOSIX_mips64_H_
-
-#include "lldb/Core/Log.h"
-#include "RegisterContextPOSIX.h"
-#include "RegisterContext_mips64.h"
-
-class ProcessMonitor;
-
-// ---------------------------------------------------------------------------
-// Internal codes for all mips64 registers.
-// ---------------------------------------------------------------------------
-enum
-{
- k_first_gpr_mips64,
- gpr_zero_mips64 = k_first_gpr_mips64,
- gpr_r1_mips64,
- gpr_r2_mips64,
- gpr_r3_mips64,
- gpr_r4_mips64,
- gpr_r5_mips64,
- gpr_r6_mips64,
- gpr_r7_mips64,
- gpr_r8_mips64,
- gpr_r9_mips64,
- gpr_r10_mips64,
- gpr_r11_mips64,
- gpr_r12_mips64,
- gpr_r13_mips64,
- gpr_r14_mips64,
- gpr_r15_mips64,
- gpr_r16_mips64,
- gpr_r17_mips64,
- gpr_r18_mips64,
- gpr_r19_mips64,
- gpr_r20_mips64,
- gpr_r21_mips64,
- gpr_r22_mips64,
- gpr_r23_mips64,
- gpr_r24_mips64,
- gpr_r25_mips64,
- gpr_r26_mips64,
- gpr_r27_mips64,
- gpr_gp_mips64,
- gpr_sp_mips64,
- gpr_r30_mips64,
- gpr_ra_mips64,
- gpr_sr_mips64,
- gpr_mullo_mips64,
- gpr_mulhi_mips64,
- gpr_badvaddr_mips64,
- gpr_cause_mips64,
- gpr_pc_mips64,
- gpr_ic_mips64,
- gpr_dummy_mips64,
-
- k_num_registers_mips64,
- k_num_gpr_registers_mips64 = k_num_registers_mips64
-};
-
-class RegisterContextPOSIX_mips64
- : public lldb_private::RegisterContext
-{
-public:
- RegisterContextPOSIX_mips64 (lldb_private::Thread &thread,
- uint32_t concrete_frame_idx,
- RegisterInfoInterface *register_info);
-
- ~RegisterContextPOSIX_mips64();
-
- void
- Invalidate();
-
- void
- InvalidateAllRegisters();
-
- size_t
- GetRegisterCount();
-
- virtual size_t
- GetGPRSize();
-
- virtual unsigned
- GetRegisterSize(unsigned reg);
-
- virtual unsigned
- GetRegisterOffset(unsigned reg);
-
- const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex(size_t reg);
-
- size_t
- GetRegisterSetCount();
-
- const lldb_private::RegisterSet *
- GetRegisterSet(size_t set);
-
- const char *
- GetRegisterName(unsigned reg);
-
- uint32_t
- ConvertRegisterKindToRegisterNumber(uint32_t kind, uint32_t num);
-
-protected:
- uint64_t m_gpr_mips64[k_num_gpr_registers_mips64]; // general purpose registers.
- std::unique_ptr<RegisterInfoInterface> m_register_info_ap; // Register Info Interface (FreeBSD or Linux)
-
- // Determines if an extended register set is supported on the processor running the inferior process.
- virtual bool
- IsRegisterSetAvailable(size_t set_index);
-
- virtual const lldb_private::RegisterInfo *
- GetRegisterInfo();
-
- bool
- IsGPR(unsigned reg);
-
- bool
- IsFPR(unsigned reg);
-
- lldb::ByteOrder GetByteOrder();
-
- virtual bool ReadGPR() = 0;
- virtual bool ReadFPR() = 0;
- virtual bool WriteGPR() = 0;
- virtual bool WriteFPR() = 0;
-};
-
-#endif // #ifndef liblldb_RegisterContextPOSIX_mips64_H_
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp (removed)
@@ -1,666 +0,0 @@
-//===-- RegisterContextPOSIX_x86.cpp ----------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstring>
-#include <errno.h>
-#include <stdint.h>
-
-#include "lldb/Core/DataBufferHeap.h"
-#include "lldb/Core/DataExtractor.h"
-#include "lldb/Core/RegisterValue.h"
-#include "lldb/Core/Scalar.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Host/Endian.h"
-#include "llvm/Support/Compiler.h"
-
-#include "ProcessPOSIX.h"
-#include "RegisterContext_x86.h"
-#include "RegisterContextPOSIX_x86.h"
-#include "Plugins/Process/elf-core/ProcessElfCore.h"
-
-using namespace lldb_private;
-using namespace lldb;
-
-const uint32_t
-g_gpr_regnums_i386[] =
-{
- gpr_eax_i386,
- gpr_ebx_i386,
- gpr_ecx_i386,
- gpr_edx_i386,
- gpr_edi_i386,
- gpr_esi_i386,
- gpr_ebp_i386,
- gpr_esp_i386,
- gpr_eip_i386,
- gpr_eflags_i386,
- gpr_cs_i386,
- gpr_fs_i386,
- gpr_gs_i386,
- gpr_ss_i386,
- gpr_ds_i386,
- gpr_es_i386,
- gpr_ax_i386,
- gpr_bx_i386,
- gpr_cx_i386,
- gpr_dx_i386,
- gpr_di_i386,
- gpr_si_i386,
- gpr_bp_i386,
- gpr_sp_i386,
- gpr_ah_i386,
- gpr_bh_i386,
- gpr_ch_i386,
- gpr_dh_i386,
- gpr_al_i386,
- gpr_bl_i386,
- gpr_cl_i386,
- gpr_dl_i386
-};
-static_assert((sizeof(g_gpr_regnums_i386) / sizeof(g_gpr_regnums_i386[0])) == k_num_gpr_registers_i386,
- "g_gpr_regnums_i386 has wrong number of register infos");
-
-const uint32_t
-g_fpu_regnums_i386[] =
-{
- fpu_fctrl_i386,
- fpu_fstat_i386,
- fpu_ftag_i386,
- fpu_fop_i386,
- fpu_fiseg_i386,
- fpu_fioff_i386,
- fpu_foseg_i386,
- fpu_fooff_i386,
- fpu_mxcsr_i386,
- fpu_mxcsrmask_i386,
- fpu_st0_i386,
- fpu_st1_i386,
- fpu_st2_i386,
- fpu_st3_i386,
- fpu_st4_i386,
- fpu_st5_i386,
- fpu_st6_i386,
- fpu_st7_i386,
- fpu_mm0_i386,
- fpu_mm1_i386,
- fpu_mm2_i386,
- fpu_mm3_i386,
- fpu_mm4_i386,
- fpu_mm5_i386,
- fpu_mm6_i386,
- fpu_mm7_i386,
- fpu_xmm0_i386,
- fpu_xmm1_i386,
- fpu_xmm2_i386,
- fpu_xmm3_i386,
- fpu_xmm4_i386,
- fpu_xmm5_i386,
- fpu_xmm6_i386,
- fpu_xmm7_i386
-};
-static_assert((sizeof(g_fpu_regnums_i386) / sizeof(g_fpu_regnums_i386[0])) == k_num_fpr_registers_i386,
- "g_fpu_regnums_i386 has wrong number of register infos");
-
-const uint32_t
-g_avx_regnums_i386[] =
-{
- fpu_ymm0_i386,
- fpu_ymm1_i386,
- fpu_ymm2_i386,
- fpu_ymm3_i386,
- fpu_ymm4_i386,
- fpu_ymm5_i386,
- fpu_ymm6_i386,
- fpu_ymm7_i386
-};
-static_assert((sizeof(g_avx_regnums_i386) / sizeof(g_avx_regnums_i386[0])) == k_num_avx_registers_i386,
- " g_avx_regnums_i386 has wrong number of register infos");
-
-static const
-uint32_t g_gpr_regnums_x86_64[] =
-{
- gpr_rax_x86_64,
- gpr_rbx_x86_64,
- gpr_rcx_x86_64,
- gpr_rdx_x86_64,
- gpr_rdi_x86_64,
- gpr_rsi_x86_64,
- gpr_rbp_x86_64,
- gpr_rsp_x86_64,
- gpr_r8_x86_64,
- gpr_r9_x86_64,
- gpr_r10_x86_64,
- gpr_r11_x86_64,
- gpr_r12_x86_64,
- gpr_r13_x86_64,
- gpr_r14_x86_64,
- gpr_r15_x86_64,
- gpr_rip_x86_64,
- gpr_rflags_x86_64,
- gpr_cs_x86_64,
- gpr_fs_x86_64,
- gpr_gs_x86_64,
- gpr_ss_x86_64,
- gpr_ds_x86_64,
- gpr_es_x86_64,
- gpr_eax_x86_64,
- gpr_ebx_x86_64,
- gpr_ecx_x86_64,
- gpr_edx_x86_64,
- gpr_edi_x86_64,
- gpr_esi_x86_64,
- gpr_ebp_x86_64,
- gpr_esp_x86_64,
- gpr_r8d_x86_64, // Low 32 bits or r8
- gpr_r9d_x86_64, // Low 32 bits or r9
- gpr_r10d_x86_64, // Low 32 bits or r10
- gpr_r11d_x86_64, // Low 32 bits or r11
- gpr_r12d_x86_64, // Low 32 bits or r12
- gpr_r13d_x86_64, // Low 32 bits or r13
- gpr_r14d_x86_64, // Low 32 bits or r14
- gpr_r15d_x86_64, // Low 32 bits or r15
- gpr_ax_x86_64,
- gpr_bx_x86_64,
- gpr_cx_x86_64,
- gpr_dx_x86_64,
- gpr_di_x86_64,
- gpr_si_x86_64,
- gpr_bp_x86_64,
- gpr_sp_x86_64,
- gpr_r8w_x86_64, // Low 16 bits or r8
- gpr_r9w_x86_64, // Low 16 bits or r9
- gpr_r10w_x86_64, // Low 16 bits or r10
- gpr_r11w_x86_64, // Low 16 bits or r11
- gpr_r12w_x86_64, // Low 16 bits or r12
- gpr_r13w_x86_64, // Low 16 bits or r13
- gpr_r14w_x86_64, // Low 16 bits or r14
- gpr_r15w_x86_64, // Low 16 bits or r15
- gpr_ah_x86_64,
- gpr_bh_x86_64,
- gpr_ch_x86_64,
- gpr_dh_x86_64,
- gpr_al_x86_64,
- gpr_bl_x86_64,
- gpr_cl_x86_64,
- gpr_dl_x86_64,
- gpr_dil_x86_64,
- gpr_sil_x86_64,
- gpr_bpl_x86_64,
- gpr_spl_x86_64,
- gpr_r8l_x86_64, // Low 8 bits or r8
- gpr_r9l_x86_64, // Low 8 bits or r9
- gpr_r10l_x86_64, // Low 8 bits or r10
- gpr_r11l_x86_64, // Low 8 bits or r11
- gpr_r12l_x86_64, // Low 8 bits or r12
- gpr_r13l_x86_64, // Low 8 bits or r13
- gpr_r14l_x86_64, // Low 8 bits or r14
- gpr_r15l_x86_64, // Low 8 bits or r15
-};
-static_assert((sizeof(g_gpr_regnums_x86_64) / sizeof(g_gpr_regnums_x86_64[0])) == k_num_gpr_registers_x86_64,
- "g_gpr_regnums_x86_64 has wrong number of register infos");
-
-static const uint32_t
-g_fpu_regnums_x86_64[] =
-{
- fpu_fctrl_x86_64,
- fpu_fstat_x86_64,
- fpu_ftag_x86_64,
- fpu_fop_x86_64,
- fpu_fiseg_x86_64,
- fpu_fioff_x86_64,
- fpu_foseg_x86_64,
- fpu_fooff_x86_64,
- fpu_mxcsr_x86_64,
- fpu_mxcsrmask_x86_64,
- fpu_st0_x86_64,
- fpu_st1_x86_64,
- fpu_st2_x86_64,
- fpu_st3_x86_64,
- fpu_st4_x86_64,
- fpu_st5_x86_64,
- fpu_st6_x86_64,
- fpu_st7_x86_64,
- fpu_mm0_x86_64,
- fpu_mm1_x86_64,
- fpu_mm2_x86_64,
- fpu_mm3_x86_64,
- fpu_mm4_x86_64,
- fpu_mm5_x86_64,
- fpu_mm6_x86_64,
- fpu_mm7_x86_64,
- fpu_xmm0_x86_64,
- fpu_xmm1_x86_64,
- fpu_xmm2_x86_64,
- fpu_xmm3_x86_64,
- fpu_xmm4_x86_64,
- fpu_xmm5_x86_64,
- fpu_xmm6_x86_64,
- fpu_xmm7_x86_64,
- fpu_xmm8_x86_64,
- fpu_xmm9_x86_64,
- fpu_xmm10_x86_64,
- fpu_xmm11_x86_64,
- fpu_xmm12_x86_64,
- fpu_xmm13_x86_64,
- fpu_xmm14_x86_64,
- fpu_xmm15_x86_64
-};
-static_assert((sizeof(g_fpu_regnums_x86_64) / sizeof(g_fpu_regnums_x86_64[0])) == k_num_fpr_registers_x86_64,
- "g_fpu_regnums_x86_64 has wrong number of register infos");
-
-static const uint32_t
-g_avx_regnums_x86_64[] =
-{
- fpu_ymm0_x86_64,
- fpu_ymm1_x86_64,
- fpu_ymm2_x86_64,
- fpu_ymm3_x86_64,
- fpu_ymm4_x86_64,
- fpu_ymm5_x86_64,
- fpu_ymm6_x86_64,
- fpu_ymm7_x86_64,
- fpu_ymm8_x86_64,
- fpu_ymm9_x86_64,
- fpu_ymm10_x86_64,
- fpu_ymm11_x86_64,
- fpu_ymm12_x86_64,
- fpu_ymm13_x86_64,
- fpu_ymm14_x86_64,
- fpu_ymm15_x86_64
-};
-static_assert((sizeof(g_avx_regnums_x86_64) / sizeof(g_avx_regnums_x86_64[0])) == k_num_avx_registers_x86_64,
- "g_avx_regnums_x86_64 has wrong number of register infos");
-
-uint32_t RegisterContextPOSIX_x86::g_contained_eax[] = { gpr_eax_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_ebx[] = { gpr_ebx_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_ecx[] = { gpr_ecx_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_edx[] = { gpr_edx_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_edi[] = { gpr_edi_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_esi[] = { gpr_esi_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_ebp[] = { gpr_ebp_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_esp[] = { gpr_esp_i386, LLDB_INVALID_REGNUM };
-
-uint32_t RegisterContextPOSIX_x86::g_invalidate_eax[] = { gpr_eax_i386, gpr_ax_i386, gpr_ah_i386, gpr_al_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_ebx[] = { gpr_ebx_i386, gpr_bx_i386, gpr_bh_i386, gpr_bl_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_ecx[] = { gpr_ecx_i386, gpr_cx_i386, gpr_ch_i386, gpr_cl_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_edx[] = { gpr_edx_i386, gpr_dx_i386, gpr_dh_i386, gpr_dl_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_edi[] = { gpr_edi_i386, gpr_di_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_esi[] = { gpr_esi_i386, gpr_si_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_ebp[] = { gpr_ebp_i386, gpr_bp_i386, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_esp[] = { gpr_esp_i386, gpr_sp_i386, LLDB_INVALID_REGNUM };
-
-uint32_t RegisterContextPOSIX_x86::g_contained_rax[] = { gpr_rax_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_rbx[] = { gpr_rbx_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_rcx[] = { gpr_rcx_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_rdx[] = { gpr_rdx_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_rdi[] = { gpr_rdi_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_rsi[] = { gpr_rsi_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_rbp[] = { gpr_rbp_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_rsp[] = { gpr_rsp_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r8[] = { gpr_r8_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r9[] = { gpr_r9_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r10[] = { gpr_r10_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r11[] = { gpr_r11_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r12[] = { gpr_r12_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r13[] = { gpr_r13_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r14[] = { gpr_r14_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_contained_r15[] = { gpr_r15_x86_64, LLDB_INVALID_REGNUM };
-
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rax[] = { gpr_rax_x86_64, gpr_eax_x86_64, gpr_ax_x86_64, gpr_ah_x86_64, gpr_al_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rbx[] = { gpr_rbx_x86_64, gpr_ebx_x86_64, gpr_bx_x86_64, gpr_bh_x86_64, gpr_bl_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rcx[] = { gpr_rcx_x86_64, gpr_ecx_x86_64, gpr_cx_x86_64, gpr_ch_x86_64, gpr_cl_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rdx[] = { gpr_rdx_x86_64, gpr_edx_x86_64, gpr_dx_x86_64, gpr_dh_x86_64, gpr_dl_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rdi[] = { gpr_rdi_x86_64, gpr_edi_x86_64, gpr_di_x86_64, gpr_dil_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rsi[] = { gpr_rsi_x86_64, gpr_esi_x86_64, gpr_si_x86_64, gpr_sil_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rbp[] = { gpr_rbp_x86_64, gpr_ebp_x86_64, gpr_bp_x86_64, gpr_bpl_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_rsp[] = { gpr_rsp_x86_64, gpr_esp_x86_64, gpr_sp_x86_64, gpr_spl_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r8[] = { gpr_r8_x86_64, gpr_r8d_x86_64, gpr_r8w_x86_64, gpr_r8l_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r9[] = { gpr_r9_x86_64, gpr_r9d_x86_64, gpr_r9w_x86_64, gpr_r9l_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r10[] = { gpr_r10_x86_64, gpr_r10d_x86_64, gpr_r10w_x86_64, gpr_r10l_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r11[] = { gpr_r11_x86_64, gpr_r11d_x86_64, gpr_r11w_x86_64, gpr_r11l_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r12[] = { gpr_r12_x86_64, gpr_r12d_x86_64, gpr_r12w_x86_64, gpr_r12l_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r13[] = { gpr_r13_x86_64, gpr_r13d_x86_64, gpr_r13w_x86_64, gpr_r13l_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r14[] = { gpr_r14_x86_64, gpr_r14d_x86_64, gpr_r14w_x86_64, gpr_r14l_x86_64, LLDB_INVALID_REGNUM };
-uint32_t RegisterContextPOSIX_x86::g_invalidate_r15[] = { gpr_r15_x86_64, gpr_r15d_x86_64, gpr_r15w_x86_64, gpr_r15l_x86_64, LLDB_INVALID_REGNUM };
-
-// Number of register sets provided by this context.
-enum
-{
- k_num_extended_register_sets = 1,
- k_num_register_sets = 3
-};
-
-static const RegisterSet
-g_reg_sets_i386[k_num_register_sets] =
-{
- { "General Purpose Registers", "gpr", k_num_gpr_registers_i386, g_gpr_regnums_i386 },
- { "Floating Point Registers", "fpu", k_num_fpr_registers_i386, g_fpu_regnums_i386 },
- { "Advanced Vector Extensions", "avx", k_num_avx_registers_i386, g_avx_regnums_i386 }
-};
-
-static const RegisterSet
-g_reg_sets_x86_64[k_num_register_sets] =
-{
- { "General Purpose Registers", "gpr", k_num_gpr_registers_x86_64, g_gpr_regnums_x86_64 },
- { "Floating Point Registers", "fpu", k_num_fpr_registers_x86_64, g_fpu_regnums_x86_64 },
- { "Advanced Vector Extensions", "avx", k_num_avx_registers_x86_64, g_avx_regnums_x86_64 }
-};
-
-bool RegisterContextPOSIX_x86::IsGPR(unsigned reg)
-{
- return reg <= m_reg_info.last_gpr; // GPR's come first.
-}
-
-bool RegisterContextPOSIX_x86::IsFPR(unsigned reg)
-{
- return (m_reg_info.first_fpr <= reg && reg <= m_reg_info.last_fpr);
-}
-
-bool RegisterContextPOSIX_x86::IsAVX(unsigned reg)
-{
- return (m_reg_info.first_ymm <= reg && reg <= m_reg_info.last_ymm);
-}
-
-bool RegisterContextPOSIX_x86::IsFPR(unsigned reg, FPRType fpr_type)
-{
- bool generic_fpr = IsFPR(reg);
-
- if (fpr_type == eXSAVE)
- return generic_fpr || IsAVX(reg);
- return generic_fpr;
-}
-
-RegisterContextPOSIX_x86::RegisterContextPOSIX_x86(Thread &thread,
- uint32_t concrete_frame_idx,
- RegisterInfoInterface *register_info)
- : RegisterContext(thread, concrete_frame_idx)
-{
- m_register_info_ap.reset(register_info);
-
- switch (register_info->m_target_arch.GetCore())
- {
- case ArchSpec::eCore_x86_32_i386:
- case ArchSpec::eCore_x86_32_i486:
- case ArchSpec::eCore_x86_32_i486sx:
- m_reg_info.num_registers = k_num_registers_i386;
- m_reg_info.num_gpr_registers = k_num_gpr_registers_i386;
- m_reg_info.num_fpr_registers = k_num_fpr_registers_i386;
- m_reg_info.num_avx_registers = k_num_avx_registers_i386;
- m_reg_info.last_gpr = k_last_gpr_i386;
- m_reg_info.first_fpr = k_first_fpr_i386;
- m_reg_info.last_fpr = k_last_fpr_i386;
- m_reg_info.first_st = fpu_st0_i386;
- m_reg_info.last_st = fpu_st7_i386;
- m_reg_info.first_mm = fpu_mm0_i386;
- m_reg_info.last_mm = fpu_mm7_i386;
- m_reg_info.first_xmm = fpu_xmm0_i386;
- m_reg_info.last_xmm = fpu_xmm7_i386;
- m_reg_info.first_ymm = fpu_ymm0_i386;
- m_reg_info.last_ymm = fpu_ymm7_i386;
- m_reg_info.first_dr = dr0_i386;
- m_reg_info.gpr_flags = gpr_eflags_i386;
- break;
- case ArchSpec::eCore_x86_64_x86_64:
- m_reg_info.num_registers = k_num_registers_x86_64;
- m_reg_info.num_gpr_registers = k_num_gpr_registers_x86_64;
- m_reg_info.num_fpr_registers = k_num_fpr_registers_x86_64;
- m_reg_info.num_avx_registers = k_num_avx_registers_x86_64;
- m_reg_info.last_gpr = k_last_gpr_x86_64;
- m_reg_info.first_fpr = k_first_fpr_x86_64;
- m_reg_info.last_fpr = k_last_fpr_x86_64;
- m_reg_info.first_st = fpu_st0_x86_64;
- m_reg_info.last_st = fpu_st7_x86_64;
- m_reg_info.first_mm = fpu_mm0_x86_64;
- m_reg_info.last_mm = fpu_mm7_x86_64;
- m_reg_info.first_xmm = fpu_xmm0_x86_64;
- m_reg_info.last_xmm = fpu_xmm15_x86_64;
- m_reg_info.first_ymm = fpu_ymm0_x86_64;
- m_reg_info.last_ymm = fpu_ymm15_x86_64;
- m_reg_info.first_dr = dr0_x86_64;
- m_reg_info.gpr_flags = gpr_rflags_x86_64;
- break;
- default:
- assert(false && "Unhandled target architecture.");
- break;
- }
-
- // Initialize m_iovec to point to the buffer and buffer size
- // using the conventions of Berkeley style UIO structures, as required
- // by PTRACE extensions.
- m_iovec.iov_base = &m_fpr.xstate.xsave;
- m_iovec.iov_len = sizeof(m_fpr.xstate.xsave);
-
- ::memset(&m_fpr, 0, sizeof(FPR));
-
- // elf-core yet to support ReadFPR()
- ProcessSP base = CalculateProcess();
- if (base.get()->GetPluginName() == ProcessElfCore::GetPluginNameStatic())
- return;
-
- m_fpr_type = eNotValid;
-}
-
-RegisterContextPOSIX_x86::~RegisterContextPOSIX_x86()
-{
-}
-
-RegisterContextPOSIX_x86::FPRType RegisterContextPOSIX_x86::GetFPRType()
-{
- if (m_fpr_type == eNotValid)
- {
- // TODO: Use assembly to call cpuid on the inferior and query ebx or ecx
- m_fpr_type = eXSAVE; // extended floating-point registers, if available
- if (false == ReadFPR())
- m_fpr_type = eFXSAVE; // assume generic floating-point registers
- }
- return m_fpr_type;
-}
-
-void
-RegisterContextPOSIX_x86::Invalidate()
-{
-}
-
-void
-RegisterContextPOSIX_x86::InvalidateAllRegisters()
-{
-}
-
-unsigned
-RegisterContextPOSIX_x86::GetRegisterOffset(unsigned reg)
-{
- assert(reg < m_reg_info.num_registers && "Invalid register number.");
- return GetRegisterInfo()[reg].byte_offset;
-}
-
-unsigned
-RegisterContextPOSIX_x86::GetRegisterSize(unsigned reg)
-{
- assert(reg < m_reg_info.num_registers && "Invalid register number.");
- return GetRegisterInfo()[reg].byte_size;
-}
-
-size_t
-RegisterContextPOSIX_x86::GetRegisterCount()
-{
- size_t num_registers = m_reg_info.num_gpr_registers + m_reg_info.num_fpr_registers;
- if (GetFPRType() == eXSAVE)
- return num_registers + m_reg_info.num_avx_registers;
- return num_registers;
-}
-
-size_t
-RegisterContextPOSIX_x86::GetGPRSize()
-{
- return m_register_info_ap->GetGPRSize ();
-}
-
-const RegisterInfo *
-RegisterContextPOSIX_x86::GetRegisterInfo()
-{
- // Commonly, this method is overridden and g_register_infos is copied and specialized.
- // So, use GetRegisterInfo() rather than g_register_infos in this scope.
- return m_register_info_ap->GetRegisterInfo ();
-}
-
-const RegisterInfo *
-RegisterContextPOSIX_x86::GetRegisterInfoAtIndex(size_t reg)
-{
- if (reg < m_reg_info.num_registers)
- return &GetRegisterInfo()[reg];
- else
- return NULL;
-}
-
-size_t
-RegisterContextPOSIX_x86::GetRegisterSetCount()
-{
- size_t sets = 0;
- for (size_t set = 0; set < k_num_register_sets; ++set)
- {
- if (IsRegisterSetAvailable(set))
- ++sets;
- }
-
- return sets;
-}
-
-const RegisterSet *
-RegisterContextPOSIX_x86::GetRegisterSet(size_t set)
-{
- if (IsRegisterSetAvailable(set))
- {
- switch (m_register_info_ap->m_target_arch.GetCore())
- {
- case ArchSpec::eCore_x86_32_i386:
- case ArchSpec::eCore_x86_32_i486:
- case ArchSpec::eCore_x86_32_i486sx:
- return &g_reg_sets_i386[set];
- case ArchSpec::eCore_x86_64_x86_64:
- return &g_reg_sets_x86_64[set];
- default:
- assert(false && "Unhandled target architecture.");
- return NULL;
- }
- }
- return NULL;
-}
-
-const char *
-RegisterContextPOSIX_x86::GetRegisterName(unsigned reg)
-{
- assert(reg < m_reg_info.num_registers && "Invalid register offset.");
- return GetRegisterInfo()[reg].name;
-}
-
-lldb::ByteOrder
-RegisterContextPOSIX_x86::GetByteOrder()
-{
- // Get the target process whose privileged thread was used for the register read.
- lldb::ByteOrder byte_order = eByteOrderInvalid;
- Process *process = CalculateProcess().get();
-
- if (process)
- byte_order = process->GetByteOrder();
- return byte_order;
-}
-
-// Parse ymm registers and into xmm.bytes and ymmh.bytes.
-bool RegisterContextPOSIX_x86::CopyYMMtoXSTATE(uint32_t reg, lldb::ByteOrder byte_order)
-{
- if (!IsAVX(reg))
- return false;
-
- if (byte_order == eByteOrderLittle)
- {
- ::memcpy(m_fpr.xstate.fxsave.xmm[reg - m_reg_info.first_ymm].bytes,
- m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes,
- sizeof(XMMReg));
- ::memcpy(m_fpr.xstate.xsave.ymmh[reg - m_reg_info.first_ymm].bytes,
- m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes + sizeof(XMMReg),
- sizeof(YMMHReg));
- return true;
- }
-
- if (byte_order == eByteOrderBig)
- {
- ::memcpy(m_fpr.xstate.fxsave.xmm[reg - m_reg_info.first_ymm].bytes,
- m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes + sizeof(XMMReg),
- sizeof(XMMReg));
- ::memcpy(m_fpr.xstate.xsave.ymmh[reg - m_reg_info.first_ymm].bytes,
- m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes,
- sizeof(YMMHReg));
- return true;
- }
- return false; // unsupported or invalid byte order
-}
-
-// Concatenate xmm.bytes with ymmh.bytes
-bool RegisterContextPOSIX_x86::CopyXSTATEtoYMM(uint32_t reg, lldb::ByteOrder byte_order)
-{
- if (!IsAVX(reg))
- return false;
-
- if (byte_order == eByteOrderLittle)
- {
- ::memcpy(m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes,
- m_fpr.xstate.fxsave.xmm[reg - m_reg_info.first_ymm].bytes,
- sizeof(XMMReg));
- ::memcpy(m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes + sizeof(XMMReg),
- m_fpr.xstate.xsave.ymmh[reg - m_reg_info.first_ymm].bytes,
- sizeof(YMMHReg));
- return true;
- }
-
- if (byte_order == eByteOrderBig)
- {
- ::memcpy(m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes + sizeof(XMMReg),
- m_fpr.xstate.fxsave.xmm[reg - m_reg_info.first_ymm].bytes,
- sizeof(XMMReg));
- ::memcpy(m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes,
- m_fpr.xstate.xsave.ymmh[reg - m_reg_info.first_ymm].bytes,
- sizeof(YMMHReg));
- return true;
- }
- return false; // unsupported or invalid byte order
-}
-
-bool
-RegisterContextPOSIX_x86::IsRegisterSetAvailable(size_t set_index)
-{
- // Note: Extended register sets are assumed to be at the end of g_reg_sets...
- size_t num_sets = k_num_register_sets - k_num_extended_register_sets;
-
- if (GetFPRType() == eXSAVE) // ...and to start with AVX registers.
- ++num_sets;
- return (set_index < num_sets);
-}
-
-
-// Used when parsing DWARF and EH frame information and any other
-// object file sections that contain register numbers in them.
-uint32_t
-RegisterContextPOSIX_x86::ConvertRegisterKindToRegisterNumber(uint32_t kind,
- uint32_t num)
-{
- const uint32_t num_regs = GetRegisterCount();
-
- assert (kind < kNumRegisterKinds);
- for (uint32_t reg_idx = 0; reg_idx < num_regs; ++reg_idx)
- {
- const RegisterInfo *reg_info = GetRegisterInfoAtIndex (reg_idx);
-
- if (reg_info->kinds[kind] == num)
- return reg_idx;
- }
-
- return LLDB_INVALID_REGNUM;
-}
-
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h (removed)
@@ -1,462 +0,0 @@
-//===-- RegisterContextPOSIX_x86.h ------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextPOSIX_x86_H_
-#define liblldb_RegisterContextPOSIX_x86_H_
-
-#include "lldb/Core/Log.h"
-#include "RegisterContextPOSIX.h"
-#include "RegisterContext_x86.h"
-
-class ProcessMonitor;
-
-//---------------------------------------------------------------------------
-// Internal codes for all i386 registers.
-//---------------------------------------------------------------------------
-enum
-{
- k_first_gpr_i386,
- gpr_eax_i386 = k_first_gpr_i386,
- gpr_ebx_i386,
- gpr_ecx_i386,
- gpr_edx_i386,
- gpr_edi_i386,
- gpr_esi_i386,
- gpr_ebp_i386,
- gpr_esp_i386,
- gpr_eip_i386,
- gpr_eflags_i386,
- gpr_cs_i386,
- gpr_fs_i386,
- gpr_gs_i386,
- gpr_ss_i386,
- gpr_ds_i386,
- gpr_es_i386,
-
- k_first_alias_i386,
- gpr_ax_i386 = k_first_alias_i386,
- gpr_bx_i386,
- gpr_cx_i386,
- gpr_dx_i386,
- gpr_di_i386,
- gpr_si_i386,
- gpr_bp_i386,
- gpr_sp_i386,
- gpr_ah_i386,
- gpr_bh_i386,
- gpr_ch_i386,
- gpr_dh_i386,
- gpr_al_i386,
- gpr_bl_i386,
- gpr_cl_i386,
- gpr_dl_i386,
- k_last_alias_i386 = gpr_dl_i386,
-
- k_last_gpr_i386 = k_last_alias_i386,
-
- k_first_fpr_i386,
- fpu_fctrl_i386 = k_first_fpr_i386,
- fpu_fstat_i386,
- fpu_ftag_i386,
- fpu_fop_i386,
- fpu_fiseg_i386,
- fpu_fioff_i386,
- fpu_foseg_i386,
- fpu_fooff_i386,
- fpu_mxcsr_i386,
- fpu_mxcsrmask_i386,
- fpu_st0_i386,
- fpu_st1_i386,
- fpu_st2_i386,
- fpu_st3_i386,
- fpu_st4_i386,
- fpu_st5_i386,
- fpu_st6_i386,
- fpu_st7_i386,
- fpu_mm0_i386,
- fpu_mm1_i386,
- fpu_mm2_i386,
- fpu_mm3_i386,
- fpu_mm4_i386,
- fpu_mm5_i386,
- fpu_mm6_i386,
- fpu_mm7_i386,
- fpu_xmm0_i386,
- fpu_xmm1_i386,
- fpu_xmm2_i386,
- fpu_xmm3_i386,
- fpu_xmm4_i386,
- fpu_xmm5_i386,
- fpu_xmm6_i386,
- fpu_xmm7_i386,
- k_last_fpr_i386 = fpu_xmm7_i386,
-
- k_first_avx_i386,
- fpu_ymm0_i386 = k_first_avx_i386,
- fpu_ymm1_i386,
- fpu_ymm2_i386,
- fpu_ymm3_i386,
- fpu_ymm4_i386,
- fpu_ymm5_i386,
- fpu_ymm6_i386,
- fpu_ymm7_i386,
- k_last_avx_i386 = fpu_ymm7_i386,
-
- dr0_i386,
- dr1_i386,
- dr2_i386,
- dr3_i386,
- dr4_i386,
- dr5_i386,
- dr6_i386,
- dr7_i386,
-
- k_num_registers_i386,
- k_num_gpr_registers_i386 = k_last_gpr_i386 - k_first_gpr_i386 + 1,
- k_num_fpr_registers_i386 = k_last_fpr_i386 - k_first_fpr_i386 + 1,
- k_num_avx_registers_i386 = k_last_avx_i386 - k_first_avx_i386 + 1
-};
-
-//---------------------------------------------------------------------------
-// Internal codes for all x86_64 registers.
-//---------------------------------------------------------------------------
-enum
-{
- k_first_gpr_x86_64,
- gpr_rax_x86_64 = k_first_gpr_x86_64,
- gpr_rbx_x86_64,
- gpr_rcx_x86_64,
- gpr_rdx_x86_64,
- gpr_rdi_x86_64,
- gpr_rsi_x86_64,
- gpr_rbp_x86_64,
- gpr_rsp_x86_64,
- gpr_r8_x86_64,
- gpr_r9_x86_64,
- gpr_r10_x86_64,
- gpr_r11_x86_64,
- gpr_r12_x86_64,
- gpr_r13_x86_64,
- gpr_r14_x86_64,
- gpr_r15_x86_64,
- gpr_rip_x86_64,
- gpr_rflags_x86_64,
- gpr_cs_x86_64,
- gpr_fs_x86_64,
- gpr_gs_x86_64,
- gpr_ss_x86_64,
- gpr_ds_x86_64,
- gpr_es_x86_64,
-
- k_first_alias_x86_64,
- gpr_eax_x86_64 = k_first_alias_x86_64,
- gpr_ebx_x86_64,
- gpr_ecx_x86_64,
- gpr_edx_x86_64,
- gpr_edi_x86_64,
- gpr_esi_x86_64,
- gpr_ebp_x86_64,
- gpr_esp_x86_64,
- gpr_r8d_x86_64, // Low 32 bits of r8
- gpr_r9d_x86_64, // Low 32 bits of r9
- gpr_r10d_x86_64, // Low 32 bits of r10
- gpr_r11d_x86_64, // Low 32 bits of r11
- gpr_r12d_x86_64, // Low 32 bits of r12
- gpr_r13d_x86_64, // Low 32 bits of r13
- gpr_r14d_x86_64, // Low 32 bits of r14
- gpr_r15d_x86_64, // Low 32 bits of r15
- gpr_ax_x86_64,
- gpr_bx_x86_64,
- gpr_cx_x86_64,
- gpr_dx_x86_64,
- gpr_di_x86_64,
- gpr_si_x86_64,
- gpr_bp_x86_64,
- gpr_sp_x86_64,
- gpr_r8w_x86_64, // Low 16 bits of r8
- gpr_r9w_x86_64, // Low 16 bits of r9
- gpr_r10w_x86_64, // Low 16 bits of r10
- gpr_r11w_x86_64, // Low 16 bits of r11
- gpr_r12w_x86_64, // Low 16 bits of r12
- gpr_r13w_x86_64, // Low 16 bits of r13
- gpr_r14w_x86_64, // Low 16 bits of r14
- gpr_r15w_x86_64, // Low 16 bits of r15
- gpr_ah_x86_64,
- gpr_bh_x86_64,
- gpr_ch_x86_64,
- gpr_dh_x86_64,
- gpr_al_x86_64,
- gpr_bl_x86_64,
- gpr_cl_x86_64,
- gpr_dl_x86_64,
- gpr_dil_x86_64,
- gpr_sil_x86_64,
- gpr_bpl_x86_64,
- gpr_spl_x86_64,
- gpr_r8l_x86_64, // Low 8 bits of r8
- gpr_r9l_x86_64, // Low 8 bits of r9
- gpr_r10l_x86_64, // Low 8 bits of r10
- gpr_r11l_x86_64, // Low 8 bits of r11
- gpr_r12l_x86_64, // Low 8 bits of r12
- gpr_r13l_x86_64, // Low 8 bits of r13
- gpr_r14l_x86_64, // Low 8 bits of r14
- gpr_r15l_x86_64, // Low 8 bits of r15
- k_last_alias_x86_64 = gpr_r15l_x86_64,
-
- k_last_gpr_x86_64 = k_last_alias_x86_64,
-
- k_first_fpr_x86_64,
- fpu_fctrl_x86_64 = k_first_fpr_x86_64,
- fpu_fstat_x86_64,
- fpu_ftag_x86_64,
- fpu_fop_x86_64,
- fpu_fiseg_x86_64,
- fpu_fioff_x86_64,
- fpu_foseg_x86_64,
- fpu_fooff_x86_64,
- fpu_mxcsr_x86_64,
- fpu_mxcsrmask_x86_64,
- fpu_st0_x86_64,
- fpu_st1_x86_64,
- fpu_st2_x86_64,
- fpu_st3_x86_64,
- fpu_st4_x86_64,
- fpu_st5_x86_64,
- fpu_st6_x86_64,
- fpu_st7_x86_64,
- fpu_mm0_x86_64,
- fpu_mm1_x86_64,
- fpu_mm2_x86_64,
- fpu_mm3_x86_64,
- fpu_mm4_x86_64,
- fpu_mm5_x86_64,
- fpu_mm6_x86_64,
- fpu_mm7_x86_64,
- fpu_xmm0_x86_64,
- fpu_xmm1_x86_64,
- fpu_xmm2_x86_64,
- fpu_xmm3_x86_64,
- fpu_xmm4_x86_64,
- fpu_xmm5_x86_64,
- fpu_xmm6_x86_64,
- fpu_xmm7_x86_64,
- fpu_xmm8_x86_64,
- fpu_xmm9_x86_64,
- fpu_xmm10_x86_64,
- fpu_xmm11_x86_64,
- fpu_xmm12_x86_64,
- fpu_xmm13_x86_64,
- fpu_xmm14_x86_64,
- fpu_xmm15_x86_64,
- k_last_fpr_x86_64 = fpu_xmm15_x86_64,
-
- k_first_avx_x86_64,
- fpu_ymm0_x86_64 = k_first_avx_x86_64,
- fpu_ymm1_x86_64,
- fpu_ymm2_x86_64,
- fpu_ymm3_x86_64,
- fpu_ymm4_x86_64,
- fpu_ymm5_x86_64,
- fpu_ymm6_x86_64,
- fpu_ymm7_x86_64,
- fpu_ymm8_x86_64,
- fpu_ymm9_x86_64,
- fpu_ymm10_x86_64,
- fpu_ymm11_x86_64,
- fpu_ymm12_x86_64,
- fpu_ymm13_x86_64,
- fpu_ymm14_x86_64,
- fpu_ymm15_x86_64,
- k_last_avx_x86_64 = fpu_ymm15_x86_64,
-
- dr0_x86_64,
- dr1_x86_64,
- dr2_x86_64,
- dr3_x86_64,
- dr4_x86_64,
- dr5_x86_64,
- dr6_x86_64,
- dr7_x86_64,
-
- k_num_registers_x86_64,
- k_num_gpr_registers_x86_64 = k_last_gpr_x86_64 - k_first_gpr_x86_64 + 1,
- k_num_fpr_registers_x86_64 = k_last_fpr_x86_64 - k_first_fpr_x86_64 + 1,
- k_num_avx_registers_x86_64 = k_last_avx_x86_64 - k_first_avx_x86_64 + 1
-};
-
-class RegisterContextPOSIX_x86
- : public lldb_private::RegisterContext
-{
-public:
- RegisterContextPOSIX_x86 (lldb_private::Thread &thread,
- uint32_t concrete_frame_idx,
- RegisterInfoInterface *register_info);
-
- ~RegisterContextPOSIX_x86();
-
- void
- Invalidate();
-
- void
- InvalidateAllRegisters();
-
- size_t
- GetRegisterCount();
-
- virtual size_t
- GetGPRSize();
-
- virtual unsigned
- GetRegisterSize(unsigned reg);
-
- virtual unsigned
- GetRegisterOffset(unsigned reg);
-
- const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex(size_t reg);
-
- size_t
- GetRegisterSetCount();
-
- const lldb_private::RegisterSet *
- GetRegisterSet(size_t set);
-
- const char *
- GetRegisterName(unsigned reg);
-
- uint32_t
- ConvertRegisterKindToRegisterNumber(uint32_t kind, uint32_t num);
-
- //---------------------------------------------------------------------------
- // Note: prefer kernel definitions over user-land
- //---------------------------------------------------------------------------
- enum FPRType
- {
- eNotValid = 0,
- eFSAVE, // TODO
- eFXSAVE,
- eSOFT, // TODO
- eXSAVE
- };
-
- static uint32_t g_contained_eax[];
- static uint32_t g_contained_ebx[];
- static uint32_t g_contained_ecx[];
- static uint32_t g_contained_edx[];
- static uint32_t g_contained_edi[];
- static uint32_t g_contained_esi[];
- static uint32_t g_contained_ebp[];
- static uint32_t g_contained_esp[];
-
- static uint32_t g_invalidate_eax[];
- static uint32_t g_invalidate_ebx[];
- static uint32_t g_invalidate_ecx[];
- static uint32_t g_invalidate_edx[];
- static uint32_t g_invalidate_edi[];
- static uint32_t g_invalidate_esi[];
- static uint32_t g_invalidate_ebp[];
- static uint32_t g_invalidate_esp[];
-
- static uint32_t g_contained_rax[];
- static uint32_t g_contained_rbx[];
- static uint32_t g_contained_rcx[];
- static uint32_t g_contained_rdx[];
- static uint32_t g_contained_rdi[];
- static uint32_t g_contained_rsi[];
- static uint32_t g_contained_rbp[];
- static uint32_t g_contained_rsp[];
- static uint32_t g_contained_r8[];
- static uint32_t g_contained_r9[];
- static uint32_t g_contained_r10[];
- static uint32_t g_contained_r11[];
- static uint32_t g_contained_r12[];
- static uint32_t g_contained_r13[];
- static uint32_t g_contained_r14[];
- static uint32_t g_contained_r15[];
-
- static uint32_t g_invalidate_rax[];
- static uint32_t g_invalidate_rbx[];
- static uint32_t g_invalidate_rcx[];
- static uint32_t g_invalidate_rdx[];
- static uint32_t g_invalidate_rdi[];
- static uint32_t g_invalidate_rsi[];
- static uint32_t g_invalidate_rbp[];
- static uint32_t g_invalidate_rsp[];
- static uint32_t g_invalidate_r8[];
- static uint32_t g_invalidate_r9[];
- static uint32_t g_invalidate_r10[];
- static uint32_t g_invalidate_r11[];
- static uint32_t g_invalidate_r12[];
- static uint32_t g_invalidate_r13[];
- static uint32_t g_invalidate_r14[];
- static uint32_t g_invalidate_r15[];
-
-protected:
- struct RegInfo
- {
- uint32_t num_registers;
- uint32_t num_gpr_registers;
- uint32_t num_fpr_registers;
- uint32_t num_avx_registers;
-
- uint32_t last_gpr;
- uint32_t first_fpr;
- uint32_t last_fpr;
-
- uint32_t first_st;
- uint32_t last_st;
- uint32_t first_mm;
- uint32_t last_mm;
- uint32_t first_xmm;
- uint32_t last_xmm;
- uint32_t first_ymm;
- uint32_t last_ymm;
-
- uint32_t first_dr;
- uint32_t gpr_flags;
- };
-
- uint64_t m_gpr_x86_64[k_num_gpr_registers_x86_64]; // 64-bit general purpose registers.
- RegInfo m_reg_info;
- FPRType m_fpr_type; // determines the type of data stored by union FPR, if any.
- FPR m_fpr; // floating-point registers including extended register sets.
- IOVEC m_iovec; // wrapper for xsave.
- YMM m_ymm_set; // copy of ymmh and xmm register halves.
- std::unique_ptr<RegisterInfoInterface> m_register_info_ap; // Register Info Interface (FreeBSD or Linux)
-
- // Determines if an extended register set is supported on the processor running the inferior process.
- virtual bool
- IsRegisterSetAvailable(size_t set_index);
-
- virtual const lldb_private::RegisterInfo *
- GetRegisterInfo();
-
- bool
- IsGPR(unsigned reg);
-
- bool
- IsFPR(unsigned reg);
-
- bool
- IsAVX(unsigned reg);
-
- lldb::ByteOrder GetByteOrder();
-
- bool CopyXSTATEtoYMM(uint32_t reg, lldb::ByteOrder byte_order);
- bool CopyYMMtoXSTATE(uint32_t reg, lldb::ByteOrder byte_order);
- bool IsFPR(unsigned reg, FPRType fpr_type);
- FPRType GetFPRType();
-
- virtual bool ReadGPR() = 0;
- virtual bool ReadFPR() = 0;
- virtual bool WriteGPR() = 0;
- virtual bool WriteFPR() = 0;
-};
-
-#endif // #ifndef liblldb_RegisterContextPOSIX_x86_H_
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h (removed)
@@ -1,104 +0,0 @@
-//===-- RegisterContext_mips64.h --------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContext_mips64_H_
-#define liblldb_RegisterContext_mips64_H_
-
-// GCC and DWARF Register numbers (eRegisterKindGCC & eRegisterKindDWARF)
-enum
-{
- // GP Registers
- gcc_dwarf_zero_mips64 = 0,
- gcc_dwarf_r1_mips64,
- gcc_dwarf_r2_mips64,
- gcc_dwarf_r3_mips64,
- gcc_dwarf_r4_mips64,
- gcc_dwarf_r5_mips64,
- gcc_dwarf_r6_mips64,
- gcc_dwarf_r7_mips64,
- gcc_dwarf_r8_mips64,
- gcc_dwarf_r9_mips64,
- gcc_dwarf_r10_mips64,
- gcc_dwarf_r11_mips64,
- gcc_dwarf_r12_mips64,
- gcc_dwarf_r13_mips64,
- gcc_dwarf_r14_mips64,
- gcc_dwarf_r15_mips64,
- gcc_dwarf_r16_mips64,
- gcc_dwarf_r17_mips64,
- gcc_dwarf_r18_mips64,
- gcc_dwarf_r19_mips64,
- gcc_dwarf_r20_mips64,
- gcc_dwarf_r21_mips64,
- gcc_dwarf_r22_mips64,
- gcc_dwarf_r23_mips64,
- gcc_dwarf_r24_mips64,
- gcc_dwarf_r25_mips64,
- gcc_dwarf_r26_mips64,
- gcc_dwarf_r27_mips64,
- gcc_dwarf_gp_mips64,
- gcc_dwarf_sp_mips64,
- gcc_dwarf_r30_mips64,
- gcc_dwarf_ra_mips64,
- gcc_dwarf_sr_mips64,
- gcc_dwarf_lo_mips64,
- gcc_dwarf_hi_mips64,
- gcc_dwarf_bad_mips64,
- gcc_dwarf_cause_mips64,
- gcc_dwarf_pc_mips64,
- gcc_dwarf_ic_mips64,
- gcc_dwarf_dummy_mips64
-};
-
-// GDB Register numbers (eRegisterKindGDB)
-enum
-{
- gdb_zero_mips64 = 0,
- gdb_r1_mips64,
- gdb_r2_mips64,
- gdb_r3_mips64,
- gdb_r4_mips64,
- gdb_r5_mips64,
- gdb_r6_mips64,
- gdb_r7_mips64,
- gdb_r8_mips64,
- gdb_r9_mips64,
- gdb_r10_mips64,
- gdb_r11_mips64,
- gdb_r12_mips64,
- gdb_r13_mips64,
- gdb_r14_mips64,
- gdb_r15_mips64,
- gdb_r16_mips64,
- gdb_r17_mips64,
- gdb_r18_mips64,
- gdb_r19_mips64,
- gdb_r20_mips64,
- gdb_r21_mips64,
- gdb_r22_mips64,
- gdb_r23_mips64,
- gdb_r24_mips64,
- gdb_r25_mips64,
- gdb_r26_mips64,
- gdb_r27_mips64,
- gdb_gp_mips64,
- gdb_sp_mips64,
- gdb_r30_mips64,
- gdb_ra_mips64,
- gdb_sr_mips64,
- gdb_lo_mips64,
- gdb_hi_mips64,
- gdb_bad_mips64,
- gdb_cause_mips64,
- gdb_pc_mips64,
- gdb_ic_mips64,
- gdb_dummy_mips64
-};
-
-#endif // liblldb_RegisterContext_mips64_H_
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h (removed)
@@ -1,479 +0,0 @@
-//===-- RegisterContext_x86.h -----------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContext_x86_H_
-#define liblldb_RegisterContext_x86_H_
-
-//---------------------------------------------------------------------------
-// i386 gcc, dwarf, gdb enums
-//---------------------------------------------------------------------------
-
-// Register numbers seen in eh_frame (eRegisterKindGCC)
-//
-// From Jason Molenda: "gcc registers" is the register numbering used in the eh_frame
-// CFI. The only registers that are described in eh_frame CFI are those that are
-// preserved across function calls aka callee-saved aka non-volatile. And none
-// of the floating point registers on x86 are preserved across function calls.
-//
-// The only reason there is a "gcc register" and a "dwarf register" is because of a
-// mistake years and years ago with i386 where they got esp and ebp
-// backwards when they emitted the eh_frame instructions. Once there were
-// binaries In The Wild using the reversed numbering, we had to stick with it
-// forever.
-enum
-{
- // 2nd parameter in DwarfRegNum() is regnum for exception handling on x86-32.
- // See http://llvm.org/docs/WritingAnLLVMBackend.html#defining-a-register
- gcc_eax_i386 = 0,
- gcc_ecx_i386,
- gcc_edx_i386,
- gcc_ebx_i386,
- gcc_ebp_i386, // Warning: these are switched from dwarf values
- gcc_esp_i386, //
- gcc_esi_i386,
- gcc_edi_i386,
- gcc_eip_i386,
- gcc_eflags_i386,
- gcc_st0_i386 = 12,
- gcc_st1_i386,
- gcc_st2_i386,
- gcc_st3_i386,
- gcc_st4_i386,
- gcc_st5_i386,
- gcc_st6_i386,
- gcc_st7_i386,
- gcc_xmm0_i386 = 21,
- gcc_xmm1_i386,
- gcc_xmm2_i386,
- gcc_xmm3_i386,
- gcc_xmm4_i386,
- gcc_xmm5_i386,
- gcc_xmm6_i386,
- gcc_xmm7_i386,
- gcc_mm0_i386 = 29,
- gcc_mm1_i386,
- gcc_mm2_i386,
- gcc_mm3_i386,
- gcc_mm4_i386,
- gcc_mm5_i386,
- gcc_mm6_i386,
- gcc_mm7_i386,
-};
-
-// DWARF register numbers (eRegisterKindDWARF)
-// Intel's x86 or IA-32
-enum
-{
- // General Purpose Registers.
- dwarf_eax_i386 = 0,
- dwarf_ecx_i386,
- dwarf_edx_i386,
- dwarf_ebx_i386,
- dwarf_esp_i386,
- dwarf_ebp_i386,
- dwarf_esi_i386,
- dwarf_edi_i386,
- dwarf_eip_i386,
- dwarf_eflags_i386,
- // Floating Point Registers
- dwarf_st0_i386 = 11,
- dwarf_st1_i386,
- dwarf_st2_i386,
- dwarf_st3_i386,
- dwarf_st4_i386,
- dwarf_st5_i386,
- dwarf_st6_i386,
- dwarf_st7_i386,
- // SSE Registers
- dwarf_xmm0_i386 = 21,
- dwarf_xmm1_i386,
- dwarf_xmm2_i386,
- dwarf_xmm3_i386,
- dwarf_xmm4_i386,
- dwarf_xmm5_i386,
- dwarf_xmm6_i386,
- dwarf_xmm7_i386,
- // MMX Registers
- dwarf_mm0_i386 = 29,
- dwarf_mm1_i386,
- dwarf_mm2_i386,
- dwarf_mm3_i386,
- dwarf_mm4_i386,
- dwarf_mm5_i386,
- dwarf_mm6_i386,
- dwarf_mm7_i386,
- dwarf_fctrl_i386 = 37, // x87 control word
- dwarf_fstat_i386 = 38, // x87 status word
- dwarf_mxcsr_i386 = 39,
- dwarf_es_i386 = 40,
- dwarf_cs_i386 = 41,
- dwarf_ss_i386 = 42,
- dwarf_ds_i386 = 43,
- dwarf_fs_i386 = 44,
- dwarf_gs_i386 = 45
-
- // I believe the ymm registers use the dwarf_xmm%_i386 register numbers and
- // then differentiate based on size of the register.
-};
-
-// Register numbers GDB uses (eRegisterKindGDB)
-//
-// From Jason Molenda: The "gdb numbers" are what you would see in the stabs debug format.
-enum
-{
- gdb_eax_i386,
- gdb_ecx_i386,
- gdb_edx_i386,
- gdb_ebx_i386,
- gdb_esp_i386,
- gdb_ebp_i386,
- gdb_esi_i386,
- gdb_edi_i386,
- gdb_eip_i386,
- gdb_eflags_i386,
- gdb_cs_i386,
- gdb_ss_i386,
- gdb_ds_i386,
- gdb_es_i386,
- gdb_fs_i386,
- gdb_gs_i386,
- gdb_st0_i386 = 16,
- gdb_st1_i386,
- gdb_st2_i386,
- gdb_st3_i386,
- gdb_st4_i386,
- gdb_st5_i386,
- gdb_st6_i386,
- gdb_st7_i386,
- gdb_fctrl_i386, // FPU Control Word
- gdb_fstat_i386, // FPU Status Word
- gdb_ftag_i386, // FPU Tag Word
- gdb_fiseg_i386, // FPU IP Selector
- gdb_fioff_i386, // FPU IP Offset
- gdb_foseg_i386, // FPU Operand Pointer Selector
- gdb_fooff_i386, // FPU Operand Pointer Offset
- gdb_fop_i386, // Last Instruction Opcode
- gdb_xmm0_i386 = 32,
- gdb_xmm1_i386,
- gdb_xmm2_i386,
- gdb_xmm3_i386,
- gdb_xmm4_i386,
- gdb_xmm5_i386,
- gdb_xmm6_i386,
- gdb_xmm7_i386,
- gdb_mxcsr_i386 = 40,
- gdb_ymm0h_i386,
- gdb_ymm1h_i386,
- gdb_ymm2h_i386,
- gdb_ymm3h_i386,
- gdb_ymm4h_i386,
- gdb_ymm5h_i386,
- gdb_ymm6h_i386,
- gdb_ymm7h_i386,
- gdb_mm0_i386,
- gdb_mm1_i386,
- gdb_mm2_i386,
- gdb_mm3_i386,
- gdb_mm4_i386,
- gdb_mm5_i386,
- gdb_mm6_i386,
- gdb_mm7_i386,
-};
-
-//---------------------------------------------------------------------------
-// AMD x86_64, AMD64, Intel EM64T, or Intel 64 gcc, dwarf, gdb enums
-//---------------------------------------------------------------------------
-
-// GCC and DWARF Register numbers (eRegisterKindGCC & eRegisterKindDWARF)
-// This is the spec I used (as opposed to x86-64-abi-0.99.pdf):
-// http://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf
-enum
-{
- // GP Registers
- gcc_dwarf_rax_x86_64 = 0,
- gcc_dwarf_rdx_x86_64,
- gcc_dwarf_rcx_x86_64,
- gcc_dwarf_rbx_x86_64,
- gcc_dwarf_rsi_x86_64,
- gcc_dwarf_rdi_x86_64,
- gcc_dwarf_rbp_x86_64,
- gcc_dwarf_rsp_x86_64,
- // Extended GP Registers
- gcc_dwarf_r8_x86_64 = 8,
- gcc_dwarf_r9_x86_64,
- gcc_dwarf_r10_x86_64,
- gcc_dwarf_r11_x86_64,
- gcc_dwarf_r12_x86_64,
- gcc_dwarf_r13_x86_64,
- gcc_dwarf_r14_x86_64,
- gcc_dwarf_r15_x86_64,
- // Return Address (RA) mapped to RIP
- gcc_dwarf_rip_x86_64 = 16,
- // SSE Vector Registers
- gcc_dwarf_xmm0_x86_64 = 17,
- gcc_dwarf_xmm1_x86_64,
- gcc_dwarf_xmm2_x86_64,
- gcc_dwarf_xmm3_x86_64,
- gcc_dwarf_xmm4_x86_64,
- gcc_dwarf_xmm5_x86_64,
- gcc_dwarf_xmm6_x86_64,
- gcc_dwarf_xmm7_x86_64,
- gcc_dwarf_xmm8_x86_64,
- gcc_dwarf_xmm9_x86_64,
- gcc_dwarf_xmm10_x86_64,
- gcc_dwarf_xmm11_x86_64,
- gcc_dwarf_xmm12_x86_64,
- gcc_dwarf_xmm13_x86_64,
- gcc_dwarf_xmm14_x86_64,
- gcc_dwarf_xmm15_x86_64,
- // Floating Point Registers
- gcc_dwarf_st0_x86_64 = 33,
- gcc_dwarf_st1_x86_64,
- gcc_dwarf_st2_x86_64,
- gcc_dwarf_st3_x86_64,
- gcc_dwarf_st4_x86_64,
- gcc_dwarf_st5_x86_64,
- gcc_dwarf_st6_x86_64,
- gcc_dwarf_st7_x86_64,
- // MMX Registers
- gcc_dwarf_mm0_x86_64 = 41,
- gcc_dwarf_mm1_x86_64,
- gcc_dwarf_mm2_x86_64,
- gcc_dwarf_mm3_x86_64,
- gcc_dwarf_mm4_x86_64,
- gcc_dwarf_mm5_x86_64,
- gcc_dwarf_mm6_x86_64,
- gcc_dwarf_mm7_x86_64,
- // Control and Status Flags Register
- gcc_dwarf_rflags_x86_64 = 49,
- // selector registers
- gcc_dwarf_es_x86_64 = 50,
- gcc_dwarf_cs_x86_64,
- gcc_dwarf_ss_x86_64,
- gcc_dwarf_ds_x86_64,
- gcc_dwarf_fs_x86_64,
- gcc_dwarf_gs_x86_64,
- // Floating point control registers
- gcc_dwarf_mxcsr_x86_64 = 64, // Media Control and Status
- gcc_dwarf_fctrl_x86_64, // x87 control word
- gcc_dwarf_fstat_x86_64, // x87 status word
- // Upper Vector Registers
- gcc_dwarf_ymm0h_x86_64 = 67,
- gcc_dwarf_ymm1h_x86_64,
- gcc_dwarf_ymm2h_x86_64,
- gcc_dwarf_ymm3h_x86_64,
- gcc_dwarf_ymm4h_x86_64,
- gcc_dwarf_ymm5h_x86_64,
- gcc_dwarf_ymm6h_x86_64,
- gcc_dwarf_ymm7h_x86_64,
- gcc_dwarf_ymm8h_x86_64,
- gcc_dwarf_ymm9h_x86_64,
- gcc_dwarf_ymm10h_x86_64,
- gcc_dwarf_ymm11h_x86_64,
- gcc_dwarf_ymm12h_x86_64,
- gcc_dwarf_ymm13h_x86_64,
- gcc_dwarf_ymm14h_x86_64,
- gcc_dwarf_ymm15h_x86_64,
- // AVX2 Vector Mask Registers
- // gcc_dwarf_k0_x86_64 = 118,
- // gcc_dwarf_k1_x86_64,
- // gcc_dwarf_k2_x86_64,
- // gcc_dwarf_k3_x86_64,
- // gcc_dwarf_k4_x86_64,
- // gcc_dwarf_k5_x86_64,
- // gcc_dwarf_k6_x86_64,
- // gcc_dwarf_k7_x86_64,
-};
-
-// GDB Register numbers (eRegisterKindGDB)
-enum
-{
- // GP Registers
- gdb_rax_x86_64 = 0,
- gdb_rbx_x86_64,
- gdb_rcx_x86_64,
- gdb_rdx_x86_64,
- gdb_rsi_x86_64,
- gdb_rdi_x86_64,
- gdb_rbp_x86_64,
- gdb_rsp_x86_64,
- // Extended GP Registers
- gdb_r8_x86_64,
- gdb_r9_x86_64,
- gdb_r10_x86_64,
- gdb_r11_x86_64,
- gdb_r12_x86_64,
- gdb_r13_x86_64,
- gdb_r14_x86_64,
- gdb_r15_x86_64,
- // Return Address (RA) mapped to RIP
- gdb_rip_x86_64,
- // Control and Status Flags Register
- gdb_rflags_x86_64,
- gdb_cs_x86_64,
- gdb_ss_x86_64,
- gdb_ds_x86_64,
- gdb_es_x86_64,
- gdb_fs_x86_64,
- gdb_gs_x86_64,
- // Floating Point Registers
- gdb_st0_x86_64,
- gdb_st1_x86_64,
- gdb_st2_x86_64,
- gdb_st3_x86_64,
- gdb_st4_x86_64,
- gdb_st5_x86_64,
- gdb_st6_x86_64,
- gdb_st7_x86_64,
- gdb_fctrl_x86_64,
- gdb_fstat_x86_64,
- gdb_ftag_x86_64,
- gdb_fiseg_x86_64,
- gdb_fioff_x86_64,
- gdb_foseg_x86_64,
- gdb_fooff_x86_64,
- gdb_fop_x86_64,
- // SSE Vector Registers
- gdb_xmm0_x86_64 = 40,
- gdb_xmm1_x86_64,
- gdb_xmm2_x86_64,
- gdb_xmm3_x86_64,
- gdb_xmm4_x86_64,
- gdb_xmm5_x86_64,
- gdb_xmm6_x86_64,
- gdb_xmm7_x86_64,
- gdb_xmm8_x86_64,
- gdb_xmm9_x86_64,
- gdb_xmm10_x86_64,
- gdb_xmm11_x86_64,
- gdb_xmm12_x86_64,
- gdb_xmm13_x86_64,
- gdb_xmm14_x86_64,
- gdb_xmm15_x86_64,
- // Floating point control registers
- gdb_mxcsr_x86_64 = 56,
- gdb_ymm0h_x86_64,
- gdb_ymm1h_x86_64,
- gdb_ymm2h_x86_64,
- gdb_ymm3h_x86_64,
- gdb_ymm4h_x86_64,
- gdb_ymm5h_x86_64,
- gdb_ymm6h_x86_64,
- gdb_ymm7h_x86_64,
- gdb_ymm8h_x86_64,
- gdb_ymm9h_x86_64,
- gdb_ymm10h_x86_64,
- gdb_ymm11h_x86_64,
- gdb_ymm12h_x86_64,
- gdb_ymm13h_x86_64,
- gdb_ymm14h_x86_64,
- gdb_ymm15h_x86_64
-};
-
-//---------------------------------------------------------------------------
-// Generic floating-point registers
-//---------------------------------------------------------------------------
-
-struct MMSReg
-{
- uint8_t bytes[10];
- uint8_t pad[6];
-};
-
-struct XMMReg
-{
- uint8_t bytes[16]; // 128-bits for each XMM register
-};
-
-// i387_fxsave_struct
-struct FXSAVE
-{
- uint16_t fctrl; // FPU Control Word (fcw)
- uint16_t fstat; // FPU Status Word (fsw)
- uint16_t ftag; // FPU Tag Word (ftw)
- uint16_t fop; // Last Instruction Opcode (fop)
- union
- {
- struct
- {
- uint64_t fip; // Instruction Pointer
- uint64_t fdp; // Data Pointer
- } x86_64;
- struct
- {
- uint32_t fioff; // FPU IP Offset (fip)
- uint32_t fiseg; // FPU IP Selector (fcs)
- uint32_t fooff; // FPU Operand Pointer Offset (foo)
- uint32_t foseg; // FPU Operand Pointer Selector (fos)
- } i386;
- } ptr;
- uint32_t mxcsr; // MXCSR Register State
- uint32_t mxcsrmask; // MXCSR Mask
- MMSReg stmm[8]; // 8*16 bytes for each FP-reg = 128 bytes
- XMMReg xmm[16]; // 16*16 bytes for each XMM-reg = 256 bytes
- uint32_t padding[24];
-};
-
-//---------------------------------------------------------------------------
-// Extended floating-point registers
-//---------------------------------------------------------------------------
-
-struct YMMHReg
-{
- uint8_t bytes[16]; // 16 * 8 bits for the high bytes of each YMM register
-};
-
-struct YMMReg
-{
- uint8_t bytes[32]; // 16 * 16 bits for each YMM register
-};
-
-struct YMM
-{
- YMMReg ymm[16]; // assembled from ymmh and xmm registers
-};
-
-struct XSAVE_HDR
-{
- uint64_t xstate_bv; // OS enabled xstate mask to determine the extended states supported by the processor
- uint64_t reserved1[2];
- uint64_t reserved2[5];
-} __attribute__((packed));
-
-// x86 extensions to FXSAVE (i.e. for AVX processors)
-struct XSAVE
-{
- FXSAVE i387; // floating point registers typical in i387_fxsave_struct
- XSAVE_HDR header; // The xsave_hdr_struct can be used to determine if the following extensions are usable
- YMMHReg ymmh[16]; // High 16 bytes of each of 16 YMM registers (the low bytes are in FXSAVE.xmm for compatibility with SSE)
- // Slot any extensions to the register file here
-} __attribute__((packed, aligned (64)));
-
-// Floating-point registers
-struct FPR
-{
- // Thread state for the floating-point unit of the processor read by ptrace.
- union XSTATE
- {
- FXSAVE fxsave; // Generic floating-point registers.
- XSAVE xsave; // x86 extended processor state.
- } xstate;
-};
-
-//---------------------------------------------------------------------------
-// ptrace PTRACE_GETREGSET, PTRACE_SETREGSET structure
-//---------------------------------------------------------------------------
-
-struct IOVEC
-{
- void *iov_base; // pointer to XSAVE
- size_t iov_len; // sizeof(XSAVE)
-};
-
-#endif
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h (removed)
@@ -1,209 +0,0 @@
-//===-- RegisterInfos_i386.h -----------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-#include "llvm/Support/Compiler.h"
-
-#ifdef DECLARE_REGISTER_INFOS_I386_STRUCT
-
-// Computes the offset of the given GPR in the user data area.
-#define GPR_OFFSET(regname) \
- (LLVM_EXTENSION offsetof(GPR, regname))
-
-// Computes the offset of the given FPR in the extended data area.
-#define FPR_OFFSET(regname) \
- (LLVM_EXTENSION offsetof(FPR, xstate) + \
- LLVM_EXTENSION offsetof(FXSAVE, regname))
-
-// Computes the offset of the YMM register assembled from register halves.
-#define YMM_OFFSET(regname) \
- (LLVM_EXTENSION offsetof(YMM, regname))
-
-// Number of bytes needed to represent a FPR.
-#if !defined(FPR_SIZE)
-#define FPR_SIZE(reg) sizeof(((FXSAVE*)NULL)->reg)
-#endif
-
-// Number of bytes needed to represent the i'th FP register.
-#define FP_SIZE sizeof(((MMSReg*)NULL)->bytes)
-
-// Number of bytes needed to represent an XMM register.
-#define XMM_SIZE sizeof(XMMReg)
-
-// Number of bytes needed to represent a YMM register.
-#define YMM_SIZE sizeof(YMMReg)
-
-// Note that the size and offset will be updated by platform-specific classes.
-#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \
- { #reg, alt, sizeof(GPR::reg), GPR_OFFSET(reg), eEncodingUint, \
- eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg##_i386 }, NULL, NULL }
-
-#define DEFINE_FPR(name, reg, kind1, kind2, kind3, kind4) \
- { #name, NULL, FPR_SIZE(reg), FPR_OFFSET(reg), eEncodingUint, \
- eFormatHex, { kind1, kind2, kind3, kind4, fpu_##name##_i386 }, NULL, NULL }
-
-// RegisterKind: GCC, DWARF, Generic, GDB, LLDB
-
-#define DEFINE_FP_ST(reg, i) \
- { #reg#i, NULL, FP_SIZE, LLVM_EXTENSION FPR_OFFSET(stmm[i]), \
- eEncodingVector, eFormatVectorOfUInt8, \
- { gcc_st##i##_i386, dwarf_st##i##_i386, LLDB_INVALID_REGNUM, gdb_st##i##_i386, fpu_st##i##_i386 }, \
- NULL, NULL }
-
-#define DEFINE_FP_MM(reg, i) \
- { #reg#i, NULL, sizeof(uint64_t), LLVM_EXTENSION FPR_OFFSET(stmm[i]), \
- eEncodingUint, eFormatHex, \
- { gcc_mm##i##_i386, dwarf_mm##i##_i386, LLDB_INVALID_REGNUM, gdb_mm##i##_i386, fpu_mm##i##_i386 }, \
- NULL, NULL }
-
-#define DEFINE_XMM(reg, i) \
- { #reg#i, NULL, XMM_SIZE, LLVM_EXTENSION FPR_OFFSET(reg[i]), \
- eEncodingVector, eFormatVectorOfUInt8, \
- { gcc_##reg##i##_i386, dwarf_##reg##i##_i386, LLDB_INVALID_REGNUM, gdb_##reg##i##_i386, fpu_##reg##i##_i386}, \
- NULL, NULL }
-
-// I believe the YMM registers use dwarf_xmm_%_i386 register numbers and then differentiate based on register size.
-#define DEFINE_YMM(reg, i) \
- { #reg#i, NULL, YMM_SIZE, LLVM_EXTENSION YMM_OFFSET(reg[i]), \
- eEncodingVector, eFormatVectorOfUInt8, \
- { LLDB_INVALID_REGNUM, dwarf_xmm##i##_i386, LLDB_INVALID_REGNUM, gdb_##reg##i##h_i386, fpu_##reg##i##_i386 }, \
- NULL, NULL }
-
-#define DEFINE_DR(reg, i) \
- { #reg#i, NULL, DR_SIZE, DR_OFFSET(i), eEncodingUint, eFormatHex, \
- { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
- LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }
-
-#define DEFINE_GPR_PSEUDO_16(reg16, reg32) \
- { #reg16, NULL, 2, GPR_OFFSET(reg32), eEncodingUint, \
- eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_##reg16##_i386 }, RegisterContextPOSIX_x86::g_contained_##reg32, RegisterContextPOSIX_x86::g_invalidate_##reg32 }
-#define DEFINE_GPR_PSEUDO_8H(reg8, reg32) \
- { #reg8, NULL, 1, GPR_OFFSET(reg32)+1, eEncodingUint, \
- eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_##reg8##_i386 }, RegisterContextPOSIX_x86::g_contained_##reg32, RegisterContextPOSIX_x86::g_invalidate_##reg32 }
-#define DEFINE_GPR_PSEUDO_8L(reg8, reg32) \
- { #reg8, NULL, 1, GPR_OFFSET(reg32), eEncodingUint, \
- eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_##reg8##_i386 }, RegisterContextPOSIX_x86::g_contained_##reg32, RegisterContextPOSIX_x86::g_invalidate_##reg32 }
-
-static RegisterInfo
-g_register_infos_i386[] =
-{
- // General purpose registers.
- DEFINE_GPR(eax, NULL, gcc_eax_i386, dwarf_eax_i386, LLDB_INVALID_REGNUM, gdb_eax_i386),
- DEFINE_GPR(ebx, NULL, gcc_ebx_i386, dwarf_ebx_i386, LLDB_INVALID_REGNUM, gdb_ebx_i386),
- DEFINE_GPR(ecx, NULL, gcc_ecx_i386, dwarf_ecx_i386, LLDB_INVALID_REGNUM, gdb_ecx_i386),
- DEFINE_GPR(edx, NULL, gcc_edx_i386, dwarf_edx_i386, LLDB_INVALID_REGNUM, gdb_edx_i386),
- DEFINE_GPR(edi, NULL, gcc_edi_i386, dwarf_edi_i386, LLDB_INVALID_REGNUM, gdb_edi_i386),
- DEFINE_GPR(esi, NULL, gcc_esi_i386, dwarf_esi_i386, LLDB_INVALID_REGNUM, gdb_esi_i386),
- DEFINE_GPR(ebp, "fp", gcc_ebp_i386, dwarf_ebp_i386, LLDB_REGNUM_GENERIC_FP, gdb_ebp_i386),
- DEFINE_GPR(esp, "sp", gcc_esp_i386, dwarf_esp_i386, LLDB_REGNUM_GENERIC_SP, gdb_esp_i386),
- DEFINE_GPR(eip, "pc", gcc_eip_i386, dwarf_eip_i386, LLDB_REGNUM_GENERIC_PC, gdb_eip_i386),
- DEFINE_GPR(eflags, "flags", gcc_eflags_i386, dwarf_eflags_i386, LLDB_REGNUM_GENERIC_FLAGS, gdb_eflags_i386),
- DEFINE_GPR(cs, NULL, LLDB_INVALID_REGNUM, dwarf_cs_i386, LLDB_INVALID_REGNUM, gdb_cs_i386),
- DEFINE_GPR(fs, NULL, LLDB_INVALID_REGNUM, dwarf_fs_i386, LLDB_INVALID_REGNUM, gdb_fs_i386),
- DEFINE_GPR(gs, NULL, LLDB_INVALID_REGNUM, dwarf_gs_i386, LLDB_INVALID_REGNUM, gdb_gs_i386),
- DEFINE_GPR(ss, NULL, LLDB_INVALID_REGNUM, dwarf_ss_i386, LLDB_INVALID_REGNUM, gdb_ss_i386),
- DEFINE_GPR(ds, NULL, LLDB_INVALID_REGNUM, dwarf_ds_i386, LLDB_INVALID_REGNUM, gdb_ds_i386),
- DEFINE_GPR(es, NULL, LLDB_INVALID_REGNUM, dwarf_es_i386, LLDB_INVALID_REGNUM, gdb_es_i386),
-
- DEFINE_GPR_PSEUDO_16(ax, eax),
- DEFINE_GPR_PSEUDO_16(bx, ebx),
- DEFINE_GPR_PSEUDO_16(cx, ecx),
- DEFINE_GPR_PSEUDO_16(dx, edx),
- DEFINE_GPR_PSEUDO_16(di, edi),
- DEFINE_GPR_PSEUDO_16(si, esi),
- DEFINE_GPR_PSEUDO_16(bp, ebp),
- DEFINE_GPR_PSEUDO_16(sp, esp),
- DEFINE_GPR_PSEUDO_8H(ah, eax),
- DEFINE_GPR_PSEUDO_8H(bh, ebx),
- DEFINE_GPR_PSEUDO_8H(ch, ecx),
- DEFINE_GPR_PSEUDO_8H(dh, edx),
- DEFINE_GPR_PSEUDO_8L(al, eax),
- DEFINE_GPR_PSEUDO_8L(bl, ebx),
- DEFINE_GPR_PSEUDO_8L(cl, ecx),
- DEFINE_GPR_PSEUDO_8L(dl, edx),
-
- // i387 Floating point registers.
- DEFINE_FPR(fctrl, fctrl, LLDB_INVALID_REGNUM, dwarf_fctrl_i386, LLDB_INVALID_REGNUM, gdb_fctrl_i386),
- DEFINE_FPR(fstat, fstat, LLDB_INVALID_REGNUM, dwarf_fstat_i386, LLDB_INVALID_REGNUM, gdb_fstat_i386),
- DEFINE_FPR(ftag, ftag, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_ftag_i386),
- DEFINE_FPR(fop, fop, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fop_i386),
- DEFINE_FPR(fiseg, ptr.i386.fiseg, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fiseg_i386),
- DEFINE_FPR(fioff, ptr.i386.fioff, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fioff_i386),
- DEFINE_FPR(foseg, ptr.i386.foseg, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_foseg_i386),
- DEFINE_FPR(fooff, ptr.i386.fooff, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fooff_i386),
- DEFINE_FPR(mxcsr, mxcsr, LLDB_INVALID_REGNUM, dwarf_mxcsr_i386, LLDB_INVALID_REGNUM, gdb_mxcsr_i386),
- DEFINE_FPR(mxcsrmask, mxcsrmask, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
-
- // FP registers.
- DEFINE_FP_ST(st, 0),
- DEFINE_FP_ST(st, 1),
- DEFINE_FP_ST(st, 2),
- DEFINE_FP_ST(st, 3),
- DEFINE_FP_ST(st, 4),
- DEFINE_FP_ST(st, 5),
- DEFINE_FP_ST(st, 6),
- DEFINE_FP_ST(st, 7),
- DEFINE_FP_MM(mm, 0),
- DEFINE_FP_MM(mm, 1),
- DEFINE_FP_MM(mm, 2),
- DEFINE_FP_MM(mm, 3),
- DEFINE_FP_MM(mm, 4),
- DEFINE_FP_MM(mm, 5),
- DEFINE_FP_MM(mm, 6),
- DEFINE_FP_MM(mm, 7),
-
- // XMM registers
- DEFINE_XMM(xmm, 0),
- DEFINE_XMM(xmm, 1),
- DEFINE_XMM(xmm, 2),
- DEFINE_XMM(xmm, 3),
- DEFINE_XMM(xmm, 4),
- DEFINE_XMM(xmm, 5),
- DEFINE_XMM(xmm, 6),
- DEFINE_XMM(xmm, 7),
-
- // Copy of YMM registers assembled from xmm and ymmh
- DEFINE_YMM(ymm, 0),
- DEFINE_YMM(ymm, 1),
- DEFINE_YMM(ymm, 2),
- DEFINE_YMM(ymm, 3),
- DEFINE_YMM(ymm, 4),
- DEFINE_YMM(ymm, 5),
- DEFINE_YMM(ymm, 6),
- DEFINE_YMM(ymm, 7),
-
- // Debug registers for lldb internal use
- DEFINE_DR(dr, 0),
- DEFINE_DR(dr, 1),
- DEFINE_DR(dr, 2),
- DEFINE_DR(dr, 3),
- DEFINE_DR(dr, 4),
- DEFINE_DR(dr, 5),
- DEFINE_DR(dr, 6),
- DEFINE_DR(dr, 7)
-};
-static_assert((sizeof(g_register_infos_i386) / sizeof(g_register_infos_i386[0])) == k_num_registers_i386,
- "g_register_infos_x86_64 has wrong number of register infos");
-
-#undef GPR_OFFSET
-#undef FPR_OFFSET
-#undef YMM_OFFSET
-#undef FPR_SIZE
-#undef FP_SIZE
-#undef XMM_SIZE
-#undef YMM_SIZE
-#undef DEFINE_GPR
-#undef DEFINE_FPR
-#undef DEFINE_FP
-#undef DEFINE_XMM
-#undef DEFINE_YMM
-#undef DEFINE_DR
-#undef DEFINE_GPR_PSEUDO_16
-#undef DEFINE_GPR_PSEUDO_8H
-#undef DEFINE_GPR_PSEUDO_8L
-
-#endif // DECLARE_REGISTER_INFOS_I386_STRUCT
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h (removed)
@@ -1,74 +0,0 @@
-//===-- RegisterInfos_mips64.h ---------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-// Computes the offset of the given GPR in the user data area.
-#define GPR_OFFSET(regname) \
- (offsetof(GPR, regname))
-
-#ifdef DECLARE_REGISTER_INFOS_MIPS64_STRUCT
-
-// Note that the size and offset will be updated by platform-specific classes.
-#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \
- { #reg, alt, sizeof(GPR::reg), GPR_OFFSET(reg), eEncodingUint, \
- eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg##_mips64 }, NULL, NULL }
-
-static RegisterInfo
-g_register_infos_mips64[] =
-{
- // General purpose registers. GCC, DWARF, Generic, GDB
- DEFINE_GPR(zero, "r0", gcc_dwarf_zero_mips64, gcc_dwarf_zero_mips64, LLDB_INVALID_REGNUM, gdb_zero_mips64),
- DEFINE_GPR(r1, NULL, gcc_dwarf_r1_mips64, gcc_dwarf_r1_mips64, LLDB_INVALID_REGNUM, gdb_r1_mips64),
- DEFINE_GPR(r2, NULL, gcc_dwarf_r2_mips64, gcc_dwarf_r2_mips64, LLDB_INVALID_REGNUM, gdb_r2_mips64),
- DEFINE_GPR(r3, NULL, gcc_dwarf_r3_mips64, gcc_dwarf_r3_mips64, LLDB_INVALID_REGNUM, gdb_r3_mips64),
- DEFINE_GPR(r4, NULL, gcc_dwarf_r4_mips64, gcc_dwarf_r4_mips64, LLDB_INVALID_REGNUM, gdb_r4_mips64),
- DEFINE_GPR(r5, NULL, gcc_dwarf_r5_mips64, gcc_dwarf_r5_mips64, LLDB_INVALID_REGNUM, gdb_r5_mips64),
- DEFINE_GPR(r6, NULL, gcc_dwarf_r6_mips64, gcc_dwarf_r6_mips64, LLDB_INVALID_REGNUM, gdb_r6_mips64),
- DEFINE_GPR(r7, NULL, gcc_dwarf_r7_mips64, gcc_dwarf_r7_mips64, LLDB_INVALID_REGNUM, gdb_r7_mips64),
- DEFINE_GPR(r8, NULL, gcc_dwarf_r8_mips64, gcc_dwarf_r8_mips64, LLDB_INVALID_REGNUM, gdb_r8_mips64),
- DEFINE_GPR(r9, NULL, gcc_dwarf_r9_mips64, gcc_dwarf_r9_mips64, LLDB_INVALID_REGNUM, gdb_r9_mips64),
- DEFINE_GPR(r10, NULL, gcc_dwarf_r10_mips64, gcc_dwarf_r10_mips64, LLDB_INVALID_REGNUM, gdb_r10_mips64),
- DEFINE_GPR(r11, NULL, gcc_dwarf_r11_mips64, gcc_dwarf_r11_mips64, LLDB_INVALID_REGNUM, gdb_r11_mips64),
- DEFINE_GPR(r12, NULL, gcc_dwarf_r12_mips64, gcc_dwarf_r12_mips64, LLDB_INVALID_REGNUM, gdb_r12_mips64),
- DEFINE_GPR(r13, NULL, gcc_dwarf_r13_mips64, gcc_dwarf_r13_mips64, LLDB_INVALID_REGNUM, gdb_r13_mips64),
- DEFINE_GPR(r14, NULL, gcc_dwarf_r14_mips64, gcc_dwarf_r14_mips64, LLDB_INVALID_REGNUM, gdb_r14_mips64),
- DEFINE_GPR(r15, NULL, gcc_dwarf_r15_mips64, gcc_dwarf_r15_mips64, LLDB_INVALID_REGNUM, gdb_r15_mips64),
- DEFINE_GPR(r16, NULL, gcc_dwarf_r16_mips64, gcc_dwarf_r16_mips64, LLDB_INVALID_REGNUM, gdb_r16_mips64),
- DEFINE_GPR(r17, NULL, gcc_dwarf_r17_mips64, gcc_dwarf_r17_mips64, LLDB_INVALID_REGNUM, gdb_r17_mips64),
- DEFINE_GPR(r18, NULL, gcc_dwarf_r18_mips64, gcc_dwarf_r18_mips64, LLDB_INVALID_REGNUM, gdb_r18_mips64),
- DEFINE_GPR(r19, NULL, gcc_dwarf_r19_mips64, gcc_dwarf_r19_mips64, LLDB_INVALID_REGNUM, gdb_r19_mips64),
- DEFINE_GPR(r20, NULL, gcc_dwarf_r20_mips64, gcc_dwarf_r20_mips64, LLDB_INVALID_REGNUM, gdb_r20_mips64),
- DEFINE_GPR(r21, NULL, gcc_dwarf_r21_mips64, gcc_dwarf_r21_mips64, LLDB_INVALID_REGNUM, gdb_r21_mips64),
- DEFINE_GPR(r22, NULL, gcc_dwarf_r22_mips64, gcc_dwarf_r22_mips64, LLDB_INVALID_REGNUM, gdb_r22_mips64),
- DEFINE_GPR(r23, NULL, gcc_dwarf_r23_mips64, gcc_dwarf_r23_mips64, LLDB_INVALID_REGNUM, gdb_r23_mips64),
- DEFINE_GPR(r24, NULL, gcc_dwarf_r24_mips64, gcc_dwarf_r24_mips64, LLDB_INVALID_REGNUM, gdb_r24_mips64),
- DEFINE_GPR(r25, NULL, gcc_dwarf_r25_mips64, gcc_dwarf_r25_mips64, LLDB_INVALID_REGNUM, gdb_r25_mips64),
- DEFINE_GPR(r26, NULL, gcc_dwarf_r26_mips64, gcc_dwarf_r26_mips64, LLDB_INVALID_REGNUM, gdb_r26_mips64),
- DEFINE_GPR(r27, NULL, gcc_dwarf_r27_mips64, gcc_dwarf_r27_mips64, LLDB_INVALID_REGNUM, gdb_r27_mips64),
- DEFINE_GPR(gp, "r28", gcc_dwarf_gp_mips64, gcc_dwarf_gp_mips64, LLDB_INVALID_REGNUM, gdb_gp_mips64),
- DEFINE_GPR(sp, "r29", gcc_dwarf_sp_mips64, gcc_dwarf_sp_mips64, LLDB_REGNUM_GENERIC_SP, gdb_sp_mips64),
- DEFINE_GPR(r30, NULL, gcc_dwarf_r30_mips64, gcc_dwarf_r30_mips64, LLDB_INVALID_REGNUM, gdb_r30_mips64),
- DEFINE_GPR(ra, "r31", gcc_dwarf_ra_mips64, gcc_dwarf_ra_mips64, LLDB_INVALID_REGNUM, gdb_ra_mips64),
- DEFINE_GPR(sr, NULL, gcc_dwarf_sr_mips64, gcc_dwarf_sr_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
- DEFINE_GPR(mullo, NULL, gcc_dwarf_lo_mips64, gcc_dwarf_lo_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
- DEFINE_GPR(mulhi, NULL, gcc_dwarf_hi_mips64, gcc_dwarf_hi_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
- DEFINE_GPR(badvaddr, NULL, gcc_dwarf_bad_mips64, gcc_dwarf_bad_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
- DEFINE_GPR(cause, NULL, gcc_dwarf_cause_mips64, gcc_dwarf_cause_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
- DEFINE_GPR(pc, "pc", gcc_dwarf_pc_mips64, gcc_dwarf_pc_mips64, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM),
- DEFINE_GPR(ic, NULL, gcc_dwarf_ic_mips64, gcc_dwarf_ic_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
- DEFINE_GPR(dummy, NULL, gcc_dwarf_dummy_mips64, gcc_dwarf_dummy_mips64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
-};
-static_assert((sizeof(g_register_infos_mips64) / sizeof(g_register_infos_mips64[0])) == k_num_registers_mips64,
- "g_register_infos_mips64 has wrong number of register infos");
-
-#undef DEFINE_GPR
-
-#endif // DECLARE_REGISTER_INFOS_MIPS64_STRUCT
-
-#undef GPR_OFFSET
-
Removed: lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h?rev=203666&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h (removed)
@@ -1,409 +0,0 @@
-//===-- RegisterInfos_x86_64.h ---------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-#include "llvm/Support/Compiler.h"
-
-// Computes the offset of the given GPR in the user data area.
-#define GPR_OFFSET(regname) \
- (LLVM_EXTENSION offsetof(GPR, regname))
-
-// Computes the offset of the given FPR in the extended data area.
-#define FPR_OFFSET(regname) \
- (LLVM_EXTENSION offsetof(FPR, xstate) + \
- LLVM_EXTENSION offsetof(FXSAVE, regname))
-
-// Computes the offset of the YMM register assembled from register halves.
-#define YMM_OFFSET(regname) \
- (LLVM_EXTENSION offsetof(YMM, regname))
-
-#ifdef DECLARE_REGISTER_INFOS_X86_64_STRUCT
-
-// Number of bytes needed to represent a FPR.
-#define FPR_SIZE(reg) sizeof(((FXSAVE*)NULL)->reg)
-
-// Number of bytes needed to represent the i'th FP register.
-#define FP_SIZE sizeof(((MMSReg*)NULL)->bytes)
-
-// Number of bytes needed to represent an XMM register.
-#define XMM_SIZE sizeof(XMMReg)
-
-// Number of bytes needed to represent a YMM register.
-#define YMM_SIZE sizeof(YMMReg)
-
-// RegisterKind: GCC, DWARF, Generic, GDB, LLDB
-
-// Note that the size and offset will be updated by platform-specific classes.
-#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \
- { #reg, alt, sizeof(GPR::reg), GPR_OFFSET(reg), eEncodingUint, \
- eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg##_x86_64 }, NULL, NULL }
-
-#define DEFINE_FPR(name, reg, kind1, kind2, kind3, kind4) \
- { #name, NULL, FPR_SIZE(reg), FPR_OFFSET(reg), eEncodingUint, \
- eFormatHex, { kind1, kind2, kind3, kind4, fpu_##name##_x86_64 }, NULL, NULL }
-
-#define DEFINE_FP_ST(reg, i) \
- { #reg#i, NULL, FP_SIZE, LLVM_EXTENSION FPR_OFFSET(stmm[i]), \
- eEncodingVector, eFormatVectorOfUInt8, \
- { gcc_dwarf_st##i##_x86_64, gcc_dwarf_st##i##_x86_64, LLDB_INVALID_REGNUM, gdb_st##i##_x86_64, fpu_st##i##_x86_64 }, \
- NULL, NULL }
-
-#define DEFINE_FP_MM(reg, i) \
- { #reg#i, NULL, sizeof(uint64_t), LLVM_EXTENSION FPR_OFFSET(stmm[i]), \
- eEncodingUint, eFormatHex, \
- { gcc_dwarf_mm##i##_x86_64, gcc_dwarf_mm##i##_x86_64, LLDB_INVALID_REGNUM, gdb_st##i##_x86_64, fpu_mm##i##_x86_64 }, \
- NULL, NULL }
-
-#define DEFINE_XMM(reg, i) \
- { #reg#i, NULL, XMM_SIZE, LLVM_EXTENSION FPR_OFFSET(reg[i]), \
- eEncodingVector, eFormatVectorOfUInt8, \
- { gcc_dwarf_##reg##i##_x86_64, gcc_dwarf_##reg##i##_x86_64, LLDB_INVALID_REGNUM, gdb_##reg##i##_x86_64, fpu_##reg##i##_x86_64}, \
- NULL, NULL }
-
-#define DEFINE_YMM(reg, i) \
- { #reg#i, NULL, YMM_SIZE, LLVM_EXTENSION YMM_OFFSET(reg[i]), \
- eEncodingVector, eFormatVectorOfUInt8, \
- { gcc_dwarf_##reg##i##h_x86_64, gcc_dwarf_##reg##i##h_x86_64, LLDB_INVALID_REGNUM, gdb_##reg##i##h_x86_64, fpu_##reg##i##_x86_64 }, \
- NULL, NULL }
-
-#define DEFINE_DR(reg, i) \
- { #reg#i, NULL, DR_SIZE, DR_OFFSET(i), eEncodingUint, eFormatHex, \
- { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
- LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }
-
-#define DEFINE_GPR_PSEUDO_32(reg32, reg64) \
- { #reg32, NULL, 4, GPR_OFFSET(reg64), eEncodingUint, \
- eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_##reg32##_x86_64 }, RegisterContextPOSIX_x86::g_contained_##reg64, RegisterContextPOSIX_x86::g_invalidate_##reg64 }
-#define DEFINE_GPR_PSEUDO_16(reg16, reg64) \
- { #reg16, NULL, 2, GPR_OFFSET(reg64), eEncodingUint, \
- eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_##reg16##_x86_64 }, RegisterContextPOSIX_x86::g_contained_##reg64, RegisterContextPOSIX_x86::g_invalidate_##reg64 }
-#define DEFINE_GPR_PSEUDO_8H(reg8, reg64) \
- { #reg8, NULL, 1, GPR_OFFSET(reg64)+1, eEncodingUint, \
- eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_##reg8##_x86_64 }, RegisterContextPOSIX_x86::g_contained_##reg64, RegisterContextPOSIX_x86::g_invalidate_##reg64 }
-#define DEFINE_GPR_PSEUDO_8L(reg8, reg64) \
- { #reg8, NULL, 1, GPR_OFFSET(reg64), eEncodingUint, \
- eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_##reg8##_x86_64 }, RegisterContextPOSIX_x86::g_contained_##reg64, RegisterContextPOSIX_x86::g_invalidate_##reg64 }
-
-static RegisterInfo
-g_register_infos_x86_64[] =
-{
- // General purpose registers. GCC, DWARF, Generic, GDB
- DEFINE_GPR(rax, NULL, gcc_dwarf_rax_x86_64, gcc_dwarf_rax_x86_64, LLDB_INVALID_REGNUM, gdb_rax_x86_64),
- DEFINE_GPR(rbx, NULL, gcc_dwarf_rbx_x86_64, gcc_dwarf_rbx_x86_64, LLDB_INVALID_REGNUM, gdb_rbx_x86_64),
- DEFINE_GPR(rcx, "arg4", gcc_dwarf_rcx_x86_64, gcc_dwarf_rcx_x86_64, LLDB_REGNUM_GENERIC_ARG4, gdb_rcx_x86_64),
- DEFINE_GPR(rdx, "arg3", gcc_dwarf_rdx_x86_64, gcc_dwarf_rdx_x86_64, LLDB_REGNUM_GENERIC_ARG3, gdb_rdx_x86_64),
- DEFINE_GPR(rdi, "arg1", gcc_dwarf_rdi_x86_64, gcc_dwarf_rdi_x86_64, LLDB_REGNUM_GENERIC_ARG1, gdb_rdi_x86_64),
- DEFINE_GPR(rsi, "arg2", gcc_dwarf_rsi_x86_64, gcc_dwarf_rsi_x86_64, LLDB_REGNUM_GENERIC_ARG2, gdb_rsi_x86_64),
- DEFINE_GPR(rbp, "fp", gcc_dwarf_rbp_x86_64, gcc_dwarf_rbp_x86_64, LLDB_REGNUM_GENERIC_FP, gdb_rbp_x86_64),
- DEFINE_GPR(rsp, "sp", gcc_dwarf_rsp_x86_64, gcc_dwarf_rsp_x86_64, LLDB_REGNUM_GENERIC_SP, gdb_rsp_x86_64),
- DEFINE_GPR(r8, "arg5", gcc_dwarf_r8_x86_64, gcc_dwarf_r8_x86_64, LLDB_REGNUM_GENERIC_ARG5, gdb_r8_x86_64),
- DEFINE_GPR(r9, "arg6", gcc_dwarf_r9_x86_64, gcc_dwarf_r9_x86_64, LLDB_REGNUM_GENERIC_ARG6, gdb_r9_x86_64),
- DEFINE_GPR(r10, NULL, gcc_dwarf_r10_x86_64, gcc_dwarf_r10_x86_64, LLDB_INVALID_REGNUM, gdb_r10_x86_64),
- DEFINE_GPR(r11, NULL, gcc_dwarf_r11_x86_64, gcc_dwarf_r11_x86_64, LLDB_INVALID_REGNUM, gdb_r11_x86_64),
- DEFINE_GPR(r12, NULL, gcc_dwarf_r12_x86_64, gcc_dwarf_r12_x86_64, LLDB_INVALID_REGNUM, gdb_r12_x86_64),
- DEFINE_GPR(r13, NULL, gcc_dwarf_r13_x86_64, gcc_dwarf_r13_x86_64, LLDB_INVALID_REGNUM, gdb_r13_x86_64),
- DEFINE_GPR(r14, NULL, gcc_dwarf_r14_x86_64, gcc_dwarf_r14_x86_64, LLDB_INVALID_REGNUM, gdb_r14_x86_64),
- DEFINE_GPR(r15, NULL, gcc_dwarf_r15_x86_64, gcc_dwarf_r15_x86_64, LLDB_INVALID_REGNUM, gdb_r15_x86_64),
- DEFINE_GPR(rip, "pc", gcc_dwarf_rip_x86_64, gcc_dwarf_rip_x86_64, LLDB_REGNUM_GENERIC_PC, gdb_rip_x86_64),
- DEFINE_GPR(rflags, "flags", gcc_dwarf_rflags_x86_64, gcc_dwarf_rflags_x86_64, LLDB_REGNUM_GENERIC_FLAGS, gdb_rflags_x86_64),
- DEFINE_GPR(cs, NULL, gcc_dwarf_cs_x86_64, gcc_dwarf_cs_x86_64, LLDB_INVALID_REGNUM, gdb_cs_x86_64),
- DEFINE_GPR(fs, NULL, gcc_dwarf_fs_x86_64, gcc_dwarf_fs_x86_64, LLDB_INVALID_REGNUM, gdb_fs_x86_64),
- DEFINE_GPR(gs, NULL, gcc_dwarf_gs_x86_64, gcc_dwarf_gs_x86_64, LLDB_INVALID_REGNUM, gdb_gs_x86_64),
- DEFINE_GPR(ss, NULL, gcc_dwarf_ss_x86_64, gcc_dwarf_ss_x86_64, LLDB_INVALID_REGNUM, gdb_ss_x86_64),
- DEFINE_GPR(ds, NULL, gcc_dwarf_ds_x86_64, gcc_dwarf_ds_x86_64, LLDB_INVALID_REGNUM, gdb_ds_x86_64),
- DEFINE_GPR(es, NULL, gcc_dwarf_es_x86_64, gcc_dwarf_es_x86_64, LLDB_INVALID_REGNUM, gdb_es_x86_64),
-
- DEFINE_GPR_PSEUDO_32(eax, rax),
- DEFINE_GPR_PSEUDO_32(ebx, rbx),
- DEFINE_GPR_PSEUDO_32(ecx, rcx),
- DEFINE_GPR_PSEUDO_32(edx, rdx),
- DEFINE_GPR_PSEUDO_32(edi, rdi),
- DEFINE_GPR_PSEUDO_32(esi, rsi),
- DEFINE_GPR_PSEUDO_32(ebp, rbp),
- DEFINE_GPR_PSEUDO_32(esp, rsp),
- DEFINE_GPR_PSEUDO_32(r8d, r8),
- DEFINE_GPR_PSEUDO_32(r9d, r9),
- DEFINE_GPR_PSEUDO_32(r10d, r10),
- DEFINE_GPR_PSEUDO_32(r11d, r11),
- DEFINE_GPR_PSEUDO_32(r12d, r12),
- DEFINE_GPR_PSEUDO_32(r13d, r13),
- DEFINE_GPR_PSEUDO_32(r14d, r14),
- DEFINE_GPR_PSEUDO_32(r15d, r15),
- DEFINE_GPR_PSEUDO_16(ax, rax),
- DEFINE_GPR_PSEUDO_16(bx, rbx),
- DEFINE_GPR_PSEUDO_16(cx, rcx),
- DEFINE_GPR_PSEUDO_16(dx, rdx),
- DEFINE_GPR_PSEUDO_16(di, rdi),
- DEFINE_GPR_PSEUDO_16(si, rsi),
- DEFINE_GPR_PSEUDO_16(bp, rbp),
- DEFINE_GPR_PSEUDO_16(sp, rsp),
- DEFINE_GPR_PSEUDO_16(r8w, r8),
- DEFINE_GPR_PSEUDO_16(r9w, r9),
- DEFINE_GPR_PSEUDO_16(r10w, r10),
- DEFINE_GPR_PSEUDO_16(r11w, r11),
- DEFINE_GPR_PSEUDO_16(r12w, r12),
- DEFINE_GPR_PSEUDO_16(r13w, r13),
- DEFINE_GPR_PSEUDO_16(r14w, r14),
- DEFINE_GPR_PSEUDO_16(r15w, r15),
- DEFINE_GPR_PSEUDO_8H(ah, rax),
- DEFINE_GPR_PSEUDO_8H(bh, rbx),
- DEFINE_GPR_PSEUDO_8H(ch, rcx),
- DEFINE_GPR_PSEUDO_8H(dh, rdx),
- DEFINE_GPR_PSEUDO_8L(al, rax),
- DEFINE_GPR_PSEUDO_8L(bl, rbx),
- DEFINE_GPR_PSEUDO_8L(cl, rcx),
- DEFINE_GPR_PSEUDO_8L(dl, rdx),
- DEFINE_GPR_PSEUDO_8L(dil, rdi),
- DEFINE_GPR_PSEUDO_8L(sil, rsi),
- DEFINE_GPR_PSEUDO_8L(bpl, rbp),
- DEFINE_GPR_PSEUDO_8L(spl, rsp),
- DEFINE_GPR_PSEUDO_8L(r8l, r8),
- DEFINE_GPR_PSEUDO_8L(r9l, r9),
- DEFINE_GPR_PSEUDO_8L(r10l, r10),
- DEFINE_GPR_PSEUDO_8L(r11l, r11),
- DEFINE_GPR_PSEUDO_8L(r12l, r12),
- DEFINE_GPR_PSEUDO_8L(r13l, r13),
- DEFINE_GPR_PSEUDO_8L(r14l, r14),
- DEFINE_GPR_PSEUDO_8L(r15l, r15),
-
- // i387 Floating point registers. GCC, DWARF, Generic, GDB
- DEFINE_FPR(fctrl, fctrl, gcc_dwarf_fctrl_x86_64, gcc_dwarf_fctrl_x86_64, LLDB_INVALID_REGNUM, gdb_fctrl_x86_64),
- DEFINE_FPR(fstat, fstat, gcc_dwarf_fstat_x86_64, gcc_dwarf_fstat_x86_64, LLDB_INVALID_REGNUM, gdb_fstat_x86_64),
- DEFINE_FPR(ftag, ftag, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_ftag_x86_64),
- DEFINE_FPR(fop, fop, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fop_x86_64),
- DEFINE_FPR(fiseg, ptr.i386.fiseg, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fiseg_x86_64),
- DEFINE_FPR(fioff, ptr.i386.fioff, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fioff_x86_64),
- DEFINE_FPR(foseg, ptr.i386.foseg, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_foseg_x86_64),
- DEFINE_FPR(fooff, ptr.i386.fooff, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gdb_fooff_x86_64),
- DEFINE_FPR(mxcsr, mxcsr, gcc_dwarf_mxcsr_x86_64, gcc_dwarf_mxcsr_x86_64, LLDB_INVALID_REGNUM, gdb_mxcsr_x86_64),
- DEFINE_FPR(mxcsrmask, mxcsrmask, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM),
-
- // FP registers.
- DEFINE_FP_ST(st, 0),
- DEFINE_FP_ST(st, 1),
- DEFINE_FP_ST(st, 2),
- DEFINE_FP_ST(st, 3),
- DEFINE_FP_ST(st, 4),
- DEFINE_FP_ST(st, 5),
- DEFINE_FP_ST(st, 6),
- DEFINE_FP_ST(st, 7),
- DEFINE_FP_MM(mm, 0),
- DEFINE_FP_MM(mm, 1),
- DEFINE_FP_MM(mm, 2),
- DEFINE_FP_MM(mm, 3),
- DEFINE_FP_MM(mm, 4),
- DEFINE_FP_MM(mm, 5),
- DEFINE_FP_MM(mm, 6),
- DEFINE_FP_MM(mm, 7),
-
- // XMM registers
- DEFINE_XMM(xmm, 0),
- DEFINE_XMM(xmm, 1),
- DEFINE_XMM(xmm, 2),
- DEFINE_XMM(xmm, 3),
- DEFINE_XMM(xmm, 4),
- DEFINE_XMM(xmm, 5),
- DEFINE_XMM(xmm, 6),
- DEFINE_XMM(xmm, 7),
- DEFINE_XMM(xmm, 8),
- DEFINE_XMM(xmm, 9),
- DEFINE_XMM(xmm, 10),
- DEFINE_XMM(xmm, 11),
- DEFINE_XMM(xmm, 12),
- DEFINE_XMM(xmm, 13),
- DEFINE_XMM(xmm, 14),
- DEFINE_XMM(xmm, 15),
-
- // Copy of YMM registers assembled from xmm and ymmh
- DEFINE_YMM(ymm, 0),
- DEFINE_YMM(ymm, 1),
- DEFINE_YMM(ymm, 2),
- DEFINE_YMM(ymm, 3),
- DEFINE_YMM(ymm, 4),
- DEFINE_YMM(ymm, 5),
- DEFINE_YMM(ymm, 6),
- DEFINE_YMM(ymm, 7),
- DEFINE_YMM(ymm, 8),
- DEFINE_YMM(ymm, 9),
- DEFINE_YMM(ymm, 10),
- DEFINE_YMM(ymm, 11),
- DEFINE_YMM(ymm, 12),
- DEFINE_YMM(ymm, 13),
- DEFINE_YMM(ymm, 14),
- DEFINE_YMM(ymm, 15),
-
- // Debug registers for lldb internal use
- DEFINE_DR(dr, 0),
- DEFINE_DR(dr, 1),
- DEFINE_DR(dr, 2),
- DEFINE_DR(dr, 3),
- DEFINE_DR(dr, 4),
- DEFINE_DR(dr, 5),
- DEFINE_DR(dr, 6),
- DEFINE_DR(dr, 7)
-};
-static_assert((sizeof(g_register_infos_x86_64) / sizeof(g_register_infos_x86_64[0])) == k_num_registers_x86_64,
- "g_register_infos_x86_64 has wrong number of register infos");
-
-#undef FPR_SIZE
-#undef FP_SIZE
-#undef XMM_SIZE
-#undef YMM_SIZE
-#undef DEFINE_GPR
-#undef DEFINE_FPR
-#undef DEFINE_FP
-#undef DEFINE_XMM
-#undef DEFINE_YMM
-#undef DEFINE_DR
-#undef DEFINE_GPR_PSEUDO_32
-#undef DEFINE_GPR_PSEUDO_16
-#undef DEFINE_GPR_PSEUDO_8H
-#undef DEFINE_GPR_PSEUDO_8L
-
-#endif // DECLARE_REGISTER_INFOS_X86_64_STRUCT
-
-
-#ifdef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
-
-#define UPDATE_GPR_INFO(reg, reg64) \
-do { \
- g_register_infos[gpr_##reg##_i386].byte_offset = GPR_OFFSET(reg64); \
-} while(false);
-
-#define UPDATE_GPR_INFO_8H(reg, reg64) \
-do { \
- g_register_infos[gpr_##reg##_i386].byte_offset = GPR_OFFSET(reg64) + 1; \
-} while(false);
-
-#define UPDATE_FPR_INFO(reg, reg64) \
-do { \
- g_register_infos[fpu_##reg##_i386].byte_offset = FPR_OFFSET(reg64); \
-} while(false);
-
-#define UPDATE_FP_INFO(reg, i) \
-do { \
- g_register_infos[fpu_##reg##i##_i386].byte_offset = FPR_OFFSET(stmm[i]); \
-} while(false);
-
-#define UPDATE_XMM_INFO(reg, i) \
-do { \
- g_register_infos[fpu_##reg##i##_i386].byte_offset = FPR_OFFSET(reg[i]); \
-} while(false);
-
-#define UPDATE_YMM_INFO(reg, i) \
-do { \
- g_register_infos[fpu_##reg##i##_i386].byte_offset = YMM_OFFSET(reg[i]); \
-} while(false);
-
-#define UPDATE_DR_INFO(reg_index) \
-do { \
- g_register_infos[dr##reg_index##_i386].byte_offset = DR_OFFSET(reg_index); \
-} while(false);
-
- // Update the register offsets
- UPDATE_GPR_INFO(eax, rax);
- UPDATE_GPR_INFO(ebx, rbx);
- UPDATE_GPR_INFO(ecx, rcx);
- UPDATE_GPR_INFO(edx, rdx);
- UPDATE_GPR_INFO(edi, rdi);
- UPDATE_GPR_INFO(esi, rsi);
- UPDATE_GPR_INFO(ebp, rbp);
- UPDATE_GPR_INFO(esp, rsp);
- UPDATE_GPR_INFO(eip, rip);
- UPDATE_GPR_INFO(eflags, rflags);
- UPDATE_GPR_INFO(cs, cs);
- UPDATE_GPR_INFO(fs, fs);
- UPDATE_GPR_INFO(gs, gs);
- UPDATE_GPR_INFO(ss, ss);
- UPDATE_GPR_INFO(ds, ds);
- UPDATE_GPR_INFO(es, es);
-
- UPDATE_GPR_INFO(ax, rax);
- UPDATE_GPR_INFO(bx, rbx);
- UPDATE_GPR_INFO(cx, rcx);
- UPDATE_GPR_INFO(dx, rdx);
- UPDATE_GPR_INFO(di, rdi);
- UPDATE_GPR_INFO(si, rsi);
- UPDATE_GPR_INFO(bp, rbp);
- UPDATE_GPR_INFO(sp, rsp);
- UPDATE_GPR_INFO_8H(ah, rax);
- UPDATE_GPR_INFO_8H(bh, rbx);
- UPDATE_GPR_INFO_8H(ch, rcx);
- UPDATE_GPR_INFO_8H(dh, rdx);
- UPDATE_GPR_INFO(al, rax);
- UPDATE_GPR_INFO(bl, rbx);
- UPDATE_GPR_INFO(cl, rcx);
- UPDATE_GPR_INFO(dl, rdx);
-
- UPDATE_FPR_INFO(fctrl, fctrl);
- UPDATE_FPR_INFO(fstat, fstat);
- UPDATE_FPR_INFO(ftag, ftag);
- UPDATE_FPR_INFO(fop, fop);
- UPDATE_FPR_INFO(fiseg, ptr.i386.fiseg);
- UPDATE_FPR_INFO(fioff, ptr.i386.fioff);
- UPDATE_FPR_INFO(fooff, ptr.i386.fooff);
- UPDATE_FPR_INFO(foseg, ptr.i386.foseg);
- UPDATE_FPR_INFO(mxcsr, mxcsr);
- UPDATE_FPR_INFO(mxcsrmask, mxcsrmask);
-
- UPDATE_FP_INFO(st, 0);
- UPDATE_FP_INFO(st, 1);
- UPDATE_FP_INFO(st, 2);
- UPDATE_FP_INFO(st, 3);
- UPDATE_FP_INFO(st, 4);
- UPDATE_FP_INFO(st, 5);
- UPDATE_FP_INFO(st, 6);
- UPDATE_FP_INFO(st, 7);
- UPDATE_FP_INFO(mm, 0);
- UPDATE_FP_INFO(mm, 1);
- UPDATE_FP_INFO(mm, 2);
- UPDATE_FP_INFO(mm, 3);
- UPDATE_FP_INFO(mm, 4);
- UPDATE_FP_INFO(mm, 5);
- UPDATE_FP_INFO(mm, 6);
- UPDATE_FP_INFO(mm, 7);
-
- UPDATE_XMM_INFO(xmm, 0);
- UPDATE_XMM_INFO(xmm, 1);
- UPDATE_XMM_INFO(xmm, 2);
- UPDATE_XMM_INFO(xmm, 3);
- UPDATE_XMM_INFO(xmm, 4);
- UPDATE_XMM_INFO(xmm, 5);
- UPDATE_XMM_INFO(xmm, 6);
- UPDATE_XMM_INFO(xmm, 7);
-
- UPDATE_YMM_INFO(ymm, 0);
- UPDATE_YMM_INFO(ymm, 1);
- UPDATE_YMM_INFO(ymm, 2);
- UPDATE_YMM_INFO(ymm, 3);
- UPDATE_YMM_INFO(ymm, 4);
- UPDATE_YMM_INFO(ymm, 5);
- UPDATE_YMM_INFO(ymm, 6);
- UPDATE_YMM_INFO(ymm, 7);
-
- UPDATE_DR_INFO(0);
- UPDATE_DR_INFO(1);
- UPDATE_DR_INFO(2);
- UPDATE_DR_INFO(3);
- UPDATE_DR_INFO(4);
- UPDATE_DR_INFO(5);
- UPDATE_DR_INFO(6);
- UPDATE_DR_INFO(7);
-
-#undef UPDATE_GPR_INFO
-#undef UPDATE_GPR_INFO_8H
-#undef UPDATE_FPR_INFO
-#undef UPDATE_FP_INFO
-#undef UPDATE_XMM_INFO
-#undef UPDATE_YMM_INFO
-#undef UPDATE_DR_INFO
-
-#endif // UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
-
-#undef GPR_OFFSET
-#undef FPR_OFFSET
-#undef YMM_OFFSET
Modified: lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt Wed Mar 12 11:04:29 2014
@@ -11,13 +11,20 @@ add_lldb_library(lldbPluginProcessUtilit
RegisterContextDarwin_i386.cpp
RegisterContextDarwin_x86_64.cpp
RegisterContextDummy.cpp
+ RegisterContextFreeBSD_i386.cpp
+ RegisterContextFreeBSD_mips64.cpp
+ RegisterContextFreeBSD_x86_64.cpp
RegisterContextHistory.cpp
+ RegisterContextLinux_i386.cpp
+ RegisterContextLinux_x86_64.cpp
RegisterContextLLDB.cpp
RegisterContextMacOSXFrameBackchain.cpp
RegisterContextMach_arm.cpp
RegisterContextMach_i386.cpp
RegisterContextMach_x86_64.cpp
RegisterContextMemory.cpp
+ RegisterContextPOSIX_mips64.cpp
+ RegisterContextPOSIX_x86.cpp
RegisterContextThreadMemory.cpp
StopInfoMachException.cpp
ThreadMemory.cpp
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.cpp&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_mips64.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp Wed Mar 12 11:04:29 2014
@@ -82,7 +82,7 @@ struct UserArea
uint32_t u_debugreg[8]; // Debug registers (DR0 - DR7).
};
-#define DR_SIZE sizeof(UserArea::u_debugreg[0])
+#define DR_SIZE sizeof(((UserArea*)NULL)->u_debugreg[0])
#define DR_0_OFFSET 0xFC
#define DR_OFFSET(reg_index) \
(DR_0_OFFSET + (reg_index * 4))
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_i386.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp Wed Mar 12 11:04:29 2014
@@ -69,7 +69,7 @@ struct UserArea
uint64_t fault_address; // Control register CR3.
};
-#define DR_SIZE sizeof(UserArea::u_debugreg[0])
+#define DR_SIZE sizeof(((UserArea*)NULL)->u_debugreg[0])
#define DR_OFFSET(reg_index) \
(LLVM_EXTENSION offsetof(UserArea, u_debugreg[reg_index]))
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp Wed Mar 12 11:04:29 2014
@@ -20,7 +20,6 @@
#include "lldb/Host/Endian.h"
#include "llvm/Support/Compiler.h"
-#include "ProcessPOSIX.h"
#include "RegisterContextPOSIX_mips64.h"
#include "Plugins/Process/elf-core/ProcessElfCore.h"
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp Wed Mar 12 11:04:29 2014
@@ -20,7 +20,6 @@
#include "lldb/Host/Endian.h"
#include "llvm/Support/Compiler.h"
-#include "ProcessPOSIX.h"
#include "RegisterContext_x86.h"
#include "RegisterContextPOSIX_x86.h"
#include "Plugins/Process/elf-core/ProcessElfCore.h"
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIX_x86.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContext_mips64.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContext_mips64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContext_mips64.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_mips64.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h Wed Mar 12 11:04:29 2014
@@ -39,7 +39,7 @@
// Note that the size and offset will be updated by platform-specific classes.
#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \
- { #reg, alt, sizeof(GPR::reg), GPR_OFFSET(reg), eEncodingUint, \
+ { #reg, alt, sizeof(((GPR*)NULL)->reg), GPR_OFFSET(reg), eEncodingUint, \
eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg##_i386 }, NULL, NULL }
#define DEFINE_FPR(name, reg, kind1, kind2, kind3, kind4) \
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h Wed Mar 12 11:04:29 2014
@@ -15,7 +15,7 @@
// Note that the size and offset will be updated by platform-specific classes.
#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \
- { #reg, alt, sizeof(GPR::reg), GPR_OFFSET(reg), eEncodingUint, \
+ { #reg, alt, sizeof(((GPR*)NULL)->reg), GPR_OFFSET(reg), eEncodingUint, \
eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg##_mips64 }, NULL, NULL }
static RegisterInfo
Copied: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h (from r203656, lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h&p1=lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h&r1=203656&r2=203667&rev=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h Wed Mar 12 11:04:29 2014
@@ -39,7 +39,7 @@
// Note that the size and offset will be updated by platform-specific classes.
#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \
- { #reg, alt, sizeof(GPR::reg), GPR_OFFSET(reg), eEncodingUint, \
+ { #reg, alt, sizeof(((GPR*)NULL)->reg), GPR_OFFSET(reg), eEncodingUint, \
eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg##_x86_64 }, NULL, NULL }
#define DEFINE_FPR(name, reg, kind1, kind2, kind3, kind4) \
Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Wed Mar 12 11:04:29 2014
@@ -17,13 +17,12 @@
#include "lldb/Core/Section.h"
#include "lldb/Core/State.h"
#include "lldb/Core/DataBufferHeap.h"
+#include "lldb/Core/Log.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/DynamicLoader.h"
#include "llvm/Support/ELF.h"
-#include "ProcessPOSIXLog.h"
-
#include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
#include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h"
@@ -397,7 +396,7 @@ ParseFreeBSDPrStatus(ThreadData &thread_
arch.GetMachine() == llvm::Triple::x86_64);
int pr_version = data.GetU32(&offset);
- Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS));
+ Log *log (GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
if (log)
{
if (pr_version > 1)
Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h Wed Mar 12 11:04:29 2014
@@ -10,7 +10,7 @@
#ifndef liblldb_RegisterContextCorePOSIX_mips64_H_
#define liblldb_RegisterContextCorePOSIX_mips64_H_
-#include "Plugins/Process/POSIX/RegisterContextPOSIX_mips64.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h"
class RegisterContextCorePOSIX_mips64 :
public RegisterContextPOSIX_mips64
Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h Wed Mar 12 11:04:29 2014
@@ -10,7 +10,7 @@
#ifndef liblldb_RegisterContextCorePOSIX_x86_64_H_
#define liblldb_RegisterContextCorePOSIX_x86_64_H_
-#include "Plugins/Process/POSIX/RegisterContextPOSIX_x86.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX_x86.h"
class RegisterContextCorePOSIX_x86_64 :
public RegisterContextPOSIX_x86
Modified: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp?rev=203667&r1=203666&r2=203667&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp Wed Mar 12 11:04:29 2014
@@ -8,11 +8,11 @@
//===----------------------------------------------------------------------===//
#include "lldb/Core/DataExtractor.h"
+#include "lldb/Core/Log.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StopInfo.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Unwind.h"
-#include "ProcessPOSIXLog.h"
#include "ThreadElfCore.h"
#include "ProcessElfCore.h"
@@ -74,7 +74,7 @@ ThreadElfCore::CreateRegisterContextForF
{
RegisterContextSP reg_ctx_sp;
uint32_t concrete_frame_idx = 0;
- Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
+ Log *log (GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
if (frame)
concrete_frame_idx = frame->GetConcreteFrameIndex ();
More information about the lldb-commits
mailing list