diff options
author | Dan Bornstein <danfuzz@android.com> | 2010-12-02 12:45:00 -0800 |
---|---|---|
committer | Dan Bornstein <danfuzz@android.com> | 2010-12-02 15:13:46 -0800 |
commit | e485276c6ba778cafa373b3b5c867f84e91b0bfd (patch) | |
tree | 9ac49d973c691964ff51f03e79a9d01f1e71d000 /dexdump | |
parent | 0c1af6d7e3176545b249338d782f886931948c86 (diff) | |
download | android_dalvik-e485276c6ba778cafa373b3b5c867f84e91b0bfd.tar.gz android_dalvik-e485276c6ba778cafa373b3b5c867f84e91b0bfd.tar.bz2 android_dalvik-e485276c6ba778cafa373b3b5c867f84e91b0bfd.zip |
Rename some instruction/opcode types and utilities.
A lot of this is more about properties of opcodes as opposed to
inspecting instructions per se, and the new naming attempts to
make it clear what is being queried and what sort of data is being
returned.
Change-Id: Ice6f9f2ebf4f1cfa8c99597419aa13d1134a33b2
Diffstat (limited to 'dexdump')
-rw-r--r-- | dexdump/DexDump.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dexdump/DexDump.c b/dexdump/DexDump.c index 257d63fa8..bc18213b8 100644 --- a/dexdump/DexDump.c +++ b/dexdump/DexDump.c @@ -708,7 +708,7 @@ static char* indexString(DexFile* pDexFile, u4 width; /* TODO: Make the index *always* be in field B, to simplify this code. */ - switch (dexGetInstrFormat(pDecInsn->opcode)) { + switch (dexGetFormatFromOpcode(pDecInsn->opcode)) { case kFmt20bc: case kFmt21c: case kFmt35c: @@ -880,7 +880,7 @@ void dumpInstruction(DexFile* pDexFile, const DexCode* pCode, int insnIdx, indexBufChars, sizeof(indexBufChars)); } - switch (dexGetInstrFormat(pDecInsn->opcode)) { + switch (dexGetFormatFromOpcode(pDecInsn->opcode)) { case kFmt10x: // op break; case kFmt12x: // op vA, vB @@ -1075,11 +1075,11 @@ void dumpBytecodes(DexFile* pDexFile, const DexMethod* pDexMethod) /* * Note: This code parallels the function - * dexGetInstrOrTableWidth() in InstrUtils.c, but this version + * dexGetWidthFromInstruction() in InstrUtils.c, but this version * can deal with data in either endianness. * * TODO: Figure out if this really matters, and possibly change - * this to just use dexGetInstrOrTableWidth(). + * this to just use dexGetWidthFromInstruction(). */ instr = get2LE((const u1*)insns); if (instr == kPackedSwitchSignature) { @@ -1094,7 +1094,7 @@ void dumpBytecodes(DexFile* pDexFile, const DexMethod* pDexMethod) insnWidth = 4 + ((size * width) + 1) / 2; } else { Opcode opcode = dexOpcodeFromCodeUnit(instr); - insnWidth = dexGetInstrWidth(opcode); + insnWidth = dexGetWidthFromOpcode(opcode); if (insnWidth == 0) { fprintf(stderr, "GLITCH: zero-width instruction at idx=0x%04x\n", insnIdx); |