23#ifndef DBGHELP_STATIC_LIB
25#define NONAMELESSUNION
71 static const char hexof[] =
"0123456789abcdef";
74 for (
i = 0;
i <
len;
i += 16)
80 msg[10 + 3 *
j + 0] = hexof[
x[
i +
j] >> 4];
81 msg[10 + 3 *
j + 1] = hexof[
x[
i +
j] & 15];
82 msg[10 + 3 *
j + 2] =
' ';
83 msg[10 + 3 * 16 + 1 +
j] = (
x[
i +
j] >= 0x20 &&
x[
i +
j] < 0x7f) ?
86 msg[10 + 3 * 16] =
' ';
87 msg[10 + 3 * 16 + 1 + 16] =
'\0';
205#define loc_dwarf2_location_list (loc_user + 0)
206#define loc_dwarf2_block (loc_user + 1)
270 }
while (
byte & 0x80);
292 const unsigned size =
sizeof(
int) * 8;
299 }
while (
byte & 0x80);
349 FIXME(
"Unsupported Word Size %u\n", word_size);
358 ctx->data +=
ctx->word_size;
400 TRACE(
"%s, end at %p\n",
408 TRACE(
"found entry_code %lu\n", entry_code);
423 TRACE(
"table:(%p,#%u) entry_code(%lu) tag(0x%lx) have_child(%u) -> %p\n",
425 entry_code, abbrev_entry->
tag, abbrev_entry->
have_child, abbrev_entry);
440 if (abbrev_entry->
attrs)
last->next =
new;
441 else abbrev_entry->
attrs =
new;
456 switch (abbrev_attr->
form)
480 FIXME(
"Unhandled attribute form %lx\n", abbrev_attr->
form);
488 const unsigned char*
data,
497 ctx->module->format_info[
DFI_DWARF]->u.dwarf2_info->word_size);
508 TRACE(
"flag_present\n");
547 FIXME(
"Unhandled 64-bit support\n");
563 attr->u.string = (
const char *)
data;
595 FIXME(
"Unhandled attribute form %lx\n", abbrev_attr->
form);
604 unsigned i, refidx = 0;
608 attr->gotten_from = attr_direct;
611 ref_abbrev_attr =
NULL;
612 for (
i = 0, abbrev_attr = di->
abbrev->
attrs; abbrev_attr;
i++, abbrev_attr = abbrev_attr->
next)
625 ref_abbrev_attr = abbrev_attr;
628 attr_abstract_origin : attr_specification;
632 if (!ref_abbrev_attr)
break;
635 FIXME(
"Should have found the debug info entry\n");
642#define Wine_DW_no_register 0x7FFFFFFF
648 FIXME(
"What the heck map reg 0x%x\n",regno);
668 while (
ctx->data <
ctx->end_data)
684 FIXME(
"Only supporting one reg (%s/%d -> %s/%d)\n",
701 FIXME(
"Only supporting one breg (%s/%d -> %s/%d)\n",
753 if (!
stack[stk--])
ctx->data += tmp;
760 FIXME(
"Only supporting one reg\n");
768 FIXME(
"Only supporting one regx\n");
775 FIXME(
"Only supporting one reg (%s/%d -> -2)\n",
801 WARN(
"Not handling OP_piece (size=%d)\n", sz);
808 FIXME(
"Unexpected empty stack\n");
813 WARN(
"Too complex expression for deref\n");
823 WARN(
"Couldn't read memory at %lx\n",
addr);
826 stack[++stk] = deref;
836 FIXME(
"Unexpected empty stack\n");
841 WARN(
"Too complex expression for deref\n");
852 WARN(
"Couldn't read memory at %lx\n",
addr);
858 case 1:
stack[++stk] = *(
unsigned char*)&deref;
break;
859 case 2:
stack[++stk] = *(
unsigned short*)&deref;
break;
860 case 4:
stack[++stk] = *(
DWORD*)&deref;
break;
861 case 8:
if (
ctx->word_size >= derefsize)
stack[++stk] = deref;
break;
876 FIXME(
"Unhandled attr op: %x\n",
op);
913 default:
FIXME(
"Unsupported yet form %lx\n", xloc.
form);
937 sizeof(
unsigned) + xloc.
u.
block.size);
957 FIXME(
"Unable to find back reference to type %lx\n",
attr.u.uvalue);
965 FIXME(
"Unable to load forward reference for tag %lx\n",
type->abbrev->tag);
990 FIXME(
"Should have found the debug info entry\n");
1008 if (last < ctx->cpp_name)
return NULL;
1048 if (low == 0 && high == 0)
break;
1049 if (low ==
ULONG_MAX)
FIXME(
"unsupported yet (base address selection)\n");
1050 if (low < *plow) *plow = low;
1051 if (high > *phigh) *phigh = high;
1054 if (*plow == *phigh) {
FIXME(
"entry found, but low=high\n");
return FALSE;}
1094 TRACE(
"found entry_code %lu at 0x%lx\n", entry_code,
offset);
1103 WARN(
"Cannot find abbrev entry for %lu at 0x%lx\n", entry_code,
offset);
1107 if (!di)
return FALSE;
1130 if (!where)
return FALSE;
1137 WARN(
"setting cursor for %s to next sibling <0x%lx>\n",
1156 FIXME(
"Should have found the debug info entry\n");
1199 switch (
size.u.uvalue)
1201 case 1: cache_idx =
sc_int1;
break;
1202 case 2: cache_idx =
sc_int2;
break;
1203 case 4: cache_idx =
sc_int4;
break;
1208 if (cache_idx != -1 && !
ctx->symt_cache[cache_idx])
1209 ctx->symt_cache[cache_idx] = di->
symt;
1218 struct symt* ref_type;
1237 struct symt* ref_type;
1258 struct symt* ref_type;
1263 const struct vector* children;
1282 switch (
child->abbrev->tag)
1294 FIXME(
"Unhandled Tag type 0x%lx at %s, for %s\n",
1306 struct symt* ref_type;
1318 di->
symt = ref_type;
1326 struct symt* ref_type;
1338 di->
symt = ref_type;
1355 name.u.string =
"void";
1356 size.u.uvalue =
sizeof(
void *);
1390 struct symt* elt_type;
1406 FIXME(
"Found register, while not expecting it\n");
1410 TRACE(
"found member_location at %s -> %lu\n",
1458 name.u.string =
"zz_anon_zz";
1462 size.u.uvalue, udt)->symt;
1469 switch (
child->abbrev->tag)
1503 FIXME(
"Unhandled Tag type 0x%lx at %s, for %s\n",
1545 switch (
size.u.uvalue)
1561 switch (
child->abbrev->tag)
1567 FIXME(
"Unhandled Tag type 0x%lx at %s, for %s\n",
1592 struct symt* param_type;
1607 &loc, &subpgm->
frame))
1611 TRACE(
"found parameter %s (kind=%d, offset=%ld, reg=%d) at %s\n",
1627 loc, 0, param_type);
1640 &loc,
block, param_type,
name.u.string);
1648 if (is_pmt)
FIXME(
"Unsupported constant (parameter) %s in function\n",
debugstr_a(
name.u.string));
1657 v.n1.n2.n3.lVal =
value.u.uvalue;
1662 v.n1.n2.n3.llVal =
value.u.lluvalue;
1667 v.n1.n2.n3.lVal =
value.u.svalue;
1684 switch (
value.u.block.size)
1686 case 1:
v.n1.n2.n3.lVal = *(
BYTE*)
value.u.block.ptr;
break;
1687 case 2:
v.n1.n2.n3.lVal = *(
USHORT*)
value.u.block.ptr;
break;
1688 case 4:
v.n1.n2.n3.lVal = *(
DWORD*)
value.u.block.ptr;
break;
1697 FIXME(
"Unsupported form for const value %s (%lx)\n",
1702 name.u.string, param_type, &
v)->symt;
1713 &loc,
block, param_type,
name.u.string);
1717 WARN(
"dropping global variable %s which has been optimized away\n",
debugstr_a(
name.u.string));
1720 if (is_pmt && subpgm->
func && subpgm->
func->type)
1744 &loc,
name.u.string);
1768 FIXME(
"cannot read range\n");
1781 switch (
child->abbrev->tag)
1800 FIXME(
"Unhandled Tag type 0x%lx at %s, for %s\n",
1835 switch (
child->abbrev->tag)
1882 FIXME(
"Unhandled Tag type 0x%lx at %s, for %s\n",
1897 struct symt* ret_type;
1910 WARN(
"No name for function... dropping function\n");
1919 TRACE(
"Function %s declared as inlined (%ld)... skipping\n",
1952 ctx->load_offset + low_pc, high_pc - low_pc,
1962 subpgm.
frame.offset = 0;
1971 switch (
child->abbrev->tag)
2013 FIXME(
"Unhandled Tag type 0x%lx at %s, for %s\n",
2031 struct symt* ret_type;
2055 switch (
child->abbrev->tag)
2062 WARN(
"Unsupported unspecified parameters\n");
2077 if (di->
symt)
return;
2145 subpgm.
frame.offset = 0;
2159 FIXME(
"Unhandled Tag type 0x%lx at %s, for %lu\n",
2173 TRACE(
"%s %lx %s %u\n",
2183 const char* compile_dir,
2188 unsigned insn_size, default_stmt;
2189 unsigned line_range, opcode_base;
2191 const unsigned char* opcode_len;
2202 WARN(
"out of bounds offset\n");
2214 WARN(
"out of bounds header\n");
2225 opcode_len = traverse.
data;
2226 traverse.
data += opcode_base - 1;
2230 *
p = compile_dir ? compile_dir :
".";
2231 while (*traverse.
data)
2233 const char* rel = (
const char*)traverse.
data;
2234 unsigned rellen =
strlen(rel);
2236 traverse.
data += rellen + 1;
2239 if (*rel ==
'/' || !compile_dir)
2244 unsigned baselen =
strlen(compile_dir);
2245 char* tmp =
pool_alloc(&
ctx->pool, baselen + 1 + rellen + 1);
2246 strcpy(tmp, compile_dir);
2247 if (tmp[baselen - 1] !=
'/') tmp[baselen++] =
'/';
2248 strcpy(&tmp[baselen], rel);
2256 while (*traverse.
data)
2258 unsigned int dir_index, mod_time;
2280 unsigned is_stmt = default_stmt;
2282 unsigned opcode, extopcode,
i;
2284 while (!end_sequence)
2287 TRACE(
"Got opcode %x\n", opcode);
2289 if (opcode >= opcode_base)
2291 unsigned delta = opcode - opcode_base;
2293 address += (delta / line_range) * insn_size;
2294 line += line_base + (delta % line_range);
2322 address += ((255 - opcode_base) / line_range) * insn_size;
2334 end_sequence =
TRUE;
2351 WARN(
"not handled discriminator %x\n",
descr);
2355 FIXME(
"Unsupported extended opcode %x\n", extopcode);
2360 WARN(
"Unsupported opcode %x\n", opcode);
2361 for (
i = 0;
i < opcode_len[opcode];
i++)
2381 const unsigned char* comp_unit_start = mod_ctx->
data;
2383 unsigned short cu_version;
2390 mod_ctx->
data += cu_length;
2395 TRACE(
"Compilation Unit Header found at 0x%x:\n",
2397 TRACE(
"- length: %lu\n", cu_length);
2398 TRACE(
"- version: %u\n", cu_version);
2399 TRACE(
"- abbrev_offset: %lu\n", cu_abbrev_offset);
2402 if (cu_version != 2)
2404 WARN(
"%u DWARF version unsupported. Wine dbghelp only support DWARF 2.\n",
2416 ctx.thunks = thunks;
2417 ctx.load_offset = load_offset;
2451 di->
symt = &
ctx.compiland->symt;
2460#if defined(__REACTOS__) && defined(__clang__)
2461 unsigned long stmt_list_val = stmt_list.
u.
uvalue;
2475 else FIXME(
"Should have a compilation unit here\n");
2487 while (ptr < modfmt->
u.dwarf2_info->debug_loc.address + modfmt->
u.
dwarf2_info->debug_loc.size)
2491 if (!beg && !
end)
break;
2503 WARN(
"Couldn't find ip in location list\n");
2526 switch (pframe->
kind)
2541 WARN(
"Couldn't compute runtime frame location\n");
2546 WARN(
"Unsupported frame kind %d\n", pframe->
kind);
2552 WARN(
"Couldn't find Custom function point, whilst location list offset is searched\n");
2568#define NB_FRAME_REGS 64
2569#define MAX_SAVED_STATES 16
2643 const char* augmentation;
2644 const unsigned char*
end;
2649 info->aug_z_format = 0;
2658 augmentation = (
const char*)
ctx->data;
2680 if (*augmentation)
do
2682 switch (*augmentation)
2687 info->aug_z_format = 1;
2704 info->signal_frame = 1;
2707 FIXME(
"unknown augmentation '%c'\n", *augmentation);
2710 }
while (*++augmentation);
2719 const unsigned char* ptr_blk;
2720 const unsigned char* cie_ptr;
2721 const unsigned char* last_cie_ptr = (
const unsigned char*)~0;
2741 if (
len == 0xffffffff)
FIXME(
"Unsupported yet 64-bit CIEs\n");
2742 ptr_blk = fde_ctx->
data +
len;
2746 last_cie_ptr = fde_ctx->
data - 8;
2754 cie_ptr = (in_eh_frame) ? fde_ctx->
data -
id - 4 :
start_data +
id;
2755 if (cie_ptr != last_cie_ptr)
2757 last_cie_ptr = cie_ptr;
2758 cie_ctx->
data = cie_ptr;
2764 FIXME(
"wrong CIE pointer at %x from FDE %x\n",
2795 while (
ctx->data <
ctx->end_data &&
info->ip <= last_ip +
info->signal_frame)
2815 TRACE(
"%lx: DW_CFA_offset %s, %ld\n",
2827 TRACE(
"%lx: DW_CFA_restore %s\n",
2842 TRACE(
"%lx: DW_CFA_set_loc %lx\n",
info->ip, loc);
2874 TRACE(
"%lx: DW_CFA_offset_extended %s, %ld\n",
2886 TRACE(
"%lx: DW_CFA_restore_extended %s\n",
2896 TRACE(
"%lx: DW_CFA_undefined %s\n",
2906 TRACE(
"%lx: DW_CFA_same_value %s\n",
2918 TRACE(
"%lx: DW_CFA_register %s == %s\n",
2927 TRACE(
"%lx: DW_CFA_remember_state\n",
info->ip);
2929 FIXME(
"%lx: DW_CFA_remember_state too many nested saves\n",
info->ip);
2934 TRACE(
"%lx: DW_CFA_restore_state\n",
info->ip);
2935 if (!
info->state_sp)
2936 FIXME(
"%lx: DW_CFA_restore_state without corresponding save\n",
info->ip);
2947 TRACE(
"%lx: DW_CFA_def_cfa %s, %ld\n",
2960 TRACE(
"%lx: DW_CFA_def_cfa_register %s\n",
2994 TRACE(
"%lx: DW_CFA_%sexpression %s %lx-%lx\n",
3012 FIXME(
"%lx: unknown CFA opcode %02x\n",
info->ip,
op);
3022 unsigned regno = csw->
cpu->map_dwarf_register(dw_reg,
module,
TRUE), sz;
3023 void*
ptr = csw->
cpu->fetch_context_reg(
context, regno, &sz);
3030 FIXME(
"unhandled size %d\n", sz);
3038 unsigned regno = csw->
cpu->map_dwarf_register(dw_reg,
module,
TRUE), sz;
3045 if (sz >
sizeof(tmp))
3047 FIXME(
"register %lu/%u size is too wide: %u\n", dw_reg, regno, sz);
3052 WARN(
"Couldn't read memory at %p\n", (
void*)
val);
3061 FIXME(
"assigning to register %lu/%u of wrong size %u\n", dw_reg, regno, sz);
3073 unsigned regdstno = csw->
cpu->map_dwarf_register(dwregdst,
module,
TRUE), szdst;
3074 unsigned regsrcno = csw->
cpu->map_dwarf_register(dwregsrc,
module,
TRUE), szsrc;
3075 ULONG_PTR* ptrdst = csw->
cpu->fetch_context_reg(dstcontext, regdstno, &szdst);
3076 ULONG_PTR* ptrsrc = csw->
cpu->fetch_context_reg(srccontext, regsrcno, &szsrc);
3080 FIXME(
"Cannot copy register %lu/%u => %lu/%u because of size mismatch (%u => %u)\n",
3081 dwregsrc, regsrcno, dwregdst, regdstno, szsrc, szdst);
3084 memcpy(ptrdst, ptrsrc, szdst);
3097 ctx.end_data = zp + 4;
3102 while (
ctx.data <
ctx.end_data)
3113 else switch (opcode)
3187 case 1:
stack[
sp] = *(
unsigned char*)&tmp;
break;
3188 case 2:
stack[
sp] = *(
unsigned short*)&tmp;
break;
3189 case 4:
stack[
sp] = *(
unsigned int*)&tmp;
break;
3191 default:
FIXME(
"Unknown size for deref 0x%lx\n", sz);
3195 FIXME(
"unhandled opcode %02x\n", opcode);
3208 switch (
state->cfa_rule)
3265 const unsigned char*
end;
3273 if (!modfmt)
return FALSE;
3275 fde_ctx.data = modfmt->
u.
dwarf2_info->eh_frame.address;
3276 fde_ctx.end_data = fde_ctx.data + modfmt->
u.
dwarf2_info->eh_frame.size;
3282 delta =
pair.effective->module.BaseOfImage + modfmt->
u.
dwarf2_info->eh_frame.rva -
3286 fde_ctx.data = modfmt->
u.
dwarf2_info->debug_frame.address;
3287 fde_ctx.end_data = fde_ctx.data + modfmt->
u.
dwarf2_info->debug_frame.size;
3289 delta =
pair.effective->reloc_delta;
3292 TRACE(
"Couldn't find information for %lx\n",
ip);
3297 TRACE(
"function %lx/%lx code_align %lu data_align %ld retaddr %s\n",
3299 csw->
cpu->fetch_regname(csw->
cpu->map_dwarf_register(
info.retaddr_reg,
pair.effective,
TRUE)));
3305 if (
info.aug_z_format)
3308 end = fde_ctx.data +
len;
3312 if (
end) fde_ctx.data =
end;
3336 WARN(
"We'd expect function %s's container to exist and be a compiland\n",
debugstr_a(
func->hash_elt.name));
3374 WARN(
"Unsupported local kind %d\n", loc->
kind);
3397 const char* zsectname,
3408 if (sz <= 12 ||
memcmp(sect,
"ZLIB", 4))
3410 ERR(
"invalid compressed section %s\n",
debugstr_a(zsectname));
3414#ifdef WORDS_BIGENDIAN
3426 z.next_in = §[12];
3427 z.avail_in = sz - 12;
3440 z.next_out =
addr +
z.total_out;
3468 const char* sectname,
const char* zsectname,
3473 if (!ism) ism = &local_ism;
3516 debug_line_sect, debug_ranges_sect, eh_frame_sect;
3543 load_offset += fmap->
u.
elf.elf_start - debug_sect.
fmap->u.elf.elf_start;
3553 sizeof(*dwarf2_modfmt) +
sizeof(*dwarf2_modfmt->
u.
dwarf2_info));
3578 dwarf2_modfmt->
module->module.CVSig =
'D' | (
'W' << 8) | (
'A' << 16) | (
'R' << 24);
3580 dwarf2_modfmt->
module->module.GlobalSymbols =
TRUE;
3581 dwarf2_modfmt->
module->module.TypeInfo =
TRUE;
3582 dwarf2_modfmt->
module->module.SourceIndexed =
TRUE;
3583 dwarf2_modfmt->
module->module.Publics =
TRUE;
unsigned long long UINT64
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
_In_ fcb _In_ chunk _In_ uint64_t start_data
struct symt_hierarchy_point * symt_add_function_point(struct module *module, struct symt_function *func, enum SymTagEnum point, const struct location *loc, const char *name) DECLSPEC_HIDDEN
struct symt_function * symt_new_function(struct module *module, struct symt_compiland *parent, const char *name, ULONG_PTR addr, ULONG_PTR size, struct symt *type) DECLSPEC_HIDDEN
BOOL symt_get_info(struct module *module, const struct symt *type, IMAGEHLP_SYMBOL_TYPE_INFO req, void *pInfo) DECLSPEC_HIDDEN
void vector_init(struct vector *v, unsigned elt_sz, unsigned bucket_sz) DECLSPEC_HIDDEN
struct symt_data * symt_new_constant(struct module *module, struct symt_compiland *parent, const char *name, struct symt *type, const VARIANT *v) DECLSPEC_HIDDEN
struct symt_data * symt_add_func_local(struct module *module, struct symt_function *func, enum DataKind dt, const struct location *loc, struct symt_block *block, struct symt *type, const char *name) DECLSPEC_HIDDEN
void * vector_add(struct vector *v, struct pool *pool) DECLSPEC_HIDDEN
void sparse_array_init(struct sparse_array *sa, unsigned elt_sz, unsigned bucket_sz) DECLSPEC_HIDDEN
void * pool_alloc(struct pool *a, size_t len) DECLSPEC_HIDDEN
struct symt_pointer * symt_new_pointer(struct module *module, struct symt *ref_type, ULONG_PTR size) DECLSPEC_HIDDEN
BOOL symt_add_enum_element(struct module *module, struct symt_enum *enum_type, const char *name, int value) DECLSPEC_HIDDEN
void pool_init(struct pool *a, size_t arena_size) DECLSPEC_HIDDEN
struct symt_udt * symt_new_udt(struct module *module, const char *typename, unsigned size, enum UdtKind kind) DECLSPEC_HIDDEN
void pool_destroy(struct pool *a) DECLSPEC_HIDDEN
unsigned vector_length(const struct vector *v) DECLSPEC_HIDDEN
unsigned source_new(struct module *module, const char *basedir, const char *source) DECLSPEC_HIDDEN
struct symt_typedef * symt_new_typedef(struct module *module, struct symt *ref, const char *name) DECLSPEC_HIDDEN
int elf_is_in_thunk_area(ULONG_PTR addr, const struct elf_thunk_area *thunks) DECLSPEC_HIDDEN
unsigned sparse_array_length(const struct sparse_array *sa) DECLSPEC_HIDDEN
struct symt_function_signature * symt_new_function_signature(struct module *module, struct symt *ret_type, enum CV_call_e call_conv) DECLSPEC_HIDDEN
struct symt_block * symt_close_func_block(struct module *module, const struct symt_function *func, struct symt_block *block, unsigned pc) DECLSPEC_HIDDEN
struct symt_data * symt_new_global_variable(struct module *module, struct symt_compiland *parent, const char *name, unsigned is_static, struct location loc, ULONG_PTR size, struct symt *type) DECLSPEC_HIDDEN
void * sparse_array_add(struct sparse_array *sa, ULONG_PTR key, struct pool *pool) DECLSPEC_HIDDEN
struct symt_enum * symt_new_enum(struct module *module, const char *typename, struct symt *basetype) DECLSPEC_HIDDEN
void * sparse_array_find(const struct sparse_array *sa, ULONG_PTR idx) DECLSPEC_HIDDEN
struct symt_block * symt_open_func_block(struct module *module, struct symt_function *func, struct symt_block *block, unsigned pc, unsigned len) DECLSPEC_HIDDEN
struct symt_array * symt_new_array(struct module *module, int min, int max, struct symt *base, struct symt *index) DECLSPEC_HIDDEN
BOOL sw_read_mem(struct cpu_stack_walk *csw, DWORD64 addr, void *ptr, DWORD sz) DECLSPEC_HIDDEN
struct symt_compiland * symt_new_compiland(struct module *module, ULONG_PTR address, unsigned src_idx) DECLSPEC_HIDDEN
struct module * module_find_by_addr(const struct process *pcs, DWORD64 addr, enum module_type type) DECLSPEC_HIDDEN
void * vector_at(const struct vector *v, unsigned pos) DECLSPEC_HIDDEN
BOOL symt_add_function_signature_parameter(struct module *module, struct symt_function_signature *sig, struct symt *param) DECLSPEC_HIDDEN
const char * source_get(const struct module *module, unsigned idx) DECLSPEC_HIDDEN
BOOL symt_add_udt_element(struct module *module, struct symt_udt *udt_type, const char *name, struct symt *elt_type, unsigned offset, unsigned size) DECLSPEC_HIDDEN
struct symt_basic * symt_new_basic(struct module *module, enum BasicType, const char *typename, unsigned size) DECLSPEC_HIDDEN
void symt_add_func_line(struct module *module, struct symt_function *func, unsigned source_idx, int line_num, ULONG_PTR offset) DECLSPEC_HIDDEN
BOOL module_get_debug(struct module_pair *) DECLSPEC_HIDDEN
char * pool_strdup(struct pool *a, const char *str) DECLSPEC_HIDDEN
BOOL symt_normalize_function(struct module *module, const struct symt_function *func) DECLSPEC_HIDDEN
struct symt_ht * symt_find_nearest(struct module *module, DWORD_PTR addr) DECLSPEC_HIDDEN
const char * wine_dbg_sprintf(const char *format,...)
#define ReadProcessMemory(a, b, c, d, e)
#define RtlUlongByteSwap(_x)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
struct process * process_find_by_handle(HANDLE hProcess)
struct cpu * dbghelp_current_cpu
#define DW_LNE_set_address
#define DW_LNS_set_column
#define DW_LNS_advance_pc
#define DW_LNS_advance_line
@ DW_CFA_def_cfa_expression
@ DW_CFA_offset_extended_sf
@ DW_CFA_def_cfa_register
@ DW_CFA_restore_extended
@ DW_CFA_def_cfa_offset_sf
#define DW_LNS_negate_stmt
#define DW_LNE_set_discriminator
#define DW_LNS_extended_op
#define DW_INL_not_inlined
#define DW_LNS_fixed_advance_pc
#define DW_LNE_define_file
@ DW_TAG_GNU_formal_parameter_pack
@ DW_TAG_formal_parameter
@ DW_TAG_enumeration_type
@ DW_TAG_template_value_param
@ DW_TAG_imported_declaration
@ DW_TAG_ptr_to_member_type
@ DW_TAG_GNU_template_parameter_pack
@ DW_TAG_inlined_subroutine
@ DW_TAG_unspecified_type
@ DW_TAG_template_type_param
@ DW_TAG_unspecified_parameters
#define DW_LNS_set_basic_block
#define DW_LNE_end_sequence
@ DW_AT_data_member_location
#define DW_LNS_const_add_pc
int inflate(z_streamp strm, int flush)
int inflateEnd(z_streamp strm)
static const WCHAR *const ext[]
static const WCHAR version[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
static ULONG_PTR dwarf2_parse_addr(dwarf2_traverse_context_t *ctx)
struct dwarf2_debug_info_s dwarf2_debug_info_t
static unsigned short dwarf2_get_u2(const unsigned char *ptr)
static BOOL dwarf2_read_one_debug_info(dwarf2_parse_context_t *ctx, dwarf2_traverse_context_t *traverse, dwarf2_debug_info_t *parent_di, dwarf2_debug_info_t **pdi)
static struct symt * dwarf2_parse_reference_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static BOOL dwarf2_get_cie(ULONG_PTR addr, struct module *module, DWORD_PTR delta, dwarf2_traverse_context_t *fde_ctx, dwarf2_traverse_context_t *cie_ctx, struct frame_info *info, BOOL in_eh_frame)
static const char * dwarf2_get_cpp_name(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di, const char *name)
static BOOL dwarf2_read_range(dwarf2_parse_context_t *ctx, const dwarf2_debug_info_t *di, ULONG_PTR *plow, ULONG_PTR *phigh)
struct dwarf2_traverse_context_s dwarf2_traverse_context_t
static void set_context_reg(const struct module *module, struct cpu_stack_walk *csw, union ctx *context, ULONG_PTR dw_reg, ULONG_PTR val, BOOL isdebuggee)
static ULONG_PTR dwarf2_parse_augmentation_ptr(dwarf2_traverse_context_t *ctx, unsigned char encoding)
static BOOL dwarf2_parse_compilation_unit(const dwarf2_section_t *sections, struct module *module, const struct elf_thunk_area *thunks, dwarf2_traverse_context_t *mod_ctx, ULONG_PTR load_offset)
static unsigned dwarf2_leb128_length(const dwarf2_traverse_context_t *ctx)
static struct symt * dwarf2_parse_pointer_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static void copy_context_reg(const struct module *module, struct cpu_stack_walk *csw, union ctx *dstcontext, ULONG_PTR dwregdst, union ctx *srccontext, ULONG_PTR dwregsrc)
static LONG_PTR dwarf2_get_leb128_as_signed(const unsigned char *ptr, const unsigned char **end)
#define Wine_DW_no_register
static ULONG_PTR dwarf2_parse_u4(dwarf2_traverse_context_t *ctx)
static BOOL dwarf2_init_zsection(dwarf2_section_t *section, const char *zsectname, struct image_section_map *ism)
static DWORD64 dwarf2_get_u8(const unsigned char *ptr)
static const char * dwarf2_debug_di(const dwarf2_debug_info_t *di)
static void dwarf2_fini_section(dwarf2_section_t *section)
BOOL dwarf2_parse(struct module *module, ULONG_PTR load_offset, const struct elf_thunk_area *thunks, struct image_file_map *fmap)
static ULONG_PTR eval_expression(const struct module *module, struct cpu_stack_walk *csw, const unsigned char *zp, union ctx *context)
struct dwarf2_abbrev_entry_attr_s dwarf2_abbrev_entry_attr_t
static void apply_frame_state(const struct module *module, struct cpu_stack_walk *csw, union ctx *context, struct frame_state *state, DWORD64 *cfa)
static void dwarf2_fill_attr(const dwarf2_parse_context_t *ctx, const dwarf2_abbrev_entry_attr_t *abbrev_attr, const unsigned char *data, struct attribute *attr)
static BOOL dwarf2_lookup_loclist(const struct module_format *modfmt, const BYTE *start, ULONG_PTR ip, dwarf2_traverse_context_t *lctx)
static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t *subpgm, struct symt_block *parent_block, dwarf2_debug_info_t *di)
static const char * dwarf2_debug_ctx(const dwarf2_parse_context_t *ctx)
static int valid_reg(ULONG_PTR reg)
static struct symt * dwarf2_parse_enumeration_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *entry)
static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t *sections, dwarf2_parse_context_t *ctx, const char *compile_dir, ULONG_PTR offset)
static BOOL parse_cie_details(dwarf2_traverse_context_t *ctx, struct frame_info *info)
struct dwarf2_parse_context_s dwarf2_parse_context_t
static void dwarf2_parse_variable(dwarf2_subprogram_t *subpgm, struct symt_block *block, dwarf2_debug_info_t *di)
static DWORD64 get_context_reg(const struct module *module, struct cpu_stack_walk *csw, union ctx *context, ULONG_PTR dw_reg)
static struct symt * dwarf2_parse_unspecified_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static void dwarf2_parse_enumerator(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di, struct symt_enum *parent)
static ULONG_PTR dwarf2_leb128_as_unsigned(dwarf2_traverse_context_t *ctx)
static ULONG_PTR dwarf2_get_addr(const unsigned char *ptr, unsigned word_size)
static struct vector * dwarf2_get_di_children(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static void dwarf2_parse_abbrev_set(dwarf2_traverse_context_t *abbrev_ctx, struct sparse_array *abbrev_table, struct pool *pool)
static void dwarf2_swallow_attribute(dwarf2_traverse_context_t *ctx, const dwarf2_abbrev_entry_attr_t *abbrev_attr)
static ULONG_PTR dwarf2_get_leb128_as_unsigned(const unsigned char *ptr, const unsigned char **end)
static const char * dwarf2_debug_traverse_ctx(const dwarf2_traverse_context_t *ctx)
static void dwarf2_load_one_entry(dwarf2_parse_context_t *, dwarf2_debug_info_t *)
static void dwarf2_parse_namespace(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
struct dwarf2_abbrev_entry_s dwarf2_abbrev_entry_t
static void dwarf2_set_line_number(struct module *module, ULONG_PTR address, const struct vector *v, unsigned file, unsigned line)
static struct symt * dwarf2_parse_array_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static enum location_error compute_location(const struct module *module, dwarf2_traverse_context_t *ctx, struct location *loc, HANDLE hproc, const struct location *frame)
static struct symt * dwarf2_lookup_type(dwarf2_parse_context_t *ctx, const dwarf2_debug_info_t *di)
static struct symt * dwarf2_parse_typedef(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static unsigned short dwarf2_parse_u2(dwarf2_traverse_context_t *ctx)
static LONG_PTR dwarf2_leb128_as_signed(dwarf2_traverse_context_t *ctx)
static enum location_error loc_compute_frame(struct process *pcs, const struct module_format *modfmt, const struct symt_function *func, DWORD_PTR ip, struct location *frame)
static struct symt * dwarf2_parse_volatile_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static dwarf2_abbrev_entry_t * dwarf2_abbrev_table_find_entry(const struct sparse_array *abbrev_table, ULONG_PTR entry_code)
#define loc_dwarf2_location_list
static void dwarf2_parse_subprogram_label(dwarf2_subprogram_t *subpgm, const dwarf2_debug_info_t *di)
static struct symt * dwarf2_parse_subprogram(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static DWORD64 dwarf2_parse_u8(dwarf2_traverse_context_t *ctx)
static BOOL dwarf2_init_section(dwarf2_section_t *section, struct image_file_map *fmap, const char *sectname, const char *zsectname, struct image_section_map *ism)
static struct symt * dwarf2_parse_const_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static void dwarf2_parse_udt_member(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di, struct symt_udt *parent)
static void * zalloc(void *priv, uInt items, uInt sz)
struct dwarf2_subprogram_s dwarf2_subprogram_t
static BOOL dwarf2_compute_location_attr(dwarf2_parse_context_t *ctx, const dwarf2_debug_info_t *di, ULONG_PTR dw, struct location *loc, const struct location *frame)
static void dwarf2_location_compute(struct process *pcs, const struct module_format *modfmt, const struct symt_function *func, struct location *loc)
static ULONG_PTR dwarf2_get_u4(const unsigned char *ptr)
static void dwarf2_module_remove(struct process *pcs, struct module_format *modfmt)
struct dwarf2_section_s dwarf2_section_t
static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t *subpgm, struct symt_block *parent_block, dwarf2_debug_info_t *di)
static unsigned dwarf2_map_register(int regno, const struct module *module)
BOOL dwarf2_virtual_unwind(struct cpu_stack_walk *csw, ULONG_PTR ip, union ctx *context, DWORD64 *cfa)
static BOOL dwarf2_find_attribute(const dwarf2_parse_context_t *ctx, const dwarf2_debug_info_t *di, unsigned at, struct attribute *attr)
static unsigned char dwarf2_get_byte(const unsigned char *ptr)
static unsigned char dwarf2_parse_byte(dwarf2_traverse_context_t *ctx)
static void zfree(void *priv, void *addr)
static struct symt * dwarf2_parse_udt_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di, enum UdtKind udt)
static struct symt * dwarf2_parse_subroutine_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static struct symt * dwarf2_parse_base_type(dwarf2_parse_context_t *ctx, dwarf2_debug_info_t *di)
static void execute_cfa_instructions(struct module *module, dwarf2_traverse_context_t *ctx, ULONG_PTR last_ip, struct frame_info *info)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static void image_unmap_section(struct image_section_map *ism)
static BOOL image_find_section(struct image_file_map *fmap, const char *name, struct image_section_map *ism)
static const char * image_map_section(struct image_section_map *ism)
static DWORD_PTR image_get_map_rva(const struct image_section_map *ism)
static unsigned image_get_map_size(const struct image_section_map *ism)
_Check_return_ long long __cdecl llabs(_In_ long long x)
REFIID LPVOID DWORD_PTR dw
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
struct section sections[2]
static void dump(const void *ptr, unsigned len)
#define inflateInit(strm)
ULONG64 InstructionOffset
struct dwarf2_block block
enum attribute::@378 gotten_from
struct dwarf2_abbrev_entry_attr_s * next
dwarf2_abbrev_entry_attr_t * attrs
const unsigned char * ptr
const dwarf2_abbrev_entry_t * abbrev
struct dwarf2_debug_info_s * parent
const unsigned char ** data
dwarf2_section_t debug_frame
dwarf2_section_t debug_loc
dwarf2_section_t eh_frame
const dwarf2_section_t * sections
const struct elf_thunk_area * thunks
struct symt_compiland * compiland
struct sparse_array abbrev_table
struct sparse_array debug_info_table
struct symt * symt_cache[sc_num]
const unsigned char * address
BOOL non_computed_variable
dwarf2_parse_context_t * ctx
struct symt_function * func
const unsigned char * end_data
const unsigned char * data
struct frame_state state_stack[MAX_SAVED_STATES]
unsigned char lsda_encoding
unsigned char signal_frame
unsigned char aug_z_format
unsigned char retaddr_reg
unsigned char fde_encoding
ULONG_PTR regs[NB_FRAME_REGS]
enum reg_rule rules[NB_FRAME_REGS]
union image_file_map::@384 u
struct image_file_map::@384::elf_file_map elf
struct image_file_map * fmap
IMAGEHLP_MODULEW64 module
struct module_format * format_info[DFI_LAST]
IMAGEHLP_STACK_FRAME ctx_frame
struct _LARGE_INTEGER::@2307 u
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO * pdi
static unsigned int block