struct symt symt;
struct hash_table_elt hash_elt;
struct symt* container; /* compiland */
+ BOOL is_function;
unsigned long address;
unsigned long size;
};
symt_new_public(struct module* module,
struct symt_compiland* parent,
const char* typename,
- unsigned long address, unsigned size) DECLSPEC_HIDDEN;
+ BOOL is_function,
+ unsigned long address,
+ unsigned size) DECLSPEC_HIDDEN;
extern struct symt_data*
symt_new_global_variable(struct module* module,
struct symt_compiland* parent,
{
symt_new_public(msc_dbg->module, compiland,
terminate_string(&sym->public_v1.p_name),
+ sym->public_v1.symtype == SYMTYPE_FUNCTION,
codeview_get_address(msc_dbg, sym->public_v1.segment, sym->public_v1.offset), 1);
}
break;
{
symt_new_public(msc_dbg->module, compiland,
terminate_string(&sym->public_v2.p_name),
+ sym->public_v3.symtype == SYMTYPE_FUNCTION,
codeview_get_address(msc_dbg, sym->public_v2.segment, sym->public_v2.offset), 1);
}
break;
{
symt_new_public(msc_dbg->module, compiland,
sym->public_v3.name,
+ sym->public_v3.symtype == SYMTYPE_FUNCTION,
codeview_get_address(msc_dbg, sym->public_v3.segment, sym->public_v3.offset), 1);
}
break;
if (ret)
{
struct pdb_module_info* pdb_info = msc_dbg->module->format_info[DFI_PDB]->u.pdb_info;
- msc_dbg->module->module.SymType = SymCv;
+ msc_dbg->module->module.SymType = SymPdb;
if (pdb_info->pdb_files[0].kind == PDB_JG)
msc_dbg->module->module.PdbSig = pdb_info->pdb_files[0].u.jg.timestamp;
else
source_new(module, NULL, lastfilename));
if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
- symt_new_public(module, compiland, name,
+ symt_new_public(module, compiland, name, FALSE,
module->module.BaseOfImage + sect[isym->SectionNumber - 1].VirtualAddress +
- isym->Value,
+ isym->Value,
1);
}
naux = isym->NumberOfAuxSymbols + 1;
#if 0
/* Add start of DLL (better use the (yet unimplemented) Exe SymTag for this) */
/* FIXME: module.ModuleName isn't correctly set yet if it's passed in SymLoadModule */
- symt_new_public(module, NULL, module->module.ModuleName, base, 1);
+ symt_new_public(module, NULL, module->module.ModuleName, FALSE, base, 1);
#endif
/* Add entry point */
- symt_new_public(module, NULL, "EntryPoint",
+ symt_new_public(module, NULL, "EntryPoint", FALSE,
base + nth->OptionalHeader.AddressOfEntryPoint, 1);
#if 0
/* FIXME: we'd better store addresses linked to sections rather than
((char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader);
for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++)
{
- symt_new_public(module, NULL, section->Name,
+ symt_new_public(module, NULL, section->Name, FALSE,
RtlImageRvaToVa(nth, mapping, section->VirtualAddress, NULL), 1);
}
#endif
if (!names[i]) continue;
symt_new_public(module, NULL,
RtlImageRvaToVa(nth, mapping, names[i], NULL),
+ FALSE,
base + functions[ordinals[i]], 1);
}
if ((ordinals[j] == i) && names[j]) break;
if (j < exports->NumberOfNames) continue;
snprintf(buffer, sizeof(buffer), "%d", i + exports->Base);
- symt_new_public(module, NULL, buffer, base + (DWORD)functions[i], 1);
+ symt_new_public(module, NULL, buffer, FALSE, base + (DWORD)functions[i], 1);
}
}
}
if (use_raw_address(SymbolName))
Address = Entry->Address;
- symt_new_public(module, NULL, SymbolName, Address, Size);
+ symt_new_public(module, NULL, SymbolName, FALSE, Address, Size);
}
else
{
struct symt_public* symt_new_public(struct module* module,
struct symt_compiland* compiland,
const char* name,
+ BOOL is_function,
unsigned long address, unsigned size)
{
struct symt_public* sym;
sym->symt.tag = SymTagPublicSymbol;
sym->hash_elt.name = pool_strdup(&module->pool, name);
sym->container = compiland ? &compiland->symt : NULL;
+ sym->is_function = is_function;
sym->address = address;
sym->size = size;
symt_add_module_ht(module, (struct symt_ht*)sym);
}
break;
case SymTagPublicSymbol:
- sym_info->Flags |= SYMFLAG_EXPORT;
- symt_get_address(sym, &sym_info->Address);
+ {
+ const struct symt_public* pub = (const struct symt_public*)sym;
+ if (pub->is_function)
+ sym_info->Flags |= SYMFLAG_PUBLIC_CODE;
+ else
+ sym_info->Flags |= SYMFLAG_EXPORT;
+ symt_get_address(sym, &sym_info->Address);
+ }
break;
case SymTagFunction:
- sym_info->Flags |= SYMFLAG_FUNCTION;
symt_get_address(sym, &sym_info->Address);
break;
case SymTagThunk: