MCPcopy Create free account
hub / github.com/capstone-engine/capstone / usage

Function usage

cstool/cstool.c:178–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178static void usage(char *prog)
179{
180 printf("Cstool for Capstone Disassembler Engine v%u.%u.%u\n\n", CS_VERSION_MAJOR, CS_VERSION_MINOR, CS_VERSION_EXTRA);
181 printf("Syntax: %s [-d|-s|-u|-v] <arch+mode> <assembly-hexstring> [start-address-in-hex-format]\n", prog);
182 printf("\nThe following <arch+mode> options are supported:\n");
183
184 if (cs_support(CS_ARCH_X86)) {
185 printf(" x16 16-bit mode (X86)\n");
186 printf(" x32 32-bit mode (X86)\n");
187 printf(" x64 64-bit mode (X86)\n");
188 printf(" x16att 16-bit mode (X86), syntax AT&T\n");
189 printf(" x32att 32-bit mode (X86), syntax AT&T\n");
190 printf(" x64att 64-bit mode (X86), syntax AT&T\n");
191 }
192
193 if (cs_support(CS_ARCH_ARM)) {
194 printf(" arm arm\n");
195 printf(" armbe arm + big endian\n");
196 printf(" thumb thumb mode\n");
197 printf(" thumbbe thumb + big endian\n");
198 printf(" cortexm thumb + cortex-m extensions\n");
199 printf(" armv8 arm v8\n");
200 printf(" thumbv8 thumb v8\n");
201 printf(" armv8be arm v8 + big endian\n");
202 printf(" thumbv8be thumb v8 + big endian\n");
203 }
204
205 if (cs_support(CS_ARCH_ARM64)) {
206 printf(" arm64 aarch64 mode\n");
207 printf(" arm64be aarch64 + big endian\n");
208 }
209
210 if (cs_support(CS_ARCH_MIPS)) {
211 printf(" mips mips32 + little endian\n");
212 printf(" mipsbe mips32 + big endian\n");
213 printf(" mips64 mips64 + little endian\n");
214 printf(" mips64be mips64 + big endian\n");
215 }
216
217 if (cs_support(CS_ARCH_PPC)) {
218 printf(" ppc32 ppc32 + little endian\n");
219 printf(" ppc32be ppc32 + big endian\n");
220 printf(" ppc32qpx ppc32 + qpx + little endian\n");
221 printf(" ppc32beqpx ppc32 + qpx + big endian\n");
222 printf(" ppc32ps ppc32 + ps + little endian\n");
223 printf(" ppc32beps ppc32 + ps + big endian\n");
224 printf(" ppc64 ppc64 + little endian\n");
225 printf(" ppc64be ppc64 + big endian\n");
226 printf(" ppc64qpx ppc64 + qpx + little endian\n");
227 printf(" ppc64beqpx ppc64 + qpx + big endian\n");
228 }
229
230 if (cs_support(CS_ARCH_SPARC)) {
231 printf(" sparc sparc\n");
232 }
233
234 if (cs_support(CS_ARCH_SYSZ)) {
235 printf(" systemz systemz (s390x)\n");

Callers 1

mainFunction · 0.85

Calls 2

printfFunction · 0.50
cs_supportFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…