aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorchibash <chiba@javassist.org>2014-07-23 19:15:11 +0900
committerchibash <chiba@javassist.org>2014-07-23 19:15:11 +0900
commit7497ae88e9644826568aa3b927f314804e4fc021 (patch)
tree200e45cf47db63cc07ffbe4e704e506376eaeca3 /src
parent3daf2b308683ea53ab52950438efe33c41b83f7f (diff)
downloadjavassist-7497ae88e9644826568aa3b927f314804e4fc021.tar.gz
javassist-7497ae88e9644826568aa3b927f314804e4fc021.zip
fixed JIRA-227
Diffstat (limited to 'src')
-rw-r--r--src/main/javassist/bytecode/CodeIterator.java5
-rw-r--r--src/main/javassist/bytecode/InstructionPrinter.java2
-rw-r--r--src/main/javassist/tools/framedump.java2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/main/javassist/bytecode/CodeIterator.java b/src/main/javassist/bytecode/CodeIterator.java
index a1d882e0..e1edcbb7 100644
--- a/src/main/javassist/bytecode/CodeIterator.java
+++ b/src/main/javassist/bytecode/CodeIterator.java
@@ -127,6 +127,11 @@ public class CodeIterator implements Opcode {
public int byteAt(int index) { return bytecode[index] & 0xff; }
/**
+ * Returns the signed 8bit value at the given index.
+ */
+ public int signedByteAt(int index) { return bytecode[index]; }
+
+ /**
* Writes an 8bit value at the given index.
*/
public void writeByte(int value, int index) {
diff --git a/src/main/javassist/bytecode/InstructionPrinter.java b/src/main/javassist/bytecode/InstructionPrinter.java
index 12f74d5b..93182baa 100644
--- a/src/main/javassist/bytecode/InstructionPrinter.java
+++ b/src/main/javassist/bytecode/InstructionPrinter.java
@@ -116,7 +116,7 @@ public class InstructionPrinter implements Opcode {
case IF_ICMPNE:
return opstring + " " + (iter.s16bitAt(pos + 1) + pos);
case IINC:
- return opstring + " " + iter.byteAt(pos + 1);
+ return opstring + " " + iter.byteAt(pos + 1) + ", " + iter.signedByteAt(pos + 2);
case GOTO:
case JSR:
return opstring + " " + (iter.s16bitAt(pos + 1) + pos);
diff --git a/src/main/javassist/tools/framedump.java b/src/main/javassist/tools/framedump.java
index 95329111..43a2beb6 100644
--- a/src/main/javassist/tools/framedump.java
+++ b/src/main/javassist/tools/framedump.java
@@ -36,7 +36,7 @@ public class framedump {
*/
public static void main(String[] args) throws Exception {
if (args.length != 1) {
- System.err.println("Usage: java javassist.tools.framedump <class file name>");
+ System.err.println("Usage: java javassist.tools.framedump <fully-qualified class name>");
return;
}