[DBGHELP] Sync with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=66841
This commit is contained in:
Amine Khaldi 2015-03-20 18:27:31 +00:00
parent 662477c556
commit 2fa249cd06
7 changed files with 46 additions and 31 deletions

View File

@ -68,21 +68,6 @@ typedef struct _UNWIND_INFO
*/
} UNWIND_INFO, *PUNWIND_INFO;
#define GetUnwindCodeEntry(info, index) \
((info)->UnwindCode[index])
#define GetLanguageSpecificDataPtr(info) \
((PVOID)&GetUnwindCodeEntry((info),((info)->CountOfCodes + 1) & ~1))
#define GetExceptionHandler(base, info) \
((PEXCEPTION_HANDLER)((base) + *(PULONG)GetLanguageSpecificDataPtr(info)))
#define GetChainedFunctionEntry(base, info) \
((PRUNTIME_FUNCTION)((base) + *(PULONG)GetLanguageSpecificDataPtr(info)))
#define GetExceptionDataPtr(info) \
((PVOID)((PULONG)GetLanguageSpecificData(info) + 1)
static BOOL x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr ca, ADDRESS64* addr)
{

View File

@ -1305,6 +1305,31 @@ static struct symt* dwarf2_parse_volatile_type(dwarf2_parse_context_t* ctx,
return ref_type;
}
static struct symt* dwarf2_parse_unspecified_type(dwarf2_parse_context_t* ctx,
dwarf2_debug_info_t* di)
{
struct attribute name;
struct attribute size;
struct symt_basic *basic;
TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di));
if (di->symt) return di->symt;
if (!dwarf2_find_attribute(ctx, di, DW_AT_name, &name))
name.u.string = "void";
size.u.uvalue = sizeof(void *);
basic = symt_new_basic(ctx->module, btVoid, name.u.string, size.u.uvalue);
di->symt = &basic->symt;
if (!ctx->symt_cache[sc_void])
ctx->symt_cache[sc_void] = di->symt;
if (dwarf2_get_di_children(ctx, di)) FIXME("Unsupported children\n");
return di->symt;
}
static struct symt* dwarf2_parse_reference_type(dwarf2_parse_context_t* ctx,
dwarf2_debug_info_t* di)
{
@ -1421,6 +1446,9 @@ static struct symt* dwarf2_parse_udt_type(dwarf2_parse_context_t* ctx,
case DW_TAG_subprogram:
dwarf2_parse_subprogram(ctx, child);
break;
case DW_TAG_const_type:
dwarf2_parse_const_type(ctx, child);
break;
case DW_TAG_structure_type:
case DW_TAG_class_type:
case DW_TAG_union_type:
@ -1432,6 +1460,8 @@ static struct symt* dwarf2_parse_udt_type(dwarf2_parse_context_t* ctx,
case DW_TAG_variable:
case DW_TAG_imported_declaration:
case DW_TAG_ptr_to_member_type:
case DW_TAG_GNU_template_parameter_pack:
case DW_TAG_GNU_formal_parameter_pack:
/* FIXME: some C++ related stuff */
break;
default:
@ -1934,6 +1964,8 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_parse_context_t* ctx,
case DW_TAG_template_type_param:
case DW_TAG_template_value_param:
case DW_TAG_GNU_call_site:
case DW_TAG_GNU_template_parameter_pack:
case DW_TAG_GNU_formal_parameter_pack:
/* FIXME: no support in dbghelp's internals so far */
break;
default:
@ -2047,6 +2079,9 @@ static void dwarf2_load_one_entry(dwarf2_parse_context_t* ctx,
case DW_TAG_volatile_type:
dwarf2_parse_volatile_type(ctx, di);
break;
case DW_TAG_unspecified_type:
dwarf2_parse_unspecified_type(ctx, di);
break;
case DW_TAG_reference_type:
dwarf2_parse_reference_type(ctx, di);
break;

View File

@ -1469,9 +1469,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
if (!ret && !strchrW(filename, '/'))
{
ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
getenv("PATH"), elf_info) ||
elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
getenv("LD_LIBRARY_PATH"), elf_info);
getenv("PATH"), elf_info);
if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
getenv("LD_LIBRARY_PATH"), elf_info);
if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
BINDIR, elf_info);
if (!ret) ret = elf_load_file_from_dll_path(pcs, filename,
load_offset, dyn_addr, elf_info);
}

View File

@ -966,10 +966,10 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
&pbi, sizeof(pbi), NULL);
if (status == STATUS_SUCCESS)
{
ULONG dyld_image_info;
ULONG_PTR dyld_image_info;
/* Read dyld image info address from PEB */
if (ReadProcessMemory(pcs->handle, &pbi.PebBaseAddress->Reserved,
if (ReadProcessMemory(pcs->handle, &pbi.PebBaseAddress->Reserved[0],
&dyld_image_info, sizeof(dyld_image_info), NULL))
{
TRACE("got dyld_image_info 0x%08x from PEB %p MacDyldImageInfo %p\n",
@ -979,6 +979,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
}
}
#ifndef __LP64__ /* No reading the symtab with nlist(3) in LP64 */
if (!ret)
{
static void* dyld_all_image_infos_addr;
@ -1002,6 +1003,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
ret = TRUE;
}
}
#endif
}
if (macho_info->flags & MACHO_INFO_MODULE)

View File

@ -504,7 +504,7 @@ static BOOL pe_load_stabs(const struct process* pcs, struct module* module)
static BOOL pe_load_dwarf(struct module* module)
{
struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap;
BOOL ret = FALSE;
BOOL ret;
ret = dwarf2_parse(module,
module->module.BaseOfImage - fmap->u.pe.ntheader.OptionalHeader.ImageBase,

View File

@ -233,15 +233,6 @@ BOOL WINAPI StackWalk64(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
if (!cpu->stack_walk(&csw, frame, ctx)) return FALSE;
/* we don't handle KdHelp */
frame->KdHelp.Thread = 0xC000FADE;
frame->KdHelp.ThCallbackStack = 0x10;
frame->KdHelp.ThCallbackBStore = 0;
frame->KdHelp.NextCallback = 0;
frame->KdHelp.FramePointer = 0;
frame->KdHelp.KiCallUserMode = 0xD000DAFE;
frame->KdHelp.KeUserCallbackDispatcher = 0xE000F000;
frame->KdHelp.SystemRangeStart = 0xC0000000;
frame->KdHelp.Reserved[0] /* KiUserExceptionDispatcher */ = 0xE0005000;
return TRUE;
}

View File

@ -70,7 +70,7 @@ reactos/dll/win32/cryptdlg # Synced to Wine-1.7.27
reactos/dll/win32/cryptdll # Synced to Wine-1.7.27
reactos/dll/win32/cryptnet # Synced to WineStaging-1.7.37
reactos/dll/win32/cryptui # Synced to Wine-1.7.27
reactos/dll/win32/dbghelp # Synced to Wine-1.7.27
reactos/dll/win32/dbghelp # Synced to WineStaging-1.7.37
reactos/dll/win32/dciman32 # Synced to Wine-1.7.27
reactos/dll/win32/dwmapi # Synced to Wine-1.7.27
reactos/dll/win32/faultrep # Synced to Wine-1.7.27