Read and allow access to the segment for (segment based) symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5063 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -39,6 +39,10 @@
|
||||
|
||||
|
||||
|
||||
static cc65_dbginfo Info;
|
||||
|
||||
|
||||
|
||||
static void ErrorFunc (const struct cc65_parseerror* E)
|
||||
/* Handle errors or warnings that occur while parsing a debug file */
|
||||
{
|
||||
@@ -113,9 +117,20 @@ static void PrintLineData (const cc65_linedata* D)
|
||||
static void PrintSymbolData (const cc65_symboldata* D)
|
||||
/* Print the data for one symbol */
|
||||
{
|
||||
printf (" %-20s = %04lX (size %u)\n",
|
||||
D->symbol_name,
|
||||
char Segment[256] = { 0 }; /* Needs dynamic alloc ### */
|
||||
if (D->symbol_segment != CC65_INV_ID) {
|
||||
cc65_segmentinfo* I = cc65_segmentinfo_byid (Info, D->symbol_segment);
|
||||
if (I && I->count == 1) {
|
||||
sprintf (Segment, "segment=%s,", I->data[0].segment_name);
|
||||
cc65_free_segmentinfo (Info, I);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
printf (" %-20s = %04lX (%ssize=%u)\n",
|
||||
D->symbol_name,
|
||||
D->symbol_value,
|
||||
Segment,
|
||||
D->symbol_size);
|
||||
}
|
||||
|
||||
@@ -176,7 +191,6 @@ static void PrintSymbolInfo (const cc65_symbolinfo* Symbols)
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
const char* Input;
|
||||
cc65_dbginfo Info;
|
||||
cc65_sourceinfo* Sources;
|
||||
cc65_segmentinfo* Segments;
|
||||
cc65_lineinfo* Lines;
|
||||
|
||||
Reference in New Issue
Block a user