Author: akhaldi
Date: Fri Mar 20 18:27:31 2015
New Revision: 66841

URL: http://svn.reactos.org/svn/reactos?rev=66841&view=rev
Log:
[DBGHELP] Sync with Wine Staging 1.7.37. CORE-9246

Modified:
    trunk/reactos/dll/win32/dbghelp/cpu_x86_64.c
    trunk/reactos/dll/win32/dbghelp/dwarf.c
    trunk/reactos/dll/win32/dbghelp/elf_module.c
    trunk/reactos/dll/win32/dbghelp/macho_module.c
    trunk/reactos/dll/win32/dbghelp/pe_module.c
    trunk/reactos/dll/win32/dbghelp/stack.c
    trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/dbghelp/cpu_x86_64.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/cpu_x86_64.c?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/cpu_x86_64.c        [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/cpu_x86_64.c        [iso-8859-1] Fri Mar 20 
18:27:31 2015
@@ -67,21 +67,6 @@
  *  OPTIONAL ULONG ExceptionData[];
  */
 } 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)

Modified: trunk/reactos/dll/win32/dbghelp/dwarf.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dwarf.c?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/dwarf.c     [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/dwarf.c     [iso-8859-1] Fri Mar 20 
18:27:31 2015
@@ -1305,6 +1305,31 @@
     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)
 {
@@ -1420,6 +1445,9 @@
             break;
         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:
@@ -1432,6 +1460,8 @@
         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 @@
         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:
@@ -2046,6 +2078,9 @@
         break;
     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);

Modified: trunk/reactos/dll/win32/dbghelp/elf_module.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/elf_module.c?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/elf_module.c        [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/elf_module.c        [iso-8859-1] Fri Mar 20 
18:27:31 2015
@@ -1469,9 +1469,11 @@
     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);
     }

Modified: trunk/reactos/dll/win32/dbghelp/macho_module.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/macho_module.c?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/macho_module.c      [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/macho_module.c      [iso-8859-1] Fri Mar 20 
18:27:31 2015
@@ -966,10 +966,10 @@
                                            &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 @@
             }
         }
 
+#ifndef __LP64__ /* No reading the symtab with nlist(3) in LP64 */
         if (!ret)
         {
             static void* dyld_all_image_infos_addr;
@@ -1002,6 +1003,7 @@
                 ret = TRUE;
             }
         }
+#endif
     }
 
     if (macho_info->flags & MACHO_INFO_MODULE)

Modified: trunk/reactos/dll/win32/dbghelp/pe_module.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/pe_module.c?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/pe_module.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/pe_module.c [iso-8859-1] Fri Mar 20 
18:27:31 2015
@@ -504,7 +504,7 @@
 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,

Modified: trunk/reactos/dll/win32/dbghelp/stack.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/stack.c?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/stack.c     [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/stack.c     [iso-8859-1] Fri Mar 20 
18:27:31 2015
@@ -233,15 +233,6 @@
     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;
 }

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Mar 20 18:27:31 2015
@@ -70,7 +70,7 @@
 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


Reply via email to