[Lldb-commits] [lldb] r124131 - in /lldb/trunk: lldb.xcodeproj/project.pbxproj source/Plugins/Process/Utility/ARMUtils.h source/Plugins/Process/Utility/EmulateInstructionARM.cpp
Johnny Chen
johnny.chen at apple.com
Mon Jan 24 10:24:53 PST 2011
Author: johnny
Date: Mon Jan 24 12:24:53 2011
New Revision: 124131
URL: http://llvm.org/viewvc/llvm-project?rev=124131&view=rev
Log:
Add an ARMUtils.h file to house utility functions for the ARM/Thumb Instruction Set Architecture.
Added:
lldb/trunk/source/Plugins/Process/Utility/ARMUtils.h
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=124131&r1=124130&r2=124131&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Jan 24 12:24:53 2011
@@ -383,6 +383,7 @@
AF68D2561255416E002FF25B /* RegisterContextLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D2541255416E002FF25B /* RegisterContextLLDB.cpp */; };
AF68D3311255A111002FF25B /* UnwindLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */; };
AF94005911C03F6500085DB9 /* SymbolVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF94005711C03F6500085DB9 /* SymbolVendor.cpp */; };
+ B23DD25012EDFAC1000C3894 /* ARMUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B23DD24F12EDFAC1000C3894 /* ARMUtils.h */; };
B296983712C2FB98002D92C3 /* CommandObjectVersion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */; };
/* End PBXBuildFile section */
@@ -1094,6 +1095,7 @@
AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindLLDB.cpp; path = Utility/UnwindLLDB.cpp; sourceTree = "<group>"; };
AF68D3301255A110002FF25B /* UnwindLLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindLLDB.h; path = Utility/UnwindLLDB.h; sourceTree = "<group>"; };
AF94005711C03F6500085DB9 /* SymbolVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolVendor.cpp; path = source/Symbol/SymbolVendor.cpp; sourceTree = "<group>"; };
+ B23DD24F12EDFAC1000C3894 /* ARMUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMUtils.h; path = Utility/ARMUtils.h; sourceTree = "<group>"; };
B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectVersion.cpp; path = source/Commands/CommandObjectVersion.cpp; sourceTree = "<group>"; };
B296983512C2FB2B002D92C3 /* CommandObjectVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectVersion.h; path = source/Commands/CommandObjectVersion.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -1609,6 +1611,7 @@
26B4666E11A2080F00CF6220 /* Utility */ = {
isa = PBXGroup;
children = (
+ B23DD24F12EDFAC1000C3894 /* ARMUtils.h */,
2621C9CC12EA009300711A30 /* EmulateInstruction.h */,
2621CA0A12EA107700711A30 /* EmulateInstruction.cpp */,
2621C9CF12EA066500711A30 /* EmulateInstructionARM.h */,
@@ -2313,6 +2316,7 @@
4C7CF7E41295E10E00B4FBB5 /* ThreadPlanCallUserExpression.h in Headers */,
2621C9CE12EA009300711A30 /* EmulateInstruction.h in Headers */,
2621C9D012EA066500711A30 /* EmulateInstructionARM.h in Headers */,
+ B23DD25012EDFAC1000C3894 /* ARMUtils.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Added: lldb/trunk/source/Plugins/Process/Utility/ARMUtils.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/ARMUtils.h?rev=124131&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/ARMUtils.h (added)
+++ lldb/trunk/source/Plugins/Process/Utility/ARMUtils.h Mon Jan 24 12:24:53 2011
@@ -0,0 +1,23 @@
+//===-- lldb_ARMUtils.h -----------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef lldb_ARMUtils_h_
+#define lldb_ARMUtils_h_
+
+// Utility functions for the ARM/Thumb Instruction Set Architecture.
+
+namespace lldb_private {
+
+// This function performs the check for the register numbers 13 and 15 that are
+// not permitted for many Thumb register specifiers.
+static inline bool BadReg(uint32_t n) { return n == 13 || n == 15; }
+
+} // namespace lldb_private
+
+#endif // lldb_ARMUtils_h_
Modified: lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp?rev=124131&r1=124130&r2=124131&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp Mon Jan 24 12:24:53 2011
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "EmulateInstructionARM.h"
+#include "ARMUtils.h"
using namespace lldb;
using namespace lldb_private;
@@ -80,6 +81,7 @@
eEncodingT5,
} ARMEncoding;
+// Typedef for the callback function used during the emulation.
// Pass along (ARMEncoding)encoding as the callback data.
typedef bool (*EmulateCallback) (EmulateInstructionARM *emulator, ARMEncoding encoding);
More information about the lldb-commits
mailing list