--- hatari/src/debug/symbols.c 2019/04/09 08:48:37 1.1 +++ hatari/src/debug/symbols.c 2019/04/09 08:49:26 1.1.1.2 @@ -34,7 +34,7 @@ typedef struct { } symbol_t; typedef struct { - int count; + unsigned int count; symbol_t *addresses; /* items sorted by address */ symbol_t *names; /* items sorted by symbol name */ } symbol_list_t; @@ -210,7 +210,7 @@ static symbol_list_t* Symbols_Load(const */ static void Symbols_Free(symbol_list_t* list) { - int i; + unsigned int i; if (!list) { return; @@ -235,8 +235,8 @@ static void Symbols_Free(symbol_list_t* */ static char* Symbols_MatchByName(symbol_list_t* list, symtype_t symtype, const char *text, int state) { + static unsigned int i, len; const symbol_t *entry; - static int i, len; if (!list) { return NULL; @@ -426,8 +426,8 @@ const char* Symbols_GetByDspAddress(Uint static void Symbols_Show(symbol_list_t* list, const char *sorttype) { symbol_t *entry, *entries; + unsigned int i; char symchar; - int i; if (!list) { fprintf(stderr, "No symbols!\n"); @@ -538,3 +538,15 @@ int Symbols_Command(int nArgc, char *psA } return DEBUGGER_CMDDONE; } + +/** + * Return how many symbols are loaded/available + */ +unsigned int Symbols_CpuCount(void) +{ + return (CpuSymbolsList ? CpuSymbolsList->count : 0); +} +unsigned int Symbols_DspCount(void) +{ + return (DspSymbolsList ? DspSymbolsList->count : 0); +}