mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
small refactoring
This commit is contained in:
parent
4f004a2442
commit
33882a2e15
@ -3188,13 +3188,13 @@ QList<ExportDescription> CutterCore::getAllExports()
|
|||||||
QList<SymbolDescription> CutterCore::getAllSymbols()
|
QList<SymbolDescription> CutterCore::getAllSymbols()
|
||||||
{
|
{
|
||||||
CORE_LOCK();
|
CORE_LOCK();
|
||||||
QList<SymbolDescription> ret;
|
RzBinFile *bf = rz_bin_cur(core->bin);
|
||||||
|
if (!bf) {
|
||||||
if (!(core && core->bin && core->bin->cur && core->bin->cur->o)) {
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const RzPVector *symbols = rz_bin_object_get_symbols(core->bin->cur->o);
|
QList<SymbolDescription> ret;
|
||||||
|
const RzPVector *symbols = rz_bin_object_get_symbols(bf->o);
|
||||||
if (symbols) {
|
if (symbols) {
|
||||||
for (const auto &bs : CutterPVector<RzBinSymbol>(symbols)) {
|
for (const auto &bs : CutterPVector<RzBinSymbol>(symbols)) {
|
||||||
QString type = QString(bs->bind) + " " + QString(bs->type);
|
QString type = QString(bs->bind) + " " + QString(bs->type);
|
||||||
@ -3207,7 +3207,7 @@ QList<SymbolDescription> CutterCore::getAllSymbols()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const RzList *entries = rz_bin_object_get_entries(core->bin->cur->o);
|
const RzList *entries = rz_bin_object_get_entries(bf->o);
|
||||||
if (entries) {
|
if (entries) {
|
||||||
/* list entrypoints as symbols too */
|
/* list entrypoints as symbols too */
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user