Rizin
unix-like reverse engineering framework and cli tools
|
#include "luac_common.h"
Go to the source code of this file.
Functions | |
void | luac_add_section (RzList *section_list, char *name, ut64 offset, ut32 size, bool is_func) |
void | luac_add_symbol (RzList *symbol_list, char *name, ut64 offset, ut64 size, const char *type) |
void | luac_add_entry (RzList *entry_list, ut64 offset, int entry_type) |
void | luac_add_string (RzList *string_list, char *string, ut64 offset, ut64 size) |
static void | try_free_empty_list (RzList *list) |
static void | free_rz_section (RzBinSection *section) |
static void | free_rz_string (RzBinString *string) |
static void | free_rz_addr (RzBinAddr *addr) |
LuacBinInfo * | luac_build_info (LuaProto *proto) |
static const char * | get_tag_string (ut8 tag) |
static char * | get_constant_symbol_name (char *proto_name, LuaConstEntry *entry) |
static char * | simple_build_upvalue_symbol (char *proto_name, LuaUpvalueEntry *entry) |
static char * | get_upvalue_symbol_name (char *proto_name, LuaUpvalueEntry *entry, char *debug_name) |
void | _luac_build_info (LuaProto *proto, LuacBinInfo *info) |
void _luac_build_info | ( | LuaProto * | proto, |
LuacBinInfo * | info | ||
) |
Definition at line 225 of file luac_bin.c.
References lua_proto_ex::code_offset, lua_proto_ex::code_size, lua_proto_ex::const_entries, lua_proto_ex::const_offset, lua_proto_ex::const_size, lua_constant_entry::data, lua_constant_entry::data_len, lua_proto_ex::dbg_upvalue_entries, lua_proto_ex::debug_offset, lua_proto_ex::debug_size, get_constant_symbol_name(), get_tag_string(), get_upvalue_symbol_name(), i, info(), lua_proto_ex::inner_proto_offset, lua_proto_ex::inner_proto_size, lua_proto_ex::local_var_info_entries, LUA_VLNGSTR, LUA_VSHRSTR, luac_add_section(), luac_add_string(), luac_add_symbol(), lua_dbg_upvalue_entry::name_len, lua_proto_ex::name_size, NULL, lua_proto_ex::offset, lua_constant_entry::offset, lua_upvalue_entry::offset, lua_local_var_entry::offset, lua_dbg_upvalue_entry::offset, lua_proto_ex::proto_entries, lua_proto_ex::proto_name, RZ_FREE, rz_list_length(), RZ_NEWS0, rz_str_new(), rz_str_newf(), lua_proto_ex::size, lua_constant_entry::tag, lua_proto_ex::upvalue_entries, lua_dbg_upvalue_entry::upvalue_name, lua_proto_ex::upvalue_offset, lua_proto_ex::upvalue_size, ut64(), lua_local_var_entry::varname, and lua_local_var_entry::varname_len.
Referenced by luac_build_info().
|
static |
|
static |
Definition at line 79 of file luac_bin.c.
References RZ_FREE.
Referenced by luac_build_info().
|
static |
Definition at line 95 of file luac_bin.c.
References RZ_FREE, and rz_bin_string_t::string.
Referenced by luac_build_info().
|
static |
Definition at line 166 of file luac_bin.c.
References LUA_VFALSE, LUA_VLNGSTR, LUA_VNIL, LUA_VNUMFLT, LUA_VNUMINT, LUA_VSHRSTR, LUA_VTRUE, NULL, rz_return_val_if_fail, rz_str_newf(), and test-lz4-versions::tag.
Referenced by _luac_build_info().
Definition at line 147 of file luac_bin.c.
References LUA_VFALSE, LUA_VLNGSTR, LUA_VNIL, LUA_VNUMFLT, LUA_VNUMINT, LUA_VSHRSTR, LUA_VTRUE, and test-lz4-versions::tag.
Referenced by _luac_build_info().
|
static |
Definition at line 216 of file luac_bin.c.
References NULL, rz_return_val_if_fail, rz_str_newf(), and simple_build_upvalue_symbol().
Referenced by _luac_build_info().
Definition at line 44 of file luac_bin.c.
References rz_list_append(), and RZ_NEW0.
Referenced by luac_build_info().
Definition at line 6 of file luac_bin.c.
References rz_bin_section_t::arch, rz_bin_section_t::bits, rz_bin_section_t::has_strings, rz_bin_section_t::is_data, rz_bin_section_t::name, rz_bin_section_t::paddr, rz_bin_section_t::perm, rz_list_append(), RZ_NEW0, RZ_PERM_R, RZ_PERM_X, rz_str_new(), rz_bin_section_t::size, rz_bin_section_t::vaddr, and rz_bin_section_t::vsize.
Referenced by _luac_build_info().
Definition at line 57 of file luac_bin.c.
References rz_bin_string_t::length, rz_bin_string_t::paddr, rz_list_append(), RZ_NEW0, rz_str_new(), RZ_STRING_ENC_UTF8, rz_bin_string_t::size, rz_bin_string_t::string, rz_bin_string_t::type, and rz_bin_string_t::vaddr.
Referenced by _luac_build_info().
void luac_add_symbol | ( | RzList * | symbol_list, |
char * | name, | ||
ut64 | offset, | ||
ut64 | size, | ||
const char * | type | ||
) |
Definition at line 30 of file luac_bin.c.
References rz_bin_symbol_t::name, rz_bin_symbol_t::paddr, rz_list_append(), RZ_NEW0, rz_str_new(), rz_bin_symbol_t::size, type, rz_bin_symbol_t::type, and rz_bin_symbol_t::vaddr.
Referenced by _luac_build_info().
LuacBinInfo* luac_build_info | ( | LuaProto * | proto | ) |
Definition at line 114 of file luac_bin.c.
References _luac_build_info(), lua_proto_ex::code_offset, lua_proto_ex::code_skipped, luac_bin_info::entry_list, free_rz_addr(), free_rz_section(), free_rz_string(), luac_add_entry(), NULL, RZ_BIN_ENTRY_TYPE_PROGRAM, rz_bin_symbol_free(), rz_list_newf(), RZ_LOG_ERROR, RZ_NEW0, luac_bin_info::section_list, luac_bin_info::string_list, luac_bin_info::symbol_list, try_free_empty_list(), and ut64().
Referenced by load_buffer().
|
static |
Definition at line 212 of file luac_bin.c.
References rz_str_newf().
Referenced by get_upvalue_symbol_name().
|
static |
Definition at line 73 of file luac_bin.c.
References list(), NULL, and rz_list_free().
Referenced by luac_build_info().