ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2020
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
382 discussions
Start a n
N
ew thread
[reactos] 174/179: [WINESYNC] dbghelp: Replace another usage of GetEnvironmentVariable() with the target process's environment.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97b990849f01d01f62934…
commit 97b990849f01d01f62934edfaf77d20be01e7a67 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:53:58 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:36:02 2020 +0200 [WINESYNC] dbghelp: Replace another usage of GetEnvironmentVariable() with the target process's environment. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 70b2d181b1547dbe3c2a62e57c6afb0ee903f358 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/dbghelp/path.c | 9 +++------ sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c index 2681c405aa1..6639375d444 100644 --- a/dll/win32/dbghelp/path.c +++ b/dll/win32/dbghelp/path.c @@ -756,12 +756,9 @@ BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL (*ma WCHAR env_name[64]; swprintf(env_name, ARRAY_SIZE(env_name), L"WINEDLLDIR%u", i); if (!(env = process_getenv(process, env_name))) return FALSE; - len = lstrlenW(env); - if (!(buf = heap_alloc((len + lstrlenW(name) + 2) * sizeof(WCHAR)))) return FALSE; - - len = GetEnvironmentVariableW(env_name, buf, len); - buf[len++] = '\\'; - lstrcpyW(buf + len, name); + len = wcslen(env) + wcslen(name) + 2; + if (!(buf = heap_alloc(len * sizeof(WCHAR)))) return FALSE; + swprintf(buf, len, L"%s\\%s", env, name); file = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (file != INVALID_HANDLE_VALUE) { diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index cdf2499dfdf..2fecd3ea9c7 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 774ee4734a7d6c02f648fdf1747df837c964583d + wine: 70b2d181b1547dbe3c2a62e57c6afb0ee903f358
4 years, 3 months
1
0
0
0
[reactos] 173/179: [WINESYNC] dbghelp: Ignore missing debug info in SymInitializeW.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ee8def7d7676219b04262…
commit ee8def7d7676219b04262403fc1d1d6c85e89b39 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:53:58 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:36:01 2020 +0200 [WINESYNC] dbghelp: Ignore missing debug info in SymInitializeW. When fInvadeProcess is used, we return an error if the target process is found but its debug info is not. We should only return an error if the process is not found. This fixes a SymInitializeW popup error on Hard Reset Redux startup. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 774ee4734a7d6c02f648fdf1747df837c964583d by Rémi Bernon <rbernon(a)codeweavers.com> --- dll/win32/dbghelp/dbghelp.c | 8 ++++---- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/win32/dbghelp/dbghelp.c b/dll/win32/dbghelp/dbghelp.c index 892ad9927cd..c67f9730125 100644 --- a/dll/win32/dbghelp/dbghelp.c +++ b/dll/win32/dbghelp/dbghelp.c @@ -378,10 +378,10 @@ static BOOL check_live_target(struct process* pcs) TRACE("got debug info address %#lx from PEB %p\n", base, pbi.PebBaseAddress); #ifndef __REACTOS__ - return elf_read_wine_loader_dbg_info(pcs, base) || macho_read_wine_loader_dbg_info(pcs, base); -#else - return TRUE; + if (!elf_read_wine_loader_dbg_info(pcs, base) && !macho_read_wine_loader_dbg_info(pcs, base)) + WARN("couldn't load process debug info at %#lx\n", base); #endif + return TRUE; } #endif @@ -485,7 +485,7 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP { if (fInvadeProcess) EnumerateLoadedModulesW64(hProcess, process_invade_cb, hProcess); - pcs->loader->synchronize_module_list(pcs); + if (pcs->loader) pcs->loader->synchronize_module_list(pcs); } else if (fInvadeProcess) #else diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index e7ba3c932be..cdf2499dfdf 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 30f17befaf216a42a4e2cfbca3ed7bdce43e476a + wine: 774ee4734a7d6c02f648fdf1747df837c964583d
4 years, 3 months
1
0
0
0
[reactos] 172/179: [WINESYNC] dbghelp: Remove support for PPC32.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c8c8313c67808a85555b2…
commit c8c8313c67808a85555b20fcee0014f960ae3ffd Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:12:34 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:36:01 2020 +0200 [WINESYNC] dbghelp: Remove support for PPC32. Signed-off-by: André Hentschel <nerv(a)dawncrow.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 30f17befaf216a42a4e2cfbca3ed7bdce43e476a by André Hentschel <nerv(a)dawncrow.de> --- dll/win32/dbghelp/CMakeLists.txt | 1 - dll/win32/dbghelp/cpu_ppc.c | 100 --------------------------------------- dll/win32/dbghelp/dbghelp.c | 6 +-- sdk/tools/winesync/dbghelp.cfg | 2 +- 4 files changed, 3 insertions(+), 106 deletions(-) diff --git a/dll/win32/dbghelp/CMakeLists.txt b/dll/win32/dbghelp/CMakeLists.txt index 15e1aaba010..508a9692842 100644 --- a/dll/win32/dbghelp/CMakeLists.txt +++ b/dll/win32/dbghelp/CMakeLists.txt @@ -50,7 +50,6 @@ else() cpu_arm.c cpu_arm64.c cpu_i386.c - cpu_ppc.c cpu_x86_64.c dbghelp.c dwarf.c diff --git a/dll/win32/dbghelp/cpu_ppc.c b/dll/win32/dbghelp/cpu_ppc.c deleted file mode 100644 index 80db2be704b..00000000000 --- a/dll/win32/dbghelp/cpu_ppc.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * File cpu_ppc.c - * - * Copyright (C) 2009-2009, Eric Pouech. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <assert.h> - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "dbghelp_private.h" -#include "winternl.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); - -static BOOL ppc_get_addr(HANDLE hThread, const CONTEXT* ctx, - enum cpu_addr ca, ADDRESS64* addr) -{ - switch (ca) - { -#if defined(__powerpc__) - case cpu_addr_pc: - addr->Mode = AddrModeFlat; - addr->Segment = 0; /* don't need segment */ - addr->Offset = ctx->Iar; - return TRUE; -#endif - default: - case cpu_addr_stack: - case cpu_addr_frame: - FIXME("not done\n"); - } - return FALSE; -} - -static BOOL ppc_stack_walk(struct cpu_stack_walk* csw, STACKFRAME64 *frame, - union ctx *ctx) -{ - FIXME("not done\n"); - return FALSE; -} - -static unsigned ppc_map_dwarf_register(unsigned regno, const struct module* module, BOOL eh_frame) -{ - FIXME("not done\n"); - return 0; -} - -static void *ppc_fetch_context_reg(union ctx *ctx, unsigned regno, unsigned *size) -{ - FIXME("NIY\n"); - return NULL; -} - -static const char* ppc_fetch_regname(unsigned regno) -{ - FIXME("Unknown register %x\n", regno); - return NULL; -} - -static BOOL ppc_fetch_minidump_thread(struct dump_context* dc, unsigned index, unsigned flags, const CONTEXT* ctx) -{ - FIXME("NIY\n"); - return FALSE; -} - -static BOOL ppc_fetch_minidump_module(struct dump_context* dc, unsigned index, unsigned flags) -{ - FIXME("NIY\n"); - return FALSE; -} - -DECLSPEC_HIDDEN struct cpu cpu_ppc = { - IMAGE_FILE_MACHINE_POWERPC, - 4, - CV_REG_NONE, /* FIXME */ - ppc_get_addr, - ppc_stack_walk, - NULL, - ppc_map_dwarf_register, - ppc_fetch_context_reg, - ppc_fetch_regname, - ppc_fetch_minidump_thread, - ppc_fetch_minidump_module, -}; diff --git a/dll/win32/dbghelp/dbghelp.c b/dll/win32/dbghelp/dbghelp.c index 5a4f55f5470..892ad9927cd 100644 --- a/dll/win32/dbghelp/dbghelp.c +++ b/dll/win32/dbghelp/dbghelp.c @@ -158,10 +158,10 @@ const char* wine_dbgstr_addr(const ADDRESS64* addr) } #endif -extern struct cpu cpu_i386, cpu_x86_64, cpu_ppc, cpu_arm, cpu_arm64; +extern struct cpu cpu_i386, cpu_x86_64, cpu_arm, cpu_arm64; #ifndef DBGHELP_STATIC_LIB -static struct cpu* dbghelp_cpus[] = {&cpu_i386, &cpu_x86_64, &cpu_ppc, &cpu_arm, &cpu_arm64, NULL}; +static struct cpu* dbghelp_cpus[] = {&cpu_i386, &cpu_x86_64, &cpu_arm, &cpu_arm64, NULL}; #else static struct cpu* dbghelp_cpus[] = {&cpu_i386, NULL}; #endif @@ -171,8 +171,6 @@ struct cpu* dbghelp_current_cpu = &cpu_i386 #elif defined(__x86_64__) &cpu_x86_64 -#elif defined(__powerpc__) - &cpu_ppc #elif defined(__arm__) &cpu_arm #elif defined(__aarch64__) diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index edefd93828d..e7ba3c932be 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 7b6f6257bc7e9d8f8a93dfa969510ab4aa16e765 + wine: 30f17befaf216a42a4e2cfbca3ed7bdce43e476a
4 years, 3 months
1
0
0
0
[reactos] 171/179: [WINESYNC] dbghelp: Use debuggee environment in search_unix_path.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5637f59e519feca255365…
commit 5637f59e519feca2553659533fc19f24e35e3b74 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:12:24 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:36:00 2020 +0200 [WINESYNC] dbghelp: Use debuggee environment in search_unix_path. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 7b6f6257bc7e9d8f8a93dfa969510ab4aa16e765 by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/dbghelp_private.h | 2 +- dll/win32/dbghelp/elf_module.c | 2 +- dll/win32/dbghelp/macho_module.c | 6 +++--- dll/win32/dbghelp/path.c | 12 ++++++------ sdk/tools/winesync/dbghelp.cfg | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h index 434e157c28f..3e307fa07d5 100644 --- a/dll/win32/dbghelp/dbghelp_private.h +++ b/dll/win32/dbghelp/dbghelp_private.h @@ -707,7 +707,7 @@ extern BOOL path_find_symbol_file(const struct process* pcs, const struc extern WCHAR *get_dos_file_name(const WCHAR *filename) DECLSPEC_HIDDEN; extern BOOL search_dll_path(const struct process* process, const WCHAR *name, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) DECLSPEC_HIDDEN; -extern BOOL search_unix_path(const WCHAR *name, const char *path, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) DECLSPEC_HIDDEN; +extern BOOL search_unix_path(const WCHAR *name, const WCHAR *path, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) DECLSPEC_HIDDEN; extern const WCHAR* file_name(const WCHAR* str) DECLSPEC_HIDDEN; extern const char* file_nameA(const char* str) DECLSPEC_HIDDEN; diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 00e5c12c2e6..e44629f016e 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -1435,7 +1435,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename, load_elf.dyn_addr = dyn_addr; load_elf.elf_info = elf_info; - ret = search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf) + ret = search_unix_path(filename, process_getenv(pcs, L"LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf) || search_dll_path(pcs, filename, elf_load_file_cb, &load_elf); } diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c index 05549571c5e..8e91577e449 100644 --- a/dll/win32/dbghelp/macho_module.c +++ b/dll/win32/dbghelp/macho_module.c @@ -1574,7 +1574,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam /* Try DYLD_LIBRARY_PATH first. */ p = file_name(filename); - ret = search_unix_path(p, getenv("DYLD_LIBRARY_PATH"), macho_load_file_cb, &load_params); + ret = search_unix_path(p, process_getenv(pcs, L"DYLD_LIBRARY_PATH"), macho_load_file_cb, &load_params); /* Try the path as given. */ if (!ret) @@ -1582,9 +1582,9 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam /* Try DYLD_FALLBACK_LIBRARY_PATH, with just the filename (no directories). */ if (!ret) { - const char* fallback = getenv("DYLD_FALLBACK_LIBRARY_PATH"); + const WCHAR* fallback = process_getenv(pcs, L"DYLD_FALLBACK_LIBRARY_PATH"); if (!fallback) - fallback = "/usr/local/lib:/lib:/usr/lib"; + fallback = L"/usr/local/lib:/lib:/usr/lib"; ret = search_unix_path(p, fallback, macho_load_file_cb, &load_params); } if (!ret && p == filename) diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c index 87eeb93ae6d..2681c405aa1 100644 --- a/dll/win32/dbghelp/path.c +++ b/dll/win32/dbghelp/path.c @@ -780,9 +780,9 @@ found: return TRUE; } -BOOL search_unix_path(const WCHAR *name, const char *path, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) +BOOL search_unix_path(const WCHAR *name, const WCHAR *path, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) { - const char *iter, *next; + const WCHAR *iter, *next; size_t size, len; WCHAR *dos_path; char *buf; @@ -791,16 +791,16 @@ BOOL search_unix_path(const WCHAR *name, const char *path, BOOL (*match)(void*, if (!path) return FALSE; name = file_name(name); - size = WideCharToMultiByte(CP_UNIXCP, 0, name, -1, NULL, 0, NULL, NULL) + strlen(path) + 1; + size = WideCharToMultiByte(CP_UNIXCP, 0, name, -1, NULL, 0, NULL, NULL) + + WideCharToMultiByte(CP_UNIXCP, 0, path, -1, NULL, 0, NULL, NULL); if (!(buf = heap_alloc(size))) return FALSE; for (iter = path;; iter = next + 1) { - if (!(next = strchr(iter, ':'))) next = iter + strlen(iter); + if (!(next = wcschr(iter, ':'))) next = iter + lstrlenW(iter); if (*iter == '/') { - len = next - iter; - memcpy(buf, iter, len); + len = WideCharToMultiByte(CP_UNIXCP, 0, iter, next - iter, buf, size, NULL, NULL); if (buf[len - 1] != '/') buf[len++] = '/'; WideCharToMultiByte(CP_UNIXCP, 0, name, -1, buf + len, size - len, NULL, NULL); if ((dos_path = wine_get_dos_file_name(buf))) diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index 29c754ab814..edefd93828d 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: ab4665f4ae3c67317e21d42868cae0af72ffcb7a + wine: 7b6f6257bc7e9d8f8a93dfa969510ab4aa16e765
4 years, 3 months
1
0
0
0
[reactos] 170/179: [WINESYNC] dbghelp: Fix the spelling of a comment.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=76ecb16c9683bc27eb651…
commit 76ecb16c9683bc27eb6518a9572696a162712691 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:12:16 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:36:00 2020 +0200 [WINESYNC] dbghelp: Fix the spelling of a comment. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id ab4665f4ae3c67317e21d42868cae0af72ffcb7a by Francois Gouget <fgouget(a)free.fr> --- dll/win32/dbghelp/elf_module.c | 2 +- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index ab2a693ecaf..00e5c12c2e6 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -105,7 +105,7 @@ struct elf_module_info #define ELF_SHT_FINI_ARRAY 15 /* Array of destructors */ #define ELF_SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */ #define ELF_SHT_GROUP 17 /* Section group */ -#define ELF_SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ +#define ELF_SHT_SYMTAB_SHNDX 18 /* Extended section indices */ #define ELF_SHT_NUM 19 /* Number of defined types. */ /* Legal values for ST_TYPE subfield of st_info (symbol type). */ diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index e8df9235796..29c754ab814 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 2b0977fc711e1faadfef69e3a46c2d1848b4826b + wine: ab4665f4ae3c67317e21d42868cae0af72ffcb7a
4 years, 3 months
1
0
0
0
[reactos] 169/179: [WINESYNC] dbghelp: Use debuggee environment variables in search_dll_path.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=be0572902a33f8740e8dd…
commit be0572902a33f8740e8dd2ccfff9f94f87ce6e82 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:12:15 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:36:00 2020 +0200 [WINESYNC] dbghelp: Use debuggee environment variables in search_dll_path. This fixes searching wow32 binaries, where debuggee search path is different than debugger's. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 2b0977fc711e1faadfef69e3a46c2d1848b4826b by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/dbghelp.c | 83 +++++++++++++++++++++++++++++++++---- dll/win32/dbghelp/dbghelp_private.h | 5 ++- dll/win32/dbghelp/elf_module.c | 2 +- dll/win32/dbghelp/macho_module.c | 2 +- dll/win32/dbghelp/path.c | 18 ++++---- dll/win32/dbghelp/pe_module.c | 2 +- sdk/tools/winesync/dbghelp.cfg | 2 +- 7 files changed, 93 insertions(+), 21 deletions(-) diff --git a/dll/win32/dbghelp/dbghelp.c b/dll/win32/dbghelp/dbghelp.c index 83c3a0ec10f..5a4f55f5470 100644 --- a/dll/win32/dbghelp/dbghelp.c +++ b/dll/win32/dbghelp/dbghelp.c @@ -284,6 +284,23 @@ static BOOL WINAPI process_invade_cb(PCWSTR name, ULONG64 base, ULONG size, PVOI return TRUE; } +const WCHAR *process_getenv(const struct process *process, const WCHAR *name) +{ + size_t name_len; + const WCHAR *iter; + + if (!process->environment) return NULL; + name_len = lstrlenW(name); + + for (iter = process->environment; *iter; iter += lstrlenW(iter) + 1) + { + if (!wcsnicmp(iter, name, name_len) && iter[name_len] == '=') + return iter + name_len + 1; + } + + return NULL; +} + /****************************************************************** * check_live_target * @@ -291,7 +308,7 @@ static BOOL WINAPI process_invade_cb(PCWSTR name, ULONG64 base, ULONG size, PVOI static BOOL check_live_target(struct process* pcs) { PROCESS_BASIC_INFORMATION pbi; - ULONG_PTR base = 0; + ULONG_PTR base = 0, env = 0; if (!GetProcessId(pcs->handle)) return FALSE; if (GetEnvironmentVariableA("DBGHELP_NOLIVE", NULL, 0)) return FALSE; @@ -302,18 +319,67 @@ static BOOL check_live_target(struct process* pcs) if (!pcs->is_64bit) { - PEB32 *peb32 = (PEB32 *)pbi.PebBaseAddress; - DWORD base32 = 0; - ReadProcessMemory(pcs->handle, &peb32->Reserved[0], &base32, sizeof(base32), NULL); - base = base32; + DWORD env32; + PEB32 peb32; + C_ASSERT(sizeof(void*) != 4 || FIELD_OFFSET(RTL_USER_PROCESS_PARAMETERS, Environment) == 0x48); + if (!ReadProcessMemory(pcs->handle, pbi.PebBaseAddress, &peb32, sizeof(peb32), NULL)) return FALSE; + base = peb32.Reserved[0]; + if (read_process_memory(pcs, peb32.ProcessParameters + 0x48, &env32, sizeof(env32))) env = env32; } - else ReadProcessMemory(pcs->handle, &pbi.PebBaseAddress->Reserved[0], &base, sizeof(base), NULL); -#ifndef __REACTOS__ + else + { + PEB peb; + if (!ReadProcessMemory(pcs->handle, pbi.PebBaseAddress, &peb, sizeof(peb), NULL)) return FALSE; + base = peb.Reserved[0]; + ReadProcessMemory(pcs->handle, &peb.ProcessParameters->Environment, &env, sizeof(env), NULL); + } + +#ifdef __REACTOS__ /* Wine store their loader base address in peb.reserved[0] and load its symbol from there. - * ReactOS does not care about it */ + * ReactOS does not care about it, we are just happy if we managed to read the value */ + base = 1; +#endif + + /* read debuggee environment block */ + if (env) + { + size_t buf_size = 0, i, last_null = -1; + WCHAR *buf = NULL; + + do + { + size_t read_size = sysinfo.dwAllocationGranularity - (env & (sysinfo.dwAllocationGranularity - 1)); + if (buf) + { + WCHAR *new_buf; + if (!(new_buf = realloc(buf, buf_size + read_size))) break; + buf = new_buf; + } + else if(!(buf = malloc(read_size))) break; + + if (!read_process_memory(pcs, env, (char*)buf + buf_size, read_size)) break; + for (i = buf_size / sizeof(WCHAR); i < (buf_size + read_size) / sizeof(WCHAR); i++) + { + if (buf[i]) continue; + if (last_null + 1 == i) + { + pcs->environment = realloc(buf, (i + 1) * sizeof(WCHAR)); + buf = NULL; + break; + } + last_null = i; + } + env += read_size; + buf_size += read_size; + } + while (buf); + free(buf); + } + if (!base) return FALSE; TRACE("got debug info address %#lx from PEB %p\n", base, pbi.PebBaseAddress); +#ifndef __REACTOS__ return elf_read_wine_loader_dbg_info(pcs, base) || macho_read_wine_loader_dbg_info(pcs, base); #else return TRUE; @@ -476,6 +542,7 @@ BOOL WINAPI SymCleanup(HANDLE hProcess) while ((*ppcs)->lmodules) module_remove(*ppcs, (*ppcs)->lmodules); HeapFree(GetProcessHeap(), 0, (*ppcs)->search_path); + free((*ppcs)->environment); next = (*ppcs)->next; HeapFree(GetProcessHeap(), 0, *ppcs); *ppcs = next; diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h index 6faf8b8eb55..434e157c28f 100644 --- a/dll/win32/dbghelp/dbghelp_private.h +++ b/dll/win32/dbghelp/dbghelp_private.h @@ -430,6 +430,7 @@ struct process HANDLE handle; const struct loader_ops* loader; WCHAR* search_path; + WCHAR* environment; PSYMBOL_REGISTERED_CALLBACK64 reg_cb; PSYMBOL_REGISTERED_CALLBACK reg_cb32; @@ -632,6 +633,7 @@ extern BOOL pcs_callback(const struct process* pcs, ULONG action, void* extern void* fetch_buffer(struct process* pcs, unsigned size) DECLSPEC_HIDDEN; extern const char* wine_dbgstr_addr(const ADDRESS64* addr) DECLSPEC_HIDDEN; extern struct cpu* cpu_find(DWORD) DECLSPEC_HIDDEN; +extern const WCHAR *process_getenv(const struct process *process, const WCHAR *name); extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN; #ifndef __REACTOS__ @@ -703,7 +705,8 @@ extern BOOL path_find_symbol_file(const struct process* pcs, const struc PCSTR full_path, enum module_type type, const GUID* guid, DWORD dw1, DWORD dw2, WCHAR *buffer, BOOL* is_unmatched) DECLSPEC_HIDDEN; extern WCHAR *get_dos_file_name(const WCHAR *filename) DECLSPEC_HIDDEN; -extern BOOL search_dll_path(const WCHAR *name, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) DECLSPEC_HIDDEN; +extern BOOL search_dll_path(const struct process* process, const WCHAR *name, + BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) DECLSPEC_HIDDEN; extern BOOL search_unix_path(const WCHAR *name, const char *path, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) DECLSPEC_HIDDEN; extern const WCHAR* file_name(const WCHAR* str) DECLSPEC_HIDDEN; extern const char* file_nameA(const char* str) DECLSPEC_HIDDEN; diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 5f92432d0e8..ab2a693ecaf 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -1436,7 +1436,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename, load_elf.elf_info = elf_info; ret = search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf) - || search_dll_path(filename, elf_load_file_cb, &load_elf); + || search_dll_path(pcs, filename, elf_load_file_cb, &load_elf); } return ret; diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c index 51119593770..05549571c5e 100644 --- a/dll/win32/dbghelp/macho_module.c +++ b/dll/win32/dbghelp/macho_module.c @@ -1588,7 +1588,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam ret = search_unix_path(p, fallback, macho_load_file_cb, &load_params); } if (!ret && p == filename) - ret = search_dll_path(filename, macho_load_file_cb, &load_params); + ret = search_dll_path(pcs, filename, macho_load_file_cb, &load_params); return ret; } diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c index d4e04ff1f40..87eeb93ae6d 100644 --- a/dll/win32/dbghelp/path.c +++ b/dll/win32/dbghelp/path.c @@ -692,19 +692,17 @@ WCHAR *get_dos_file_name(const WCHAR *filename) } #ifndef __REACTOS__ -BOOL search_dll_path(const WCHAR *name, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) +BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) { + const WCHAR *env; size_t len, i; HANDLE file; WCHAR *buf; BOOL ret; - static const WCHAR winebuilddirW[] = {'W','I','N','E','B','U','I','L','D','D','I','R',0}; - static const WCHAR winedlldirW[] = {'W','I','N','E','D','L','L','D','I','R','%','u',0}; - name = file_name(name); - if ((len = GetEnvironmentVariableW(winebuilddirW, NULL, 0))) + if ((env = process_getenv(process, L"WINEBUILDDIR"))) { WCHAR *p, *end; const WCHAR dllsW[] = { '\\','d','l','l','s','\\' }; @@ -713,8 +711,11 @@ BOOL search_dll_path(const WCHAR *name, BOOL (*match)(void*, HANDLE, const WCHAR const WCHAR dot_exeW[] = {'.','e','x','e',0}; const WCHAR dot_soW[] = {'.','s','o',0}; + + len = lstrlenW(env); if (!(buf = heap_alloc((len + 8 + 3 * lstrlenW(name)) * sizeof(WCHAR)))) return FALSE; - end = buf + GetEnvironmentVariableW(winebuilddirW, buf, len); + wcscpy(buf, env); + end = buf + len; memcpy(end, dllsW, sizeof(dllsW)); lstrcpyW(end + ARRAY_SIZE(dllsW), name); @@ -753,8 +754,9 @@ BOOL search_dll_path(const WCHAR *name, BOOL (*match)(void*, HANDLE, const WCHAR for (i = 0;; i++) { WCHAR env_name[64]; - swprintf(env_name, ARRAY_SIZE(env_name), winedlldirW, i); - if (!(len = GetEnvironmentVariableW(env_name, NULL, 0))) break; + swprintf(env_name, ARRAY_SIZE(env_name), L"WINEDLLDIR%u", i); + if (!(env = process_getenv(process, env_name))) return FALSE; + len = lstrlenW(env); if (!(buf = heap_alloc((len + lstrlenW(name) + 2) * sizeof(WCHAR)))) return FALSE; len = GetEnvironmentVariableW(env_name, buf, len); diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c index 9ea60ecade4..193876263ac 100644 --- a/dll/win32/dbghelp/pe_module.c +++ b/dll/win32/dbghelp/pe_module.c @@ -823,7 +823,7 @@ struct module* pe_load_native_module(struct process* pcs, const WCHAR* name, { #ifndef __REACTOS__ struct builtin_search builtin = { NULL }; - if (modfmt->u.pe_info->fmap.u.pe.builtin && search_dll_path(loaded_name, search_builtin_pe, &builtin)) + if (modfmt->u.pe_info->fmap.u.pe.builtin && search_dll_path(pcs, loaded_name, search_builtin_pe, &builtin)) { TRACE("reloaded %s from %s\n", debugstr_w(loaded_name), debugstr_w(builtin.path)); image_unmap_file(&modfmt->u.pe_info->fmap); diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index d728bdefbc4..e8df9235796 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 341feeb10eddd3d139c4c206a43db80d0671ff3b + wine: 2b0977fc711e1faadfef69e3a46c2d1848b4826b
4 years, 3 months
1
0
0
0
[reactos] 168/179: [WINESYNC] dbghelp: Use stricmp() instead of _strnicmp(..., -1).
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=37eff17d4dcc5ca475088…
commit 37eff17d4dcc5ca475088ad0aa596e6c1396cb65 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:12:13 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:59 2020 +0200 [WINESYNC] dbghelp: Use stricmp() instead of _strnicmp(..., -1). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 341feeb10eddd3d139c4c206a43db80d0671ff3b by Alexandre Julliard <julliard(a)winehq.org> --- dll/win32/dbghelp/compat.h | 1 + dll/win32/dbghelp/msc.c | 2 +- dll/win32/dbghelp/pe_module.c | 2 +- sdk/tools/winesync/dbghelp.cfg | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dll/win32/dbghelp/compat.h b/dll/win32/dbghelp/compat.h index 2bfa06bc242..2711bca953a 100644 --- a/dll/win32/dbghelp/compat.h +++ b/dll/win32/dbghelp/compat.h @@ -21,6 +21,7 @@ typedef HANDLE HWND; #define min(x, y) (((x) < (y)) ? (x) : (y)) #define max(x, y) (((x) > (y)) ? (x) : (y)) #define _strnicmp(_String1, _String2, _MaxCount) strncasecmp(_String1, _String2, _MaxCount) +#define stricmp(_String1, _String2) strcasecmp(_String1, _String2) #ifdef __i386__ #define CDECL __cdecl diff --git a/dll/win32/dbghelp/msc.c b/dll/win32/dbghelp/msc.c index 0f0aa25e768..4dcbd41f26f 100644 --- a/dll/win32/dbghelp/msc.c +++ b/dll/win32/dbghelp/msc.c @@ -2682,7 +2682,7 @@ static void pdb_process_symbol_imports(const struct process* pcs, { ptr = (const char*)imp + sizeof(*imp) + strlen(imp->filename); if (i >= CV_MAX_MODULES) FIXME("Out of bounds!!!\n"); - if (!_strnicmp(pdb_lookup->filename, imp->filename, -1)) + if (!stricmp(pdb_lookup->filename, imp->filename)) { if (module_index != -1) FIXME("Twice the entry\n"); else module_index = i; diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c index 864be64f573..9ea60ecade4 100644 --- a/dll/win32/dbghelp/pe_module.c +++ b/dll/win32/dbghelp/pe_module.c @@ -129,7 +129,7 @@ static BOOL pe_find_section(struct image_file_map* fmap, const char* name, sectname = memcpy(tmp, sectname, IMAGE_SIZEOF_SHORT_NAME); tmp[IMAGE_SIZEOF_SHORT_NAME] = '\0'; } - if (!_strnicmp(sectname, name, -1)) + if (!stricmp(sectname, name)) { ism->fmap = fmap; ism->sidx = i; diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index ec7b0db7014..d728bdefbc4 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 0163db5152124efbd1a5ba46aa52a6da66d897d5 + wine: 341feeb10eddd3d139c4c206a43db80d0671ff3b
4 years, 3 months
1
0
0
0
[reactos] 167/179: [WINESYNC] dbghelp: Make qsort callback explicitly cdecl.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4cc24ef20ee2dfbf4421b…
commit 4cc24ef20ee2dfbf4421b6846d18c8dae64bc0a1 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:12:13 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:59 2020 +0200 [WINESYNC] dbghelp: Make qsort callback explicitly cdecl. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 0163db5152124efbd1a5ba46aa52a6da66d897d5 by Alexandre Julliard <julliard(a)winehq.org> --- dll/win32/dbghelp/dbghelp_private.h | 2 +- dll/win32/dbghelp/symbol.c | 2 +- sdk/tools/winesync/dbghelp.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h index 4f5bf926149..6faf8b8eb55 100644 --- a/dll/win32/dbghelp/dbghelp_private.h +++ b/dll/win32/dbghelp/dbghelp_private.h @@ -761,7 +761,7 @@ extern DWORD64 sw_module_base(struct cpu_stack_walk* csw, DWORD64 addr) DEC extern const char* symt_get_name(const struct symt* sym) DECLSPEC_HIDDEN; extern WCHAR* symt_get_nameW(const struct symt* sym) DECLSPEC_HIDDEN; extern BOOL symt_get_address(const struct symt* type, ULONG64* addr) DECLSPEC_HIDDEN; -extern int symt_cmp_addr(const void* p1, const void* p2) DECLSPEC_HIDDEN; +extern int __cdecl symt_cmp_addr(const void* p1, const void* p2) DECLSPEC_HIDDEN; extern void copy_symbolW(SYMBOL_INFOW* siw, const SYMBOL_INFO* si) DECLSPEC_HIDDEN; extern struct symt_ht* symt_find_nearest(struct module* module, DWORD_PTR addr) DECLSPEC_HIDDEN; diff --git a/dll/win32/dbghelp/symbol.c b/dll/win32/dbghelp/symbol.c index 09b83f38a00..f16a1e2cf8e 100644 --- a/dll/win32/dbghelp/symbol.c +++ b/dll/win32/dbghelp/symbol.c @@ -54,7 +54,7 @@ static inline int cmp_sorttab_addr(struct module* module, int idx, ULONG64 addr) return cmp_addr(ref, addr); } -int symt_cmp_addr(const void* p1, const void* p2) +int __cdecl symt_cmp_addr(const void* p1, const void* p2) { const struct symt* sym1 = *(const struct symt* const *)p1; const struct symt* sym2 = *(const struct symt* const *)p2; diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index e06fc334c77..ec7b0db7014 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: e014d325ddb87dbb4678ef47ef17f9e7f49b0248 + wine: 0163db5152124efbd1a5ba46aa52a6da66d897d5
4 years, 3 months
1
0
0
0
[reactos] 166/179: [WINESYNC] Improve script
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=55d0c3cf666b74c2034ce…
commit 55d0c3cf666b74c2034cea731e9fa81cfaed3c5f Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Fri Sep 11 19:09:22 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:58 2020 +0200 [WINESYNC] Improve script - Fix situation with added or deleted files - Improve getting blob IDs - Improve messages --- sdk/tools/winesync/winesync.py | 60 +++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/sdk/tools/winesync/winesync.py b/sdk/tools/winesync/winesync.py index a63eb406049..a890e2a773f 100644 --- a/sdk/tools/winesync/winesync.py +++ b/sdk/tools/winesync/winesync.py @@ -112,7 +112,7 @@ class wine_sync: # Get the diff object diff = self.wine_repo.diff(wine_commit.parents[0], wine_commit) - modified_files = [] + modified_files = False ignored_files = [] warning_message = '' complete_patch = '' @@ -126,7 +126,7 @@ class wine_sync: return True, '' for delta in diff.deltas: - if delta.old_file.path == '/dev/null': + if delta.status == pygit2.GIT_DELTA_ADDED: # check if we should care new_reactos_path = self.wine_to_reactos_path(delta.new_file.path) if not new_reactos_path is None: @@ -134,7 +134,7 @@ class wine_sync: old_reactos_path = '/dev/null' else: old_reactos_path = None - elif delta.new_file.path == '/dev/null': + elif delta.status == pygit2.GIT_DELTA_DELETED: # check if we should care old_reactos_path = self.wine_to_reactos_path(delta.old_file.path) if not old_reactos_path is None: @@ -152,14 +152,27 @@ class wine_sync: if (new_reactos_path is not None) or (old_reactos_path is not None): # print('Must apply diff: ' + old_reactos_path + ' --> ' + new_reactos_path) - new_blob = self.wine_repo.get(wine_commit.tree[delta.new_file.path].id) - old_blob = self.wine_repo.get(wine_commit.parents[0].tree[delta.old_file.path].id) + if delta.status == pygit2.GIT_DELTA_ADDED: + new_blob = self.wine_repo.get(delta.new_file.id) + blob_patch = pygit2.Patch.create_from( + old=None, + new=new_blob, + new_as_path=new_reactos_path) + elif delta.status == pygit2.GIT_DELTA_DELETED: + old_blob = self.wine_repo.get(delta.old_file.id) + blob_patch = pygit2.Patch.create_from( + old=old_blob, + new=None, + old_as_path=old_reactos_path) + else: + new_blob = self.wine_repo.get(delta.new_file.id) + old_blob = self.wine_repo.get(delta.old_file.id) - blob_patch = pygit2.Patch.create_from( - old=old_blob, - new=new_blob, - old_as_path=old_reactos_path, - new_as_path=new_reactos_path) + blob_patch = pygit2.Patch.create_from( + old=old_blob, + new=new_blob, + old_as_path=old_reactos_path, + new_as_path=new_reactos_path) # print(str(wine_commit.id)) # print(blob_patch.text) @@ -171,11 +184,15 @@ class wine_sync: subprocess.run(['git', '-C', self.reactos_src, 'apply', '--reject'], input=blob_patch.data, check=True) except subprocess.CalledProcessError as err: warning_message += 'Error while applying patch to ' + new_reactos_path + '\n' - self.reactos_index.add(new_reactos_path) + + if delta.status == pygit2.GIT_DELTA_DELETED: + self.reactos_index.remove(old_reactos_path) + else: + self.reactos_index.add(new_reactos_path) complete_patch += blob_patch.text - modified_files += [delta.old_file.path, delta.new_file.path] + modified_files = True else: ignored_files += [delta.old_file.path, delta.new_file.path] @@ -221,13 +238,16 @@ class wine_sync: warning_message += 'If needed, amend the current commit in your reactos tree and start this script again' if not in_staging: - warning_message += f'You can see the details of the wine commit here:
https://source.winehq.org/git/wine.git/commit/{str(wine_commit.id)}
' + warning_message += f'\n' \ + f'You can see the details of the wine commit here:\n' \ + f'
https://source.winehq.org/git/wine.git/commit/{str(wine_commit.id)}\n
' else: - warning_message += 'Do not forget to run\n' - warning_message += f'git diff HEAD^ \':(exclude)sdk/tools/winesync/{patch_file_name}\' > sdk/tools/winesync/{patch_file_name}\n' - warning_message += 'after your correction and then\n' - warning_message += f'git add sdk/tools/winesync/{patch_file_name}\n' - warning_message += 'before running "git commit --amend"' + warning_message += f'\n' \ + f'Do not forget to run\n' \ + f' git diff HEAD^ \':(exclude)sdk/tools/winesync/{patch_file_name}\' > sdk/tools/winesync/{patch_file_name}\n' \ + f'after your correction and then\n' \ + f' git add sdk/tools/winesync/{patch_file_name}\n' \ + f'before running "git commit --amend"' return True, warning_message @@ -314,7 +334,9 @@ class wine_sync: staging_patch_index += 1 if warning_message != '': + print("THERE WERE SOME ISSUES WHEN APPLYING THE PATCH\n\n") print(warning_message) + print("\n") finished_sync = False break @@ -351,4 +373,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main()
4 years, 3 months
1
0
0
0
[reactos] 165/179: [WINESYNC] dbghelp: Get rid of no longer needed #ifdefs.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4710112bb79b1816a8a7d…
commit 4710112bb79b1816a8a7da2b6512c9492885c4ce Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 19:05:02 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:58 2020 +0200 [WINESYNC] dbghelp: Get rid of no longer needed #ifdefs. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id e014d325ddb87dbb4678ef47ef17f9e7f49b0248 by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/stabs.c | 16 ---------------- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index c55ca5049c6..bf329152c1d 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -59,32 +59,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs); #endif /* Masks for n_type field */ -#ifndef N_STAB #define N_STAB 0xe0 -#endif -#ifndef N_PEXT #define N_PEXT 0x10 -#endif -#ifndef N_TYPE #define N_TYPE 0x1e -#endif -#ifndef N_EXT #define N_EXT 0x01 -#endif /* Values for (n_type & N_TYPE) */ -#ifndef N_UNDF #define N_UNDF 0x00 -#endif -#ifndef N_ABS #define N_ABS 0x02 -#endif -#ifndef N_INDR #define N_INDR 0x0a -#endif -#ifndef N_SECT #define N_SECT 0x0e -#endif #define N_GSYM 0x20 #define N_FUN 0x24 diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index e1eddf4ee19..e06fc334c77 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 6b1bc0beac510aa48a848b8182b9310f92609dd0 + wine: e014d325ddb87dbb4678ef47ef17f9e7f49b0248
4 years, 3 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
39
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Results per page:
10
25
50
100
200