mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 14:20:17 +00:00
Remove i386 and armv7 native support in debugserver
i386 and armv7 macOS/iOS cannot be built with current Xcode any longer; we cannot build or test the support code for running debugserver on these targets. Remove the code. Differential Revision: https://reviews.llvm.org/D149503
This commit is contained in:
parent
13dbc16b4d
commit
13d613de4b
@ -39,8 +39,6 @@
|
||||
26CE05BD115C36430022F371 /* PThreadMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */; };
|
||||
26CE05BE115C36440022F371 /* SysSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C638010C71334A0024798E /* SysSignal.cpp */; };
|
||||
26CE05BF115C364D0022F371 /* DNBArchImplX86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */; };
|
||||
26CE05C0115C364F0022F371 /* DNBArchImplI386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */; };
|
||||
26CE05C1115C36510022F371 /* DNBArchImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */; };
|
||||
26CE05C3115C36580022F371 /* CFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */; };
|
||||
26CE05C5115C36590022F371 /* CFBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */; };
|
||||
26CE05CF115C36F70022F371 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26ACA3340D3E956300A2120B /* CoreFoundation.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
@ -70,8 +68,6 @@
|
||||
456F675C1AD46CE9002850C2 /* PThreadMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */; };
|
||||
456F675D1AD46CE9002850C2 /* SysSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C638010C71334A0024798E /* SysSignal.cpp */; };
|
||||
456F675E1AD46CE9002850C2 /* DNBArchImplX86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */; };
|
||||
456F675F1AD46CE9002850C2 /* DNBArchImplI386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */; };
|
||||
456F67601AD46CE9002850C2 /* DNBArchImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */; };
|
||||
456F67621AD46CE9002850C2 /* CFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */; };
|
||||
456F67641AD46CE9002850C2 /* CFBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */; };
|
||||
456F67651AD46CE9002850C2 /* PseudoTerminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF67ABFF0D34604D0022D128 /* PseudoTerminal.cpp */; };
|
||||
@ -107,8 +103,6 @@
|
||||
266B5ECF1460A68200E43F0A /* DNBArchImplARM64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArchImplARM64.cpp; sourceTree = "<group>"; };
|
||||
266B5ED01460A68200E43F0A /* DNBArchImplARM64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNBArchImplARM64.h; sourceTree = "<group>"; };
|
||||
2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PThreadMutex.cpp; sourceTree = "<group>"; };
|
||||
2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DNBArchImpl.cpp; path = arm/DNBArchImpl.cpp; sourceTree = "<group>"; };
|
||||
2675D4230CCEB705000F49AF /* DNBArchImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DNBArchImpl.h; path = arm/DNBArchImpl.h; sourceTree = "<group>"; };
|
||||
2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFBundle.cpp; sourceTree = "<group>"; };
|
||||
2695DD920D3EBFF6007E4CA2 /* CFBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFBundle.h; sourceTree = "<group>"; };
|
||||
2695DD9A0D3EC160007E4CA2 /* CFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFString.h; sourceTree = "<group>"; };
|
||||
@ -142,8 +136,6 @@
|
||||
26C637E30C71334A0024798E /* DNBRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBRegisterInfo.h; sourceTree = "<group>"; };
|
||||
26C637E70C71334A0024798E /* CFUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFUtils.h; sourceTree = "<group>"; };
|
||||
26C637E80C71334A0024798E /* dbgnub-mig.defs */ = {isa = PBXFileReference; explicitFileType = sourcecode.mig; fileEncoding = 30; path = "dbgnub-mig.defs"; sourceTree = "<group>"; };
|
||||
26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArchImplI386.cpp; sourceTree = "<group>"; };
|
||||
26C637EB0C71334A0024798E /* DNBArchImplI386.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBArchImplI386.h; sourceTree = "<group>"; };
|
||||
26C637EE0C71334A0024798E /* MachException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachException.cpp; sourceTree = "<group>"; };
|
||||
26C637EF0C71334A0024798E /* MachException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachException.h; sourceTree = "<group>"; };
|
||||
26C637F00C71334A0024798E /* MachProcess.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = MachProcess.mm; sourceTree = "<group>"; };
|
||||
@ -170,9 +162,12 @@
|
||||
26E6B9DA0D1329010037ECDD /* RNBDefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBDefs.h; sourceTree = "<group>"; };
|
||||
456F67721AD46CE9002850C2 /* debugserver-nonui */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "debugserver-nonui"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
49D404611E39260F00570CDC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
49F530111331519C008956F6 /* MachRegisterStatesI386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachRegisterStatesI386.h; sourceTree = "<group>"; };
|
||||
49F5301213316D7F008956F6 /* MachRegisterStatesX86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachRegisterStatesX86_64.h; sourceTree = "<group>"; };
|
||||
9457ECF61419864100DFE7D8 /* stack_logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stack_logging.h; sourceTree = "<group>"; };
|
||||
9684D93A29FCA1E10046D45E /* debugserver-macosx-private-entitlements.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = "debugserver-macosx-private-entitlements.plist"; path = "resources/debugserver-macosx-private-entitlements.plist"; sourceTree = SOURCE_ROOT; };
|
||||
9684D93B29FCA1E10046D45E /* lldb-debugserver-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = "lldb-debugserver-Info.plist"; path = "resources/lldb-debugserver-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||
9684D93C29FCA1E10046D45E /* debugserver-macosx-entitlements.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = "debugserver-macosx-entitlements.plist"; path = "resources/debugserver-macosx-entitlements.plist"; sourceTree = SOURCE_ROOT; };
|
||||
9684D93D29FCA1E10046D45E /* debugserver-entitlements.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = "debugserver-entitlements.plist"; path = "resources/debugserver-entitlements.plist"; sourceTree = SOURCE_ROOT; };
|
||||
AF0934BA18E12B92005A11FD /* Genealogy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Genealogy.h; sourceTree = "<group>"; };
|
||||
AF0934BB18E12B92005A11FD /* GenealogySPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenealogySPI.h; sourceTree = "<group>"; };
|
||||
AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StdStringExtractor.cpp; sourceTree = "<group>"; };
|
||||
@ -239,18 +234,13 @@
|
||||
path = arm64;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2675D41C0CCEB6CF000F49AF /* arm */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */,
|
||||
2675D4230CCEB705000F49AF /* DNBArchImpl.h */,
|
||||
);
|
||||
name = arm;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26A028FE114AB6A60029C479 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9684D93D29FCA1E10046D45E /* debugserver-entitlements.plist */,
|
||||
9684D93C29FCA1E10046D45E /* debugserver-macosx-entitlements.plist */,
|
||||
9684D93A29FCA1E10046D45E /* debugserver-macosx-private-entitlements.plist */,
|
||||
9684D93B29FCA1E10046D45E /* lldb-debugserver-Info.plist */,
|
||||
26A4BAED0D498B7D00A9BEAB /* com.apple.debugserver.plist */,
|
||||
EF88788B0D9C7558001831DA /* com.apple.debugserver.applist.plist */,
|
||||
269E8DF8164B2ED200AD65F6 /* com.apple.debugserver.posix.plist */,
|
||||
@ -336,9 +326,7 @@
|
||||
2695DD9B0D3EC160007E4CA2 /* CFString.cpp */,
|
||||
26C637E70C71334A0024798E /* CFUtils.h */,
|
||||
2307CCCC1D4A5DAE0016ABC0 /* CMakeLists.txt */,
|
||||
2675D41C0CCEB6CF000F49AF /* arm */,
|
||||
266B5ECE1460A68200E43F0A /* arm64 */,
|
||||
26C637E90C71334A0024798E /* i386 */,
|
||||
26CF99A11142EB7400011AAB /* x86_64 */,
|
||||
26C637E80C71334A0024798E /* dbgnub-mig.defs */,
|
||||
AFEC3363194A8B0B00FF05C6 /* Genealogy.cpp */,
|
||||
@ -365,16 +353,6 @@
|
||||
path = MacOSX;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26C637E90C71334A0024798E /* i386 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */,
|
||||
26C637EB0C71334A0024798E /* DNBArchImplI386.h */,
|
||||
49F530111331519C008956F6 /* MachRegisterStatesI386.h */,
|
||||
);
|
||||
path = i386;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26CF99A11142EB7400011AAB /* x86_64 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -422,7 +400,6 @@
|
||||
buildPhases = (
|
||||
26CE0591115C31C20022F371 /* Sources */,
|
||||
26CE0592115C31C20022F371 /* Frameworks */,
|
||||
4C3326CB18B2A2F600EB5DD7 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -478,22 +455,6 @@
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
4C3326CB18B2A2F600EB5DD7 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = "/bin/sh -x";
|
||||
shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\n if [ -n \"${DEBUGSERVER_USE_FROM_SYSTEM}\" ]\n then\n\t\tditto \"${DEVELOPER_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver\" \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n elif [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n then\n codesign -f -s lldb_codesign --entitlements ${SRCROOT}/resources/debugserver-macosx-entitlements.plist \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n fi\nfi\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
26CE0591115C31C20022F371 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
@ -529,8 +490,6 @@
|
||||
26CE05BD115C36430022F371 /* PThreadMutex.cpp in Sources */,
|
||||
26CE05BE115C36440022F371 /* SysSignal.cpp in Sources */,
|
||||
26CE05BF115C364D0022F371 /* DNBArchImplX86_64.cpp in Sources */,
|
||||
26CE05C0115C364F0022F371 /* DNBArchImplI386.cpp in Sources */,
|
||||
26CE05C1115C36510022F371 /* DNBArchImpl.cpp in Sources */,
|
||||
26CE05C5115C36590022F371 /* CFBundle.cpp in Sources */,
|
||||
26CE05C3115C36580022F371 /* CFString.cpp in Sources */,
|
||||
26CE05F1115C387C0022F371 /* PseudoTerminal.cpp in Sources */,
|
||||
@ -570,8 +529,6 @@
|
||||
456F675C1AD46CE9002850C2 /* PThreadMutex.cpp in Sources */,
|
||||
456F675D1AD46CE9002850C2 /* SysSignal.cpp in Sources */,
|
||||
456F675E1AD46CE9002850C2 /* DNBArchImplX86_64.cpp in Sources */,
|
||||
456F675F1AD46CE9002850C2 /* DNBArchImplI386.cpp in Sources */,
|
||||
456F67601AD46CE9002850C2 /* DNBArchImpl.cpp in Sources */,
|
||||
23043C9E1D35DBFA00FC25CA /* StringConvert.cpp in Sources */,
|
||||
AF588449206077BD00A0CB5A /* SocketAddress.cpp in Sources */,
|
||||
456F67621AD46CE9002850C2 /* CFString.cpp in Sources */,
|
||||
@ -600,7 +557,7 @@
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 360.99.0;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
@ -666,10 +623,10 @@
|
||||
buildSettings = {
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-entitlements.plist";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=*]" = "resources/debugserver-entitlements.plist";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "resources/debugserver-macosx-entitlements.plist";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 360.99.0;
|
||||
FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
|
||||
@ -766,10 +723,10 @@
|
||||
buildSettings = {
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-entitlements.plist";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=*]" = "resources/debugserver-entitlements.plist";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "resources/debugserver-macosx-entitlements.plist";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 360.99.0;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
@ -875,8 +832,8 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-entitlements.plist";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 360.99.0;
|
||||
@ -955,7 +912,7 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-entitlements.plist";
|
||||
"CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 360.99.0;
|
||||
|
@ -3,9 +3,7 @@ include(CheckLibraryExists)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
|
||||
include_directories(${LLDB_SOURCE_DIR}/source)
|
||||
include_directories(MacOSX)
|
||||
include_directories(MacOSX/i386)
|
||||
include_directories(MacOSX/x86_64)
|
||||
include_directories(MacOSX/arm)
|
||||
include_directories(MacOSX/arm64)
|
||||
|
||||
function(check_certificate identity result_valid)
|
||||
@ -228,9 +226,7 @@ set(lldbDebugserverCommonSources
|
||||
MacOSX/MachVMMemory.cpp
|
||||
MacOSX/MachVMRegion.cpp
|
||||
MacOSX/OsLogger.cpp
|
||||
MacOSX/arm/DNBArchImpl.cpp
|
||||
MacOSX/arm64/DNBArchImplARM64.cpp
|
||||
MacOSX/i386/DNBArchImplI386.cpp
|
||||
MacOSX/x86_64/DNBArchImplX86_64.cpp
|
||||
${generated_mach_interfaces}
|
||||
${DEBUGSERVER_VERS_GENERATED_FILE})
|
||||
|
@ -1768,10 +1768,8 @@ std::string DNBGetMacCatalystVersionString() {
|
||||
void DNBInitialize() {
|
||||
DNBLogThreadedIf(LOG_PROCESS, "DNBInitialize ()");
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
DNBArchImplI386::Initialize();
|
||||
DNBArchImplX86_64::Initialize();
|
||||
#elif defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
|
||||
DNBArchMachARM::Initialize();
|
||||
DNBArchMachARM64::Initialize();
|
||||
#endif
|
||||
}
|
||||
|
@ -122,9 +122,7 @@ protected:
|
||||
// SaveRegisterState/RestoreRegisterState
|
||||
};
|
||||
|
||||
#include "MacOSX/arm/DNBArchImpl.h"
|
||||
#include "MacOSX/arm64/DNBArchImplARM64.h"
|
||||
#include "MacOSX/i386/DNBArchImplI386.h"
|
||||
#include "MacOSX/x86_64/DNBArchImplX86_64.h"
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,275 +0,0 @@
|
||||
//===-- DNBArchImpl.h -------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Created by Greg Clayton on 6/25/07.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_ARM_DNBARCHIMPL_H
|
||||
#define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_ARM_DNBARCHIMPL_H
|
||||
|
||||
#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
|
||||
|
||||
#include "DNBArch.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
class MachThread;
|
||||
|
||||
class DNBArchMachARM : public DNBArchProtocol {
|
||||
public:
|
||||
enum { kMaxNumThumbITBreakpoints = 4 };
|
||||
|
||||
DNBArchMachARM(MachThread *thread)
|
||||
: m_thread(thread), m_state(), m_disabled_watchpoints(),
|
||||
m_hw_single_chained_step_addr(INVALID_NUB_ADDRESS),
|
||||
m_last_decode_pc(INVALID_NUB_ADDRESS), m_watchpoint_hw_index(-1),
|
||||
m_watchpoint_did_occur(false),
|
||||
m_watchpoint_resume_single_step_enabled(false),
|
||||
m_saved_register_states() {
|
||||
m_disabled_watchpoints.resize(16);
|
||||
memset(&m_dbg_save, 0, sizeof(m_dbg_save));
|
||||
#if defined(USE_ARM_DISASSEMBLER_FRAMEWORK)
|
||||
ThumbStaticsInit(&m_last_decode_thumb);
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual ~DNBArchMachARM() {}
|
||||
|
||||
static void Initialize();
|
||||
static const DNBRegisterSetInfo *GetRegisterSetInfo(nub_size_t *num_reg_sets);
|
||||
|
||||
bool GetRegisterValue(uint32_t set, uint32_t reg,
|
||||
DNBRegisterValue *value) override;
|
||||
bool SetRegisterValue(uint32_t set, uint32_t reg,
|
||||
const DNBRegisterValue *value) override;
|
||||
nub_size_t GetRegisterContext(void *buf, nub_size_t buf_len) override;
|
||||
nub_size_t SetRegisterContext(const void *buf, nub_size_t buf_len) override;
|
||||
uint32_t SaveRegisterState() override;
|
||||
bool RestoreRegisterState(uint32_t save_id) override;
|
||||
|
||||
kern_return_t GetRegisterState(int set, bool force) override;
|
||||
kern_return_t SetRegisterState(int set) override;
|
||||
bool RegisterSetStateIsValid(int set) const override;
|
||||
|
||||
uint64_t GetPC(uint64_t failValue) override; // Get program counter
|
||||
kern_return_t SetPC(uint64_t value) override;
|
||||
uint64_t GetSP(uint64_t failValue) override; // Get stack pointer
|
||||
void ThreadWillResume() override;
|
||||
bool ThreadDidStop() override;
|
||||
bool NotifyException(MachException::Data &exc) override;
|
||||
|
||||
static DNBArchProtocol *Create(MachThread *thread);
|
||||
static const uint8_t *SoftwareBreakpointOpcode(nub_size_t byte_size);
|
||||
static uint32_t GetCPUType();
|
||||
|
||||
uint32_t NumSupportedHardwareBreakpoints() override;
|
||||
uint32_t NumSupportedHardwareWatchpoints() override;
|
||||
uint32_t EnableHardwareBreakpoint(nub_addr_t addr, nub_size_t size,
|
||||
bool also_set_on_task) override;
|
||||
bool DisableHardwareBreakpoint(uint32_t hw_break_index,
|
||||
bool also_set_on_task) override;
|
||||
|
||||
uint32_t EnableHardwareWatchpoint(nub_addr_t addr, nub_size_t size, bool read,
|
||||
bool write, bool also_set_on_task) override;
|
||||
bool DisableHardwareWatchpoint(uint32_t hw_break_index,
|
||||
bool also_set_on_task) override;
|
||||
virtual bool DisableHardwareWatchpoint_helper(uint32_t hw_break_index,
|
||||
bool also_set_on_task);
|
||||
virtual bool ReenableHardwareWatchpoint(uint32_t hw_break_index);
|
||||
virtual bool ReenableHardwareWatchpoint_helper(uint32_t hw_break_index);
|
||||
|
||||
virtual bool StepNotComplete() override;
|
||||
uint32_t GetHardwareWatchpointHit(nub_addr_t &addr) override;
|
||||
|
||||
#if defined(ARM_DEBUG_STATE32) && (defined(__arm64__) || defined(__aarch64__))
|
||||
typedef arm_debug_state32_t DBG;
|
||||
#else
|
||||
typedef arm_debug_state_t DBG;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
kern_return_t EnableHardwareSingleStep(bool enable);
|
||||
kern_return_t SetSingleStepSoftwareBreakpoints();
|
||||
|
||||
bool ConditionPassed(uint8_t condition, uint32_t cpsr);
|
||||
#if defined(USE_ARM_DISASSEMBLER_FRAMEWORK)
|
||||
bool ComputeNextPC(nub_addr_t currentPC,
|
||||
arm_decoded_instruction_t decodedInstruction,
|
||||
bool currentPCIsThumb, nub_addr_t *targetPC);
|
||||
arm_error_t DecodeInstructionUsingDisassembler(
|
||||
nub_addr_t curr_pc, uint32_t curr_cpsr,
|
||||
arm_decoded_instruction_t *decodedInstruction,
|
||||
thumb_static_data_t *thumbStaticData, nub_addr_t *next_pc);
|
||||
void DecodeITBlockInstructions(nub_addr_t curr_pc);
|
||||
#endif
|
||||
void EvaluateNextInstructionForSoftwareBreakpointSetup(nub_addr_t currentPC,
|
||||
uint32_t cpsr,
|
||||
bool currentPCIsThumb,
|
||||
nub_addr_t *nextPC,
|
||||
bool *nextPCIsThumb);
|
||||
|
||||
enum RegisterSet {
|
||||
e_regSetALL = REGISTER_SET_ALL,
|
||||
e_regSetGPR, // ARM_THREAD_STATE
|
||||
e_regSetVFP, // ARM_VFP_STATE (ARM_NEON_STATE if defined __arm64__)
|
||||
e_regSetEXC, // ARM_EXCEPTION_STATE
|
||||
e_regSetDBG, // ARM_DEBUG_STATE (ARM_DEBUG_STATE32 if defined __arm64__)
|
||||
kNumRegisterSets
|
||||
};
|
||||
|
||||
enum { Read = 0, Write = 1, kNumErrors = 2 };
|
||||
|
||||
typedef arm_thread_state_t GPR;
|
||||
#if defined(__arm64__) || defined(__aarch64__)
|
||||
typedef arm_neon_state_t FPU;
|
||||
#else
|
||||
typedef arm_vfp_state_t FPU;
|
||||
#endif
|
||||
typedef arm_exception_state_t EXC;
|
||||
|
||||
static const DNBRegisterInfo g_gpr_registers[];
|
||||
static const DNBRegisterInfo g_vfp_registers[];
|
||||
static const DNBRegisterInfo g_exc_registers[];
|
||||
static const DNBRegisterSetInfo g_reg_sets[];
|
||||
|
||||
static const size_t k_num_gpr_registers;
|
||||
static const size_t k_num_vfp_registers;
|
||||
static const size_t k_num_exc_registers;
|
||||
static const size_t k_num_all_registers;
|
||||
static const size_t k_num_register_sets;
|
||||
|
||||
struct Context {
|
||||
GPR gpr;
|
||||
FPU vfp;
|
||||
EXC exc;
|
||||
};
|
||||
|
||||
struct State {
|
||||
Context context;
|
||||
DBG dbg;
|
||||
kern_return_t gpr_errs[2]; // Read/Write errors
|
||||
kern_return_t vfp_errs[2]; // Read/Write errors
|
||||
kern_return_t exc_errs[2]; // Read/Write errors
|
||||
kern_return_t dbg_errs[2]; // Read/Write errors
|
||||
State() {
|
||||
uint32_t i;
|
||||
for (i = 0; i < kNumErrors; i++) {
|
||||
gpr_errs[i] = -1;
|
||||
vfp_errs[i] = -1;
|
||||
exc_errs[i] = -1;
|
||||
dbg_errs[i] = -1;
|
||||
}
|
||||
}
|
||||
void InvalidateRegisterSetState(int set) { SetError(set, Read, -1); }
|
||||
kern_return_t GetError(int set, uint32_t err_idx) const {
|
||||
if (err_idx < kNumErrors) {
|
||||
switch (set) {
|
||||
// When getting all errors, just OR all values together to see if
|
||||
// we got any kind of error.
|
||||
case e_regSetALL:
|
||||
return gpr_errs[err_idx] | vfp_errs[err_idx] | exc_errs[err_idx] |
|
||||
dbg_errs[err_idx];
|
||||
case e_regSetGPR:
|
||||
return gpr_errs[err_idx];
|
||||
case e_regSetVFP:
|
||||
return vfp_errs[err_idx];
|
||||
case e_regSetEXC:
|
||||
return exc_errs[err_idx];
|
||||
case e_regSetDBG:
|
||||
return dbg_errs[err_idx];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
bool SetError(int set, uint32_t err_idx, kern_return_t err) {
|
||||
if (err_idx < kNumErrors) {
|
||||
switch (set) {
|
||||
case e_regSetALL:
|
||||
gpr_errs[err_idx] = err;
|
||||
vfp_errs[err_idx] = err;
|
||||
dbg_errs[err_idx] = err;
|
||||
exc_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetGPR:
|
||||
gpr_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetVFP:
|
||||
vfp_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetEXC:
|
||||
exc_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetDBG:
|
||||
dbg_errs[err_idx] = err;
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool RegsAreValid(int set) const {
|
||||
return GetError(set, Read) == KERN_SUCCESS;
|
||||
}
|
||||
};
|
||||
|
||||
kern_return_t GetGPRState(bool force);
|
||||
kern_return_t GetVFPState(bool force);
|
||||
kern_return_t GetEXCState(bool force);
|
||||
kern_return_t GetDBGState(bool force);
|
||||
|
||||
kern_return_t SetGPRState();
|
||||
kern_return_t SetVFPState();
|
||||
kern_return_t SetEXCState();
|
||||
kern_return_t SetDBGState(bool also_set_on_task);
|
||||
|
||||
bool IsWatchpointEnabled(const DBG &debug_state, uint32_t hw_index);
|
||||
nub_addr_t GetWatchpointAddressByIndex(uint32_t hw_index);
|
||||
nub_addr_t GetWatchAddress(const DBG &debug_state, uint32_t hw_index);
|
||||
|
||||
class disabled_watchpoint {
|
||||
public:
|
||||
disabled_watchpoint() {
|
||||
addr = 0;
|
||||
control = 0;
|
||||
}
|
||||
nub_addr_t addr;
|
||||
uint32_t control;
|
||||
};
|
||||
|
||||
protected:
|
||||
MachThread *m_thread;
|
||||
State m_state;
|
||||
DBG m_dbg_save;
|
||||
|
||||
// armv8 doesn't keep the disabled watchpoint values in the debug register
|
||||
// context like armv7;
|
||||
// we need to save them aside when we disable them temporarily.
|
||||
std::vector<disabled_watchpoint> m_disabled_watchpoints;
|
||||
|
||||
nub_addr_t m_hw_single_chained_step_addr;
|
||||
nub_addr_t m_last_decode_pc;
|
||||
|
||||
// The following member variables should be updated atomically.
|
||||
int32_t m_watchpoint_hw_index;
|
||||
bool m_watchpoint_did_occur;
|
||||
bool m_watchpoint_resume_single_step_enabled;
|
||||
|
||||
typedef std::map<uint32_t, Context> SaveRegisterStates;
|
||||
SaveRegisterStates m_saved_register_states;
|
||||
};
|
||||
|
||||
#endif // #if defined (__arm__)
|
||||
#endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_ARM_DNBARCHIMPL_H
|
File diff suppressed because it is too large
Load Diff
@ -1,246 +0,0 @@
|
||||
//===-- DNBArchImplI386.h ---------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Created by Greg Clayton on 6/25/07.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_I386_DNBARCHIMPLI386_H
|
||||
#define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_I386_DNBARCHIMPLI386_H
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
|
||||
#include "DNBArch.h"
|
||||
#include "MachRegisterStatesI386.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
class MachThread;
|
||||
|
||||
class DNBArchImplI386 : public DNBArchProtocol {
|
||||
public:
|
||||
DNBArchImplI386(MachThread *thread)
|
||||
: DNBArchProtocol(), m_thread(thread), m_state(), m_2pc_dbg_checkpoint(),
|
||||
m_2pc_trans_state(Trans_Done), m_saved_register_states() {}
|
||||
virtual ~DNBArchImplI386() {}
|
||||
|
||||
static void Initialize();
|
||||
|
||||
bool GetRegisterValue(uint32_t set, uint32_t reg,
|
||||
DNBRegisterValue *value) override;
|
||||
bool SetRegisterValue(uint32_t set, uint32_t reg,
|
||||
const DNBRegisterValue *value) override;
|
||||
nub_size_t GetRegisterContext(void *buf, nub_size_t buf_len) override;
|
||||
nub_size_t SetRegisterContext(const void *buf, nub_size_t buf_len) override;
|
||||
uint32_t SaveRegisterState() override;
|
||||
bool RestoreRegisterState(uint32_t save_id) override;
|
||||
|
||||
kern_return_t GetRegisterState(int set, bool force) override;
|
||||
kern_return_t SetRegisterState(int set) override;
|
||||
bool RegisterSetStateIsValid(int set) const override;
|
||||
|
||||
uint64_t GetPC(uint64_t failValue) override; // Get program counter
|
||||
kern_return_t SetPC(uint64_t value) override;
|
||||
uint64_t GetSP(uint64_t failValue) override; // Get stack pointer
|
||||
void ThreadWillResume() override;
|
||||
bool ThreadDidStop() override;
|
||||
bool NotifyException(MachException::Data &exc) override;
|
||||
|
||||
uint32_t NumSupportedHardwareBreakpoints() override;
|
||||
uint32_t NumSupportedHardwareWatchpoints() override;
|
||||
uint32_t EnableHardwareBreakpoint(nub_addr_t addr, nub_size_t size,
|
||||
bool also_set_on_task) override;
|
||||
bool DisableHardwareBreakpoint(uint32_t hw_index,
|
||||
bool also_set_on_task) override;
|
||||
uint32_t EnableHardwareWatchpoint(nub_addr_t addr, nub_size_t size,
|
||||
bool read, bool write,
|
||||
bool also_set_on_task) override;
|
||||
bool DisableHardwareWatchpoint(uint32_t hw_break_index,
|
||||
bool also_set_on_task) override;
|
||||
uint32_t GetHardwareWatchpointHit(nub_addr_t &addr) override;
|
||||
|
||||
protected:
|
||||
kern_return_t EnableHardwareSingleStep(bool enable);
|
||||
|
||||
typedef __i386_thread_state_t GPR;
|
||||
typedef __i386_float_state_t FPU;
|
||||
typedef __i386_exception_state_t EXC;
|
||||
typedef __i386_avx_state_t AVX;
|
||||
typedef __i386_debug_state_t DBG;
|
||||
|
||||
static const DNBRegisterInfo g_gpr_registers[];
|
||||
static const DNBRegisterInfo g_fpu_registers_no_avx[];
|
||||
static const DNBRegisterInfo g_fpu_registers_avx[];
|
||||
static const DNBRegisterInfo g_exc_registers[];
|
||||
static const DNBRegisterSetInfo g_reg_sets_no_avx[];
|
||||
static const DNBRegisterSetInfo g_reg_sets_avx[];
|
||||
static const size_t k_num_gpr_registers;
|
||||
static const size_t k_num_fpu_registers_no_avx;
|
||||
static const size_t k_num_fpu_registers_avx;
|
||||
static const size_t k_num_exc_registers;
|
||||
static const size_t k_num_all_registers_no_avx;
|
||||
static const size_t k_num_all_registers_avx;
|
||||
static const size_t k_num_register_sets;
|
||||
|
||||
typedef __i386_avx512f_state_t AVX512F;
|
||||
static const DNBRegisterInfo g_fpu_registers_avx512f[];
|
||||
static const DNBRegisterSetInfo g_reg_sets_avx512f[];
|
||||
static const size_t k_num_fpu_registers_avx512f;
|
||||
static const size_t k_num_all_registers_avx512f;
|
||||
|
||||
enum RegisterSet {
|
||||
e_regSetALL = REGISTER_SET_ALL,
|
||||
e_regSetGPR,
|
||||
e_regSetFPU,
|
||||
e_regSetEXC,
|
||||
e_regSetDBG,
|
||||
kNumRegisterSets
|
||||
};
|
||||
|
||||
enum RegisterSetWordSize {
|
||||
e_regSetWordSizeGPR = sizeof(GPR) / sizeof(int),
|
||||
e_regSetWordSizeFPU = sizeof(FPU) / sizeof(int),
|
||||
e_regSetWordSizeEXC = sizeof(EXC) / sizeof(int),
|
||||
e_regSetWordSizeAVX = sizeof(AVX) / sizeof(int),
|
||||
e_regSetWordSizeAVX512f = sizeof(AVX512F) / sizeof(int),
|
||||
e_regSetWordSizeDBG = sizeof(DBG) / sizeof(int)
|
||||
};
|
||||
|
||||
enum { Read = 0, Write = 1, kNumErrors = 2 };
|
||||
|
||||
struct Context {
|
||||
GPR gpr;
|
||||
union {
|
||||
FPU no_avx;
|
||||
AVX avx;
|
||||
AVX512F avx512f;
|
||||
} fpu;
|
||||
EXC exc;
|
||||
DBG dbg;
|
||||
};
|
||||
|
||||
struct State {
|
||||
Context context;
|
||||
kern_return_t gpr_errs[2]; // Read/Write errors
|
||||
kern_return_t fpu_errs[2]; // Read/Write errors
|
||||
kern_return_t exc_errs[2]; // Read/Write errors
|
||||
kern_return_t dbg_errs[2]; // Read/Write errors
|
||||
|
||||
State() {
|
||||
uint32_t i;
|
||||
for (i = 0; i < kNumErrors; i++) {
|
||||
gpr_errs[i] = -1;
|
||||
fpu_errs[i] = -1;
|
||||
exc_errs[i] = -1;
|
||||
dbg_errs[i] = -1;
|
||||
}
|
||||
}
|
||||
void InvalidateAllRegisterStates() { SetError(e_regSetALL, Read, -1); }
|
||||
kern_return_t GetError(int flavor, uint32_t err_idx) const {
|
||||
if (err_idx < kNumErrors) {
|
||||
switch (flavor) {
|
||||
// When getting all errors, just OR all values together to see if
|
||||
// we got any kind of error.
|
||||
case e_regSetALL:
|
||||
return gpr_errs[err_idx] | fpu_errs[err_idx] | exc_errs[err_idx];
|
||||
case e_regSetGPR:
|
||||
return gpr_errs[err_idx];
|
||||
case e_regSetFPU:
|
||||
return fpu_errs[err_idx];
|
||||
case e_regSetEXC:
|
||||
return exc_errs[err_idx];
|
||||
case e_regSetDBG:
|
||||
return dbg_errs[err_idx];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
bool SetError(int flavor, uint32_t err_idx, kern_return_t err) {
|
||||
if (err_idx < kNumErrors) {
|
||||
switch (flavor) {
|
||||
case e_regSetALL:
|
||||
gpr_errs[err_idx] = fpu_errs[err_idx] = exc_errs[err_idx] =
|
||||
dbg_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetGPR:
|
||||
gpr_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetFPU:
|
||||
fpu_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetEXC:
|
||||
exc_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
case e_regSetDBG:
|
||||
dbg_errs[err_idx] = err;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool RegsAreValid(int flavor) const {
|
||||
return GetError(flavor, Read) == KERN_SUCCESS;
|
||||
}
|
||||
};
|
||||
|
||||
kern_return_t GetGPRState(bool force);
|
||||
kern_return_t GetFPUState(bool force);
|
||||
kern_return_t GetEXCState(bool force);
|
||||
kern_return_t GetDBGState(bool force);
|
||||
|
||||
kern_return_t SetGPRState();
|
||||
kern_return_t SetFPUState();
|
||||
kern_return_t SetEXCState();
|
||||
kern_return_t SetDBGState(bool also_set_on_task);
|
||||
|
||||
static DNBArchProtocol *Create(MachThread *thread);
|
||||
|
||||
static const uint8_t *SoftwareBreakpointOpcode(nub_size_t byte_size);
|
||||
|
||||
static const DNBRegisterSetInfo *GetRegisterSetInfo(nub_size_t *num_reg_sets);
|
||||
|
||||
static uint32_t GetRegisterContextSize();
|
||||
|
||||
static void SetHardwareBreakpoint(DBG &debug_state, uint32_t hw_index,
|
||||
nub_addr_t addr, nub_size_t size);
|
||||
|
||||
// Helper functions for watchpoint manipulations.
|
||||
static void SetWatchpoint(DBG &debug_state, uint32_t hw_index,
|
||||
nub_addr_t addr, nub_size_t size, bool read,
|
||||
bool write);
|
||||
static void ClearWatchpoint(DBG &debug_state, uint32_t hw_index);
|
||||
static bool IsWatchpointVacant(const DBG &debug_state, uint32_t hw_index);
|
||||
static void ClearWatchpointHits(DBG &debug_state);
|
||||
static bool IsWatchpointHit(const DBG &debug_state, uint32_t hw_index);
|
||||
static nub_addr_t GetWatchAddress(const DBG &debug_state, uint32_t hw_index);
|
||||
|
||||
bool StartTransForHWP() override;
|
||||
bool RollbackTransForHWP() override;
|
||||
bool FinishTransForHWP() override;
|
||||
DBG GetDBGCheckpoint();
|
||||
|
||||
MachThread *m_thread;
|
||||
State m_state;
|
||||
DBG m_2pc_dbg_checkpoint;
|
||||
uint32_t m_2pc_trans_state; // Is transaction of DBG state change: Pedning
|
||||
// (0), Done (1), or Rolled Back (2)?
|
||||
typedef std::map<uint32_t, Context> SaveRegisterStates;
|
||||
SaveRegisterStates m_saved_register_states;
|
||||
};
|
||||
|
||||
#endif // #if defined (__i386__) || defined (__x86_64__)
|
||||
#endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_I386_DNBARCHIMPLI386_H
|
@ -1,241 +0,0 @@
|
||||
//===-- MachRegisterStatesI386.h --------------------------------*- C++ -*-===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Created by Sean Callanan on 3/16/11.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_I386_MACHREGISTERSTATESI386_H
|
||||
#define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_I386_MACHREGISTERSTATESI386_H
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
#define __i386_THREAD_STATE 1
|
||||
#define __i386_FLOAT_STATE 2
|
||||
#define __i386_EXCEPTION_STATE 3
|
||||
#define __i386_DEBUG_STATE 10
|
||||
#define __i386_AVX_STATE 16
|
||||
#define __i386_AVX512F_STATE 19
|
||||
|
||||
typedef struct {
|
||||
uint32_t __eax;
|
||||
uint32_t __ebx;
|
||||
uint32_t __ecx;
|
||||
uint32_t __edx;
|
||||
uint32_t __edi;
|
||||
uint32_t __esi;
|
||||
uint32_t __ebp;
|
||||
uint32_t __esp;
|
||||
uint32_t __ss;
|
||||
uint32_t __eflags;
|
||||
uint32_t __eip;
|
||||
uint32_t __cs;
|
||||
uint32_t __ds;
|
||||
uint32_t __es;
|
||||
uint32_t __fs;
|
||||
uint32_t __gs;
|
||||
} __i386_thread_state_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t __invalid : 1;
|
||||
uint16_t __denorm : 1;
|
||||
uint16_t __zdiv : 1;
|
||||
uint16_t __ovrfl : 1;
|
||||
uint16_t __undfl : 1;
|
||||
uint16_t __precis : 1;
|
||||
uint16_t __PAD1 : 2;
|
||||
uint16_t __pc : 2;
|
||||
uint16_t __rc : 2;
|
||||
uint16_t __PAD2 : 1;
|
||||
uint16_t __PAD3 : 3;
|
||||
} __i386_fp_control_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t __invalid : 1;
|
||||
uint16_t __denorm : 1;
|
||||
uint16_t __zdiv : 1;
|
||||
uint16_t __ovrfl : 1;
|
||||
uint16_t __undfl : 1;
|
||||
uint16_t __precis : 1;
|
||||
uint16_t __stkflt : 1;
|
||||
uint16_t __errsumm : 1;
|
||||
uint16_t __c0 : 1;
|
||||
uint16_t __c1 : 1;
|
||||
uint16_t __c2 : 1;
|
||||
uint16_t __tos : 3;
|
||||
uint16_t __c3 : 1;
|
||||
uint16_t __busy : 1;
|
||||
} __i386_fp_status_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t __mmst_reg[10];
|
||||
uint8_t __mmst_rsrv[6];
|
||||
} __i386_mmst_reg;
|
||||
|
||||
typedef struct { uint8_t __xmm_reg[16]; } __i386_xmm_reg;
|
||||
|
||||
typedef struct {
|
||||
uint32_t __fpu_reserved[2];
|
||||
__i386_fp_control_t __fpu_fcw;
|
||||
__i386_fp_status_t __fpu_fsw;
|
||||
uint8_t __fpu_ftw;
|
||||
uint8_t __fpu_rsrv1;
|
||||
uint16_t __fpu_fop;
|
||||
uint32_t __fpu_ip;
|
||||
uint16_t __fpu_cs;
|
||||
uint16_t __fpu_rsrv2;
|
||||
uint32_t __fpu_dp;
|
||||
uint16_t __fpu_ds;
|
||||
uint16_t __fpu_rsrv3;
|
||||
uint32_t __fpu_mxcsr;
|
||||
uint32_t __fpu_mxcsrmask;
|
||||
__i386_mmst_reg __fpu_stmm0;
|
||||
__i386_mmst_reg __fpu_stmm1;
|
||||
__i386_mmst_reg __fpu_stmm2;
|
||||
__i386_mmst_reg __fpu_stmm3;
|
||||
__i386_mmst_reg __fpu_stmm4;
|
||||
__i386_mmst_reg __fpu_stmm5;
|
||||
__i386_mmst_reg __fpu_stmm6;
|
||||
__i386_mmst_reg __fpu_stmm7;
|
||||
__i386_xmm_reg __fpu_xmm0;
|
||||
__i386_xmm_reg __fpu_xmm1;
|
||||
__i386_xmm_reg __fpu_xmm2;
|
||||
__i386_xmm_reg __fpu_xmm3;
|
||||
__i386_xmm_reg __fpu_xmm4;
|
||||
__i386_xmm_reg __fpu_xmm5;
|
||||
__i386_xmm_reg __fpu_xmm6;
|
||||
__i386_xmm_reg __fpu_xmm7;
|
||||
uint8_t __fpu_rsrv4[14 * 16];
|
||||
uint32_t __fpu_reserved1;
|
||||
} __i386_float_state_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t __fpu_reserved[2];
|
||||
__i386_fp_control_t __fpu_fcw;
|
||||
__i386_fp_status_t __fpu_fsw;
|
||||
uint8_t __fpu_ftw;
|
||||
uint8_t __fpu_rsrv1;
|
||||
uint16_t __fpu_fop;
|
||||
uint32_t __fpu_ip;
|
||||
uint16_t __fpu_cs;
|
||||
uint16_t __fpu_rsrv2;
|
||||
uint32_t __fpu_dp;
|
||||
uint16_t __fpu_ds;
|
||||
uint16_t __fpu_rsrv3;
|
||||
uint32_t __fpu_mxcsr;
|
||||
uint32_t __fpu_mxcsrmask;
|
||||
__i386_mmst_reg __fpu_stmm0;
|
||||
__i386_mmst_reg __fpu_stmm1;
|
||||
__i386_mmst_reg __fpu_stmm2;
|
||||
__i386_mmst_reg __fpu_stmm3;
|
||||
__i386_mmst_reg __fpu_stmm4;
|
||||
__i386_mmst_reg __fpu_stmm5;
|
||||
__i386_mmst_reg __fpu_stmm6;
|
||||
__i386_mmst_reg __fpu_stmm7;
|
||||
__i386_xmm_reg __fpu_xmm0;
|
||||
__i386_xmm_reg __fpu_xmm1;
|
||||
__i386_xmm_reg __fpu_xmm2;
|
||||
__i386_xmm_reg __fpu_xmm3;
|
||||
__i386_xmm_reg __fpu_xmm4;
|
||||
__i386_xmm_reg __fpu_xmm5;
|
||||
__i386_xmm_reg __fpu_xmm6;
|
||||
__i386_xmm_reg __fpu_xmm7;
|
||||
uint8_t __fpu_rsrv4[14 * 16];
|
||||
uint32_t __fpu_reserved1;
|
||||
uint8_t __avx_reserved1[64];
|
||||
__i386_xmm_reg __fpu_ymmh0;
|
||||
__i386_xmm_reg __fpu_ymmh1;
|
||||
__i386_xmm_reg __fpu_ymmh2;
|
||||
__i386_xmm_reg __fpu_ymmh3;
|
||||
__i386_xmm_reg __fpu_ymmh4;
|
||||
__i386_xmm_reg __fpu_ymmh5;
|
||||
__i386_xmm_reg __fpu_ymmh6;
|
||||
__i386_xmm_reg __fpu_ymmh7;
|
||||
} __i386_avx_state_t;
|
||||
|
||||
typedef struct { uint8_t __ymm_reg[32]; } __i386_ymm_reg;
|
||||
typedef struct { uint8_t __opmask_reg[8]; } __i386_opmask_reg;
|
||||
|
||||
typedef struct {
|
||||
uint32_t __fpu_reserved[2];
|
||||
__i386_fp_control_t __fpu_fcw;
|
||||
__i386_fp_status_t __fpu_fsw;
|
||||
uint8_t __fpu_ftw;
|
||||
uint8_t __fpu_rsrv1;
|
||||
uint16_t __fpu_fop;
|
||||
uint32_t __fpu_ip;
|
||||
uint16_t __fpu_cs;
|
||||
uint16_t __fpu_rsrv2;
|
||||
uint32_t __fpu_dp;
|
||||
uint16_t __fpu_ds;
|
||||
uint16_t __fpu_rsrv3;
|
||||
uint32_t __fpu_mxcsr;
|
||||
uint32_t __fpu_mxcsrmask;
|
||||
__i386_mmst_reg __fpu_stmm0;
|
||||
__i386_mmst_reg __fpu_stmm1;
|
||||
__i386_mmst_reg __fpu_stmm2;
|
||||
__i386_mmst_reg __fpu_stmm3;
|
||||
__i386_mmst_reg __fpu_stmm4;
|
||||
__i386_mmst_reg __fpu_stmm5;
|
||||
__i386_mmst_reg __fpu_stmm6;
|
||||
__i386_mmst_reg __fpu_stmm7;
|
||||
__i386_xmm_reg __fpu_xmm0;
|
||||
__i386_xmm_reg __fpu_xmm1;
|
||||
__i386_xmm_reg __fpu_xmm2;
|
||||
__i386_xmm_reg __fpu_xmm3;
|
||||
__i386_xmm_reg __fpu_xmm4;
|
||||
__i386_xmm_reg __fpu_xmm5;
|
||||
__i386_xmm_reg __fpu_xmm6;
|
||||
__i386_xmm_reg __fpu_xmm7;
|
||||
uint8_t __fpu_rsrv4[14 * 16];
|
||||
uint32_t __fpu_reserved1;
|
||||
uint8_t __avx_reserved1[64];
|
||||
__i386_xmm_reg __fpu_ymmh0;
|
||||
__i386_xmm_reg __fpu_ymmh1;
|
||||
__i386_xmm_reg __fpu_ymmh2;
|
||||
__i386_xmm_reg __fpu_ymmh3;
|
||||
__i386_xmm_reg __fpu_ymmh4;
|
||||
__i386_xmm_reg __fpu_ymmh5;
|
||||
__i386_xmm_reg __fpu_ymmh6;
|
||||
__i386_xmm_reg __fpu_ymmh7;
|
||||
__i386_opmask_reg __fpu_k0;
|
||||
__i386_opmask_reg __fpu_k1;
|
||||
__i386_opmask_reg __fpu_k2;
|
||||
__i386_opmask_reg __fpu_k3;
|
||||
__i386_opmask_reg __fpu_k4;
|
||||
__i386_opmask_reg __fpu_k5;
|
||||
__i386_opmask_reg __fpu_k6;
|
||||
__i386_opmask_reg __fpu_k7;
|
||||
__i386_ymm_reg __fpu_zmmh0;
|
||||
__i386_ymm_reg __fpu_zmmh1;
|
||||
__i386_ymm_reg __fpu_zmmh2;
|
||||
__i386_ymm_reg __fpu_zmmh3;
|
||||
__i386_ymm_reg __fpu_zmmh4;
|
||||
__i386_ymm_reg __fpu_zmmh5;
|
||||
__i386_ymm_reg __fpu_zmmh6;
|
||||
__i386_ymm_reg __fpu_zmmh7;
|
||||
} __i386_avx512f_state_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t __trapno;
|
||||
uint32_t __err;
|
||||
uint32_t __faultvaddr;
|
||||
} __i386_exception_state_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t __dr0;
|
||||
uint32_t __dr1;
|
||||
uint32_t __dr2;
|
||||
uint32_t __dr3;
|
||||
uint32_t __dr4;
|
||||
uint32_t __dr5;
|
||||
uint32_t __dr6;
|
||||
uint32_t __dr7;
|
||||
} __i386_debug_state_t;
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user