Re-add rz_core_sym_name & rz_core_sym_is_export wrongly removed.

This commit is contained in:
wargio 2023-06-08 19:39:18 +08:00 committed by Anton Kochkov
parent 4186be8b56
commit 5f30f1c966
2 changed files with 5 additions and 2 deletions

View file

@ -1877,7 +1877,7 @@ RZ_API bool rz_core_bin_entries_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinF
return entries_initfini_print(core, bf, state, false);
}
static bool is_symbol_exported(RZ_NONNULL RzBinSymbol *s) {
RZ_API bool rz_core_sym_is_export(RZ_NONNULL RzBinSymbol *s) {
rz_return_val_if_fail(s, false);
/* workaround for some RzBinPlugins */
if (s->is_imported) {
@ -1910,7 +1910,7 @@ static bool symbols_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state,
if (!symbol->name) {
continue;
}
if (only_export && !is_symbol_exported(symbol)) {
if (only_export && !rz_core_sym_is_export(symbol)) {
continue;
}
ut64 addr = rva(o, symbol->paddr, symbol->vaddr, va);

View file

@ -1284,6 +1284,9 @@ RZ_API void rz_core_rtr_enable(RZ_NONNULL RzCore *core, const char *cmdremote);
RZ_API RZ_OWN char *rz_core_analysis_var_to_string(RZ_NONNULL RzCore *core, RZ_NONNULL RzAnalysisVar *var);
RZ_API void rz_core_sym_name_init(RZ_NONNULL RZ_OUT RzBinSymNames *names, RZ_NONNULL RzBinSymbol *symbol);
RZ_API void rz_core_sym_name_fini(RZ_NULLABLE RzBinSymNames *names);
#endif
#ifdef __cplusplus