From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/dbghelp/dbghelp_private.h | 6 +++--- dlls/dbghelp/dwarf.c | 6 +++--- dlls/dbghelp/msc.c | 12 ++++++------ dlls/dbghelp/type.c | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 852f883aa0b..1bb1f0e08cf 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -388,7 +388,7 @@ struct symt_typedef { struct symt symt; struct hash_table_elt hash_elt; - struct symt* type; + symref_t type; };
struct symt_udt @@ -1010,11 +1010,11 @@ extern BOOL symt_add_function_signature_parameter(struct module* module, struct symt_function_signature* sig, struct symt* param); extern struct symt_pointer* - symt_new_pointer(struct module* module, + symt_new_pointer(struct module* module, struct symt* ref_type, ULONG_PTR size); extern struct symt_typedef* - symt_new_typedef(struct module* module, struct symt* ref, + symt_new_typedef(struct module* module, symref_t ref, const char* name); extern struct symt_function* symt_find_lowest_inlined(struct symt_function* func, DWORD64 addr); diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 60aa04270b5..0a4f62cf7ff 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -715,7 +715,7 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx, static struct symt *symt_get_real_type(struct symt *symt) { while (symt && symt->tag == SymTagTypedef) - symt = ((struct symt_typedef*)symt)->type; + symt = (struct symt*)(((struct symt_typedef*)symt)->type); return symt; }
@@ -1650,7 +1650,7 @@ static struct symt* dwarf2_parse_typedef(dwarf2_debug_info_t* di) */ if ((is_c_language(di->unit_ctx) || is_cpp_language(di->unit_ctx)) && !strcmp(name.u.string, "WCHAR")) ref_type = &symt_get_basic(btWChar, 2)->symt; - di->symt = &symt_new_typedef(di->unit_ctx->module_ctx->module, ref_type, name.u.string)->symt; + di->symt = &symt_new_typedef(di->unit_ctx->module_ctx->module, symt_ptr_to_symref(ref_type), name.u.string)->symt; } if (dwarf2_get_di_children(di)) FIXME("Unsupported children\n"); return di->symt; @@ -1822,7 +1822,7 @@ static struct symt* dwarf2_parse_unspecified_type(dwarf2_debug_info_t* di) basic = &symt_get_basic(btVoid, 0)->symt; if (dwarf2_find_attribute(di, DW_AT_name, &name)) /* define the missing type as a typedef to void... */ - di->symt = &symt_new_typedef(di->unit_ctx->module_ctx->module, basic, name.u.string)->symt; + di->symt = &symt_new_typedef(di->unit_ctx->module_ctx->module, symt_ptr_to_symref(basic), name.u.string)->symt; else /* or use void if it doesn't even have a name */ di->symt = basic;
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 56e1491ee7b..5163532a41d 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2679,7 +2679,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, if (sym->udt_v1.type) { if ((symt = codeview_get_type(sym->udt_v1.type, FALSE))) - symt_new_typedef(msc_dbg->module, symt, + symt_new_typedef(msc_dbg->module, symt_ptr_to_symref(symt), terminate_string(&sym->udt_v1.p_name)); else FIXME("S-Udt %s: couldn't find type 0x%x\n", @@ -2690,7 +2690,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, if (sym->udt_v2.type) { if ((symt = codeview_get_type(sym->udt_v2.type, FALSE))) - symt_new_typedef(msc_dbg->module, symt, + symt_new_typedef(msc_dbg->module, symt_ptr_to_symref(symt), terminate_string(&sym->udt_v2.p_name)); else FIXME("S-Udt %s: couldn't find type 0x%x\n", @@ -2701,7 +2701,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, if (sym->udt_v3.type) { if ((symt = codeview_get_type(sym->udt_v3.type, FALSE))) - symt_new_typedef(msc_dbg->module, symt, sym->udt_v3.name); + symt_new_typedef(msc_dbg->module, symt_ptr_to_symref(symt), sym->udt_v3.name); else FIXME("S-Udt %s: couldn't find type 0x%x\n", debugstr_a(sym->udt_v3.name), sym->udt_v3.type); @@ -2988,7 +2988,7 @@ static BOOL pdb_global_feed_types(const struct msc_debug_info* msc_dbg, const un if (sym->udt_v1.type) { if ((symt = codeview_get_type(sym->udt_v1.type, FALSE))) - symt_new_typedef(msc_dbg->module, symt, + symt_new_typedef(msc_dbg->module, symt_ptr_to_symref(symt), terminate_string(&sym->udt_v1.p_name)); else FIXME("S-Udt %s: couldn't find type 0x%x\n", @@ -2999,7 +2999,7 @@ static BOOL pdb_global_feed_types(const struct msc_debug_info* msc_dbg, const un if (sym->udt_v2.type) { if ((symt = codeview_get_type(sym->udt_v2.type, FALSE))) - symt_new_typedef(msc_dbg->module, symt, + symt_new_typedef(msc_dbg->module, symt_ptr_to_symref(symt), terminate_string(&sym->udt_v2.p_name)); else FIXME("S-Udt %s: couldn't find type 0x%x\n", @@ -3010,7 +3010,7 @@ static BOOL pdb_global_feed_types(const struct msc_debug_info* msc_dbg, const un if (sym->udt_v3.type) { if ((symt = codeview_get_type(sym->udt_v3.type, FALSE))) - symt_new_typedef(msc_dbg->module, symt, sym->udt_v3.name); + symt_new_typedef(msc_dbg->module, symt_ptr_to_symref(symt), sym->udt_v3.name); else FIXME("S-Udt %s: couldn't find type 0x%x\n", debugstr_a(sym->udt_v3.name), sym->udt_v3.type); diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c index 4fa4c8e7b00..e47a04401c1 100644 --- a/dlls/dbghelp/type.c +++ b/dlls/dbghelp/type.c @@ -430,7 +430,7 @@ struct symt_pointer* symt_new_pointer(struct module* module, struct symt* ref_ty return sym; }
-struct symt_typedef* symt_new_typedef(struct module* module, struct symt* ref, +struct symt_typedef* symt_new_typedef(struct module* module, symref_t ref, const char* typename) { struct symt_typedef* sym; @@ -818,7 +818,7 @@ BOOL symt_get_info(struct module* module, const struct symt* type, X(DWORD64) = ((const struct symt_public*)type)->size; break; case SymTagTypedef: - return symt_get_info(module, ((const struct symt_typedef*)type)->type, TI_GET_LENGTH, pInfo); + return symt_get_info_from_symref(module, ((const struct symt_typedef*)type)->type, TI_GET_LENGTH, pInfo); case SymTagThunk: X(DWORD64) = ((const struct symt_thunk*)type)->size; break; @@ -990,7 +990,7 @@ BOOL symt_get_info(struct module* module, const struct symt* type, X(DWORD) = symt_ptr_to_index(module, ((const struct symt_function_signature*)type)->rettype); break; case SymTagTypedef: - X(DWORD) = symt_ptr_to_index(module, ((const struct symt_typedef*)type)->type); + X(DWORD) = symt_symref_to_index(module, ((const struct symt_typedef*)type)->type); break; /* lexical => hierarchical */ case SymTagData: