Skip to content

Commit 0347834

Browse files
committed
+ Added convenience members to DisassembleMode enumeration
+ Fixed stupid bug in solution file where "debug" mode was actually "release" mode + Updated example command line application
1 parent e21e76b commit 0347834

File tree

3 files changed

+36
-9
lines changed

3 files changed

+36
-9
lines changed

Capstone.NET.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ Global
1919
.NET4Release|x86 = .NET4Release|x86
2020
EndGlobalSection
2121
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22-
{1297DCEE-009D-4739-8124-3F064EA9EA10}..NET4Debug|x86.ActiveCfg = .NET45Release|x86
23-
{1297DCEE-009D-4739-8124-3F064EA9EA10}..NET4Debug|x86.Build.0 = .NET45Release|x86
22+
{1297DCEE-009D-4739-8124-3F064EA9EA10}..NET4Debug|x86.ActiveCfg = .NET45Debug|x86
23+
{1297DCEE-009D-4739-8124-3F064EA9EA10}..NET4Debug|x86.Build.0 = .NET45Debug|x86
2424
{1297DCEE-009D-4739-8124-3F064EA9EA10}..NET4Release|x86.ActiveCfg = .NET45Release|x86
2525
{1297DCEE-009D-4739-8124-3F064EA9EA10}..NET4Release|x86.Build.0 = .NET45Release|x86
26-
{7D755424-C594-4605-820D-9AF880E091BC}..NET4Debug|x86.ActiveCfg = .NET45Release|x86
27-
{7D755424-C594-4605-820D-9AF880E091BC}..NET4Debug|x86.Build.0 = .NET45Release|x86
26+
{7D755424-C594-4605-820D-9AF880E091BC}..NET4Debug|x86.ActiveCfg = .NET45Debug|x86
27+
{7D755424-C594-4605-820D-9AF880E091BC}..NET4Debug|x86.Build.0 = .NET45Debug|x86
2828
{7D755424-C594-4605-820D-9AF880E091BC}..NET4Release|x86.ActiveCfg = .NET45Release|x86
2929
{7D755424-C594-4605-820D-9AF880E091BC}..NET4Release|x86.Build.0 = .NET45Release|x86
30-
{D1A6EC03-1420-4516-8548-4117A18DA8B3}..NET4Debug|x86.ActiveCfg = .NET45Release|x86
31-
{D1A6EC03-1420-4516-8548-4117A18DA8B3}..NET4Debug|x86.Build.0 = .NET45Release|x86
30+
{D1A6EC03-1420-4516-8548-4117A18DA8B3}..NET4Debug|x86.ActiveCfg = .NET45Debug|x86
31+
{D1A6EC03-1420-4516-8548-4117A18DA8B3}..NET4Debug|x86.Build.0 = .NET45Debug|x86
3232
{D1A6EC03-1420-4516-8548-4117A18DA8B3}..NET4Release|x86.ActiveCfg = .NET45Release|x86
3333
{D1A6EC03-1420-4516-8548-4117A18DA8B3}..NET4Release|x86.Build.0 = .NET45Release|x86
3434
{D8E7BF01-1424-4312-AF14-982E7DA9B9BC}..NET4Debug|x86.ActiveCfg = .NET4Debug|x86

CapstoneCMD/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal static void Main(string[] args) {
3838
Program.ShowArm(DisassembleMode.ArmThumb);
3939
break;
4040
case "ARM32-Thumb-MClass":
41-
Program.ShowArm((int) DisassembleMode.ArmThumb + DisassembleMode.ArmCortexM);
41+
Program.ShowArm(DisassembleMode.ArmThumbArmCortexM);
4242
break;
4343
case "ARM64":
4444
Program.ShowArm64();
@@ -82,7 +82,7 @@ internal static void ShowArm(DisassembleMode mode) {
8282
case DisassembleMode.ArmThumb:
8383
code = new byte[] { 0x70, 0x47, 0xeb, 0x46, 0x83, 0xb0, 0xc9, 0x68, 0x1f, 0xb1, 0x30, 0xbf, 0xaf, 0xf3, 0x20, 0x84 };
8484
break;
85-
case (int) DisassembleMode.ArmThumb + DisassembleMode.ArmCortexM:
85+
case DisassembleMode.ArmThumbArmCortexM:
8686
code = new byte[] { 0xef, 0xf3, 0x02, 0x80 };
8787
break;
8888
}

Gee.External.Capstone/DisassembleMode.cs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,33 @@ public enum DisassembleMode {
8484
/// <summary>
8585
/// MIPS-64 Disassemble Mode.
8686
/// </summary>
87-
Mips64 = Bit64
87+
Mips64 = Bit64,
88+
89+
/// <summary>
90+
/// 32-Bit ARM + ARMv8 Disassemble Mode.
91+
/// </summary>
92+
/// <remarks>
93+
/// Represents a disassemble mode consisting of 32-Bit ARM + ARMv8. This enumeration member is not natively
94+
/// defined by the Capstone API and is provided for convenience.
95+
/// </remarks>
96+
Arm32ArmV8 = Arm32 + ArmV8,
97+
98+
/// <summary>
99+
/// ARM Thumb + ARM Cortex-M Disassemble Mode.
100+
/// </summary>
101+
/// <remarks>
102+
/// Represents a disassemble mode consisting of ARM Thumb + ARM Cortex-M. This enumeration member is not
103+
/// natively defined by the Capstone API and is provided for convenience.
104+
/// </remarks>
105+
ArmThumbArmCortexM = ArmThumb + ArmCortexM,
106+
107+
/// <summary>
108+
/// 32-Bit ARM + Big Endian Disassemble Mode.
109+
/// </summary>
110+
/// <remarks>
111+
/// Represents a disassemble mode consisting of 32-Bit ARM + Big Endian. This enumeration member is not
112+
/// natively defined by the Capstone API and is provided for convenience.
113+
/// </remarks>
114+
Arm32BigEndian = Arm32 + BigEndian
88115
}
89116
}

0 commit comments

Comments
 (0)