Commit f76f133b authored by Jonathan Callen's avatar Jonathan Callen Committed by Linus Torvalds

Documentation: update java sample wrapper for java 7

The sample wrapper currently fails on some Java 7 .class files.  This
updates the wrapper to properly handle those files.
Signed-off-by: default avatarJonathan Callen <jcallen@gentoo.org>
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f9a0974d
...@@ -188,6 +188,9 @@ shift ...@@ -188,6 +188,9 @@ shift
#define CP_METHODREF 10 #define CP_METHODREF 10
#define CP_INTERFACEMETHODREF 11 #define CP_INTERFACEMETHODREF 11
#define CP_NAMEANDTYPE 12 #define CP_NAMEANDTYPE 12
#define CP_METHODHANDLE 15
#define CP_METHODTYPE 16
#define CP_INVOKEDYNAMIC 18
/* Define some commonly used error messages */ /* Define some commonly used error messages */
...@@ -242,14 +245,19 @@ void skip_constant(FILE *classfile, u_int16_t *cur) ...@@ -242,14 +245,19 @@ void skip_constant(FILE *classfile, u_int16_t *cur)
break; break;
case CP_CLASS: case CP_CLASS:
case CP_STRING: case CP_STRING:
case CP_METHODTYPE:
seekerr = fseek(classfile, 2, SEEK_CUR); seekerr = fseek(classfile, 2, SEEK_CUR);
break; break;
case CP_METHODHANDLE:
seekerr = fseek(classfile, 3, SEEK_CUR);
break;
case CP_INTEGER: case CP_INTEGER:
case CP_FLOAT: case CP_FLOAT:
case CP_FIELDREF: case CP_FIELDREF:
case CP_METHODREF: case CP_METHODREF:
case CP_INTERFACEMETHODREF: case CP_INTERFACEMETHODREF:
case CP_NAMEANDTYPE: case CP_NAMEANDTYPE:
case CP_INVOKEDYNAMIC:
seekerr = fseek(classfile, 4, SEEK_CUR); seekerr = fseek(classfile, 4, SEEK_CUR);
break; break;
case CP_LONG: case CP_LONG:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment