mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 16:33:19 +00:00
More changes to account for modules without debug info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5204 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
0077e37182
commit
ec6acb8606
@ -1255,7 +1255,11 @@ static void CopyModInfo (cc65_moduledata* D, const ModInfo* M)
|
||||
} else {
|
||||
D->library_id = CC65_INV_ID;
|
||||
}
|
||||
if (M->MainScope) {
|
||||
D->scope_id = M->MainScope->Id;
|
||||
} else {
|
||||
D->scope_id = CC65_INV_ID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4313,14 +4317,20 @@ static void ProcessScopeInfo (InputData* D)
|
||||
}
|
||||
}
|
||||
|
||||
/* Walk over all modules, check that eacxh one has a main scope assigned,
|
||||
* then sort the scopes by name
|
||||
/* Walk over all modules. If a module doesn't have scopes, it wasn't
|
||||
* compiled with debug info which is ok. If it has debug info, it must
|
||||
* also have a main scope. If there are scopes, sort them by name.
|
||||
*/
|
||||
for (I = 0; I < CollCount (&D->Info->ModInfoById); ++I) {
|
||||
|
||||
/* Get this module */
|
||||
ModInfo* M = CollAt (&D->Info->ModInfoById, I);
|
||||
|
||||
/* Ignore modules without any scopes (no debug info) */
|
||||
if (CollCount (&M->ScopeInfoByName) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Must have a main scope */
|
||||
if (M->MainScope == 0) {
|
||||
ParseError (D,
|
||||
|
@ -205,7 +205,11 @@ void cc65_free_lineinfo (cc65_dbginfo handle, const cc65_lineinfo* info);
|
||||
|
||||
|
||||
|
||||
/* Module information */
|
||||
/* Module information
|
||||
* Notes:
|
||||
* - scope_id contains CC65_INV_ID if the module was compiled without
|
||||
* debug information.
|
||||
*/
|
||||
typedef struct cc65_moduledata cc65_moduledata;
|
||||
struct cc65_moduledata {
|
||||
unsigned module_id; /* The internal module id */
|
||||
|
Loading…
Reference in New Issue
Block a user