winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2018
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
629 discussions
Start a n
N
ew thread
Zebediah Figura : winedbg/gdbproxy: Handle VS thread renaming.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: c1adb6ea1cb24c06bc10024c44c54ef326d7b4fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c1adb6ea1cb24c06bc10024c…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jun 14 16:58:49 2018 -0500 winedbg/gdbproxy: Handle VS thread renaming. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedbg/gdbproxy.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index 869d56b..7f59ce1 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -339,6 +339,30 @@ static BOOL handle_exception(struct gdb_context* gdbctx, EXCEPTION_DEBUG_INFO* e ret = TRUE; /* FIXME: we could also add here a O packet with additional information */ break; + case EXCEPTION_NAME_THREAD: + { + const THREADNAME_INFO *threadname = (const THREADNAME_INFO *)rec->ExceptionInformation; + struct dbg_thread *thread; + char name[9]; + SIZE_T read; + + if (threadname->dwThreadID == -1) + thread = dbg_curr_thread; + else + thread = dbg_get_thread(gdbctx->process, threadname->dwThreadID); + if (thread) + { + if (gdbctx->process->process_io->read( gdbctx->process->handle, + threadname->szName, name, sizeof(name), &read) && read == sizeof(name)) + { + fprintf(stderr, "Thread ID=%04x renamed to \"%.9s\"\n", + threadname->dwThreadID, name); + } + } + else + fprintf(stderr, "Cannot set name of thread %04x\n", threadname->dwThreadID); + return DBG_CONTINUE; + } default: if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT) fprintf(stderr, "Unhandled exception code 0x%08x\n", rec->ExceptionCode);
1
0
0
0
Zebediah Figura : dbghelp: Read the stabs nlist entry corresponding to the target's architecture.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: 7d441808ac3b1d8bcef7795b636bda14c31c927b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d441808ac3b1d8bcef7795b…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jun 14 16:58:18 2018 -0500 dbghelp: Read the stabs nlist entry corresponding to the target's architecture. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp_private.h | 2 +- dlls/dbghelp/macho_module.c | 16 +++------ dlls/dbghelp/stabs.c | 73 ++++++++++++++++++++++++------------------ 3 files changed, 47 insertions(+), 44 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7d441808ac3b1d8bcef7…
1
0
0
0
Zebediah Figura : dbghelp: Translate the 32-bit Mach-O section header to the 64-bit one.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: 1dc9bb70cd16fa7b37e8fd6e82ed18311ddfbe38 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1dc9bb70cd16fa7b37e8fd6e…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jun 14 16:58:17 2018 -0500 dbghelp: Translate the 32-bit Mach-O section header to the 64-bit one. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/image_private.h | 8 +------- dlls/dbghelp/macho_module.c | 43 +++++++++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h index 60cdd35..9990850 100644 --- a/dlls/dbghelp/image_private.h +++ b/dlls/dbghelp/image_private.h @@ -44,12 +44,6 @@ #endif #ifdef HAVE_MACH_O_LOADER_H #include <mach-o/loader.h> - -#ifdef _WIN64 -typedef struct section_64 macho_section; -#else -typedef struct section macho_section; -#endif #endif #define IMAGE_NO_MAP ((void*)-1) @@ -105,7 +99,7 @@ struct image_file_map int num_sections; struct { - const macho_section* section; + struct section_64 section; const char* mapped; unsigned int ignored : 1; }* sect; diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 52ea739..b8f5967 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -328,7 +328,7 @@ BOOL macho_find_section(struct image_file_map* ifm, const char* segname, const c { struct macho_file_map* fmap; unsigned i; - char tmp[sizeof(fmap->sect[0].section->sectname)]; + char tmp[sizeof(fmap->sect[0].section.sectname)]; /* Other parts of dbghelp use section names like ".eh_frame". Mach-O uses names like "__eh_frame". Convert those. */ @@ -345,8 +345,8 @@ BOOL macho_find_section(struct image_file_map* ifm, const char* segname, const c for (i = 0; i < fmap->num_sections; i++) { if (!fmap->sect[i].ignored && - strcmp(fmap->sect[i].section->sectname, sectname) == 0 && - (!segname || strcmp(fmap->sect[i].section->segname, segname) == 0)) + strcmp(fmap->sect[i].section.sectname, sectname) == 0 && + (!segname || strcmp(fmap->sect[i].section.segname, segname) == 0)) { ism->fmap = ifm; ism->sidx = i; @@ -372,7 +372,7 @@ const char* macho_map_section(struct image_section_map* ism) if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.macho.num_sections || fmap->sect[ism->sidx].ignored) return IMAGE_NO_MAP; - return macho_map_range(fmap, fmap->sect[ism->sidx].section->offset, fmap->sect[ism->sidx].section->size, + return macho_map_range(fmap, fmap->sect[ism->sidx].section.offset, fmap->sect[ism->sidx].section.size, &fmap->sect[ism->sidx].mapped); } @@ -385,8 +385,8 @@ void macho_unmap_section(struct image_section_map* ism) if (ism->sidx >= 0 && ism->sidx < fmap->num_sections && fmap->sect[ism->sidx].mapped != IMAGE_NO_MAP) { - macho_unmap_range(&fmap->sect[ism->sidx].mapped, NULL, fmap, fmap->sect[ism->sidx].section->offset, - fmap->sect[ism->sidx].section->size); + macho_unmap_range(&fmap->sect[ism->sidx].mapped, NULL, fmap, fmap->sect[ism->sidx].section.offset, + fmap->sect[ism->sidx].section.size); } } @@ -398,7 +398,7 @@ DWORD_PTR macho_get_map_rva(const struct image_section_map* ism) if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.macho.num_sections || ism->fmap->u.macho.sect[ism->sidx].ignored) return 0; - return ism->fmap->u.macho.sect[ism->sidx].section->addr - ism->fmap->u.macho.segs_start; + return ism->fmap->u.macho.sect[ism->sidx].section.addr - ism->fmap->u.macho.segs_start; } /****************************************************************** @@ -409,7 +409,7 @@ unsigned macho_get_map_size(const struct image_section_map* ism) if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.macho.num_sections || ism->fmap->u.macho.sect[ism->sidx].ignored) return 0; - return ism->fmap->u.macho.sect[ism->sidx].section->size; + return ism->fmap->u.macho.sect[ism->sidx].section.size; } /****************************************************************** @@ -539,12 +539,12 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct load struct macho_file_map* fmap = &ifm->u.macho; struct section_info* info = user; BOOL ignore; - const macho_section* section; int i; unsigned long tmp, page_mask = sysconf( _SC_PAGESIZE ) - 1; uint64_t vmaddr, vmsize; char segname[16]; uint32_t nsects; + const void *sections; if (ifm->addr_size == 32) { @@ -553,7 +553,7 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct load vmsize = sc->vmsize; memcpy(segname, sc->segname, sizeof(segname)); nsects = sc->nsects; - section = (const macho_section*)(sc + 1); + sections = (const void *)(sc + 1); } else { @@ -562,7 +562,7 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct load vmsize = sc->vmsize; memcpy(segname, sc->segname, sizeof(segname)); nsects = sc->nsects; - section = (const macho_section*)(sc + 1); + sections = (const void *)(sc + 1); } TRACE("(%p/%d, %p, %p) before: 0x%08lx - 0x%08lx\n", fmap, fmap->fd, lc, user, @@ -596,7 +596,22 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct load for (i = 0; i < nsects; i++) { - fmap->sect[info->section_index].section = §ion[i]; + if (ifm->addr_size == 32) + { + const struct section *section = &((const struct section *)sections)[i]; + memcpy(fmap->sect[info->section_index].section.sectname, section->sectname, sizeof(section->sectname)); + memcpy(fmap->sect[info->section_index].section.segname, section->segname, sizeof(section->segname)); + fmap->sect[info->section_index].section.addr = section->addr; + fmap->sect[info->section_index].section.size = section->size; + fmap->sect[info->section_index].section.offset = section->offset; + fmap->sect[info->section_index].section.align = section->align; + fmap->sect[info->section_index].section.reloff = section->reloff; + fmap->sect[info->section_index].section.nreloc = section->nreloc; + fmap->sect[info->section_index].section.flags = section->flags; + } + else + fmap->sect[info->section_index].section = ((const struct section_64 *)sections)[i]; + fmap->sect[info->section_index].mapped = IMAGE_NO_MAP; fmap->sect[info->section_index].ignored = ignore; info->section_index++; @@ -831,8 +846,8 @@ static BOOL macho_sect_is_code(struct macho_file_map* fmap, unsigned char sectid sectidx--; /* convert from 1-based to 0-based */ if (sectidx >= fmap->num_sections || fmap->sect[sectidx].ignored) return FALSE; - ret = (!(fmap->sect[sectidx].section->flags & SECTION_TYPE) && - (fmap->sect[sectidx].section->flags & (S_ATTR_PURE_INSTRUCTIONS|S_ATTR_SOME_INSTRUCTIONS))); + ret = (!(fmap->sect[sectidx].section.flags & SECTION_TYPE) && + (fmap->sect[sectidx].section.flags & (S_ATTR_PURE_INSTRUCTIONS|S_ATTR_SOME_INSTRUCTIONS))); TRACE("-> %d\n", ret); return ret; }
1
0
0
0
Zebediah Figura : dbghelp: Read the Mach-O segment command corresponding to the target' s architecture.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: 0fc3c33637d4c8eff3f4373d374b3feb402bce4a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0fc3c33637d4c8eff3f4373d…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jun 14 16:58:16 2018 -0500 dbghelp: Read the Mach-O segment command corresponding to the target's architecture. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/macho_module.c | 68 +++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 50fcca4..52ea739 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -89,10 +89,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_macho); #ifdef _WIN64 -typedef struct segment_command_64 macho_segment_command; typedef struct nlist_64 macho_nlist; #else -typedef struct segment_command macho_segment_command; typedef struct nlist macho_nlist; #endif @@ -506,12 +504,26 @@ static int macho_enum_load_commands(struct image_file_map *ifm, unsigned cmd, */ static int macho_count_sections(struct image_file_map* ifm, const struct load_command* lc, void* user) { - const macho_segment_command* sc = (const macho_segment_command*)lc; + char segname[16]; + uint32_t nsects; + + if (ifm->addr_size == 32) + { + const struct segment_command *sc = (const struct segment_command *)lc; + memcpy(segname, sc->segname, sizeof(segname)); + nsects = sc->nsects; + } + else + { + const struct segment_command_64 *sc = (const struct segment_command_64 *)lc; + memcpy(segname, sc->segname, sizeof(segname)); + nsects = sc->nsects; + } TRACE("(%p/%d, %p, %p) segment %s\n", ifm, ifm->u.macho.fd, lc, user, - debugstr_an(sc->segname, sizeof(sc->segname))); + debugstr_an(segname, sizeof(segname))); - ifm->u.macho.num_sections += sc->nsects; + ifm->u.macho.num_sections += nsects; return 0; } @@ -525,44 +537,64 @@ static int macho_count_sections(struct image_file_map* ifm, const struct load_co static int macho_load_section_info(struct image_file_map* ifm, const struct load_command* lc, void* user) { struct macho_file_map* fmap = &ifm->u.macho; - const macho_segment_command* sc = (const macho_segment_command*)lc; struct section_info* info = user; BOOL ignore; const macho_section* section; int i; unsigned long tmp, page_mask = sysconf( _SC_PAGESIZE ) - 1; + uint64_t vmaddr, vmsize; + char segname[16]; + uint32_t nsects; + + if (ifm->addr_size == 32) + { + const struct segment_command *sc = (const struct segment_command *)lc; + vmaddr = sc->vmaddr; + vmsize = sc->vmsize; + memcpy(segname, sc->segname, sizeof(segname)); + nsects = sc->nsects; + section = (const macho_section*)(sc + 1); + } + else + { + const struct segment_command_64 *sc = (const struct segment_command_64 *)lc; + vmaddr = sc->vmaddr; + vmsize = sc->vmsize; + memcpy(segname, sc->segname, sizeof(segname)); + nsects = sc->nsects; + section = (const macho_section*)(sc + 1); + } TRACE("(%p/%d, %p, %p) before: 0x%08lx - 0x%08lx\n", fmap, fmap->fd, lc, user, (unsigned long)fmap->segs_start, (unsigned long)fmap->segs_size); - TRACE("Segment command vm: 0x%08lx - 0x%08lx\n", (unsigned long)sc->vmaddr, - (unsigned long)(sc->vmaddr + sc->vmsize)); + TRACE("Segment command vm: 0x%08lx - 0x%08lx\n", (unsigned long)vmaddr, + (unsigned long)(vmaddr + vmsize)); /* Images in the dyld shared cache have their segments mapped non-contiguously. We don't know how to properly locate any of the segments other than __TEXT, so ignore them. */ - ignore = (info->split_segs && strcmp(sc->segname, SEG_TEXT)); + ignore = (info->split_segs && strcmp(segname, SEG_TEXT)); - if (!strncmp(sc->segname, "WINE_", 5)) - TRACE("Ignoring special Wine segment %s\n", debugstr_an(sc->segname, sizeof(sc->segname))); - else if (!strncmp(sc->segname, "__PAGEZERO", 10)) + if (!strncmp(segname, "WINE_", 5)) + TRACE("Ignoring special Wine segment %s\n", debugstr_an(segname, sizeof(segname))); + else if (!strncmp(segname, "__PAGEZERO", 10)) TRACE("Ignoring __PAGEZERO segment\n"); else if (ignore) - TRACE("Ignoring %s segment because image has split segments\n", sc->segname); + TRACE("Ignoring %s segment because image has split segments\n", segname); else { /* If this segment starts before previously-known earliest, record new earliest. */ - if (sc->vmaddr < fmap->segs_start) - fmap->segs_start = sc->vmaddr; + if (vmaddr < fmap->segs_start) + fmap->segs_start = vmaddr; /* If this segment extends beyond previously-known furthest, record new furthest. */ - tmp = (sc->vmaddr + sc->vmsize + page_mask) & ~page_mask; + tmp = (vmaddr + vmsize + page_mask) & ~page_mask; if (fmap->segs_size < tmp) fmap->segs_size = tmp; TRACE("after: 0x%08lx - 0x%08lx\n", (unsigned long)fmap->segs_start, (unsigned long)fmap->segs_size); } - section = (const macho_section*)(sc + 1); - for (i = 0; i < sc->nsects; i++) + for (i = 0; i < nsects; i++) { fmap->sect[info->section_index].section = §ion[i]; fmap->sect[info->section_index].mapped = IMAGE_NO_MAP;
1
0
0
0
Zebediah Figura : dbghelp: Pass an image_file_map to macho_enum_load_commands().
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: bf7681cb2f3a73239170b4f0ebc8f6b38bc027ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf7681cb2f3a73239170b4f0…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jun 14 16:58:15 2018 -0500 dbghelp: Pass an image_file_map to macho_enum_load_commands(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/macho_module.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 679c203..50fcca4 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -467,10 +467,11 @@ static const struct load_command* macho_next_load_command(const struct load_comm * callback. If >=0, that's the count of load commands successfully * processed. */ -static int macho_enum_load_commands(struct macho_file_map* fmap, unsigned cmd, - int (*cb)(struct macho_file_map*, const struct load_command*, void*), +static int macho_enum_load_commands(struct image_file_map *ifm, unsigned cmd, + int (*cb)(struct image_file_map*, const struct load_command*, void*), void* user) { + struct macho_file_map* fmap = &ifm->u.macho; const struct load_command* lc; int i; int count = 0; @@ -488,7 +489,7 @@ static int macho_enum_load_commands(struct macho_file_map* fmap, unsigned cmd, if (cmd && cmd != lc->cmd) continue; count++; - result = cb(fmap, lc, user); + result = cb(ifm, lc, user); TRACE("load_command[%d] (%p), cmd %u; callback => %d\n", i, lc, lc->cmd, result); if (result) return (result < 0) ? result : count; } @@ -503,13 +504,14 @@ static int macho_enum_load_commands(struct macho_file_map* fmap, unsigned cmd, * significant sections in a Mach-O file. All commands are * expected to be of LC_SEGMENT[_64] type. */ -static int macho_count_sections(struct macho_file_map* fmap, const struct load_command* lc, void* user) +static int macho_count_sections(struct image_file_map* ifm, const struct load_command* lc, void* user) { const macho_segment_command* sc = (const macho_segment_command*)lc; - TRACE("(%p/%d, %p, %p) segment %s\n", fmap, fmap->fd, lc, user, debugstr_an(sc->segname, sizeof(sc->segname))); + TRACE("(%p/%d, %p, %p) segment %s\n", ifm, ifm->u.macho.fd, lc, user, + debugstr_an(sc->segname, sizeof(sc->segname))); - fmap->num_sections += sc->nsects; + ifm->u.macho.num_sections += sc->nsects; return 0; } @@ -520,8 +522,9 @@ static int macho_count_sections(struct macho_file_map* fmap, const struct load_c * range covered by the segments of a Mach-O file and builds the * section map. All commands are expected to be of LC_SEGMENT[_64] type. */ -static int macho_load_section_info(struct macho_file_map* fmap, const struct load_command* lc, void* user) +static int macho_load_section_info(struct image_file_map* ifm, const struct load_command* lc, void* user) { + struct macho_file_map* fmap = &ifm->u.macho; const macho_segment_command* sc = (const macho_segment_command*)lc; struct section_info* info = user; BOOL ignore; @@ -576,9 +579,9 @@ static int macho_load_section_info(struct macho_file_map* fmap, const struct loa * Callback for macho_enum_load_commands. Records the UUID load * command of a Mach-O file. */ -static int find_uuid(struct macho_file_map* fmap, const struct load_command* lc, void* user) +static int find_uuid(struct image_file_map* ifm, const struct load_command* lc, void* user) { - fmap->uuid = (const struct uuid_command*)lc; + ifm->u.macho.uuid = (const struct uuid_command*)lc; return 1; } @@ -700,7 +703,7 @@ static BOOL macho_map_file(struct process *pcs, const WCHAR *filenameW, TRACE("... verified Mach header\n"); fmap->num_sections = 0; - if (macho_enum_load_commands(fmap, target_cmd, macho_count_sections, NULL) < 0) + if (macho_enum_load_commands(ifm, target_cmd, macho_count_sections, NULL) < 0) goto done; TRACE("%d sections\n", fmap->num_sections); @@ -713,7 +716,7 @@ static BOOL macho_map_file(struct process *pcs, const WCHAR *filenameW, info.split_segs = split_segs; info.section_index = 0; - if (macho_enum_load_commands(fmap, target_cmd, macho_load_section_info, &info) < 0) + if (macho_enum_load_commands(ifm, target_cmd, macho_load_section_info, &info) < 0) { fmap->num_sections = 0; goto done; @@ -723,7 +726,7 @@ static BOOL macho_map_file(struct process *pcs, const WCHAR *filenameW, TRACE("segs_start: 0x%08lx, segs_size: 0x%08lx\n", (unsigned long)fmap->segs_start, (unsigned long)fmap->segs_size); - if (macho_enum_load_commands(fmap, LC_UUID, find_uuid, NULL) < 0) + if (macho_enum_load_commands(ifm, LC_UUID, find_uuid, NULL) < 0) goto done; if (fmap->uuid) { @@ -857,9 +860,10 @@ static void macho_stabs_def_cb(struct module* module, unsigned long load_offset, * Callback for macho_enum_load_commands. Processes the LC_SYMTAB * load commands from the Mach-O file. */ -static int macho_parse_symtab(struct macho_file_map* fmap, +static int macho_parse_symtab(struct image_file_map* ifm, const struct load_command* lc, void* user) { + struct macho_file_map* fmap = &ifm->u.macho; const struct symtab_command* sc = (const struct symtab_command*)lc; struct macho_debug_info* mdi = user; const macho_nlist* stab; @@ -1219,6 +1223,7 @@ BOOL macho_load_debug_info(struct process *pcs, struct module* module) BOOL ret = FALSE; struct macho_debug_info mdi; int result; + struct image_file_map *ifm; struct macho_file_map *fmap; if (module->type != DMT_MACHO || !module->format_info[DFI_MACHO]->u.macho_info) @@ -1227,7 +1232,8 @@ BOOL macho_load_debug_info(struct process *pcs, struct module* module) return FALSE; } - fmap = &module->format_info[DFI_MACHO]->u.macho_info->file_map.u.macho; + ifm = &module->format_info[DFI_MACHO]->u.macho_info->file_map; + fmap = &ifm->u.macho; TRACE("(%p, %p/%d)\n", module, fmap, fmap->fd); @@ -1246,7 +1252,7 @@ BOOL macho_load_debug_info(struct process *pcs, struct module* module) mdi.module = module; pool_init(&mdi.pool, 65536); hash_table_init(&mdi.pool, &mdi.ht_symtab, 256); - result = macho_enum_load_commands(fmap, LC_SYMTAB, macho_parse_symtab, &mdi); + result = macho_enum_load_commands(ifm, LC_SYMTAB, macho_parse_symtab, &mdi); if (result > 0) ret = TRUE; else if (result < 0) @@ -1255,7 +1261,7 @@ BOOL macho_load_debug_info(struct process *pcs, struct module* module) if (!(dbghelp_options & SYMOPT_PUBLICS_ONLY) && fmap->dsym) { mdi.fmap = &fmap->dsym->u.macho; - result = macho_enum_load_commands(mdi.fmap, LC_SYMTAB, macho_parse_symtab, &mdi); + result = macho_enum_load_commands(fmap->dsym, LC_SYMTAB, macho_parse_symtab, &mdi); if (result > 0) ret = TRUE; else if (result < 0)
1
0
0
0
Zebediah Figura : dbghelp: Read the 32-bit Mach-O header.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: f2e38e17956197180ad730fd00a267fc25d4f238 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2e38e17956197180ad730fd…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jun 14 16:58:14 2018 -0500 dbghelp: Read the 32-bit Mach-O header. It is identical to the 64-bit header, except for the "reserved" field. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/image_private.h | 4 +--- dlls/dbghelp/macho_module.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h index b12cacb..60cdd35 100644 --- a/dlls/dbghelp/image_private.h +++ b/dlls/dbghelp/image_private.h @@ -46,10 +46,8 @@ #include <mach-o/loader.h> #ifdef _WIN64 -typedef struct mach_header_64 macho_mach_header; typedef struct section_64 macho_section; #else -typedef struct mach_header macho_mach_header; typedef struct section macho_section; #endif #endif @@ -96,7 +94,7 @@ struct image_file_map struct image_file_map* dsym; /* the debug symbols file associated with this one */ #ifdef HAVE_MACH_O_LOADER_H - macho_mach_header mach_header; + struct mach_header mach_header; const struct load_command* load_commands; const struct uuid_command* uuid; diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index ee35af5..679c203 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -1196,7 +1196,7 @@ static BOOL image_uses_split_segs(HANDLE process, unsigned long load_addr) struct process *pcs = process_find_by_handle(process); cpu_type_t target_cpu = (pcs->is_64bit) ? CPU_TYPE_X86_64 : CPU_TYPE_X86; uint32_t target_magic = (pcs->is_64bit) ? MH_MAGIC_64 : MH_MAGIC; - macho_mach_header header; + struct mach_header header; if (ReadProcessMemory(process, (void*)load_addr, &header, sizeof(header), NULL) && header.magic == target_magic && header.cputype == target_cpu &&
1
0
0
0
Zebediah Figura : dbghelp: Determine the target Mach-O architecture from the process's architecture.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: f0ee3471f369bc3d3911647c7efa63fc503e6ce2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f0ee3471f369bc3d3911647c…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jun 14 16:58:13 2018 -0500 dbghelp: Determine the target Mach-O architecture from the process's architecture. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp_private.h | 2 +- dlls/dbghelp/macho_module.c | 66 +++++++++++++++++++++--------------------- dlls/dbghelp/module.c | 2 +- 3 files changed, 35 insertions(+), 35 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f0ee3471f369bc3d3911…
1
0
0
0
Józef Kucia : dxgi: Get supported feature levels from wined3d caps.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: 25d4a110cb0bb7eb8d386c7ab2b7b52e057768a9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=25d4a110cb0bb7eb8d386c7a…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jun 13 12:24:03 2018 +0200 dxgi: Get supported feature levels from wined3d caps. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dxgi/utils.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/dlls/dxgi/utils.c b/dlls/dxgi/utils.c index a305281..aed62a4 100644 --- a/dlls/dxgi/utils.c +++ b/dlls/dxgi/utils.c @@ -626,21 +626,20 @@ D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory, { static const struct { - D3D_FEATURE_LEVEL feature_level; - unsigned int sm; + D3D_FEATURE_LEVEL d3d; + enum wined3d_feature_level wined3d; } - feature_levels_sm[] = + wined3d_feature_levels[] = { - {D3D_FEATURE_LEVEL_11_1, 5}, - {D3D_FEATURE_LEVEL_11_0, 5}, - {D3D_FEATURE_LEVEL_10_1, 4}, - {D3D_FEATURE_LEVEL_10_0, 4}, - {D3D_FEATURE_LEVEL_9_3, 3}, - {D3D_FEATURE_LEVEL_9_2, 2}, - {D3D_FEATURE_LEVEL_9_1, 2}, + {D3D_FEATURE_LEVEL_11_1, WINED3D_FEATURE_LEVEL_11}, + {D3D_FEATURE_LEVEL_11_0, WINED3D_FEATURE_LEVEL_11}, + {D3D_FEATURE_LEVEL_10_1, WINED3D_FEATURE_LEVEL_10}, + {D3D_FEATURE_LEVEL_10_0, WINED3D_FEATURE_LEVEL_10}, + {D3D_FEATURE_LEVEL_9_3, WINED3D_FEATURE_LEVEL_9_SM3}, + {D3D_FEATURE_LEVEL_9_2, WINED3D_FEATURE_LEVEL_9_SM2}, + {D3D_FEATURE_LEVEL_9_1, WINED3D_FEATURE_LEVEL_9_SM2}, }; D3D_FEATURE_LEVEL selected_feature_level = 0; - unsigned int shader_model; struct wined3d_caps caps; unsigned int i, j; HRESULT hr; @@ -652,18 +651,17 @@ D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory, if (FAILED(hr)) level_count = 0; - shader_model = min(caps.VertexShaderVersion, caps.PixelShaderVersion); for (i = 0; i < level_count; ++i) { - for (j = 0; j < ARRAY_SIZE(feature_levels_sm); ++j) + for (j = 0; j < ARRAY_SIZE(wined3d_feature_levels); ++j) { - if (feature_levels[i] == feature_levels_sm[j].feature_level) + if (feature_levels[i] == wined3d_feature_levels[j].d3d) { - if (shader_model >= feature_levels_sm[j].sm) + if (caps.max_feature_level >= wined3d_feature_levels[j].wined3d) { selected_feature_level = feature_levels[i]; - TRACE("Choosing supported feature level %s (SM%u).\n", - debug_feature_level(selected_feature_level), feature_levels_sm[j].sm); + TRACE("Choosing supported feature level %s.\n", + debug_feature_level(selected_feature_level)); } break; } @@ -671,7 +669,7 @@ D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory, if (selected_feature_level) break; - if (j == ARRAY_SIZE(feature_levels_sm)) + if (j == ARRAY_SIZE(wined3d_feature_levels)) FIXME("Unexpected feature level %#x.\n", feature_levels[i]); else TRACE("Feature level %s not supported, trying next fallback if available.\n",
1
0
0
0
Józef Kucia : wined3d: Expose feature level in wined3d caps.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: 98ef3c88606953ac9ddd84dfcefccbc43a5fdbb6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98ef3c88606953ac9ddd84df…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jun 13 12:24:02 2018 +0200 wined3d: Expose feature level in wined3d caps. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 2 ++ dlls/wined3d/wined3d_private.h | 13 ------------- include/wine/wined3d.h | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 7046060..9ecc4ed 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -6190,6 +6190,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte caps->shader_double_precision = d3d_info->shader_double_precision; + caps->max_feature_level = d3d_info->feature_level; + return WINED3D_OK; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0188846..9aa7081 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -184,19 +184,6 @@ struct wined3d_ffp_attrib_ops wined3d_generic_attrib_func generic[WINED3D_FFP_EMIT_COUNT]; }; -enum wined3d_feature_level -{ - WINED3D_FEATURE_LEVEL_5, - WINED3D_FEATURE_LEVEL_6, - WINED3D_FEATURE_LEVEL_7, - WINED3D_FEATURE_LEVEL_8, - WINED3D_FEATURE_LEVEL_9_SM2, - WINED3D_FEATURE_LEVEL_9_SM3, - WINED3D_FEATURE_LEVEL_10, - WINED3D_FEATURE_LEVEL_11, - WINED3D_FEATURE_LEVEL_COUNT -}; - struct wined3d_d3d_info { struct wined3d_d3d_limits limits; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 0f388ab..239ccd8 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -88,6 +88,19 @@ enum wined3d_device_type WINED3D_DEVICE_TYPE_NULLREF = 4, }; +enum wined3d_feature_level +{ + WINED3D_FEATURE_LEVEL_5, + WINED3D_FEATURE_LEVEL_6, + WINED3D_FEATURE_LEVEL_7, + WINED3D_FEATURE_LEVEL_8, + WINED3D_FEATURE_LEVEL_9_SM2, + WINED3D_FEATURE_LEVEL_9_SM3, + WINED3D_FEATURE_LEVEL_10, + WINED3D_FEATURE_LEVEL_11, + WINED3D_FEATURE_LEVEL_COUNT +}; + enum wined3d_degree_type { WINED3D_DEGREE_LINEAR = 1, @@ -1962,6 +1975,8 @@ struct wined3d_caps struct wined3d_ddraw_caps ddraw_caps; BOOL shader_double_precision; + + enum wined3d_feature_level max_feature_level; }; struct wined3d_color_key
1
0
0
0
Józef Kucia : wined3d: Store feature level in d3d_info.
by Alexandre Julliard
15 Jun '18
15 Jun '18
Module: wine Branch: master Commit: 7b58d1a0077c226ffd191f15ee2fe77790f7deea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b58d1a0077c226ffd191f15…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jun 13 12:24:01 2018 +0200 wined3d: Store feature level in d3d_info. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 107 ++++++++++++++++++----------------------- dlls/wined3d/wined3d_private.h | 14 ++++++ 2 files changed, 62 insertions(+), 59 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7b58d1a0077c226ffd19…
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
63
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Results per page:
10
25
50
100
200