7 #define ACCESS_FLAG_MASK_SRC (ACCESS_FLAG_PUBLIC | ACCESS_FLAG_PRIVATE | ACCESS_FLAG_PROTECTED | ACCESS_FLAG_STATIC | ACCESS_FLAG_FINAL)
9 #define CLASS_ACCESS_FLAGS_SIZE 16
68 if (
bin->constant_pool && index < bin->constant_pool_count) {
69 return bin->constant_pool[index];
83 ut64 memory_size =
count * min_struct_size;
88 return bin->major_version < (45) || (
bin->major_version == 45 &&
bin->minor_version < 3);
94 return position >=
size;
102 RZ_LOG_ERROR(
"java bin: invalid buffer size (size < 1)\n");
103 goto java_class_parse_bad;
110 goto java_class_parse_bad;
120 if (
bin->constant_pool_count > 0) {
122 if (!
bin->constant_pool) {
123 goto java_class_parse_bad;
125 for (
ut32 i = 1;
i <
bin->constant_pool_count; ++
i) {
132 bin->constant_pool[
i] = cpool;
134 if (
i >= (
bin->constant_pool_count - 1)) {
143 goto java_class_parse_bad;
151 goto java_class_parse_bad;
157 if (
bin->interfaces_count > 0) {
159 if (!
bin->interfaces) {
160 goto java_class_parse_bad;
162 for (
ut32 i = 0;
i <
bin->interfaces_count; ++
i) {
168 goto java_class_parse_bad;
173 goto java_class_parse_bad;
179 if (
bin->fields_count > 0) {
182 goto java_class_parse_bad;
184 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
191 goto java_class_parse_bad;
196 goto java_class_parse_bad;
201 if (
bin->methods_count > 0) {
204 goto java_class_parse_bad;
206 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
213 goto java_class_parse_bad;
218 goto java_class_parse_bad;
224 if (
bin->attributes_count > 0) {
226 if (!
bin->attributes) {
227 goto java_class_parse_bad;
229 for (
ut32 i = 0;
i <
bin->attributes_count; ++
i) {
233 bin->attributes[
i] = attr;
246 java_class_parse_bad:
263 sdb_set(kv,
"java_class.version", tmp_val, 0);
267 sdb_num_set(kv,
"java_class.constant_pool_count",
bin->constant_pool_count, 0);
268 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
275 snprintf(tmp_key,
sizeof(tmp_key),
"java_class.constant_pool_%d",
i);
276 sdb_set(kv, tmp_key, tmp_val, 0);
282 sdb_num_set(kv,
"java_class.methods_count",
bin->methods_count, 0);
283 sdb_num_set(kv,
"java_class.attributes_count",
bin->attributes_count, 0);
310 #define is_version(bin, major, minor) ((bin)->major_version == (major) && (bin)->minor_version >= (minor))
311 if (
bin->major_version < 45 ||
312 (
bin->major_version == 45 &&
bin->minor_version < 3)) {
313 return strdup(
"Java SE 1.0.2");
315 return strdup(
"Java SE 1.1");
317 return strdup(
"Java SE 1.2");
319 return strdup(
"Java SE 1.3");
321 return strdup(
"Java SE 1.4");
323 return strdup(
"Java SE 1.5");
325 return strdup(
"Java SE 1.6");
327 return strdup(
"Java SE 1.7");
329 return strdup(
"Java SE 1.8");
331 return strdup(
"Java SE 1.9");
333 return strdup(
"Java SE 10");
335 return strdup(
"Java SE 11");
337 return strdup(
"Java SE 12");
339 return strdup(
"Java SE 13");
341 return strdup(
"Java SE 14");
343 return strdup(
"Java SE 15");
345 return strdup(
"Java SE 16");
356 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
380 const char *language =
"java";
382 if (
bin->constant_pool) {
383 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
389 if (
string && !strncmp(
string,
"kotlin/jvm", 10)) {
392 }
else if (
string && !strncmp(
string,
"org/codehaus/groovy/runtime", 27)) {
411 if (
bin->constant_pool) {
412 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
417 if (
bin->interfaces) {
418 for (
ut32 i = 0;
i <
bin->interfaces_count; ++
i) {
424 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
430 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
435 if (
bin->attributes) {
436 for (
ut32 i = 0;
i <
bin->attributes_count; ++
i) {
453 RZ_LOG_ERROR(
"java bin: unknown class name at constant pool index %u\n",
bin->this_class);
454 return strdup(
"unknown_class");
471 RZ_LOG_ERROR(
"java bin: unknown super name at constant pool index %u\n",
bin->this_class);
472 return strdup(
"unknown_super");
479 return bin->access_flags;
492 if (access_flags & afr->
flag) {
510 }
else if (
count > 999) {
512 }
else if (
count > 99) {
529 pj_kn(j,
"minor",
bin->minor_version);
530 pj_kn(j,
"major",
bin->major_version);
537 pj_kn(j,
"constant_pool_count",
bin->constant_pool_count);
538 pj_k(j,
"constant_pool");
541 pj_kn(j,
"access_flags_n",
bin->access_flags);
546 pj_kn(j,
"class_n",
bin->this_class);
551 pj_kn(j,
"super_n",
bin->super_class);
556 pj_kn(j,
"interfaces_count",
bin->interfaces_count);
557 pj_k(j,
"interfaces");
560 pj_kn(j,
"methods_count",
bin->methods_count);
564 pj_kn(j,
"fields_count",
bin->fields_count);
568 pj_kn(j,
"attributes_count",
bin->attributes_count);
569 pj_ka(j,
"attributes");
570 for (
ut32 i = 0;
i <
bin->attributes_count; ++
i) {
620 for (
ut32 i = 0;
i <
bin->attributes_count; ++
i) {
625 snprintf(number,
sizeof(number),
"#%u",
i);
650 if (!cpool || !index) {
658 RZ_LOG_ERROR(
"java bin: can't resolve constant pool index %u\n", index);
662 if (
tmp[0] ==
'[' &&
tmp[1] ==
'L') {
670 RZ_LOG_ERROR(
"java bin: can't resolve constant pool index %u\n", index);
679 RZ_LOG_ERROR(
"java bin: can't resolve constant pool index %u\n", index);
684 if ((arg0 && !
s0) || !
s1) {
685 RZ_LOG_ERROR(
"java bin: can't resolve constant pool index %u\n", index);
747 if (strcmp(
tmp,
"java/lang/Object") != 0) {
754 if (
bin->interfaces_count > 0) {
757 for (
ut32 i = 0;
i <
bin->interfaces_count; ++
i) {
758 if (!
bin->interfaces[
i]) {
763 RZ_LOG_ERROR(
"java bin: can't resolve constant pool index %u\n",
bin->interfaces[
i]->index);
787 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
809 if (
desc[0] ==
'(') {
829 if (
bin->methods_count > 0 &&
bin->fields_count) {
834 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
881 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
893 if (strcmp(
name,
"<init>") != 0 && strcmp(
name,
"<clinit>") != 0) {
898 if (strcmp(
name,
"main") != 0) {
914 RZ_LOG_ERROR(
"java bin: can't resolve symbol address\n");
938 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
950 if (strcmp(
name,
"main") != 0 && strcmp(
name,
"<init>") != 0 && strcmp(
name,
"<clinit>") != 0) {
967 RZ_LOG_ERROR(
"java bin: can't resolve entrypoint address\n");
995 if (
bin->constant_pool_count > 0) {
996 for (
ut32 i = 1;
i <
bin->constant_pool_count; ++
i) {
1003 RZ_LOG_ERROR(
"java bin: expecting a string, got NULL\n");
1022 for (
ut32 i = 0;
i <
bin->attributes_count; ++
i) {
1060 char *method_name =
NULL;
1062 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
1128 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
1157 snprintf(number,
sizeof(number),
"#%u",
i);
1176 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
1201 pj_ka(j,
"attributes");
1237 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
1287 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
1325 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
1354 snprintf(number,
sizeof(number),
"#%u",
i);
1373 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
1399 pj_ka(j,
"attributes");
1442 char *method_name, *classname;
1444 ut16 class_index, name_and_type_index, name_index, descriptor_index, class_name_index;
1445 if (
bin->constant_pool) {
1446 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
1452 RZ_LOG_ERROR(
"java bin: can't resolve symbol with constant pool index %u\n",
i);
1458 RZ_LOG_ERROR(
"java bin: can't resolve symbol with constant pool index %u\n",
i);
1464 RZ_LOG_ERROR(
"java bin: can't resolve symbol with constant pool index %u\n",
i);
1480 method_name =
strdup(
"unknown_method");
1482 is_main = !strcmp(method_name,
"main");
1485 if (
desc[0] ==
'(') {
1517 ut16 class_index, name_and_type_index, name_index, descriptor_index, class_name_index;
1518 if (
bin->constant_pool) {
1519 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
1525 RZ_LOG_ERROR(
"java bin: can't resolve import with constant pool index %u\n",
i);
1531 RZ_LOG_ERROR(
"java bin: can't resolve import with constant pool index %u\n",
i);
1537 RZ_LOG_ERROR(
"java bin: can't resolve import with constant pool index %u\n",
i);
1559 import->classname =
strdup(class_name ? class_name :
object);
1560 import->libname = class_name ?
strdup(
object) :
NULL;
1562 is_main =
import->name && !strcmp(import->name,
"main");
1566 import->ordinal =
i;
1572 if (
bin->interfaces) {
1573 for (
ut32 i = 0;
i <
bin->interfaces_count; ++
i) {
1574 if (!
bin->interfaces[
i]) {
1585 RZ_LOG_ERROR(
"java bin: can't resolve interface with constant pool index %u\n",
i);
1591 import->name =
strdup(
"*");
1594 import->ordinal =
i;
1612 if (
bin->constant_pool) {
1614 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
1622 RZ_LOG_ERROR(
"java bin: invalid tag name for constant pool at index %u\n",
i);
1625 snprintf(number,
sizeof(number),
"#%u",
i);
1655 if (
bin->constant_pool) {
1656 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
1664 RZ_LOG_ERROR(
"java bin: invalid tag name for constant pool at index %u\n",
i);
1676 pj_ks(j,
"resolved", rtext ? rtext :
"");
1712 return strcmp((
const char *)
a, sec->
name);
1729 if (
bin->constant_pool) {
1732 bin->constant_pool_offset,
1733 bin->interfaces_offset,
1736 if (
bin->interfaces) {
1739 bin->interfaces_offset,
1744 for (
ut32 i = 0;
i <
bin->fields_count; ++
i) {
1754 snprintf(secname,
sizeof(secname),
"class.fields.%s.attr",
tmp);
1755 if ((
i + 1) <
bin->fields_count &&
bin->fields[
i + 1]) {
1756 end_offset =
bin->fields[
i + 1]->offset;
1758 end_offset =
bin->methods_offset;
1761 snprintf(secname,
sizeof(secname),
"class.fields.%s_%d.attr",
tmp, iname);
1769 bin->methods_offset,
1775 bin->methods_offset,
1776 bin->attributes_offset,
1779 for (
ut32 i = 0;
i <
bin->methods_count; ++
i) {
1789 snprintf(secname,
sizeof(secname),
"class.methods.%s.attr",
tmp);
1791 snprintf(secname,
sizeof(secname),
"class.methods.%s_%d.attr",
tmp, iname);
1794 if ((
i + 1) <
bin->methods_count &&
bin->methods[
i + 1]) {
1795 end_offset =
bin->methods[
i + 1]->offset;
1797 end_offset =
bin->attributes_offset;
1800 snprintf(secname,
sizeof(secname),
"class.methods.%s_%d.attr",
tmp, iname);
1802 snprintf(secname,
sizeof(secname),
"class.methods.%s.attr",
tmp);
1816 snprintf(secname,
sizeof(secname),
"class.methods.%s_%d.attr.%d.code",
tmp, iname,
k);
1818 snprintf(secname,
sizeof(secname),
"class.methods.%s.attr.%d.code",
tmp,
k);
1828 if (
bin->attributes) {
1831 bin->attributes_offset,
1832 bin->class_end_offset,
1840 return strcmp((
const char *)
a, (
const char *)
b);
1856 if (
bin->constant_pool) {
1857 for (
ut32 i = 0;
i <
bin->constant_pool_count; ++
i) {
1865 RZ_LOG_ERROR(
"java bin: can't resolve library with constant pool index %u\n",
i);
1872 RZ_LOG_ERROR(
"java bin: can't resolve library with constant pool index %u\n",
i);
1879 RZ_LOG_ERROR(
"java bin: can't resolve library with constant pool index %u\n",
i);
1905 if (
bin->interfaces) {
1907 for (
ut32 i = 0;
i <
bin->interfaces_count; ++
i) {
1908 if (!
bin->interfaces[
i]) {
1913 RZ_LOG_ERROR(
"java bin: can't resolve interface with constant pool index %u\n",
i);
1916 snprintf(number,
sizeof(number),
"#%u",
i);
1933 if (
bin->interfaces) {
1934 for (
ut32 i = 0;
i <
bin->interfaces_count; ++
i) {
1935 if (!
bin->interfaces[
i]) {
1941 RZ_LOG_ERROR(
"java bin: can't resolve interface with constant pool index %u\n",
i);
1945 pj_kn(j,
"offset",
bin->interfaces[
i]->offset);
1946 pj_kn(j,
"name_n",
bin->interfaces[
i]->index);
RZ_API RzBinSymbol * rz_bin_symbol_new(const char *name, ut64 paddr, ut64 vaddr)
RZ_API void rz_bin_symbol_free(RzBinSymbol *sym)
RZ_API void rz_bin_string_free(void *_str)
RZ_API void rz_bin_field_free(RzBinField *field)
RZ_API void rz_bin_import_free(RzBinImport *imp)
RZ_API void rz_bin_section_free(RzBinSection *bs)
RZ_API RzBinField * rz_bin_field_new(ut64 paddr, ut64 vaddr, int size, const char *name, const char *comment, const char *format, bool format_named)
RzList * imports(RzBinFile *bf)
RzList * sections(RzBinFile *bf)
bool java_attribute_resolve(ConstPool **pool, ut32 poolsize, Attribute *attr, RzBuffer *buf, bool is_oak)
Attribute * java_attribute_new(RzBuffer *buf, ut64 offset)
void java_attribute_free(Attribute *attr)
@ ATTRIBUTE_TYPE_LINENUMBERTABLE
@ ATTRIBUTE_TYPE_SOURCEDEBUGEXTENSION
RZ_API RZ_BORROW const char * rz_bin_java_class_language(RZ_NONNULL RzBinJavaClass *bin)
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.
static bool java_class_parse(RzBinJavaClass *bin, ut64 base, Sdb *kv, RzBuffer *buf, ut64 *size)
RZ_API RZ_OWN RzList * rz_bin_java_class_fields_as_symbols(RZ_NONNULL RzBinJavaClass *bin)
Returns a RzList<RzBinSymbol*> containing the class fields.
static char * add_class_name_to_name(char *name, char *classname)
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.
RZ_API RZ_OWN RzList * rz_bin_java_class_methods_as_symbols(RZ_NONNULL RzBinJavaClass *bin)
Returns a RzList<RzBinSymbol*> containing the class methods.
RZ_API ut64 rz_bin_java_class_debug_info(RZ_NONNULL RzBinJavaClass *bin)
static int calculate_padding_ut16(ut16 count)
RZ_API RZ_OWN RzList * rz_bin_java_class_as_libraries(RZ_NONNULL RzBinJavaClass *bin)
Returns a RzList<char*> containing the class libraries.
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.
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.
RZ_API RZ_OWN RzList * rz_bin_java_class_strings(RZ_NONNULL RzBinJavaClass *bin)
Returns a RzList<RzBinString*> containing the strings.
static RzBinSection * new_section(const char *name, ut64 start, ut64 end, ut32 perm)
static ut32 sanitize_size(st64 buffer_size, ut64 count, ut32 min_struct_size)
static const AccessFlagsReadable access_flags_list[CLASS_ACCESS_FLAGS_SIZE]
RZ_API void rz_bin_java_class_as_json(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL PJ *j)
Returns the class info as json.
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.
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.
RZ_API RZ_OWN RzList * rz_bin_java_class_as_sections(RZ_NONNULL RzBinJavaClass *bin)
Returns a RzList<RzBinSection*> containing the class sections.
static bool is_dual_index(const ConstPool *cpool)
RZ_API RZ_OWN char * rz_bin_java_class_version(RZ_NONNULL RzBinJavaClass *bin)
Parses the java class file and returns a RzBinJavaClass struct.
static ut64 java_access_flags_to_bin_flags(ut64 access_flags)
static int compare_section_names(const void *a, const void *b)
static char * java_class_constant_pool_stringify_at(RzBinJavaClass *bin, ut32 index)
static char * import_type(const ConstPool *cpool)
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.
RZ_API void rz_bin_java_class_as_text(RZ_NONNULL RzBinJavaClass *bin, RZ_NONNULL RzStrBuf *sb)
Returns the class info as text.
RZ_API RZ_OWN char * rz_bin_java_class_access_flags_readable(RZ_NONNULL RzBinJavaClass *bin, ut16 mask)
Returns the readable class access flags.
RZ_API RZ_OWN RzList * rz_bin_java_class_entrypoints(RZ_NONNULL RzBinJavaClass *bin)
Returns a RzList<RzBinAddr*> containing the entrypoints.
RZ_API RZ_OWN char * rz_bin_java_class_name(RZ_NONNULL RzBinJavaClass *bin)
Returns the class name.
RZ_API RZ_OWN RzList * rz_bin_java_class_fields_as_binfields(RZ_NONNULL RzBinJavaClass *bin)
Returns a RzList<RzBinField*> containing the class fields.
RZ_API RZ_OWN char * rz_bin_java_class_super(RZ_NONNULL RzBinJavaClass *bin)
Returns the class super name.
static bool java_class_is_oak(RzBinJavaClass *bin)
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.
static const ConstPool * java_class_constant_pool_at(RzBinJavaClass *bin, ut32 index)
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.
static bool is_eob(RzBuffer *buf)
static void section_free(void *u)
#define ACCESS_FLAG_MASK_SRC
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.
RZ_API void rz_bin_java_class_free(RZ_NULLABLE RzBinJavaClass *bin)
Frees a RzBinJavaClass pointer.
static void java_set_sdb(Sdb *kv, RzBinJavaClass *bin, ut64 offset, ut64 size)
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.
static int compare_strings(const void *a, const void *b)
#define is_version(bin, major, minor)
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.
RZ_API ut32 rz_bin_java_class_access_flags(RZ_NONNULL RzBinJavaClass *bin)
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.
#define CLASS_ACCESS_FLAGS_SIZE
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.
#define ACCESS_FLAG_MASK_ALL
bool java_constant_pool_requires_null(const ConstPool *cpool)
bool java_constant_pool_is_string(const ConstPool *cpool)
void java_constant_pool_free(ConstPool *cpool)
ut32 java_constant_pool_resolve(const ConstPool *cpool, ut16 *arg0, ut16 *arg1)
char * java_constant_pool_stringify(const ConstPool *cpool)
const char * java_constant_pool_tag_name(const ConstPool *cpool)
ConstPool * java_constant_pool_new(RzBuffer *buf, ut64 offset)
ConstPool * java_constant_null_new(ut64 offset)
bool java_constant_pool_is_number(const ConstPool *cpool)
bool java_constant_pool_is_import(const ConstPool *cpool)
@ CONSTANT_POOL_METHODREF
@ CONSTANT_POOL_INTERFACEMETHODREF
@ CONSTANT_POOL_NAMEANDTYPE
@ CONSTANT_POOL_INVOKEDYNAMIC
bool java_field_is_global(const Field *field)
Field * java_field_new(ConstPool **pool, ut32 poolsize, RzBuffer *buf, ut64 offset)
void java_field_free(Field *field)
char * java_field_access_flags_readable(const Field *field)
Interface * java_interface_new(RzBuffer *buf, ut64 offset)
#define java_interface_free(x)
Method * java_method_new(ConstPool **pool, ut32 poolsize, RzBuffer *buf, ut64 offset, bool is_oak)
bool java_method_is_global(const Method *method)
char * java_method_access_flags_readable(const Method *method)
void java_method_free(Method *method)
@ METHOD_ACCESS_FLAG_STATIC
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_OWN char * rz_demangler_java(RZ_NULLABLE const char *symbol)
Demangles java symbols.
static void list(RzEgg *egg)
RZ_API RZ_BORROW RzListIter * rz_list_find(RZ_NONNULL const RzList *list, const void *p, RZ_NONNULL RzListComparator cmp)
Returns RzListIter element which matches via the RzListComparator.
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API int sdb_num_set(Sdb *s, const char *key, ut64 v, ut32 cas)
#define rz_warn_if_reached()
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
#define RZ_BIN_BIND_WEAK_STR
#define RZ_BIN_TYPE_OBJECT_STR
#define RZ_BIN_METH_PUBLIC
#define RZ_BIN_TYPE_METH_STR
#define RZ_BIN_METH_VARARGS
#define RZ_BIN_METH_SYNTHETIC
#define RZ_BIN_METH_STRICT
#define RZ_BIN_TYPE_IFACE_STR
@ RZ_BIN_SPECIAL_SYMBOL_ENTRY
@ RZ_BIN_SPECIAL_SYMBOL_INIT
@ RZ_BIN_SPECIAL_SYMBOL_MAIN
#define RZ_BIN_METH_ABSTRACT
#define RZ_BIN_METH_FINAL
#define RZ_BIN_BIND_LOCAL_STR
#define RZ_BIN_BIND_GLOBAL_STR
#define RZ_BIN_METH_BRIDGE
#define RZ_BIN_METH_STATIC
#define RZ_BIN_METH_PRIVATE
#define RZ_BIN_METH_PROTECTED
#define RZ_BIN_TYPE_FUNC_STR
#define RZ_BIN_METH_NATIVE
#define RZ_BIN_TYPE_UNKNOWN_STR
#define RZ_BIN_DBG_LINENUMS
#define RZ_BIN_BIND_IMPORT_STR
RZ_API ut64 rz_buf_tell(RZ_NONNULL RzBuffer *b)
Return the current cursor position.
#define rz_buf_read_be16(b, result)
#define rz_buf_read_be32(b, result)
RZ_API ut64 rz_buf_size(RZ_NONNULL RzBuffer *b)
Return the size of the buffer.
void(* RzListFree)(void *ptr)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API PJ * pj_ko(PJ *j, const char *k)
RZ_API PJ * pj_ka(PJ *j, const char *k)
RZ_API PJ * pj_k(PJ *j, const char *k)
RZ_API PJ * pj_end(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API const char * rz_str_rchr(const char *base, const char *p, int ch)
RZ_API int rz_str_replace_ch(char *s, char a, char b, bool g)
RZ_API int rz_str_replace_char(char *s, int a, int b)
RZ_API RZ_OWN char * rz_strbuf_drain(RzStrBuf *sb)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
static struct sockaddr static addrlen static backlog const void static flags void flags
ut16 attribute_name_index
static const char * resolve(struct Type *t, const char *foo, const char **bar)
if(dbg->bits==RZ_SYS_BITS_64)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
#define buffer_size(buffer)