71057 sr=waterson properly demangle C symbols NOT PART OF THE REGULAR BUILD

This commit is contained in:
dprice%netscape.com 2001-03-13 10:42:36 +00:00
Родитель dbec894840
Коммит b13183b421
1 изменённых файлов: 14 добавлений и 7 удалений

Просмотреть файл

@ -163,23 +163,26 @@ DumpFiles(PLDHashTable* table, PLDHashEntryHdr* hdr,
ModulesEntry* entry = (ModulesEntry*) hdr;
Node* cur = entry->byCount;
char dest[256];
char ilkName[256];
char pdbName[256];
FILE* orderFile;
strcpy(ilkName, entry->moduleName);
strcat(ilkName, ".ilk");
strcpy(pdbName, entry->moduleName);
strcat(pdbName, ".pdb");
if ( !::FindExecutableImage(ilkName, MOZ_SRC, dest) ) {
printf("+++ERROR Could not find %s\n",ilkName);
if ( !::FindExecutableImage(pdbName, MOZ_SRC, dest) ) {
printf("+++ERROR Could not find %s\n",pdbName);
return PL_DHASH_NEXT;
}
dest[strlen(dest)-strlen(ilkName)-strlen("WIN32_D.OBJ\\")] = 0;
dest[strlen(dest)-strlen(pdbName)-strlen("WIN32_D.OBJ\\")] = 0;
strcat(dest,"win32.order");
orderFile = fopen(dest,"w");
printf("Creating order file %s\n",dest);
while( cur ) {
fprintf(orderFile,"%s ; %d\n", cur->function, cur->count );
if(cur->function[0] == '_' && cur->function[1] == '_')
fprintf(orderFile,"%s ; %d\n", cur->function+1, cur->count );
else
fprintf(orderFile,"%s ; %d\n", cur->function, cur->count );
cur = cur->next;
}
@ -247,10 +250,14 @@ ListCounts(PLDHashTable* table, PLDHashEntryHdr* hdr,
foo->count = entry->count;
if ( cur->count < entry->count ) {
if (!strcmp(cur->function,symbol->Name))
return PL_DHASH_NEXT;
foo->next = mod->byCount;
mod->byCount = foo;
} else {
while ( cur->next ) {
if (!strcmp(cur->function,symbol->Name))
return PL_DHASH_NEXT;
if ( cur->next->count > entry->count ) { cur = cur->next; }
else { break; }
}