Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
#include <rz_util.h>
#include <rz_bin.h>
#include <rz_demangler.h>
#include "class_attribute.h"
#include "class_const_pool.h"
#include "class_field.h"
#include "class_interface.h"
#include "class_method.h"
Go to the source code of this file.
Classes | |
struct | java_class_t |
Macros | |
#define | ACCESS_FLAG_MASK_ALL (0xFFFF) |
#define | ACCESS_FLAG_MASK_ALL_NO_SUPER ((~ACCESS_FLAG_SUPER) & ACCESS_FLAG_MASK_ALL) |
Typedefs | |
typedef struct java_class_t | RzBinJavaClass |
Enumerations | |
enum | ClassAccessFlag { ACCESS_FLAG_PUBLIC = 0x0001 , ACCESS_FLAG_PRIVATE = 0x0002 , ACCESS_FLAG_PROTECTED = 0x0004 , ACCESS_FLAG_STATIC = 0x0008 , ACCESS_FLAG_FINAL = 0x0010 , ACCESS_FLAG_SUPER = 0x0020 , ACCESS_FLAG_BRIDGE = 0x0040 , ACCESS_FLAG_VARARGS = 0x0080 , ACCESS_FLAG_NATIVE = 0x0100 , ACCESS_FLAG_INTERFACE = 0x0200 , ACCESS_FLAG_ABSTRACT = 0x0400 , ACCESS_FLAG_STRICT = 0x0800 , ACCESS_FLAG_SYNTHETIC = 0x1000 , ACCESS_FLAG_ANNOTATION = 0x2000 , ACCESS_FLAG_ENUM = 0x4000 , ACCESS_FLAG_MODULE = 0x8000 } |
#define ACCESS_FLAG_MASK_ALL (0xFFFF) |
Definition at line 36 of file class_bin.h.
#define ACCESS_FLAG_MASK_ALL_NO_SUPER ((~ACCESS_FLAG_SUPER) & ACCESS_FLAG_MASK_ALL) |
Definition at line 37 of file class_bin.h.
typedef struct java_class_t RzBinJavaClass |
enum ClassAccessFlag |
Definition at line 17 of file class_bin.h.
RZ_API ut32 rz_bin_java_class_access_flags | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Definition at line 477 of file class_bin.c.
References rz_return_val_if_fail.
Referenced by classes().
RZ_API RZ_OWN char* rz_bin_java_class_access_flags_readable | ( | RZ_NONNULL RzBinJavaClass * | bin, |
ut16 | mask | ||
) |
Returns the readable class access flags.
Definition at line 485 of file class_bin.c.
References access_flags_list, CLASS_ACCESS_FLAGS_SIZE, access_flags_readable_t::flag, i, mask, NULL, access_flags_readable_t::readable, rz_return_val_if_fail, rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_new(), and sb.
Referenced by classes(), rz_bin_java_class_as_json(), rz_bin_java_class_as_source_code(), and rz_bin_java_class_as_text().
RZ_API void rz_bin_java_class_as_json | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL PJ * | j | ||
) |
Returns the class info as json.
Definition at line 521 of file class_bin.c.
References ACCESS_FLAG_MASK_ALL, java_attribute_t::attribute_length, java_attribute_t::attribute_name_index, free(), i, java_class_constant_pool_stringify_at(), NULL, java_attribute_t::offset, pj_end(), pj_k(), pj_ka(), pj_kn(), pj_ko(), pj_ks(), pj_o(), rz_bin_java_class_access_flags_readable(), rz_bin_java_class_const_pool_as_json(), rz_bin_java_class_fields_as_json(), rz_bin_java_class_interfaces_as_json(), rz_bin_java_class_methods_as_json(), rz_bin_java_class_name(), rz_bin_java_class_super(), rz_bin_java_class_version(), rz_return_if_fail, and autogen_x86imm::tmp.
Referenced by rz_cmd_javac_handler().
RZ_API RZ_OWN RzList* rz_bin_java_class_as_libraries | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<char*> containing the class libraries.
Definition at line 1846 of file class_bin.c.
References compare_strings(), CONSTANT_POOL_CLASS, free(), i, java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_is_import(), java_constant_pool_resolve(), list(), NULL, rz_list_append(), rz_list_find(), rz_list_newf(), RZ_LOG_ERROR, rz_return_val_if_fail, java_constant_pool_t::tag, and autogen_x86imm::tmp.
Referenced by libs(), and rz_bin_java_class_as_source_code().
RZ_API RZ_OWN RzList* rz_bin_java_class_as_sections | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinSection*> containing the class sections.
Definition at line 1718 of file class_bin.c.
References java_attribute_t::attribute_length, ATTRIBUTE_TYPE_CODE, java_method_t::attributes, java_method_t::attributes_count, java_attribute_code_t::code_offset, compare_section_names(), free(), i, if(), java_attribute_t::info, java_class_constant_pool_stringify_at(), k, java_field_t::name_index, java_method_t::name_index, new_section(), NULL, java_field_t::offset, java_method_t::offset, rz_list_append(), rz_list_find(), rz_list_newf(), RZ_PERM_R, RZ_PERM_X, rz_return_val_if_fail, rz_warn_if_reached, section_free(), sections(), snprintf, autogen_x86imm::tmp, java_attribute_t::type, and ut64().
Referenced by sections().
RZ_API void rz_bin_java_class_as_source_code | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL RzStrBuf * | sb | ||
) |
Returns the class info as text source code.
Definition at line 708 of file class_bin.c.
References ACCESS_FLAG_MASK_SRC, ACCESS_FLAG_SUPER, desc, java_field_t::descriptor_index, java_method_t::descriptor_index, free(), i, java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_resolve(), java_field_access_flags_readable(), java_method_access_flags_readable(), k, list(), java_field_t::name_index, java_method_t::name_index, NULL, rz_bin_java_class_access_flags_readable(), rz_bin_java_class_as_libraries(), rz_bin_java_class_name(), rz_bin_java_class_super(), rz_demangler_java(), RZ_FREE, rz_list_free(), rz_list_length(), RZ_LOG_ERROR, rz_return_if_fail, rz_str_newf(), rz_str_replace_char(), rz_strbuf_append(), rz_strbuf_appendf(), sb, strdup(), and autogen_x86imm::tmp.
Referenced by rz_cmd_javas_handler().
RZ_API void rz_bin_java_class_as_text | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL RzStrBuf * | sb | ||
) |
Returns the class info as text.
Definition at line 591 of file class_bin.c.
References ACCESS_FLAG_MASK_ALL, java_attribute_t::attribute_length, java_attribute_t::attribute_name_index, calculate_padding_ut16(), free(), i, java_class_constant_pool_stringify_at(), NULL, rz_bin_java_class_access_flags_readable(), rz_bin_java_class_const_pool_as_text(), rz_bin_java_class_fields_as_text(), rz_bin_java_class_interfaces_as_text(), rz_bin_java_class_methods_as_text(), rz_bin_java_class_name(), rz_bin_java_class_super(), rz_bin_java_class_version(), rz_return_if_fail, rz_strbuf_appendf(), sb, snprintf, and autogen_x86imm::tmp.
Referenced by rz_cmd_javac_handler().
RZ_API RZ_OWN RzList* rz_bin_java_class_const_pool_as_imports | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinImport*> containing the class const pool.
Definition at line 1509 of file class_bin.c.
References free(), i, import_type(), imports(), java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_is_import(), java_constant_pool_resolve(), NULL, RZ_BIN_BIND_GLOBAL_STR, RZ_BIN_BIND_WEAK_STR, rz_bin_import_free(), RZ_BIN_TYPE_FUNC_STR, RZ_BIN_TYPE_IFACE_STR, rz_list_append(), rz_list_newf(), RZ_LOG_ERROR, RZ_NEW0, rz_return_val_if_fail, rz_str_rchr(), rz_str_replace_ch(), rz_warn_if_reached, and strdup().
Referenced by imports().
RZ_API void rz_bin_java_class_const_pool_as_json | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL PJ * | j | ||
) |
Returns the class const pool in json format via PJ arg.
Definition at line 1650 of file class_bin.c.
References free(), i, java_constant_pool_is_number(), java_constant_pool_is_string(), java_constant_pool_stringify(), java_constant_pool_tag_name(), NULL, pj_a(), pj_end(), pj_kn(), pj_ks(), pj_o(), rz_bin_java_class_const_pool_resolve_index(), RZ_LOG_ERROR, rz_return_if_fail, java_constant_pool_t::tag, test-lz4-versions::tag, and create_tags_rz::text.
Referenced by rz_bin_java_class_as_json(), and rz_cmd_javap_handler().
RZ_API RZ_OWN RzList* rz_bin_java_class_const_pool_as_symbols | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinSymbol*> containing the class const pool.
Definition at line 1435 of file class_bin.c.
References add_class_name_to_name(), rz_bin_symbol_t::bind, rz_bin_symbol_t::classname, desc, rz_bin_symbol_t::dname, free(), i, import_type(), rz_bin_symbol_t::is_imported, java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_is_import(), java_constant_pool_resolve(), rz_bin_symbol_t::libname, list(), rz_bin_symbol_t::name, NULL, java_constant_pool_t::offset, rz_bin_symbol_t::ordinal, RZ_BIN_BIND_IMPORT_STR, rz_bin_symbol_free(), rz_bin_symbol_new(), RZ_BIN_TYPE_FUNC_STR, rz_list_append(), rz_list_newf(), RZ_LOG_ERROR, rz_return_val_if_fail, rz_str_newf(), rz_str_replace_ch(), rz_warn_if_reached, strdup(), and rz_bin_symbol_t::type.
Referenced by symbols().
RZ_API void rz_bin_java_class_const_pool_as_text | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL RzStrBuf * | sb | ||
) |
Returns the class const pool in text format via RzStrBuf arg.
Definition at line 1605 of file class_bin.c.
References calculate_padding_ut16(), free(), i, java_constant_pool_is_number(), java_constant_pool_is_string(), java_constant_pool_stringify(), java_constant_pool_tag_name(), NULL, rz_bin_java_class_const_pool_resolve_index(), rz_demangler_java(), RZ_LOG_ERROR, rz_return_if_fail, rz_strbuf_appendf(), sb, snprintf, test-lz4-versions::tag, and create_tags_rz::text.
Referenced by rz_bin_java_class_as_text(), and rz_cmd_javap_handler().
RZ_API RZ_OWN char* rz_bin_java_class_const_pool_resolve_index | ( | RZ_NONNULL RzBinJavaClass * | bin, |
st32 | index | ||
) |
Returns the string linked to the class const pool index.
Definition at line 644 of file class_bin.c.
References CONSTANT_POOL_CLASS, CONSTANT_POOL_STRING, free(), is_dual_index(), java_class_constant_pool_at(), java_constant_pool_is_number(), java_constant_pool_is_string(), java_constant_pool_resolve(), java_constant_pool_stringify(), NULL, RZ_LOG_ERROR, rz_return_val_if_fail, rz_str_newf(), s0, s1, java_constant_pool_t::tag, and autogen_x86imm::tmp.
Referenced by enrich_asm(), rz_bin_java_class_const_pool_as_json(), rz_bin_java_class_const_pool_as_text(), and rz_cmd_javar_handler().
RZ_API ut64 rz_bin_java_class_debug_info | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Definition at line 351 of file class_bin.c.
References ATTRIBUTE_TYPE_CODE, ATTRIBUTE_TYPE_LINENUMBERTABLE, java_attribute_code_t::attributes, java_method_t::attributes, java_attribute_code_t::attributes_count, java_method_t::attributes_count, i, java_attribute_t::info, k, RZ_BIN_DBG_LINENUMS, RZ_BIN_DBG_SYMS, and java_attribute_t::type.
Referenced by info().
RZ_API RZ_OWN RzList* rz_bin_java_class_entrypoints | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinAddr*> containing the entrypoints.
Definition at line 927 of file class_bin.c.
References java_method_t::access_flags, addr, ATTRIBUTE_TYPE_CODE, java_method_t::attributes, java_method_t::attributes_count, java_attribute_code_t::code_offset, free(), i, java_attribute_t::info, java_class_constant_pool_stringify_at(), list(), METHOD_ACCESS_FLAG_STATIC, java_method_t::name_index, NULL, rz_bin_addr_t::paddr, rz_list_append(), rz_list_newf(), RZ_LOG_ERROR, RZ_NEW0, rz_return_val_if_fail, rz_warn_if_reached, java_attribute_t::type, ut64(), UT64_MAX, and rz_bin_addr_t::vaddr.
Referenced by entrypoints().
RZ_API RZ_OWN RzList* rz_bin_java_class_fields_as_binfields | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinField*> containing the class fields.
Definition at line 1277 of file class_bin.c.
References java_field_t::access_flags, java_field_t::descriptor_index, rz_bin_field_t::flags, free(), i, java_access_flags_to_bin_flags(), java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_is_string(), java_constant_pool_stringify(), list(), java_field_t::name_index, NULL, java_field_t::offset, rz_bin_field_free(), rz_bin_field_new(), rz_list_append(), rz_list_newf(), RZ_LOG_ERROR, rz_return_val_if_fail, rz_warn_if_reached, rz_bin_field_t::type, and rz_bin_field_t::visibility.
RZ_API void rz_bin_java_class_fields_as_json | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL PJ * | j | ||
) |
Returns the fields in json format via PJ arg.
Definition at line 1366 of file class_bin.c.
References java_field_t::access_flags, java_attribute_t::attribute_length, java_attribute_t::attribute_name_index, java_field_t::attributes, java_field_t::attributes_count, java_field_t::descriptor_index, free(), i, java_class_constant_pool_stringify_at(), java_field_access_flags_readable(), java_field_t::name_index, java_attribute_t::offset, java_field_t::offset, pj_a(), pj_end(), pj_ka(), pj_kn(), pj_ks(), pj_o(), rz_return_if_fail, rz_warn_if_reached, and autogen_x86imm::tmp.
Referenced by rz_bin_java_class_as_json(), and rz_cmd_javaf_handler().
RZ_API RZ_OWN RzList* rz_bin_java_class_fields_as_symbols | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinSymbol*> containing the class fields.
Definition at line 1227 of file class_bin.c.
References java_field_t::access_flags, add_class_name_to_name(), rz_bin_symbol_t::bind, rz_bin_symbol_t::classname, field_name, free(), i, java_access_flags_to_bin_flags(), java_class_constant_pool_at(), java_constant_pool_is_string(), java_constant_pool_stringify(), java_field_access_flags_readable(), java_field_is_global(), list(), rz_bin_symbol_t::method_flags, rz_bin_symbol_t::name, java_field_t::name_index, NULL, java_field_t::offset, rz_bin_symbol_t::ordinal, RZ_BIN_BIND_GLOBAL_STR, RZ_BIN_BIND_LOCAL_STR, rz_bin_java_class_name(), rz_bin_symbol_free(), rz_bin_symbol_new(), RZ_BIN_TYPE_OBJECT_STR, rz_list_append(), rz_list_newf(), RZ_LOG_ERROR, rz_return_val_if_fail, rz_warn_if_reached, rz_bin_symbol_t::size, rz_bin_symbol_t::type, rz_bin_symbol_t::visibility, and rz_bin_symbol_t::visibility_str.
Referenced by symbols().
RZ_API void rz_bin_java_class_fields_as_text | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL RzStrBuf * | sb | ||
) |
Returns the fields in text format via RzStrBuf arg.
Definition at line 1318 of file class_bin.c.
References java_field_t::access_flags, java_attribute_t::attribute_length, java_attribute_t::attribute_name_index, java_field_t::attributes, java_field_t::attributes_count, calculate_padding_ut16(), java_field_t::descriptor_index, flags, free(), i, java_class_constant_pool_stringify_at(), java_field_access_flags_readable(), name, java_field_t::name_index, rz_return_if_fail, rz_strbuf_appendf(), rz_warn_if_reached, sb, and snprintf.
Referenced by rz_bin_java_class_as_text(), and rz_cmd_javaf_handler().
RZ_API void rz_bin_java_class_free | ( | RZ_NULLABLE RzBinJavaClass * | bin | ) |
Frees a RzBinJavaClass pointer.
Definition at line 407 of file class_bin.c.
References free(), i, java_attribute_free(), java_constant_pool_free(), java_field_free(), java_interface_free, and java_method_free().
Referenced by destroy(), and java_class_parse().
RZ_API void rz_bin_java_class_interfaces_as_json | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL PJ * | j | ||
) |
Returns the class interfaces as json via PJ arg.
Definition at line 1928 of file class_bin.c.
References free(), i, java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_resolve(), NULL, pj_a(), pj_end(), pj_kn(), pj_ks(), pj_o(), RZ_LOG_ERROR, rz_return_if_fail, rz_str_replace_char(), and autogen_x86imm::tmp.
Referenced by rz_bin_java_class_as_json(), and rz_cmd_javai_handler().
RZ_API void rz_bin_java_class_interfaces_as_text | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL RzStrBuf * | sb | ||
) |
Returns the class interfaces as text via RzStrBuf arg.
Definition at line 1898 of file class_bin.c.
References calculate_padding_ut16(), free(), i, java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_resolve(), NULL, RZ_LOG_ERROR, rz_return_if_fail, rz_str_replace_char(), rz_strbuf_appendf(), sb, snprintf, and autogen_x86imm::tmp.
Referenced by rz_bin_java_class_as_text(), and rz_cmd_javai_handler().
RZ_API RZ_BORROW const char* rz_bin_java_class_language | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Definition at line 378 of file class_bin.c.
References free(), i, java_constant_pool_is_string(), java_constant_pool_stringify(), NULL, and rz_return_val_if_fail.
Referenced by info().
RZ_API void rz_bin_java_class_methods_as_json | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL PJ * | j | ||
) |
Returns the methods in json format via PJ arg.
Definition at line 1169 of file class_bin.c.
References java_method_t::access_flags, java_attribute_t::attribute_length, java_attribute_t::attribute_name_index, java_method_t::attributes, java_method_t::attributes_count, java_method_t::descriptor_index, free(), i, java_class_constant_pool_stringify_at(), java_method_access_flags_readable(), java_method_t::name_index, java_attribute_t::offset, java_method_t::offset, pj_a(), pj_end(), pj_ka(), pj_kn(), pj_ks(), pj_o(), rz_return_if_fail, rz_warn_if_reached, and autogen_x86imm::tmp.
Referenced by rz_bin_java_class_as_json(), and rz_cmd_javam_handler().
RZ_API RZ_OWN RzList* rz_bin_java_class_methods_as_symbols | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinSymbol*> containing the class methods.
Definition at line 1052 of file class_bin.c.
References java_method_t::access_flags, add_class_name_to_name(), addr, java_attribute_t::attribute_length, ATTRIBUTE_TYPE_CODE, java_method_t::attributes, java_method_t::attributes_count, rz_bin_symbol_t::bind, rz_bin_symbol_t::classname, java_attribute_code_t::code_offset, desc, java_method_t::descriptor_index, rz_bin_symbol_t::dname, free(), i, java_attribute_t::info, java_access_flags_to_bin_flags(), java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_is_string(), java_constant_pool_stringify(), java_method_access_flags_readable(), java_method_is_global(), rz_bin_symbol_t::libname, list(), rz_bin_symbol_t::method_flags, rz_bin_symbol_t::name, java_method_t::name_index, NULL, rz_bin_symbol_t::ordinal, RZ_BIN_BIND_GLOBAL_STR, RZ_BIN_BIND_LOCAL_STR, rz_bin_java_class_name(), rz_bin_symbol_free(), rz_bin_symbol_new(), RZ_BIN_TYPE_FUNC_STR, rz_demangler_java(), rz_list_append(), rz_list_length(), rz_list_newf(), RZ_LOG_ERROR, rz_return_val_if_fail, rz_str_newf(), rz_warn_if_reached, rz_bin_symbol_t::size, strdup(), java_attribute_t::type, rz_bin_symbol_t::type, ut64(), UT64_MAX, rz_bin_symbol_t::visibility, and rz_bin_symbol_t::visibility_str.
RZ_API void rz_bin_java_class_methods_as_text | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RZ_NONNULL RzStrBuf * | sb | ||
) |
Returns the methods in text format via RzStrBuf arg.
Definition at line 1121 of file class_bin.c.
References java_method_t::access_flags, java_attribute_t::attribute_length, java_attribute_t::attribute_name_index, java_method_t::attributes, java_method_t::attributes_count, calculate_padding_ut16(), java_method_t::descriptor_index, flags, free(), i, java_class_constant_pool_stringify_at(), java_method_access_flags_readable(), name, java_method_t::name_index, rz_return_if_fail, rz_strbuf_appendf(), rz_warn_if_reached, sb, and snprintf.
Referenced by rz_bin_java_class_as_text(), and rz_cmd_javam_handler().
RZ_API RZ_OWN char* rz_bin_java_class_name | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns the class name.
Definition at line 447 of file class_bin.c.
References free(), java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_resolve(), NULL, RZ_LOG_ERROR, rz_return_val_if_fail, rz_str_newf(), strdup(), and autogen_x86imm::tmp.
Referenced by classes(), rz_bin_java_class_as_json(), rz_bin_java_class_as_source_code(), rz_bin_java_class_as_text(), rz_bin_java_class_fields_as_symbols(), and rz_bin_java_class_methods_as_symbols().
RZ_API RZ_OWN RzBinJavaClass* rz_bin_java_class_new | ( | RZ_NONNULL RzBuffer * | buf, |
ut64 | offset, | ||
RZ_NONNULL Sdb * | kv | ||
) |
Parses the java class file and returns a RzBinJavaClass struct.
Definition at line 289 of file class_bin.c.
References java_class_parse(), java_set_sdb(), NULL, RZ_NEW0, rz_return_val_if_fail, and ut64().
Referenced by load_buffer().
RZ_API RZ_OWN RzBinAddr* rz_bin_java_class_resolve_symbol | ( | RZ_NONNULL RzBinJavaClass * | bin, |
RzBinSpecialSymbol | resolve | ||
) |
Resolves and returns the RzBinAddr struct linked to the input RzBinSpecialSymbol.
Definition at line 870 of file class_bin.c.
References addr, ATTRIBUTE_TYPE_CODE, java_method_t::attributes, java_method_t::attributes_count, java_attribute_code_t::code_offset, free(), i, java_attribute_t::info, java_class_constant_pool_stringify_at(), java_method_t::name_index, NULL, rz_bin_addr_t::paddr, resolve(), RZ_BIN_SPECIAL_SYMBOL_ENTRY, RZ_BIN_SPECIAL_SYMBOL_INIT, RZ_BIN_SPECIAL_SYMBOL_MAIN, RZ_LOG_ERROR, RZ_NEW0, rz_return_val_if_fail, java_attribute_t::type, ut64(), and UT64_MAX.
Referenced by binsym().
RZ_API RZ_OWN RzList* rz_bin_java_class_strings | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns a RzList<RzBinString*> containing the strings.
Definition at line 986 of file class_bin.c.
References java_attribute_t::attribute_length, ATTRIBUTE_TYPE_SOURCEDEBUGEXTENSION, free(), i, java_attribute_t::info, java_constant_pool_is_string(), java_constant_pool_stringify(), rz_bin_string_t::length, list(), NULL, java_attribute_t::offset, java_constant_pool_t::offset, rz_bin_string_t::ordinal, rz_bin_string_t::paddr, rz_bin_string_free(), rz_list_append(), rz_list_newf(), RZ_LOG_ERROR, RZ_NEW0, rz_return_val_if_fail, RZ_STRING_ENC_MUTF8, RZ_STRING_ENC_UTF8, rz_warn_if_reached, java_constant_pool_t::size, rz_bin_string_t::size, strdup(), rz_bin_string_t::string, java_attribute_t::type, and rz_bin_string_t::type.
Referenced by strings().
RZ_API RZ_OWN char* rz_bin_java_class_super | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Returns the class super name.
Definition at line 466 of file class_bin.c.
References java_class_constant_pool_at(), java_class_constant_pool_stringify_at(), java_constant_pool_resolve(), NULL, RZ_LOG_ERROR, rz_return_val_if_fail, and strdup().
Referenced by classes(), rz_bin_java_class_as_json(), rz_bin_java_class_as_source_code(), and rz_bin_java_class_as_text().
RZ_API RZ_OWN char* rz_bin_java_class_version | ( | RZ_NONNULL RzBinJavaClass * | bin | ) |
Parses the java class file and returns a RzBinJavaClass struct.
Definition at line 306 of file class_bin.c.
References is_version, NULL, and strdup().
Referenced by info(), java_set_sdb(), rz_bin_java_class_as_json(), and rz_bin_java_class_as_text().