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] 134/179: [WINESYNC] dbghelp: Use local declarations of r_debug and link_map structs.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8f9ab8954d92e3c88f949…
commit 8f9ab8954d92e3c88f94941e1ef9beb1670e0e42 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:54:57 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:52 2020 +0200 [WINESYNC] dbghelp: Use local declarations of r_debug and link_map structs. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 11ea231501f4f2a54433031ada21052d81641fee by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/elf_module.c | 94 +++++++++++++++++------------------------- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 39 insertions(+), 57 deletions(-) diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 6bdbcdeb3e7..cca07ead31e 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -47,49 +47,6 @@ #define ELF_INFO_MODULE 0x0002 #define ELF_INFO_NAME 0x0004 -#ifndef HAVE_STRUCT_R_DEBUG -struct r_debug -{ - int r_version; - struct link_map *r_map; - ElfW(Addr) r_brk; - enum - { - RT_CONSISTENT, - RT_ADD, - RT_DELETE - } r_state; - ElfW(Addr) r_ldbase; -}; -#endif /* HAVE_STRUCT_R_DEBUG */ - -struct r_debug32 -{ - int r_version; - DWORD r_map; - Elf32_Addr r_brk; - int r_state; - Elf32_Addr r_ldbase; -}; - -#ifndef HAVE_STRUCT_LINK_MAP -struct link_map -{ - ElfW(Addr) l_addr; - char *l_name; - ElfW(Dyn) *l_ld; - struct link_map *l_next, *l_prev; -}; -#endif /* HAVE_STRUCT_LINK_MAP */ - -struct link_map32 -{ - Elf32_Addr l_addr; - DWORD l_name; - DWORD l_ld; - DWORD l_next, l_prev; -}; - WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); struct elf_info @@ -1402,12 +1359,25 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, { WCHAR bufstrW[MAX_PATH]; char bufstr[256]; - void *lm_addr; + ULONG_PTR lm_addr; if (pcs->is_64bit) { - struct r_debug dbg_hdr; - struct link_map lm; + struct + { + UINT32 r_version; + UINT64 r_map; + UINT64 r_brk; + UINT32 r_state; + UINT64 r_ldbase; + } dbg_hdr; + struct + { + UINT64 l_addr; + UINT64 l_name; + UINT64 l_ld; + UINT64 l_next, l_prev; + } lm; if (!pcs->dbg_hdr_addr || !ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr, @@ -1419,14 +1389,14 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, * cases the first entry doesn't appear with a name, in other cases it * does. */ - for (lm_addr = (void*)dbg_hdr.r_map; lm_addr; lm_addr = (void*)lm.l_next) + for (lm_addr = dbg_hdr.r_map; lm_addr; lm_addr = lm.l_next) { - if (!ReadProcessMemory(pcs->handle, lm_addr, &lm, sizeof(lm), NULL)) + if (!ReadProcessMemory(pcs->handle, (void*)lm_addr, &lm, sizeof(lm), NULL)) return FALSE; - if (lm.l_prev != NULL && /* skip first entry, normally debuggee itself */ - lm.l_name != NULL && - ReadProcessMemory(pcs->handle, lm.l_name, bufstr, sizeof(bufstr), NULL)) + if (lm.l_prev && /* skip first entry, normally debuggee itself */ + lm.l_name && + ReadProcessMemory(pcs->handle, (void*)(ULONG_PTR)lm.l_name, bufstr, sizeof(bufstr), NULL)) { bufstr[sizeof(bufstr) - 1] = '\0'; MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, ARRAY_SIZE(bufstrW)); @@ -1438,8 +1408,21 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, } else { - struct r_debug32 dbg_hdr; - struct link_map32 lm; + struct + { + UINT32 r_version; + UINT32 r_map; + UINT32 r_brk; + UINT32 r_state; + UINT32 r_ldbase; + } dbg_hdr; + struct + { + UINT32 l_addr; + UINT32 l_name; + UINT32 l_ld; + UINT32 l_next, l_prev; + } lm; if (!pcs->dbg_hdr_addr || !ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr, @@ -1451,10 +1434,9 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, * cases the first entry doesn't appear with a name, in other cases it * does. */ - for (lm_addr = (void *)(DWORD_PTR)dbg_hdr.r_map; lm_addr; - lm_addr = (void *)(DWORD_PTR)lm.l_next) + for (lm_addr = dbg_hdr.r_map; lm_addr; lm_addr = lm.l_next) { - if (!ReadProcessMemory(pcs->handle, lm_addr, &lm, sizeof(lm), NULL)) + if (!ReadProcessMemory(pcs->handle, (void*)lm_addr, &lm, sizeof(lm), NULL)) return FALSE; if (lm.l_prev && /* skip first entry, normally debuggee itself */ diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index 03cb11af8a4..2c4fb3b3dfd 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: 620019fd71fd519470b4d624949a74fba9f350e9 + wine: 11ea231501f4f2a54433031ada21052d81641fee
4 years, 3 months
1
0
0
0
[reactos] 133/179: [WINESYNC] dbghelp: Use local AT_SYSINFO_EHDR definition.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=72a0721cf7354a21e42e7…
commit 72a0721cf7354a21e42e725ff32a2bd8d07b9601 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:54:57 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:52 2020 +0200 [WINESYNC] dbghelp: Use local AT_SYSINFO_EHDR definition. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 620019fd71fd519470b4d624949a74fba9f350e9 by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/elf_module.c | 34 ++++++++++++++++++++-------------- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 4019bcf7776..6bdbcdeb3e7 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -124,6 +124,8 @@ struct elf_module_info struct image_file_map file_map; }; +#define ELF_AT_SYSINFO_EHDR 33 + /****************************************************************** * elf_map_section * @@ -1269,7 +1271,6 @@ static BOOL elf_load_file_cb(void *param, HANDLE handle, const WCHAR *filename) return elf_load_file(load_file->process, filename, load_file->load_offset, load_file->dyn_addr, load_file->elf_info); } -#ifdef AT_SYSINFO_EHDR /****************************************************************** * elf_search_auxv * @@ -1279,9 +1280,9 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR* { char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME]; SYMBOL_INFO*si = (SYMBOL_INFO*)buffer; - void* addr; - void* str; - void* str_max; + BYTE* addr; + BYTE* str; + BYTE* str_max; si->SizeOfStruct = sizeof(*si); si->MaxNameLen = MAX_SYM_NAME; @@ -1309,36 +1310,43 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR* if (pcs->is_64bit) { - Elf64_auxv_t auxv; + struct + { + UINT64 a_type; + UINT64 a_val; + } auxv; while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type) { if (auxv.a_type == type) { - *val = auxv.a_un.a_val; + *val = auxv.a_val; return TRUE; } - addr = (void*)((DWORD_PTR)addr + sizeof(auxv)); + addr += sizeof(auxv); } } else { - Elf32_auxv_t auxv; + struct + { + UINT32 a_type; + UINT32 a_val; + } auxv; while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type) { if (auxv.a_type == type) { - *val = auxv.a_un.a_val; + *val = auxv.a_val; return TRUE; } - addr = (void*)((DWORD_PTR)addr + sizeof(auxv)); + addr += sizeof(auxv); } } return FALSE; } -#endif /****************************************************************** * elf_search_and_load_file @@ -1463,18 +1471,16 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, } } -#ifdef AT_SYSINFO_EHDR if (!lm_addr) { ULONG_PTR ehdr_addr; - if (elf_search_auxv(pcs, AT_SYSINFO_EHDR, &ehdr_addr)) + if (elf_search_auxv(pcs, ELF_AT_SYSINFO_EHDR, &ehdr_addr)) { static const WCHAR vdsoW[] = {'[','v','d','s','o',']','.','s','o',0}; cb(vdsoW, ehdr_addr, 0, TRUE, user); } } -#endif return TRUE; } diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index fee3214cbc1..03cb11af8a4 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: ee34cf365d34b23669c2ead03b040f09b7fb1e2b + wine: 620019fd71fd519470b4d624949a74fba9f350e9
4 years, 3 months
1
0
0
0
[reactos] 132/179: [WINESYNC] dbghelp: Don't use *_NULL constants.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=77888f05a4eba3e4b9167…
commit 77888f05a4eba3e4b9167b7cf1f63d86b5fe1d68 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:54:56 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:52 2020 +0200 [WINESYNC] dbghelp: Don't use *_NULL constants. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id ee34cf365d34b23669c2ead03b040f09b7fb1e2b by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/elf_module.c | 12 ++++++------ dll/win32/dbghelp/image_private.h | 6 ------ sdk/tools/winesync/dbghelp.cfg | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 196ebcaded8..4019bcf7776 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -1116,8 +1116,8 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename, break; } ptr += sizeof(dyn); - } while (dyn.d_tag != DT_NULL); - if (dyn.d_tag == DT_NULL) return ret; + } while (dyn.d_tag); + if (!dyn.d_tag) return ret; } else { @@ -1138,8 +1138,8 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename, break; } ptr += sizeof(dyn); - } while (dyn.d_tag != DT_NULL); - if (dyn.d_tag == DT_NULL) return ret; + } while (dyn.d_tag); + if (!dyn.d_tag) return ret; } } elf_end_find(fmap); @@ -1311,7 +1311,7 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR* { Elf64_auxv_t auxv; - while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type != AT_NULL) + while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type) { if (auxv.a_type == type) { @@ -1325,7 +1325,7 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR* { Elf32_auxv_t auxv; - while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type != AT_NULL) + while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type) { if (auxv.a_type == type) { diff --git a/dll/win32/dbghelp/image_private.h b/dll/win32/dbghelp/image_private.h index 37f715b55e7..04885128217 100644 --- a/dll/win32/dbghelp/image_private.h +++ b/dll/win32/dbghelp/image_private.h @@ -50,12 +50,6 @@ #define IMAGE_NO_MAP ((void*)-1) -#ifndef __ELF__ -#ifndef SHT_NULL -#define SHT_NULL 0 -#endif -#endif - /* structure holding information while handling an ELF image * allows one by one section mapping for memory savings */ diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index f16ecdcb0df..fee3214cbc1 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: 2534c2a2d22d3c610ffdfbb6b33e0b5176509aa1 + wine: ee34cf365d34b23669c2ead03b040f09b7fb1e2b
4 years, 3 months
1
0
0
0
[reactos] 131/179: [WINESYNC] dbghelp: Use local NOTE_GNU_BUILD_ID declaration.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eed384bb16f73a05df824…
commit eed384bb16f73a05df82427402375d1ca904493a Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:52:54 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:52 2020 +0200 [WINESYNC] dbghelp: Use local NOTE_GNU_BUILD_ID declaration. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 2534c2a2d22d3c610ffdfbb6b33e0b5176509aa1 by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/elf_module.c | 4 ---- dll/win32/dbghelp/image_private.h | 4 ---- dll/win32/dbghelp/module.c | 6 ++++-- sdk/tools/winesync/dbghelp.cfg | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 50f19bc79a3..196ebcaded8 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -47,10 +47,6 @@ #define ELF_INFO_MODULE 0x0002 #define ELF_INFO_NAME 0x0004 -#ifndef NT_GNU_BUILD_ID -#define NT_GNU_BUILD_ID 3 -#endif - #ifndef HAVE_STRUCT_R_DEBUG struct r_debug { diff --git a/dll/win32/dbghelp/image_private.h b/dll/win32/dbghelp/image_private.h index 955f7790a7a..37f715b55e7 100644 --- a/dll/win32/dbghelp/image_private.h +++ b/dll/win32/dbghelp/image_private.h @@ -56,10 +56,6 @@ #endif #endif -#ifndef NT_GNU_BUILD_ID -#define NT_GNU_BUILD_ID 3 -#endif - /* structure holding information while handling an ELF image * allows one by one section mapping for memory savings */ diff --git a/dll/win32/dbghelp/module.c b/dll/win32/dbghelp/module.c index 80a484e94ae..094b4f77faa 100644 --- a/dll/win32/dbghelp/module.c +++ b/dll/win32/dbghelp/module.c @@ -36,6 +36,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); +#define NOTE_GNU_BUILD_ID 3 + const WCHAR S_ElfW[] = {'<','e','l','f','>','\0'}; #ifndef __REACTOS__ const WCHAR S_WineLoaderW[] = {'<','w','i','n','e','-','l','o','a','d','e','r','>','\0'}; @@ -663,7 +665,7 @@ static BOOL image_locate_build_id_target(struct image_file_map* fmap, const BYTE if (note != IMAGE_NO_MAP) { /* the usual ELF note structure: name-size desc-size type <name> <desc> */ - if (note[2] == NT_GNU_BUILD_ID) + if (note[2] == NOTE_GNU_BUILD_ID) { if (note[1] == idlen && !memcmp(note + 3 + ((note[0] + 3) >> 2), idend - idlen, idlen)) @@ -709,7 +711,7 @@ BOOL image_check_alternate(struct image_file_map* fmap, const struct module* mod if (note != IMAGE_NO_MAP) { /* the usual ELF note structure: name-size desc-size type <name> <desc> */ - if (note[2] == NT_GNU_BUILD_ID) + if (note[2] == NOTE_GNU_BUILD_ID) { ret = image_locate_build_id_target(fmap, (const BYTE*)(note + 3 + ((note[0] + 3) >> 2)), note[1]); } diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index 0a7d21bd580..f16ecdcb0df 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: 94ad6bd2e66f589303fe9102b9a81b1f3e8ea9c6 + wine: 2534c2a2d22d3c610ffdfbb6b33e0b5176509aa1
4 years, 3 months
1
0
0
0
[reactos] 130/179: [WINESYNC] dbghelp: Fix misleading indentation warning.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aa015b65dc8ab50e6e7a3…
commit aa015b65dc8ab50e6e7a326c9db14e6828d915ea Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:52:53 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:51 2020 +0200 [WINESYNC] dbghelp: Fix misleading indentation warning. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 94ad6bd2e66f589303fe9102b9a81b1f3e8ea9c6 by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/dwarf.c | 5 ++++- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dll/win32/dbghelp/dwarf.c b/dll/win32/dbghelp/dwarf.c index 04985003653..765d73ce645 100644 --- a/dll/win32/dbghelp/dwarf.c +++ b/dll/win32/dbghelp/dwarf.c @@ -762,7 +762,10 @@ compute_location(const struct module *module, dwarf2_traverse_context_t* ctx, st case DW_OP_eq: stack[stk-1] = (stack[stk-1] == stack[stk]); stk--; break; case DW_OP_ne: stack[stk-1] = (stack[stk-1] != stack[stk]); stk--; break; case DW_OP_skip: tmp = dwarf2_parse_u2(ctx); ctx->data += tmp; break; - case DW_OP_bra: tmp = dwarf2_parse_u2(ctx); if (!stack[stk--]) ctx->data += tmp; break; + case DW_OP_bra: + tmp = dwarf2_parse_u2(ctx); + if (!stack[stk--]) ctx->data += tmp; + break; case DW_OP_regx: tmp = dwarf2_leb128_as_unsigned(ctx); if (!piece_found) diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index 0c82a58e2d3..0a7d21bd580 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: 9c2cedabc7c7b48c4f9042d444c45a3036cfd4be + wine: 94ad6bd2e66f589303fe9102b9a81b1f3e8ea9c6
4 years, 3 months
1
0
0
0
[reactos] 129/179: [WINESYNC] dbghelp: Pass stab size to stabs_parse.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36388062cde2534651dbd…
commit 36388062cde2534651dbdc259678dd7208bb4c40 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:52:52 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:51 2020 +0200 [WINESYNC] dbghelp: Pass stab size to stabs_parse. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 9c2cedabc7c7b48c4f9042d444c45a3036cfd4be 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 | 2 +- dll/win32/dbghelp/pe_module.c | 2 +- dll/win32/dbghelp/stabs.c | 15 ++------------- sdk/tools/winesync/dbghelp.cfg | 2 +- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h index 521f64881ad..b43eec1a2ed 100644 --- a/dll/win32/dbghelp/dbghelp_private.h +++ b/dll/win32/dbghelp/dbghelp_private.h @@ -723,7 +723,7 @@ typedef void (*stabs_def_cb)(struct module* module, ULONG_PTR load_offset, BOOL is_public, BOOL is_global, unsigned char other, struct symt_compiland* compiland, void* user); extern BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, - const char* stabs, int stablen, + const char* stabs, size_t nstab, size_t stabsize, const char* strs, int strtablen, stabs_def_cb callback, void* user) DECLSPEC_HIDDEN; diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 01759cd18ee..50f19bc79a3 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -1007,7 +1007,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module, { /* OK, now just parse all of the stabs. */ lret = stabs_parse(module, module->format_info[DFI_ELF]->u.elf_info->elf_addr, - stab, image_get_map_size(&stab_sect), + stab, image_get_map_size(&stab_sect) / sizeof(struct stab_nlist), sizeof(struct stab_nlist), stabstr, image_get_map_size(&stabstr_sect), NULL, NULL); if (lret) diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c index ab88d271081..1e01d84c192 100644 --- a/dll/win32/dbghelp/macho_module.c +++ b/dll/win32/dbghelp/macho_module.c @@ -944,7 +944,7 @@ static int macho_parse_symtab(struct image_file_map* ifm, if (!stabs_parse(mdi->module, mdi->module->format_info[DFI_MACHO]->u.macho_info->load_addr - fmap->segs_start, - stab, sc->nsyms * stabsize, + stab, sc->nsyms, stabsize, stabstr, sc->strsize, macho_stabs_def_cb, mdi)) ret = -1; diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c index b915911d6ce..230c4d01d78 100644 --- a/dll/win32/dbghelp/pe_module.c +++ b/dll/win32/dbghelp/pe_module.c @@ -502,7 +502,7 @@ static BOOL pe_load_stabs(const struct process* pcs, struct module* module) { ret = stabs_parse(module, module->module.BaseOfImage - fmap->u.pe.ntheader.OptionalHeader.ImageBase, - stab, image_get_map_size(§_stabs), + stab, image_get_map_size(§_stabs) / sizeof(struct stab_nlist), sizeof(struct stab_nlist), stabstr, image_get_map_size(§_stabstr), NULL, NULL); } diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index 9190997cdf8..0d28ae1415a 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -1255,7 +1255,7 @@ static inline void stabbuf_append(char **buf, unsigned *buf_size, const char *st } BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, - const char* pv_stab_ptr, int stablen, + const char* pv_stab_ptr, size_t nstab, size_t stabsize, const char* strs, int strtablen, stabs_def_cb callback, void* user) { @@ -1264,7 +1264,6 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, struct symt_compiland* compiland = NULL; char* srcpath = NULL; int i; - int nstab; const char* ptr; char* stabbuff; unsigned int stabbufflen; @@ -1280,14 +1279,8 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, BOOL ret = TRUE; struct location loc; unsigned char type; - size_t stabsize = sizeof(struct stab_nlist); uint64_t n_value; -#ifdef __APPLE__ - if (module->process->is_64bit) - stabsize = sizeof(struct macho64_nlist); -#endif - nstab = stablen / stabsize; strs_end = strs + strtablen; memset(stabs_basic, 0, sizeof(stabs_basic)); @@ -1306,11 +1299,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, for (i = 0; i < nstab; i++) { stab_ptr = (struct stab_nlist *)(pv_stab_ptr + i * stabsize); - n_value = stab_ptr->n_value; -#ifdef __APPLE__ - if (module->process->is_64bit) - n_value = ((struct macho64_nlist *)stab_ptr)->n_value; -#endif + n_value = stabsize == sizeof(struct macho64_nlist) ? ((struct macho64_nlist *)stab_ptr)->n_value : stab_ptr->n_value; ptr = strs + stab_ptr->n_strx; if ((ptr > strs_end) || (ptr + strlen(ptr) > strs_end)) { diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index e3835e05f57..0c82a58e2d3 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: f48f8cc39980f2d93015ecd56f28e3e9f52843fe + wine: 9c2cedabc7c7b48c4f9042d444c45a3036cfd4be
4 years, 3 months
1
0
0
0
[reactos] 128/179: [WINESYNC] dbghelp: Use local declaration for 64-bit macho nlist.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7fa8c40ed522bacba6c35…
commit 7fa8c40ed522bacba6c3549a16a3e20b6a91075e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:49:27 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:51 2020 +0200 [WINESYNC] dbghelp: Use local declaration for 64-bit macho nlist. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id f48f8cc39980f2d93015ecd56f28e3e9f52843fe by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/image_private.h | 9 +++++++++ dll/win32/dbghelp/macho_module.c | 2 +- dll/win32/dbghelp/stabs.c | 17 ++--------------- sdk/tools/winesync/dbghelp.cfg | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/dll/win32/dbghelp/image_private.h b/dll/win32/dbghelp/image_private.h index 7453976a403..955f7790a7a 100644 --- a/dll/win32/dbghelp/image_private.h +++ b/dll/win32/dbghelp/image_private.h @@ -145,6 +145,15 @@ struct stab_nlist unsigned n_value; }; +struct macho64_nlist +{ + unsigned n_strx; + unsigned char n_type; + char n_other; + short n_desc; + UINT64 n_value; +}; + BOOL image_check_alternate(struct image_file_map* fmap, const struct module* module) DECLSPEC_HIDDEN; BOOL elf_map_handle(HANDLE handle, struct image_file_map* fmap) DECLSPEC_HIDDEN; diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c index ff7cf2b3c03..ab88d271081 100644 --- a/dll/win32/dbghelp/macho_module.c +++ b/dll/win32/dbghelp/macho_module.c @@ -932,7 +932,7 @@ static int macho_parse_symtab(struct image_file_map* ifm, struct macho_debug_info* mdi = user; const char* stabstr; int ret = 0; - size_t stabsize = (ifm->addr_size == 32) ? sizeof(struct stab_nlist) : sizeof(struct nlist_64); + size_t stabsize = (ifm->addr_size == 32) ? sizeof(struct stab_nlist) : sizeof(struct macho64_nlist); const char *stab; TRACE("(%p/%p, %p, %p) %u syms at 0x%08x, strings 0x%08x - 0x%08x\n", fmap, fmap->handle, lc, diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index 1d83d8de934..9190997cdf8 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -34,27 +34,14 @@ #include <sys/types.h> #include <fcntl.h> -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#ifdef HAVE_SYS_MMAN_H -#include <sys/mman.h> -#endif #include <limits.h> #include <stdint.h> #include <stdlib.h> #include <string.h> -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif #include <stdio.h> #include <assert.h> #include <stdarg.h> -#ifdef HAVE_MACH_O_NLIST_H -# include <mach-o/nlist.h> -#endif - #ifndef DBGHELP_STATIC_LIB #include "windef.h" #include "winbase.h" @@ -1298,7 +1285,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, #ifdef __APPLE__ if (module->process->is_64bit) - stabsize = sizeof(struct nlist_64); + stabsize = sizeof(struct macho64_nlist); #endif nstab = stablen / stabsize; strs_end = strs + strtablen; @@ -1322,7 +1309,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, n_value = stab_ptr->n_value; #ifdef __APPLE__ if (module->process->is_64bit) - n_value = ((struct nlist_64 *)stab_ptr)->n_value; + n_value = ((struct macho64_nlist *)stab_ptr)->n_value; #endif ptr = strs + stab_ptr->n_strx; if ((ptr > strs_end) || (ptr + strlen(ptr) > strs_end)) diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index c93a6fbe288..e3835e05f57 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: 061146c2ab530a54f8323331e88c5771dd7bba49 + wine: f48f8cc39980f2d93015ecd56f28e3e9f52843fe
4 years, 3 months
1
0
0
0
[reactos] 127/179: [WINESYNC] dbghelp: Use local stab_nlist declaration in macho_module.c.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=43384a1d3c761fa33abe2…
commit 43384a1d3c761fa33abe24849ad517232748fa0e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:46:09 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:51 2020 +0200 [WINESYNC] dbghelp: Use local stab_nlist declaration in macho_module.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 061146c2ab530a54f8323331e88c5771dd7bba49 by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/image_private.h | 9 ++++++ dll/win32/dbghelp/macho_module.c | 2 +- dll/win32/dbghelp/stabs.c | 64 +++++++++++++++++---------------------- sdk/tools/winesync/dbghelp.cfg | 2 +- 4 files changed, 39 insertions(+), 38 deletions(-) diff --git a/dll/win32/dbghelp/image_private.h b/dll/win32/dbghelp/image_private.h index e614fda237c..7453976a403 100644 --- a/dll/win32/dbghelp/image_private.h +++ b/dll/win32/dbghelp/image_private.h @@ -136,6 +136,15 @@ struct image_section_map LONG_PTR sidx; }; +struct stab_nlist +{ + unsigned n_strx; + unsigned char n_type; + char n_other; + short n_desc; + unsigned n_value; +}; + BOOL image_check_alternate(struct image_file_map* fmap, const struct module* module) DECLSPEC_HIDDEN; BOOL elf_map_handle(HANDLE handle, struct image_file_map* fmap) DECLSPEC_HIDDEN; diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c index d10e402de27..ff7cf2b3c03 100644 --- a/dll/win32/dbghelp/macho_module.c +++ b/dll/win32/dbghelp/macho_module.c @@ -932,7 +932,7 @@ static int macho_parse_symtab(struct image_file_map* ifm, struct macho_debug_info* mdi = user; const char* stabstr; int ret = 0; - size_t stabsize = (ifm->addr_size == 32) ? sizeof(struct nlist) : sizeof(struct nlist_64); + size_t stabsize = (ifm->addr_size == 32) ? sizeof(struct stab_nlist) : sizeof(struct nlist_64); const char *stab; TRACE("(%p/%p, %p, %p) %u syms at 0x%08x, strings 0x%08x - 0x%08x\n", fmap, fmap->handle, lc, diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index f7c2cd1a7c0..1d83d8de934 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -62,6 +62,7 @@ #endif #include "dbghelp_private.h" +#include "image_private.h" #ifndef DBGHELP_STATIC_LIB #include "wine/debug.h" @@ -120,15 +121,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs); #define N_EXCL 0xc2 #define N_RBRAC 0xe0 -struct stab_nlist -{ - unsigned n_strx; - unsigned char n_type; - char n_other; - short n_desc; - unsigned n_value; -}; - static void stab_strcpy(char* dest, int sz, const char* source) { char* ptr = dest; @@ -339,7 +331,7 @@ struct ParseTypedefData int idx; struct module* module; #ifdef PTS_DEBUG - struct PTS_Error + struct PTS_Error { const char* ptr; unsigned line; @@ -396,12 +388,12 @@ static int stabs_get_basic(struct ParseTypedefData* ptd, unsigned basic, struct case 35: stabs_basic[basic] = symt_new_basic(ptd->module, btComplex, "long double complex", 24); break; default: PTS_ABORTIF(ptd, 1); } - } + } *symt = &stabs_basic[basic]->symt; return 0; } -static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, +static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typename, struct symt** dt); static int stabs_pts_read_id(struct ParseTypedefData* ptd) @@ -480,7 +472,7 @@ static int stabs_pts_read_range_value(struct ParseTypedefData* ptd, struct pts_r { switch (ptd->ptr[1]) { - case '0': + case '0': PTS_ABORTIF(ptd, ptd->ptr[0] != '1'); prv->sign = -1; prv->val = 0; @@ -501,7 +493,7 @@ static int stabs_pts_read_range_value(struct ParseTypedefData* ptd, struct pts_r ptd->ptr = last; break; case '+': - default: + default: prv->sign = 1; prv->val = strtoull(ptd->ptr, &last, 10); ptd->ptr = last; @@ -631,7 +623,7 @@ static inline int stabs_pts_read_method_info(struct ParseTypedefData* ptd) return 0; } -static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, +static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, struct symt_udt* sdt) { LONG_PTR sz, ofs; @@ -677,7 +669,7 @@ static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, } PTS_ABORTIF(ptd, *ptd->ptr++ != ';'); } - + } /* if the structure has already been filled, just redo the parsing * but don't store results into the struct @@ -685,7 +677,7 @@ static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, */ /* Now parse the individual elements of the structure/union. */ - while (*ptd->ptr != ';') + while (*ptd->ptr != ';') { /* agg_name : type ',' <int:offset> ',' <int:size> */ idx = ptd->idx; @@ -727,7 +719,7 @@ static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, */ if (*ptd->ptr == ':') { - ptd->ptr++; + ptd->ptr++; stabs_pts_read_method_info(ptd); ptd->idx = idx; continue; @@ -773,7 +765,7 @@ static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, return 0; } -static inline int stabs_pts_read_enum(struct ParseTypedefData* ptd, +static inline int stabs_pts_read_enum(struct ParseTypedefData* ptd, struct symt_enum* edt) { LONG_PTR value; @@ -837,7 +829,7 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ PTS_ABORTIF(ptd, new_dt != NULL); /* first handle attribute if any */ - switch (*ptd->ptr) + switch (*ptd->ptr) { case '@': if (*++ptd->ptr == 's') @@ -915,7 +907,7 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ * classes names. Therefore, we could be here with either: * - typename and udt->hash_elt.name being the same string * (non embedded case) - * - typename being foo::bar while udt->hash_elt.name being + * - typename being foo::bar while udt->hash_elt.name being * just bar * So, we twist the comparison to test both occurrences. When * we have proper C++ types in this file, this twist has to be @@ -986,7 +978,7 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ { LONG_PTR type, len, unk; int basic; - + PTS_ABORTIF(ptd, stabs_pts_read_number(ptd, &type) == -1); PTS_ABORTIF(ptd, *ptd->ptr++ != ';'); /* ';' */ PTS_ABORTIF(ptd, stabs_pts_read_number(ptd, &len) == -1); @@ -1025,7 +1017,7 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ new_dt = &symt_new_basic(ptd->module, btVoid, typename, 0)->symt; PTS_ABORTIF(ptd, strcmp(typename, "void")); } - } + } *stabs_find_ref(filenr1, subnr1) = *ret_dt = new_dt; @@ -1034,7 +1026,7 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ return 0; } -static int stabs_parse_typedef(struct module* module, const char* ptr, +static int stabs_parse_typedef(struct module* module, const char* ptr, const char* typename) { struct ParseTypedefData ptd; @@ -1062,7 +1054,7 @@ static int stabs_parse_typedef(struct module* module, const char* ptr, ret = stabs_pts_read_type_def(&ptd, typename, &dt); } - if (ret == -1 || *ptd.ptr) + if (ret == -1 || *ptd.ptr) { #ifdef PTS_DEBUG int i; @@ -1071,13 +1063,13 @@ static int stabs_parse_typedef(struct module* module, const char* ptr, { for (i = 0; i < ptd.err_idx; i++) { - TRACE("[%d]: line %d => %s\n", + TRACE("[%d]: line %d => %s\n", i, ptd.errors[i].line, debugstr_a(ptd.errors[i].ptr)); } } else TRACE("[0]: => %s\n", debugstr_a(ptd.ptr)); - + #else ERR("Failure on %s at %s\n", debugstr_a(ptr), debugstr_a(ptd.ptr)); #endif @@ -1254,7 +1246,7 @@ static void stabs_finalize_function(struct module* module, struct symt_function* { loc.kind = loc_absolute; loc.offset = il.Address - func->address; - symt_add_function_point(module, func, SymTagFuncDebugStart, + symt_add_function_point(module, func, SymTagFuncDebugStart, &loc, NULL); } if (size) func->size = size; @@ -1447,8 +1439,8 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, symt_add_func_local(module, curr_func, (int)n_value >= 0 ? DataIsParam : DataIsLocal, &loc, NULL, param_type, symname); - symt_add_function_signature_parameter(module, - (struct symt_function_signature*)curr_func->type, + symt_add_function_signature_parameter(module, + (struct symt_function_signature*)curr_func->type, param_type); } break; @@ -1506,8 +1498,8 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, stab_strcpy(symname, sizeof(symname), ptr); symt_add_func_local(module, curr_func, DataIsParam, &loc, NULL, param_type, symname); - symt_add_function_signature_parameter(module, - (struct symt_function_signature*)curr_func->type, + symt_add_function_signature_parameter(module, + (struct symt_function_signature*)curr_func->type, param_type); } else @@ -1532,7 +1524,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, ULONG_PTR offset = n_value; if (module->type == DMT_MACHO) offset -= curr_func->address - load_offset; - symt_add_func_line(module, curr_func, source_idx, + symt_add_func_line(module, curr_func, source_idx, stab_ptr->n_desc, offset); } else pending_add_line(&pending_func, source_idx, stab_ptr->n_desc, @@ -1562,13 +1554,13 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, * Assume size of the func is the delta between current offset * and offset of last function */ - stabs_finalize_function(module, curr_func, + stabs_finalize_function(module, curr_func, n_value ? (load_offset + n_value - curr_func->address) : 0); } - func_type = symt_new_function_signature(module, + func_type = symt_new_function_signature(module, stabs_parse_type(ptr), -1); - curr_func = symt_new_function(module, compiland, symname, + curr_func = symt_new_function(module, compiland, symname, load_offset + n_value, 0, &func_type->symt); pending_flush(&pending_func, module, curr_func, NULL); diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index fb390dcefcf..c93a6fbe288 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: 47f1c5a993ed34e5f1e4783360019613d0f9682a + wine: 061146c2ab530a54f8323331e88c5771dd7bba49
4 years, 3 months
1
0
0
0
[reactos] 126/179: [WINESYNC] dbghelp: Clear N_PEXT flag of stab type in macho files.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d57c6b88f67bb6031ed8…
commit 2d57c6b88f67bb6031ed88d2c93f7c9bc082fd88 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:46:09 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:51 2020 +0200 [WINESYNC] dbghelp: Clear N_PEXT flag of stab type in macho files. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 47f1c5a993ed34e5f1e4783360019613d0f9682a by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/stabs.c | 3 +++ sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index dcb28d21a96..f7c2cd1a7c0 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -1357,7 +1357,10 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, if (stab_ptr->n_type & N_STAB) type = stab_ptr->n_type; else + { type = (stab_ptr->n_type & N_TYPE); + if (module->type == DMT_MACHO) type &= ~N_PEXT; + } /* only symbol entries contain a typedef */ switch (type) diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index 5b6f77aa2f1..fb390dcefcf 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: 208719a7507c41b77d3db9f6b8ffbcc5a4e02f3d + wine: 47f1c5a993ed34e5f1e4783360019613d0f9682a
4 years, 3 months
1
0
0
0
[reactos] 125/179: [WINESYNC] dbghelp: Provide N_PEXT and N_SECT defines when not available.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e99c66b8bcafdf07e432d…
commit e99c66b8bcafdf07e432dc8c49b594f379afde02 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Fri Sep 11 18:46:09 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Sep 16 10:35:51 2020 +0200 [WINESYNC] dbghelp: Provide N_PEXT and N_SECT defines when not available. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 208719a7507c41b77d3db9f6b8ffbcc5a4e02f3d by Jacek Caban <jacek(a)codeweavers.com> --- dll/win32/dbghelp/stabs.c | 10 ++++++---- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index 07f5142893f..dcb28d21a96 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -77,6 +77,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs); #ifndef N_STAB #define N_STAB 0xe0 #endif +#ifndef N_PEXT +#define N_PEXT 0x10 +#endif #ifndef N_TYPE #define N_TYPE 0x1e #endif @@ -91,6 +94,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs); #ifndef N_ABS #define N_ABS 0x02 #endif +#ifndef N_SECT +#define N_SECT 0x0e +#endif #define N_GSYM 0x20 #define N_FUN 0x24 @@ -1651,16 +1657,13 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, /* Always ignore these, they seem to be used only on Darwin. */ break; case N_ABS: -#ifdef N_SECT case N_SECT: -#endif /* FIXME: Other definition types (N_TEXT, N_DATA, N_BSS, ...)? */ if (callback) { BOOL is_public = (stab_ptr->n_type & N_EXT); BOOL is_global = is_public; -#ifdef N_PEXT /* "private extern"; shared among compilation units in a shared * library, but not accessible from outside the library. */ if (stab_ptr->n_type & N_PEXT) @@ -1668,7 +1671,6 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset, is_public = FALSE; is_global = TRUE; } -#endif if (*ptr == '_') ptr++; stab_strcpy(symname, sizeof(symname), ptr); diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index 85f89bf51d8..5b6f77aa2f1 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: 3b6c268380d703079fa3c5ca06f67b6feb02487f + wine: 208719a7507c41b77d3db9f6b8ffbcc5a4e02f3d
4 years, 3 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
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