Commit c4f1f5b1 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Get rid of symt_inlinesite by merging it inside symt_function.

Basically: - extending symt_function to enable storage of multiple address ranges - symt_function and sym_inlinesite now share the same fields, so get rid to the later. Note that only the first range of a top level function is actually stored and used (even if the structure allows for more). Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
parent 790a2852
......@@ -706,7 +706,7 @@ BOOL WINAPI SymSetScopeFromIndex(HANDLE hProcess, ULONG64 addr, DWORD index)
BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD inlinectx)
{
struct module_pair pair;
struct symt_inlinesite* inlined;
struct symt_function* inlined;
TRACE("(%p %I64x %lx)\n", hProcess, addr, inlinectx);
......@@ -718,7 +718,7 @@ BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD in
if (inlined)
{
pair.pcs->localscope_pc = addr;
pair.pcs->localscope_symt = &inlined->func.symt;
pair.pcs->localscope_symt = &inlined->symt;
return TRUE;
}
/* fall through */
......
......@@ -284,20 +284,13 @@ struct symt_data
struct symt_function
{
struct symt symt; /* SymTagFunction (or SymTagInlineSite when embedded in symt_inlinesite) */
struct hash_table_elt hash_elt; /* if global symbol */
struct symt* container; /* compiland */
struct symt symt; /* SymTagFunction or SymTagInlineSite */
struct hash_table_elt hash_elt; /* if global symbol, inline site */
struct symt* container; /* compiland (for SymTagFunction) or function (for SymTagInlineSite) */
struct symt* type; /* points to function_signature */
struct vector vlines;
struct vector vchildren; /* locals, params, blocks, start/end, labels, inline sites */
struct symt_inlinesite* next_inlinesite;/* linked list of inline sites in this function */
struct addr_range ranges[1];
};
/* a symt_inlinesite* can be casted to a symt_function* to access all function bits */
struct symt_inlinesite
{
struct symt_function func;
struct symt_function* next_inlinesite;/* linked list of inline sites in this function */
unsigned num_ranges;
struct addr_range ranges[];
};
......@@ -850,7 +843,7 @@ extern struct symt_function*
const char* name,
ULONG_PTR addr, ULONG_PTR size,
struct symt* type) DECLSPEC_HIDDEN;
extern struct symt_inlinesite*
extern struct symt_function*
symt_new_inlinesite(struct module* module,
struct symt_function* func,
struct symt* parent,
......@@ -945,18 +938,18 @@ extern struct symt_pointer*
extern struct symt_typedef*
symt_new_typedef(struct module* module, struct symt* ref,
const char* name) DECLSPEC_HIDDEN;
extern struct symt_inlinesite*
extern struct symt_function*
symt_find_lowest_inlined(struct symt_function* func, DWORD64 addr) DECLSPEC_HIDDEN;
extern struct symt*
symt_get_upper_inlined(struct symt_inlinesite* inlined) DECLSPEC_HIDDEN;
symt_get_upper_inlined(struct symt_function* inlined) DECLSPEC_HIDDEN;
static inline struct symt_function*
symt_get_function_from_inlined(struct symt_inlinesite* inlined)
symt_get_function_from_inlined(struct symt_function* inlined)
{
while (!symt_check_tag(&inlined->func.symt, SymTagFunction))
inlined = (struct symt_inlinesite*)symt_get_upper_inlined(inlined);
return &inlined->func;
while (!symt_check_tag(&inlined->symt, SymTagFunction))
inlined = (struct symt_function*)symt_get_upper_inlined(inlined);
return inlined;
}
extern struct symt_inlinesite*
extern struct symt_function*
symt_find_inlined_site(struct module* module,
DWORD64 addr, DWORD inline_ctx) DECLSPEC_HIDDEN;
extern DWORD symt_get_inlinesite_depth(HANDLE hProcess, DWORD64 addr) DECLSPEC_HIDDEN;
......
......@@ -2113,7 +2113,7 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
struct attribute name;
struct symt* ret_type;
struct symt_function_signature* sig_type;
struct symt_inlinesite* inlined;
struct symt_function* inlined;
struct vector* children;
dwarf2_debug_info_t*child;
unsigned int i;
......@@ -2149,8 +2149,6 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
FIXME("Unexpected situation\n");
inlined->num_ranges = 0;
}
/* temporary: update address field */
inlined->func.ranges[0].low = inlined->ranges[0].low;
children = dwarf2_get_di_children(di);
if (children) for (i = 0; i < vector_length(children); i++)
......@@ -2182,7 +2180,7 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
}
subpgm->current_block = symt_check_tag(subpgm->current_func->container, SymTagBlock) ?
(struct symt_block*)subpgm->current_func->container : NULL;
subpgm->current_func = (struct symt_function*)symt_get_upper_inlined((struct symt_inlinesite*)subpgm->current_func);
subpgm->current_func = (struct symt_function*)symt_get_upper_inlined(subpgm->current_func);
}
static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm,
......@@ -2601,7 +2599,7 @@ static void dwarf2_set_line_number(struct module* module, ULONG_PTR address,
const struct vector* v, unsigned file, unsigned line)
{
struct symt_function* func;
struct symt_inlinesite* inlined;
struct symt_function* inlined;
struct symt_ht* symt;
unsigned* psrc;
......@@ -2613,14 +2611,14 @@ static void dwarf2_set_line_number(struct module* module, ULONG_PTR address,
if (symt_check_tag(&symt->symt, SymTagFunction))
{
func = (struct symt_function*)symt;
for (inlined = func->next_inlinesite; inlined; inlined = inlined->func.next_inlinesite)
for (inlined = func->next_inlinesite; inlined; inlined = inlined->next_inlinesite)
{
int i;
for (i = 0; i < inlined->num_ranges; ++i)
{
if (inlined->ranges[i].low <= address && address < inlined->ranges[i].high)
{
symt_add_func_line(module, &inlined->func, *psrc, line, address);
symt_add_func_line(module, inlined, *psrc, line, address);
return; /* only add to lowest matching inline site */
}
}
......@@ -3019,7 +3017,7 @@ static BOOL dwarf2_lookup_loclist(const struct module_format* modfmt, const dwar
static const dwarf2_cuhead_t* get_cuhead_from_func(const struct symt_function* func)
{
if (symt_check_tag(&func->symt, SymTagInlineSite))
func = symt_get_function_from_inlined((struct symt_inlinesite*)func);
func = symt_get_function_from_inlined((struct symt_function*)func);
if (symt_check_tag(&func->symt, SymTagFunction) && symt_check_tag(func->container, SymTagCompiland))
{
struct symt_compiland* c = (struct symt_compiland*)func->container;
......
......@@ -1012,7 +1012,7 @@ BOOL module_remove(struct process* pcs, struct module* module)
{
struct symt* locsym = pcs->localscope_symt;
if (symt_check_tag(locsym, SymTagInlineSite))
locsym = &symt_get_function_from_inlined((struct symt_inlinesite*)locsym)->symt;
locsym = &symt_get_function_from_inlined((struct symt_function*)locsym)->symt;
if (symt_check_tag(locsym, SymTagFunction))
{
locsym = ((struct symt_function*)locsym)->container;
......
......@@ -2077,7 +2077,7 @@ static BOOL cv_dbgsubsect_find_inlinee(const struct msc_debug_info* msc_dbg,
return FALSE;
}
static inline void inline_site_update_last_range(struct symt_inlinesite* inlined, unsigned index, ULONG_PTR hi)
static inline void inline_site_update_last_range(struct symt_function* inlined, unsigned index, ULONG_PTR hi)
{
if (index && index <= inlined->num_ranges)
{
......@@ -2119,17 +2119,17 @@ static unsigned inline_site_get_num_ranges(const unsigned char* annot,
return num_ranges;
}
static struct symt_inlinesite* codeview_create_inline_site(const struct msc_debug_info* msc_dbg,
const struct cv_module_snarf* cvmod,
struct symt_function* top_func,
struct symt* container,
cv_itemid_t inlinee,
const unsigned char* annot,
const unsigned char* last_annot)
static struct symt_function* codeview_create_inline_site(const struct msc_debug_info* msc_dbg,
const struct cv_module_snarf* cvmod,
struct symt_function* top_func,
struct symt* container,
cv_itemid_t inlinee,
const unsigned char* annot,
const unsigned char* last_annot)
{
const struct CV_DebugSSubsectionHeader_t* hdr_files = NULL;
const union codeview_type* cvt;
struct symt_inlinesite* inlined;
struct symt_function* inlined;
struct cv_binannot cvba;
BOOL srcok;
unsigned num_ranges;
......@@ -2194,7 +2194,7 @@ static struct symt_inlinesite* codeview_create_inline_site(const struct msc_debu
offset += cvba.arg1;
inline_site_update_last_range(inlined, index, top_func->ranges[0].low + offset);
if (srcok)
symt_add_func_line(msc_dbg->module, &inlined->func, srcfile, line, top_func->ranges[0].low + offset);
symt_add_func_line(msc_dbg->module, inlined, srcfile, line, top_func->ranges[0].low + offset);
inlined->ranges[index ].low = top_func->ranges[0].low + offset;
inlined->ranges[index++].high = top_func->ranges[0].low + offset;
break;
......@@ -2215,7 +2215,7 @@ static struct symt_inlinesite* codeview_create_inline_site(const struct msc_debu
offset += cvba.arg1;
inline_site_update_last_range(inlined, index, top_func->ranges[0].low + offset);
if (srcok)
symt_add_func_line(msc_dbg->module, &inlined->func, srcfile, line, top_func->ranges[0].low + offset);
symt_add_func_line(msc_dbg->module, inlined, srcfile, line, top_func->ranges[0].low + offset);
inlined->ranges[index ].low = top_func->ranges[0].low + offset;
inlined->ranges[index++].high = top_func->ranges[0].low + offset;
break;
......@@ -2223,7 +2223,7 @@ static struct symt_inlinesite* codeview_create_inline_site(const struct msc_debu
offset += cvba.arg2;
inline_site_update_last_range(inlined, index, top_func->ranges[0].low + offset);
if (srcok)
symt_add_func_line(msc_dbg->module, &inlined->func, srcfile, line, top_func->ranges[0].low + offset);
symt_add_func_line(msc_dbg->module, inlined, srcfile, line, top_func->ranges[0].low + offset);
inlined->ranges[index ].low = top_func->ranges[0].low + offset;
inlined->ranges[index++].high = top_func->ranges[0].low + offset + cvba.arg1;
break;
......@@ -2238,10 +2238,8 @@ static struct symt_inlinesite* codeview_create_inline_site(const struct msc_debu
{
struct addr_range* range = &inlined->ranges[inlined->num_ranges - 1];
if (range->low == range->high) WARN("pending empty range at end of %s inside %s\n",
inlined->func.hash_elt.name,
inlined->hash_elt.name,
top_func->hash_elt.name);
/* temporary: update address field */
inlined->func.ranges[0].low = inlined->ranges[0].low;
}
return inlined;
}
......@@ -2657,11 +2655,11 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
break;
case S_INLINESITE:
{
struct symt_inlinesite* inlined = codeview_create_inline_site(msc_dbg, cvmod, top_func,
block ? &block->symt : &curr_func->symt,
sym->inline_site_v3.inlinee,
sym->inline_site_v3.binaryAnnotations,
(const unsigned char*)sym + length);
struct symt_function* inlined = codeview_create_inline_site(msc_dbg, cvmod, top_func,
block ? &block->symt : &curr_func->symt,
sym->inline_site_v3.inlinee,
sym->inline_site_v3.binaryAnnotations,
(const unsigned char*)sym + length);
if (inlined)
{
curr_func = (struct symt_function*)inlined;
......@@ -2678,11 +2676,11 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
break;
case S_INLINESITE2:
{
struct symt_inlinesite* inlined = codeview_create_inline_site(msc_dbg, cvmod, top_func,
block ? &block->symt : &curr_func->symt,
sym->inline_site2_v3.inlinee,
sym->inline_site2_v3.binaryAnnotations,
(const unsigned char*)sym + length);
struct symt_function* inlined = codeview_create_inline_site(msc_dbg, cvmod, top_func,
block ? &block->symt : &curr_func->symt,
sym->inline_site2_v3.inlinee,
sym->inline_site2_v3.binaryAnnotations,
(const unsigned char*)sym + length);
if (inlined)
{
curr_func = (struct symt_function*)inlined;
......@@ -2701,7 +2699,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
case S_INLINESITE_END:
block = symt_check_tag(curr_func->container, SymTagBlock) ?
(struct symt_block*)curr_func->container : NULL;
curr_func = (struct symt_function*)symt_get_upper_inlined((struct symt_inlinesite*)curr_func);
curr_func = (struct symt_function*)symt_get_upper_inlined(curr_func);
break;
/*
......
......@@ -314,23 +314,27 @@ struct symt_data* symt_new_global_variable(struct module* module,
return sym;
}
static void init_function_or_inlinesite(struct symt_function* sym,
struct module* module,
DWORD tag,
struct symt* container,
const char* name,
ULONG_PTR addr, ULONG_PTR size,
struct symt* sig_type)
static struct symt_function* init_function_or_inlinesite(struct module* module,
DWORD tag,
struct symt* container,
const char* name,
struct symt* sig_type,
unsigned num_ranges)
{
struct symt_function* sym;
assert(!sig_type || sig_type->tag == SymTagFunctionType);
sym->symt.tag = tag;
sym->hash_elt.name = pool_strdup(&module->pool, name);
sym->container = container;
sym->ranges[0].low = addr;
sym->ranges[0].high = addr + size;
sym->type = sig_type;
vector_init(&sym->vlines, sizeof(struct line_info), 64);
vector_init(&sym->vchildren, sizeof(struct symt*), 8);
if ((sym = pool_alloc(&module->pool, offsetof(struct symt_function, ranges[num_ranges]))))
{
sym->symt.tag = tag;
sym->hash_elt.name = pool_strdup(&module->pool, name);
sym->container = container;
sym->type = sig_type;
vector_init(&sym->vlines, sizeof(struct line_info), 64);
vector_init(&sym->vchildren, sizeof(struct symt*), 8);
sym->num_ranges = num_ranges;
}
return sym;
}
struct symt_function* symt_new_function(struct module* module,
......@@ -343,10 +347,11 @@ struct symt_function* symt_new_function(struct module* module,
TRACE_(dbghelp_symt)("Adding global function %s:%s @%Ix-%Ix\n",
debugstr_w(module->modulename), name, addr, addr + size - 1);
if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
if ((sym = init_function_or_inlinesite(module, SymTagFunction, &compiland->symt, name, sig_type, 1)))
{
struct symt** p;
init_function_or_inlinesite(sym, module, SymTagFunction, &compiland->symt, name, addr, size, sig_type);
sym->ranges[0].low = addr;
sym->ranges[0].high = addr + size;
sym->next_inlinesite = NULL; /* first of list */
symt_add_module_ht(module, (struct symt_ht*)sym);
if (compiland)
......@@ -358,25 +363,24 @@ struct symt_function* symt_new_function(struct module* module,
return sym;
}
struct symt_inlinesite* symt_new_inlinesite(struct module* module,
struct symt_function* func,
struct symt* container,
const char* name,
struct symt* sig_type,
unsigned num_ranges)
struct symt_function* symt_new_inlinesite(struct module* module,
struct symt_function* func,
struct symt* container,
const char* name,
struct symt* sig_type,
unsigned num_ranges)
{
struct symt_inlinesite* sym;
struct symt_function* sym;
TRACE_(dbghelp_symt)("Adding inline site %s\n", name);
if ((sym = pool_alloc(&module->pool, offsetof(struct symt_inlinesite, ranges[num_ranges]))))
if ((sym = init_function_or_inlinesite(module, SymTagInlineSite, container, name, sig_type, num_ranges)))
{
struct symt** p;
assert(container);
init_function_or_inlinesite(&sym->func, module, SymTagInlineSite, container, name, 0, 0, sig_type);
/* chain inline sites */
sym->func.next_inlinesite = func->next_inlinesite;
sym->next_inlinesite = func->next_inlinesite;
func->next_inlinesite = sym;
sym->num_ranges = num_ranges;
if (container->tag == SymTagFunction || container->tag == SymTagInlineSite)
p = vector_add(&((struct symt_function*)container)->vchildren, &module->pool);
else
......@@ -384,7 +388,7 @@ struct symt_inlinesite* symt_new_inlinesite(struct module* module,
assert(container->tag == SymTagBlock);
p = vector_add(&((struct symt_block*)container)->vchildren, &module->pool);
}
*p = &sym->func.symt;
*p = &sym->symt;
}
return sym;
}
......@@ -1201,13 +1205,13 @@ void copy_symbolW(SYMBOL_INFOW* siw, const SYMBOL_INFO* si)
}
/* return the lowest inline site inside a function */
struct symt_inlinesite* symt_find_lowest_inlined(struct symt_function* func, DWORD64 addr)
struct symt_function* symt_find_lowest_inlined(struct symt_function* func, DWORD64 addr)
{
struct symt_inlinesite* current;
struct symt_function* current;
int i;
assert(func->symt.tag == SymTagFunction);
for (current = func->next_inlinesite; current; current = current->func.next_inlinesite)
for (current = func->next_inlinesite; current; current = current->next_inlinesite)
{
for (i = 0; i < current->num_ranges; ++i)
{
......@@ -1220,9 +1224,9 @@ struct symt_inlinesite* symt_find_lowest_inlined(struct symt_function* func, DWO
}
/* from an inline function, get either the enclosing inlined function, or the top function when no inlined */
struct symt* symt_get_upper_inlined(struct symt_inlinesite* inlined)
struct symt* symt_get_upper_inlined(struct symt_function* inlined)
{
struct symt* symt = &inlined->func.symt;
struct symt* symt = &inlined->symt;
do
{
......@@ -1237,18 +1241,18 @@ struct symt* symt_get_upper_inlined(struct symt_inlinesite* inlined)
}
/* lookup in module for an inline site (from addr and inline_ctx) */
struct symt_inlinesite* symt_find_inlined_site(struct module* module, DWORD64 addr, DWORD inline_ctx)
struct symt_function* symt_find_inlined_site(struct module* module, DWORD64 addr, DWORD inline_ctx)
{
struct symt_ht* symt = symt_find_symbol_at(module, addr);
if (symt_check_tag(&symt->symt, SymTagFunction))
{
struct symt_function* func = (struct symt_function*)symt;
struct symt_inlinesite* curr = symt_find_lowest_inlined(func, addr);
struct symt_function* curr = symt_find_lowest_inlined(func, addr);
DWORD depth = IFC_DEPTH(inline_ctx);
if (curr)
for ( ; &curr->func != func; curr = (struct symt_inlinesite*)symt_get_upper_inlined(curr))
for ( ; curr != func; curr = (struct symt_function*)symt_get_upper_inlined(curr))
if (depth-- == 0) return curr;
}
return NULL;
......@@ -1264,10 +1268,10 @@ DWORD symt_get_inlinesite_depth(HANDLE hProcess, DWORD64 addr)
struct symt_ht* symt = symt_find_symbol_at(pair.effective, addr);
if (symt_check_tag(&symt->symt, SymTagFunction))
{
struct symt_inlinesite* inlined = symt_find_lowest_inlined((struct symt_function*)symt, addr);
struct symt_function* inlined = symt_find_lowest_inlined((struct symt_function*)symt, addr);
if (inlined)
{
for ( ; &inlined->func.symt != &symt->symt; inlined = (struct symt_inlinesite*)symt_get_upper_inlined(inlined))
for ( ; &inlined->symt != &symt->symt; inlined = (struct symt_function*)symt_get_upper_inlined(inlined))
++depth;
}
}
......@@ -2673,7 +2677,7 @@ PWSTR WINAPI SymSetHomeDirectoryW(HANDLE hProcess, PCWSTR dir)
BOOL WINAPI SymFromInlineContext(HANDLE hProcess, DWORD64 addr, ULONG inline_ctx, PDWORD64 disp, PSYMBOL_INFO si)
{
struct module_pair pair;
struct symt_inlinesite* inlined;
struct symt_function* inlined;
TRACE("(%p, %#I64x, 0x%lx, %p, %p)\n", hProcess, addr, inline_ctx, disp, si);
......@@ -2684,8 +2688,8 @@ BOOL WINAPI SymFromInlineContext(HANDLE hProcess, DWORD64 addr, ULONG inline_ctx
inlined = symt_find_inlined_site(pair.effective, addr, inline_ctx);
if (inlined)
{
symt_fill_sym_info(&pair, NULL, &inlined->func.symt, si);
if (disp) *disp = addr - inlined->func.ranges[0].low;
symt_fill_sym_info(&pair, NULL, &inlined->symt, si);
if (disp) *disp = addr - inlined->ranges[0].low;
return TRUE;
}
/* fall through */
......@@ -2728,14 +2732,14 @@ static BOOL get_line_from_inline_context(HANDLE hProcess, DWORD64 addr, ULONG in
struct internal_line_t* intl)
{
struct module_pair pair;
struct symt_inlinesite* inlined;
struct symt_function* inlined;
if (!module_init_pair(&pair, hProcess, mod_addr ? mod_addr : addr)) return FALSE;
switch (IFC_MODE(inline_ctx))
{
case IFC_MODE_INLINE:
inlined = symt_find_inlined_site(pair.effective, addr, inline_ctx);
if (inlined && get_line_from_function(&pair, &inlined->func, addr, disp, intl))
if (inlined && get_line_from_function(&pair, inlined, addr, disp, intl))
return TRUE;
/* fall through: check if we can find line info at top function level */
case IFC_MODE_IGNORE:
......
......@@ -94,8 +94,8 @@ const char* symt_get_name(const struct symt* sym)
{
/* lexical tree */
case SymTagData: return ((const struct symt_data*)sym)->hash_elt.name;
case SymTagFunction: return ((const struct symt_function*)sym)->hash_elt.name;
case SymTagInlineSite: return ((const struct symt_inlinesite*)sym)->func.hash_elt.name;
case SymTagFunction:
case SymTagInlineSite: return ((const struct symt_function*)sym)->hash_elt.name;
case SymTagPublicSymbol: return ((const struct symt_public*)sym)->hash_elt.name;
case SymTagLabel: return ((const struct symt_hierarchy_point*)sym)->hash_elt.name;
case SymTagThunk: return ((const struct symt_thunk*)sym)->hash_elt.name;
......@@ -153,10 +153,8 @@ BOOL symt_get_address(const struct symt* type, ULONG64* addr)
*addr = ((const struct symt_block*)type)->ranges[0].low;
break;
case SymTagFunction:
*addr = ((const struct symt_function*)type)->ranges[0].low;
break;
case SymTagInlineSite:
*addr = ((const struct symt_inlinesite*)type)->func.ranges[0].low;
*addr = ((const struct symt_function*)type)->ranges[0].low;
break;
case SymTagPublicSymbol:
*addr = ((const struct symt_public*)type)->address;
......@@ -685,8 +683,8 @@ BOOL symt_get_info(struct module* module, const struct symt* type,
case SymTagUDT: v = &((const struct symt_udt*)type)->vchildren; break;
case SymTagEnum: v = &((const struct symt_enum*)type)->vchildren; break;
case SymTagFunctionType: v = &((const struct symt_function_signature*)type)->vchildren; break;
case SymTagFunction: v = &((const struct symt_function*)type)->vchildren; break;
case SymTagInlineSite: v = &((const struct symt_inlinesite*)type)->func.vchildren; break;
case SymTagFunction:
case SymTagInlineSite: v = &((const struct symt_function*)type)->vchildren; break;
case SymTagBlock: v = &((const struct symt_block*)type)->vchildren; break;
case SymTagPointerType:
case SymTagArrayType:
......@@ -756,10 +754,8 @@ BOOL symt_get_info(struct module* module, const struct symt* type,
X(DWORD) = vector_length(&((const struct symt_function_signature*)type)->vchildren);
break;
case SymTagFunction:
X(DWORD) = vector_length(&((const struct symt_function*)type)->vchildren);
break;
case SymTagInlineSite:
X(DWORD) = vector_length(&((const struct symt_inlinesite*)type)->func.vchildren);
X(DWORD) = vector_length(&((const struct symt_function*)type)->vchildren);
break;
case SymTagBlock:
X(DWORD) = vector_length(&((const struct symt_block*)type)->vchildren);
......@@ -898,10 +894,8 @@ BOOL symt_get_info(struct module* module, const struct symt* type,
X(DWORD) = symt_ptr2index(module, ((const struct symt_data*)type)->container);
break;
case SymTagFunction:
X(DWORD) = symt_ptr2index(module, ((const struct symt_function*)type)->container);
break;
case SymTagInlineSite:
X(DWORD) = symt_ptr2index(module, ((const struct symt_inlinesite*)type)->func.container);
X(DWORD) = symt_ptr2index(module, ((const struct symt_function*)type)->container);
break;
case SymTagThunk:
X(DWORD) = symt_ptr2index(module, ((const struct symt_thunk*)type)->container);
......@@ -1043,10 +1037,8 @@ BOOL symt_get_info(struct module* module, const struct symt* type,
X(DWORD) = symt_ptr2index(module, ((const struct symt_data*)type)->type);
break;
case SymTagFunction:
X(DWORD) = symt_ptr2index(module, ((const struct symt_function*)type)->type);
break;
case SymTagInlineSite:
X(DWORD) = symt_ptr2index(module, ((const struct symt_inlinesite*)type)->func.type);
X(DWORD) = symt_ptr2index(module, ((const struct symt_function*)type)->type);
break;
case SymTagEnum:
X(DWORD) = symt_ptr2index(module, ((const struct symt_enum*)type)->base_type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment