Author: akhaldi
Date: Sat Jun 3 19:01:43 2017
New Revision: 74794
URL:
http://svn.reactos.org/svn/reactos?rev=74794&view=rev
Log:
[DBGHELP] Sync with Wine Staging 2.9. CORE-13362
d47c07d dbghelp: Avoid using isdigit() for WCHARs.
8d6cf80 dbghelp: Add support for char32_t type.
b316ac1 dbghelp: Add support for char16_t type.
74f05b8 dbghelp: Use the main module load address from the PEB.
329b176 dbghelp: Use debugstr_a() to trace a string that can be NULL.
4bbb252 dbghelp: Removed no longer needed psapi import.
Modified:
trunk/reactos/dll/win32/dbghelp/cpu_i386.c
trunk/reactos/dll/win32/dbghelp/dwarf.c
trunk/reactos/dll/win32/dbghelp/elf_module.c
trunk/reactos/dll/win32/dbghelp/module.c
trunk/reactos/dll/win32/dbghelp/msc.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/dbghelp/cpu_i386.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/cpu_i386…
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/cpu_i386.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/cpu_i386.c [iso-8859-1] Sat Jun 3 19:01:43 2017
@@ -215,16 +215,16 @@
/* Init done */
set_curr_mode((frame->AddrPC.Mode == AddrModeFlat) ? stm_32bit : stm_16bit);
- /* cur_switch holds address of WOW32Reserved field in TEB in debuggee
+ /* cur_switch holds address of SystemReserved1[0] field in TEB in debuggee
* address space
*/
if (NtQueryInformationThread(csw->hThread, ThreadBasicInformation, &info,
sizeof(info), NULL) == STATUS_SUCCESS)
{
- curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB,
WOW32Reserved);
+ curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB,
SystemReserved1[0]);
if (!sw_read_mem(csw, curr_switch, &p, sizeof(p)))
{
- WARN("Can't read TEB:WOW32Reserved\n");
+ WARN("Can't read TEB:SystemReserved1[0]\n");
goto done_err;
}
next_switch = p;
Modified: trunk/reactos/dll/win32/dbghelp/dwarf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dwarf.c?…
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/dwarf.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/dwarf.c [iso-8859-1] Sat Jun 3 19:01:43 2017
@@ -1888,7 +1888,7 @@
inline_flags.u.uvalue != DW_INL_not_inlined)
{
TRACE("Function %s declared as inlined (%ld)... skipping\n",
- name.u.string ? name.u.string : "(null)",
inline_flags.u.uvalue);
+ debugstr_a(name.u.string), inline_flags.u.uvalue);
return NULL;
}
Modified: trunk/reactos/dll/win32/dbghelp/elf_module.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/elf_modu…
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/elf_module.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/elf_module.c [iso-8859-1] Sat Jun 3 19:01:43 2017
@@ -1183,6 +1183,8 @@
char* ptr = (char*)fmap->u.elf.sect[ism.sidx].shdr.sh_addr;
unsigned long len;
+ if (load_offset) ptr += load_offset - fmap->u.elf.elf_start;
+
do
{
if (!ReadProcessMemory(pcs->handle, ptr, &dyn, sizeof(dyn),
&len) ||
@@ -1550,7 +1552,13 @@
*/
static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info)
{
- return elf_search_and_load_file(pcs, get_wine_loader_name(), 0, 0, elf_info);
+ PROCESS_BASIC_INFORMATION pbi;
+ ULONG_PTR base = 0;
+
+ if (!NtQueryInformationProcess( pcs->handle, ProcessBasicInformation, &pbi,
sizeof(pbi), NULL ))
+ ReadProcessMemory( pcs->handle, &pbi.PebBaseAddress->Reserved[0],
&base, sizeof(base), NULL );
+
+ return elf_search_and_load_file(pcs, get_wine_loader_name(), base, 0, elf_info);
}
/******************************************************************
Modified: trunk/reactos/dll/win32/dbghelp/module.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/module.c…
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/module.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/module.c [iso-8859-1] Sat Jun 3 19:01:43 2017
@@ -459,7 +459,7 @@
{
int i = len;
- while (i && isdigit(name[i - 1])) i--;
+ while (i && name[i - 1] >= '0' && name[i - 1] <=
'9') i--;
if (i && name[i - 1] == '.')
len = i - 1;
Modified: trunk/reactos/dll/win32/dbghelp/msc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/msc.c?re…
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/msc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/msc.c [iso-8859-1] Sat Jun 3 19:01:43 2017
@@ -149,6 +149,8 @@
cv_basic_types[T_REAL80] = &symt_new_basic(module, btFloat, "long
double", 10)->symt;
cv_basic_types[T_RCHAR] = &symt_new_basic(module, btInt, "signed
char", 1)->symt;
cv_basic_types[T_WCHAR] = &symt_new_basic(module, btWChar, "wchar_t",
2)->symt;
+ cv_basic_types[T_CHAR16] = &symt_new_basic(module, btChar16,"char16_t",
2)->symt;
+ cv_basic_types[T_CHAR32] = &symt_new_basic(module, btChar32,"char32_t",
4)->symt;
cv_basic_types[T_INT2] = &symt_new_basic(module, btInt, "INT2",
2)->symt;
cv_basic_types[T_UINT2] = &symt_new_basic(module, btUInt, "UINT2",
2)->symt;
cv_basic_types[T_INT4] = &symt_new_basic(module, btInt, "INT4",
4)->symt;
@@ -175,6 +177,8 @@
cv_basic_types[T_32PREAL80] = &symt_new_pointer(module, cv_basic_types[T_REAL80],
4)->symt;
cv_basic_types[T_32PRCHAR] = &symt_new_pointer(module, cv_basic_types[T_RCHAR],
4)->symt;
cv_basic_types[T_32PWCHAR] = &symt_new_pointer(module, cv_basic_types[T_WCHAR],
4)->symt;
+ cv_basic_types[T_32PCHAR16] = &symt_new_pointer(module, cv_basic_types[T_CHAR16],
4)->symt;
+ cv_basic_types[T_32PCHAR32] = &symt_new_pointer(module, cv_basic_types[T_CHAR32],
4)->symt;
cv_basic_types[T_32PINT2] = &symt_new_pointer(module, cv_basic_types[T_INT2],
4)->symt;
cv_basic_types[T_32PUINT2] = &symt_new_pointer(module, cv_basic_types[T_UINT2],
4)->symt;
cv_basic_types[T_32PINT4] = &symt_new_pointer(module, cv_basic_types[T_INT4],
4)->symt;
@@ -201,6 +205,8 @@
cv_basic_types[T_64PREAL80] = &symt_new_pointer(module, cv_basic_types[T_REAL80],
8)->symt;
cv_basic_types[T_64PRCHAR] = &symt_new_pointer(module, cv_basic_types[T_RCHAR],
8)->symt;
cv_basic_types[T_64PWCHAR] = &symt_new_pointer(module, cv_basic_types[T_WCHAR],
8)->symt;
+ cv_basic_types[T_64PCHAR16] = &symt_new_pointer(module, cv_basic_types[T_CHAR16],
8)->symt;
+ cv_basic_types[T_64PCHAR32] = &symt_new_pointer(module, cv_basic_types[T_CHAR32],
8)->symt;
cv_basic_types[T_64PINT2] = &symt_new_pointer(module, cv_basic_types[T_INT2],
8)->symt;
cv_basic_types[T_64PUINT2] = &symt_new_pointer(module, cv_basic_types[T_UINT2],
8)->symt;
cv_basic_types[T_64PINT4] = &symt_new_pointer(module, cv_basic_types[T_INT4],
8)->symt;
@@ -227,6 +233,8 @@
cv_basic_types[T_PREAL80] = &symt_new_pointer(module, cv_basic_types[T_REAL80],
sizeof(void*))->symt;
cv_basic_types[T_PRCHAR] = &symt_new_pointer(module, cv_basic_types[T_RCHAR],
sizeof(void*))->symt;
cv_basic_types[T_PWCHAR] = &symt_new_pointer(module, cv_basic_types[T_WCHAR],
sizeof(void*))->symt;
+ cv_basic_types[T_PCHAR16] = &symt_new_pointer(module, cv_basic_types[T_CHAR16],
sizeof(void*))->symt;
+ cv_basic_types[T_PCHAR32] = &symt_new_pointer(module, cv_basic_types[T_CHAR32],
sizeof(void*))->symt;
cv_basic_types[T_PINT2] = &symt_new_pointer(module, cv_basic_types[T_INT2],
sizeof(void*))->symt;
cv_basic_types[T_PUINT2] = &symt_new_pointer(module, cv_basic_types[T_UINT2],
sizeof(void*))->symt;
cv_basic_types[T_PINT4] = &symt_new_pointer(module, cv_basic_types[T_INT4],
sizeof(void*))->symt;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jun 3 19:01:43 2017
@@ -63,7 +63,7 @@
reactos/dll/win32/cryptdll # Synced to WineStaging-1.9.11
reactos/dll/win32/cryptnet # Synced to WineStaging-2.9
reactos/dll/win32/cryptui # Synced to WineStaging-1.9.16
-reactos/dll/win32/dbghelp # Synced to WineStaging-1.9.23
+reactos/dll/win32/dbghelp # Synced to WineStaging-2.9
reactos/dll/win32/dciman32 # Synced to WineStaging-1.9.11
reactos/dll/win32/faultrep # Synced to WineStaging-1.9.11
reactos/dll/win32/fontsub # Synced to WineStaging-1.9.13