Skip to content

Commit

Permalink
Explicitly print any address that doesn't match
Browse files Browse the repository at this point in the history
  • Loading branch information
mubes committed Dec 18, 2024
1 parent 1df6957 commit 5111550
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Src/symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define NO_FILE_TXT "No Source"

//#define GPTI_DEBUG 1 /* Define this for objdump data collection state machine trace */

//#define _DUMP_SYMBOLS /* Define this to dump all symbols at start of run */
#ifdef GPTI_DEBUG
#define GTPIP(...) { fprintf(stderr, __VA_ARGS__); }
#else
Expand Down Expand Up @@ -854,6 +854,26 @@ static enum symbolErr _getTargetProgramInfo( struct SymbolSet *s )
#endif

_sortLines( s );

#ifdef _DUMP_SYMBOLS
uint32_t sline = 0;
uint32_t functionindex = s->sources[0].functionIdx;
uint32_t firstaddr = s->sources[0].startAddr;

while ( sline < s->sourceCount - 1 )
{
if ( s->sources[sline + 1].functionIdx != functionindex )
{
printf( "%08x-%08x %s" EOL, firstaddr, s->sources[sline].endAddr, s->functions[functionindex].name );
functionindex = s->sources[sline + 1].functionIdx;
firstaddr = s->sources[sline + 1].startAddr;
}

sline++;
}

#endif

return SYMBOL_OK;
}
// ====================================================================================================
Expand Down Expand Up @@ -931,6 +951,7 @@ bool SymbolLookup( struct SymbolSet *s, uint32_t addr, struct nameEntry *n )
}


printf("%08x ",addr);
n->fileindex = n->functionindex = n->line = 0;
n->source = "";
n->assy = NULL;
Expand Down

0 comments on commit 5111550

Please sign in to comment.