JVM
|
#include "debugging.h"
#include <string.h>
#include <inttypes.h>
#include "readfunctions.h"
#include "constantpool.h"
#include "utf8.h"
Functions | |
char | readConstantPool_Class (JavaClass *jc, cp_info *entry) |
Reads a cp_info of type CONSTANT_Class from the file. More... | |
char | readConstantPool_Fieldref (JavaClass *jc, cp_info *entry) |
Reads a cp_info of type CONSTANT_Fieldref from the file. More... | |
char | readConstantPool_Integer (JavaClass *jc, cp_info *entry) |
Reads a cp_info of type CONSTANT_Integer from the file. More... | |
char | readConstantPool_Long (JavaClass *jc, cp_info *entry) |
Reads a cp_info of type CONSTANT_Long from the file. More... | |
char | readConstantPool_Utf8 (JavaClass *jc, cp_info *entry) |
Reads a cp_info of type CONSTANT_Utf8 from the file. More... | |
char | readConstantPoolEntry (JavaClass *jc, cp_info *entry) |
Reads a cp_info from the file. More... | |
const char * | decodeTag (uint8_t tag) |
Decodes ConstantPoolTag enumeration elements. More... | |
void | printConstantPoolEntry (JavaClass *jc, cp_info *entry) |
Print one single constant from the constant pool. More... | |
void | printConstantPool (JavaClass *jc) |
Function to print all the constants from the constant pool of the class file. More... | |
const char* decodeTag | ( | uint8_t | tag | ) |
Decodes ConstantPoolTag enumeration elements.
uint8_t | tag - identifier of the enumeration to be translated. |
void printConstantPool | ( | JavaClass * | jc | ) |
Print one single constant from the constant pool.
JavaClass* | jc - pointer to JavaClass structure that must already be loaded, no checks are made. |
*entry | - the pointer to the constant that will be printed. |
Reads a cp_info of type CONSTANT_Class from the file.
Reads a cp_info of type CONSTANT_Class from the file Data read is written to pointer *entry. CONSTANT_Class has the same structure as CONSTANT_String, so this function could be used to read that too.
JavaClass* | jc - pointer to the structure to be read. |
cp_info* | entry - where the data read is written |
Reads a cp_info of type CONSTANT_Fieldref from the file.
CONSTANT_Fieldref has the same internal structure as CONSTANT_Methodref CONSTANT_InterfaceMethodref and CONSTANT_NameAndType, so this function can be also used to read those.
JavaClass* | jc - pointer to the structure to be read. |
cp_info* | entry - where the data read is written |
Reads a cp_info of type CONSTANT_Integer from the file.
CONSTANT_Integer has the same structure as CONSTANT_Float, so this function could be used to read that too.
JavaClass* | jc - pointer to the structure to be read. |
cp_info* | entry - where the data read is written |
Reads a cp_info of type CONSTANT_Long from the file.
CONSTANT_Long has the same structure as CONSTANT_Double, so this function could be used to read that too.
JavaClass* | jc - pointer to the structure to be read. |
cp_info* | entry - where the data read is written |
Reads a cp_info of type CONSTANT_Utf8 from the file.
JavaClass* | jc - pointer to the structure to be read. |
cp_info* | entry - where the data read is written |
Reads a cp_info from the file.
This function identifies the structure indicated by the tag byte and selects the corresponding reading type
JavaClass* | jc - pointer to the structure to be read. |
cp_info* | entry - where the data read is written |