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
March 2020
----- 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
996 discussions
Start a n
N
ew thread
Alexandre Julliard : unicode: Add compression flags to the sortkey table.
by Alexandre Julliard
18 Mar '20
18 Mar '20
Module: wine Branch: master Commit: 94397d96bb473e3d987e8ea778c52dc2ec78fc59 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=94397d96bb473e3d987e8ea7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 18 16:03:33 2020 +0100 unicode: Add compression flags to the sortkey table. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- nls/sortdefault.nls | Bin 3316820 -> 3354708 bytes tools/make_unicode | 33 +++++++++++++++++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/nls/sortdefault.nls b/nls/sortdefault.nls index fcd92d90c4..8d6cc62209 100644 Binary files a/nls/sortdefault.nls and b/nls/sortdefault.nls differ diff --git a/tools/make_unicode b/tools/make_unicode index 9acc87e9c8..86a180259f 100755 --- a/tools/make_unicode +++ b/tools/make_unicode @@ -2371,13 +2371,13 @@ sub dump_sortkey_table($$) my ($filename, $download) = @_; my @keys; - my ($part, $section, $subsection, $guid, $version); + my ($part, $section, $subsection, $guid, $version, $ling_flag); my @multiple_weights; my @expansions; my @compressions; - my @exceptions; - my @except_guid; + my %exceptions; my %guids; + my %compr_flags; my %locales; my $default_guid = "00000001-57ee-1e5c-00b4-d0000bb1e11e"; my $jamostr = ""; @@ -2488,6 +2488,8 @@ sub dump_sortkey_table($$) $guids{$guid} = { } unless defined $guids{$guid}; $guids{$guid}->{flags} |= $flags{$2} if $2; $guids{$guid}->{compr} = @compressions; + $exceptions{"$guid-"} = [ ] unless defined $exceptions{"$guid-"}; + $compr_flags{$guid} = [ ] unless defined $compr_flags{$guid}; push @compressions, [ ]; } else # merge with current one @@ -2495,6 +2497,7 @@ sub dump_sortkey_table($$) $guids{lc $1} = { } unless defined $guids{lc $1}; $guids{lc $1}->{flags} |= $flags{$2} if $2; $guids{lc $1}->{compr} = $guids{$guid}->{compr}; + $compr_flags{lc $1} = $compr_flags{$guid}; } next; } @@ -2510,7 +2513,10 @@ sub dump_sortkey_table($$) } if ($subsection && /^\s*(($re_hex\s+){2,8})$re_key/) { - push @{$compressions[$#compressions]}, [ split(/\s+/,$3), map { hex $_; } split(/\s+/,$1) ]; + my @comp = map { hex $_; } split(/\s+/,$1); + push @{$compressions[$#compressions]}, [ split(/\s+/,$3), @comp ]; + # add compression flags + $compr_flags{$guid}->[$comp[0]] |= @comp >= 6 ? 0xc0 : @comp >= 4 ? 0x80 : 0x40; next; } } @@ -2520,8 +2526,8 @@ sub dump_sortkey_table($$) { $guid = lc $1; $guids{$guid} = { } unless defined $guids{lc $1}; - push @except_guid, ($2 ? "+" : "-") . $guid; - push @exceptions, [ ]; + $ling_flag = ($2 ? "+" : "-"); + $exceptions{"$guid$ling_flag"} = [ ] unless defined $exceptions{"$guid$ling_flag"}; next; } if (/^\s*LOCALENAME\s+([A-Za-z0-9-_]+)/) @@ -2531,7 +2537,7 @@ sub dump_sortkey_table($$) } if (/^\s*($re_hex)\s+$re_key/) { - ${$exceptions[$#exceptions]}[hex $1] = [ split(/\s+/,$2) ]; + $exceptions{"$guid$ling_flag"}->[hex $1] = [ split(/\s+/,$2) ]; next; } } @@ -2556,17 +2562,19 @@ sub dump_sortkey_table($$) $table .= pack "C4", $k[1], $k[0], $k[2], $k[3]; } - for (my $i = 0; $i < @exceptions; $i++) + foreach my $id (sort keys %exceptions) { my $pos = length($table) / 4; - my @exc = @{$exceptions[$i]}; + my @exc = @{$exceptions{$id}}; my @filled; - my $key = (substr($except_guid[$i],0,1) eq "+" ? "ling_except" : "except"); - $guids{substr( $except_guid[$i], 1 )}->{$key} = $pos; + my $key = (substr( $id, -1 ) eq "+" ? "ling_except" : "except"); + my $guid = substr( $id, 0, -1 ); + $guids{$guid}->{$key} = $pos; $pos += 0x100; + my @flags = @{$compr_flags{$guid}} if defined $compr_flags{$guid}; for (my $j = 0; $j < 0x10000; $j++) { - next unless defined $exc[$j]; + next unless defined $exc[$j] || defined $flags[$j]; $filled[$j >> 8] = 1; $j |= 0xff; } @@ -2579,6 +2587,7 @@ sub dump_sortkey_table($$) { next unless $filled[$j >> 8]; my @k = defined $exc[$j] ? @{$exc[$j]} : defined $keys[$j] ? @{$keys[$j]} : (0) x 4; + $k[3] |= $flags[$j] || 0; $table .= pack "C4", $k[1], $k[0], $k[2], $k[3]; } }
1
0
0
0
Alexandre Julliard : kernelbase: Use linguistic case table for LCMAP_LINGUISTIC_CASING.
by Alexandre Julliard
18 Mar '20
18 Mar '20
Module: wine Branch: master Commit: b780e5f5b1bd018629bfa31431e216c7579fe9aa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b780e5f5b1bd018629bfa314…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 18 12:00:02 2020 +0100 kernelbase: Use linguistic case table for LCMAP_LINGUISTIC_CASING. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/locale.c | 42 +++++++-------- dlls/kernelbase/locale.c | 121 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 129 insertions(+), 34 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b780e5f5b1bd018629bf…
1
0
0
0
Gabriel Ivăncescu : jscript: Get rid of the variable_obj parameter to exec_source.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: 7ad740cd29c6bd87238df6231689b861058bc5a8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7ad740cd29c6bd87238df623…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Mar 17 19:19:25 2020 +0100 jscript: Get rid of the variable_obj parameter to exec_source. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 32 ++++++++++++++++++++++++-------- dlls/jscript/engine.h | 2 +- dlls/jscript/function.c | 11 +++-------- dlls/jscript/global.c | 2 +- dlls/jscript/jscript.c | 6 +++--- 5 files changed, 32 insertions(+), 21 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index db0863c902..8914e760ed 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2990,8 +2990,9 @@ static HRESULT setup_scope(script_ctx_t *ctx, call_frame_t *frame, scope_chain_t } HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, function_code_t *function, scope_chain_t *scope, - IDispatch *this_obj, jsdisp_t *function_instance, jsdisp_t *variable_obj, unsigned argc, jsval_t *argv, jsval_t *r) + IDispatch *this_obj, jsdisp_t *function_instance, unsigned argc, jsval_t *argv, jsval_t *r) { + jsdisp_t *variable_obj; call_frame_t *frame; unsigned i; HRESULT hres; @@ -3024,6 +3025,15 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi return hres; } + if((flags & EXEC_EVAL) && ctx->call_ctx) { + variable_obj = jsdisp_addref(ctx->call_ctx->variable_obj); + }else if(!(flags & (EXEC_GLOBAL | EXEC_EVAL))) { + hres = create_dispex(ctx, NULL, NULL, &variable_obj); + if(FAILED(hres)) return hres; + }else { + variable_obj = jsdisp_addref(ctx->global); + } + if(flags & (EXEC_GLOBAL | EXEC_EVAL)) { BOOL lookup_globals = (flags & EXEC_GLOBAL) && !bytecode->named_item; @@ -3034,7 +3044,7 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi hres = create_source_function(ctx, bytecode, function->funcs+function->variables[i].func_id, scope, &func_obj); if(FAILED(hres)) - return hres; + goto fail; hres = jsdisp_propput_name(variable_obj, function->variables[i].name, jsval_obj(func_obj)); jsdisp_release(func_obj); @@ -3043,7 +3053,7 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi hres = jsdisp_get_id(variable_obj, function->variables[i].name, fdexNameEnsure, &id); if(FAILED(hres)) - return hres; + goto fail; } } } @@ -3063,12 +3073,14 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi if(ctx->call_ctx && (flags & EXEC_EVAL)) { hres = detach_variable_object(ctx, ctx->call_ctx, FALSE); if(FAILED(hres)) - return hres; + goto fail; } frame = heap_alloc_zero(sizeof(*frame)); - if(!frame) - return E_OUTOFMEMORY; + if(!frame) { + hres = E_OUTOFMEMORY; + goto fail; + } frame->function = function; frame->ret = jsval_undefined(); @@ -3080,7 +3092,7 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi if(FAILED(hres)) { release_bytecode(frame->bytecode); heap_free(frame); - return hres; + goto fail; } }else if(scope) { frame->base_scope = frame->scope = scope_addref(scope); @@ -3097,7 +3109,7 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi frame->function_instance = jsdisp_addref(function_instance); frame->flags = flags; - frame->variable_obj = jsdisp_addref(variable_obj); + frame->variable_obj = variable_obj; frame->prev_frame = ctx->call_ctx; ctx->call_ctx = frame; @@ -3113,4 +3125,8 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi } return enter_bytecode(ctx, r); + +fail: + jsdisp_release(variable_obj); + return hres; } diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index fe6b2a06d0..2a8e405a28 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -281,7 +281,7 @@ typedef struct _call_frame_t { #define EXEC_EVAL 0x0008 HRESULT exec_source(script_ctx_t*,DWORD,bytecode_t*,function_code_t*,scope_chain_t*,IDispatch*, - jsdisp_t*,jsdisp_t*,unsigned,jsval_t*,jsval_t*) DECLSPEC_HIDDEN; + jsdisp_t*,unsigned,jsval_t*,jsval_t*) DECLSPEC_HIDDEN; HRESULT create_source_function(script_ctx_t*,bytecode_t*,function_code_t*,scope_chain_t*,jsdisp_t**) DECLSPEC_HIDDEN; HRESULT setup_arguments_object(script_ctx_t*,call_frame_t*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 007aec0370..caca274a49 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -722,7 +722,7 @@ static HRESULT InterpretedFunction_call(script_ctx_t *ctx, FunctionInstance *fun unsigned argc, jsval_t *argv, jsval_t *r) { InterpretedFunction *function = (InterpretedFunction*)func; - jsdisp_t *var_disp, *new_obj = NULL; + jsdisp_t *new_obj = NULL; DWORD exec_flags = 0; HRESULT hres; @@ -744,15 +744,10 @@ static HRESULT InterpretedFunction_call(script_ctx_t *ctx, FunctionInstance *fun exec_flags |= EXEC_RETURN_TO_INTERP; if(flags & DISPATCH_CONSTRUCT) exec_flags |= EXEC_CONSTRUCTOR; - - hres = create_dispex(ctx, NULL, NULL, &var_disp); - if(SUCCEEDED(hres)) - hres = exec_source(ctx, exec_flags, function->code, function->func_code, function->scope_chain, this_obj, - &function->function.dispex, var_disp, argc, argv, r); + hres = exec_source(ctx, exec_flags, function->code, function->func_code, function->scope_chain, this_obj, + &function->function.dispex, argc, argv, r); if(new_obj) jsdisp_release(new_obj); - - jsdisp_release(var_disp); return hres; } diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 2a1dcb2b84..64b910faa7 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -215,7 +215,7 @@ HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned a if(flags & DISPATCH_JSCRIPT_CALLEREXECSSOURCE) exec_flags |= EXEC_RETURN_TO_INTERP; hres = exec_source(ctx, exec_flags, code, &code->global_code, frame ? frame->scope : NULL, - frame ? frame->this_obj : NULL, NULL, frame ? frame->variable_obj : ctx->global, 0, NULL, r); + frame ? frame->this_obj : NULL, NULL, 0, NULL, r); release_bytecode(code); return hres; } diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index aabad7ef8b..f54c34ab5a 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -408,7 +408,7 @@ static void exec_queued_code(JScript *This) LIST_FOR_EACH_ENTRY(iter, &This->queued_code, bytecode_t, entry) { enter_script(This->ctx, &ei); - hres = exec_source(This->ctx, EXEC_GLOBAL, iter, &iter->global_code, NULL, NULL, NULL, This->ctx->global, 0, NULL, NULL); + hres = exec_source(This->ctx, EXEC_GLOBAL, iter, &iter->global_code, NULL, NULL, NULL, 0, NULL, NULL); leave_script(This->ctx, hres); if(FAILED(hres)) break; @@ -1053,7 +1053,7 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface, if(dwFlags & SCRIPTTEXT_ISEXPRESSION) { jsval_t r; - hres = exec_source(This->ctx, EXEC_GLOBAL, code, &code->global_code, NULL, NULL, NULL, This->ctx->global, 0, NULL, &r); + hres = exec_source(This->ctx, EXEC_GLOBAL, code, &code->global_code, NULL, NULL, NULL, 0, NULL, &r); if(SUCCEEDED(hres)) { if(pvarResult) hres = jsval_to_variant(r, pvarResult); @@ -1072,7 +1072,7 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface, if(!pvarResult && !is_started(This->ctx)) { list_add_tail(&This->queued_code, &code->entry); }else { - hres = exec_source(This->ctx, EXEC_GLOBAL, code, &code->global_code, NULL, NULL, NULL, This->ctx->global, 0, NULL, NULL); + hres = exec_source(This->ctx, EXEC_GLOBAL, code, &code->global_code, NULL, NULL, NULL, 0, NULL, NULL); if(code->is_persistent) list_add_tail(&This->persistent_code, &code->entry); else
1
0
0
0
Jacek Caban : dbghelp: Lookup real image paths in image_locate_debug_link.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: 838de56e0ac5b91e2ffa27a696d33e0f09179b2e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=838de56e0ac5b91e2ffa27a6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 17 17:22:07 2020 +0100 dbghelp: Lookup real image paths in image_locate_debug_link. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/module.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 9c8fb662f0..0a90595b8c 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -606,6 +606,7 @@ static BOOL image_locate_debug_link(const struct module* module, struct image_fi filename_len = MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, NULL, 0); path_len = strlenW(module->module.LoadedImageName); + if (module->real_path) path_len = max(path_len, strlenW(module->real_path)); p = HeapAlloc(GetProcessHeap(), 0, (globalDebugDirLen + path_len + 6 + 1 + filename_len + 1) * sizeof(WCHAR)); if (!p) goto found; @@ -625,6 +626,16 @@ static BOOL image_locate_debug_link(const struct module* module, struct image_fi MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, slash + ARRAY_SIZE(dotDebugW), filename_len); if (image_check_debug_link(p, fmap_link, crc)) goto found; + if (module->real_path) + { + strcpyW(p, module->real_path); + slash = p; + if ((slash2 = strrchrW(slash, '/'))) slash = slash2 + 1; + if ((slash2 = strrchrW(slash, '\\'))) slash = slash2 + 1; + MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, slash, filename_len); + if (image_check_debug_link(p, fmap_link, crc)) goto found; + } + /* testing globaldebugdir/execdir/filename */ memmove(p + globalDebugDirLen, p, (slash - p) * sizeof(WCHAR)); memcpy(p, globalDebugDirW, globalDebugDirLen * sizeof(WCHAR));
1
0
0
0
Jacek Caban : dbghelp: Support PE debug link files.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: 2642f43eabe6c61341daee24487372b57723894d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2642f43eabe6c61341daee24…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 17 17:21:58 2020 +0100 dbghelp: Support PE debug link files. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/image_private.h | 1 + dlls/dbghelp/module.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h index a219427d46..2e1d9299e5 100644 --- a/dlls/dbghelp/image_private.h +++ b/dlls/dbghelp/image_private.h @@ -136,6 +136,7 @@ struct image_section_map 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; +BOOL pe_map_file(HANDLE file, struct image_file_map* fmap, enum module_type mt) DECLSPEC_HIDDEN; struct image_file_map_ops { diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 32cb1caf32..9c8fb662f0 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -540,8 +540,10 @@ static BOOL refresh_module_list(struct process* pcs) static BOOL image_check_debug_link(const WCHAR* file, struct image_file_map* fmap, DWORD link_crc) { + DWORD read_bytes; HANDLE handle; WCHAR *path; + WORD magic; BOOL ret; path = get_dos_file_name(file); @@ -560,7 +562,11 @@ static BOOL image_check_debug_link(const WCHAR* file, struct image_file_map* fma } } - ret = elf_map_handle(handle, fmap); + SetFilePointer(handle, 0, 0, FILE_BEGIN); + if (ReadFile(handle, &magic, sizeof(magic), &read_bytes, NULL) && magic == IMAGE_DOS_SIGNATURE) + ret = pe_map_file(handle, fmap, DMT_PE); + else + ret = elf_map_handle(handle, fmap); CloseHandle(handle); return ret; }
1
0
0
0
Jacek Caban : dbghelp: Support GNU debug link and build id in PE files.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: 0dd495868846f30d9bb8f15f389d2b1ff6f383cb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0dd495868846f30d9bb8f15f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 17 17:21:45 2020 +0100 dbghelp: Support GNU debug link and build id in PE files. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/pe_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 17db805515..8c120e00dc 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -723,7 +723,8 @@ BOOL pe_load_debug_info(const struct process* pcs, struct module* module) if (!(dbghelp_options & SYMOPT_PUBLICS_ONLY)) { - ret = pe_load_stabs(pcs, module); + ret = image_check_alternate(&module->format_info[DFI_PE]->u.pe_info->fmap, module); + ret = pe_load_stabs(pcs, module) || ret; ret = pe_load_dwarf(module) || ret; ret = pe_load_msc_debug_info(pcs, module) || ret; ret = ret || pe_load_coff_symbol_table(module); /* FIXME */
1
0
0
0
Jacek Caban : dbghelp: Move elf_check_alternate implementation to module.c.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: 4694801e4f58f0e856327d251ac98cfb573fd83b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4694801e4f58f0e856327d25…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 17 20:10:40 2020 +0100 dbghelp: Move elf_check_alternate implementation to module.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/elf_module.c | 247 ++----------------------------------------- dlls/dbghelp/image_private.h | 7 ++ dlls/dbghelp/module.c | 239 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 253 insertions(+), 240 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4694801e4f58f0e85632…
1
0
0
0
Jacek Caban : dbghelp: Move get_dos_file_name to path.c.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: d38682397997c56359f6d161467a56ffe5bfa9fa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d38682397997c56359f6d161…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 17 17:21:17 2020 +0100 dbghelp: Move get_dos_file_name to path.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp_private.h | 1 + dlls/dbghelp/elf_module.c | 23 ----------------------- dlls/dbghelp/path.c | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index b143216dd0..d55b018fa7 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -668,6 +668,7 @@ extern BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip, extern BOOL path_find_symbol_file(const struct process* pcs, const struct module* module, PCSTR full_path, 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; /* pe_module.c */ extern BOOL pe_load_nt_header(HANDLE hProc, DWORD64 base, IMAGE_NT_HEADERS* nth) DECLSPEC_HIDDEN; diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index c89292a644..75f046105c 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -396,29 +396,6 @@ static BOOL elf_map_shdr(struct elf_map_file_data* emfd, struct image_file_map* return TRUE; } -static WCHAR *get_dos_file_name(const WCHAR *filename) -{ - WCHAR *dos_path; - size_t len; - - if (*filename == '/') - { - char *unix_path; - len = WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, NULL, 0, NULL, NULL); - unix_path = heap_alloc(len * sizeof(WCHAR)); - WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, unix_path, len, NULL, NULL); - dos_path = wine_get_dos_file_name(unix_path); - heap_free(unix_path); - } - else - { - len = lstrlenW(filename); - dos_path = heap_alloc((len + 1) * sizeof(WCHAR)); - memcpy(dos_path, filename, (len + 1) * sizeof(WCHAR)); - } - return dos_path; -} - /****************************************************************** * elf_map_file * diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c index 014c79c479..feb951ad55 100644 --- a/dlls/dbghelp/path.c +++ b/dlls/dbghelp/path.c @@ -27,6 +27,7 @@ #include "winnls.h" #include "winternl.h" #include "wine/debug.h" +#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -696,3 +697,26 @@ BOOL path_find_symbol_file(const struct process* pcs, const struct module* modul } return FALSE; } + +WCHAR *get_dos_file_name(const WCHAR *filename) +{ + WCHAR *dos_path; + size_t len; + + if (*filename == '/') + { + char *unix_path; + len = WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, NULL, 0, NULL, NULL); + unix_path = heap_alloc(len * sizeof(WCHAR)); + WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, unix_path, len, NULL, NULL); + dos_path = wine_get_dos_file_name(unix_path); + heap_free(unix_path); + } + else + { + len = lstrlenW(filename); + dos_path = heap_alloc((len + 1) * sizeof(WCHAR)); + memcpy(dos_path, filename, (len + 1) * sizeof(WCHAR)); + } + return dos_path; +}
1
0
0
0
Jacek Caban : dbghelp: Use elf_check_debug_link in elf_locate_build_id_target.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: 171c6fadab8eb444968c1b3a4b364e2e978a639a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=171c6fadab8eb444968c1b3a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 17 17:21:06 2020 +0100 dbghelp: Use elf_check_debug_link in elf_locate_build_id_target. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/elf_module.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 1ad37a24ed..c89292a644 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -985,20 +985,25 @@ static BOOL elf_check_debug_link(const WCHAR* file, struct image_file_map* fmap, { HANDLE handle; WCHAR *path; - DWORD crc; - BOOL ret = FALSE; + BOOL ret; path = get_dos_file_name(file); handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); heap_free(path); if (handle == INVALID_HANDLE_VALUE) return FALSE; - crc = calc_crc32(handle); - if (crc != link_crc) - WARN("Bad CRC for file %s (got %08x while expecting %08x)\n", debugstr_w(file), crc, link_crc); - else - ret = elf_map_handle(handle, fmap); + if (link_crc) + { + DWORD crc = calc_crc32(handle); + if (crc != link_crc) + { + WARN("Bad CRC for file %s (got %08x while expecting %08x)\n", debugstr_w(file), crc, link_crc); + CloseHandle(handle); + return FALSE; + } + } + ret = elf_map_handle(handle, fmap); CloseHandle(handle); return ret; } @@ -1094,7 +1099,6 @@ static BOOL elf_locate_build_id_target(struct image_file_map* fmap, const BYTE* WCHAR* p; WCHAR* z; const BYTE* idend = id + idlen; - struct elf_map_file_data emfd; fmap_link = HeapAlloc(GetProcessHeap(), 0, sizeof(*fmap_link)); if (!fmap_link) return FALSE; @@ -1125,9 +1129,7 @@ static BOOL elf_locate_build_id_target(struct image_file_map* fmap, const BYTE* memcpy(z, dotDebug0W, sizeof(dotDebug0W)); TRACE("checking %s\n", wine_dbgstr_w(p)); - emfd.kind = from_file; - emfd.u.file.filename = p; - if (elf_map_file(&emfd, fmap_link)) + if (elf_check_debug_link(p, fmap_link, 0)) { struct image_section_map buildid_sect; if (image_find_section(fmap_link, ".note.gnu.build-id", &buildid_sect))
1
0
0
0
Jacek Caban : dbghelp: Check checksum before mapping elf file.
by Alexandre Julliard
17 Mar '20
17 Mar '20
Module: wine Branch: master Commit: c1d867fa872fafe1e6cc54ba6da63868fb7a4a6f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c1d867fa872fafe1e6cc54ba…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 17 17:20:54 2020 +0100 dbghelp: Check checksum before mapping elf file. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/elf_module.c | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 6bfd58b917..1ad37a24ed 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -326,7 +326,7 @@ static inline void elf_reset_file_map(struct image_file_map* fmap) struct elf_map_file_data { - enum {from_file, from_process} kind; + enum {from_file, from_process, from_handle} kind; union { struct @@ -338,6 +338,7 @@ struct elf_map_file_data HANDLE handle; void* load_addr; } process; + HANDLE handle; } u; }; @@ -351,6 +352,7 @@ static BOOL elf_map_file_read(struct image_file_map* fmap, struct elf_map_file_d switch (emfd->kind) { case from_file: + case from_handle: li.QuadPart = off; if (!SetFilePointerEx(fmap->u.elf.handle, li, NULL, FILE_BEGIN)) return FALSE; return ReadFile(fmap->u.elf.handle, buf, len, &bytes_read, NULL); @@ -444,6 +446,10 @@ static BOOL elf_map_file(struct elf_map_file_data* emfd, struct image_file_map* heap_free(dos_path); if (fmap->u.elf.handle == INVALID_HANDLE_VALUE) return FALSE; break; + case from_handle: + if (!DuplicateHandle(GetCurrentProcess(), emfd->u.handle, GetCurrentProcess(), &fmap->u.elf.handle, GENERIC_READ, FALSE, 0)) + return FALSE; + break; case from_process: break; } @@ -539,6 +545,7 @@ static BOOL elf_map_file(struct elf_map_file_data* emfd, struct image_file_map* switch (emfd->kind) { + case from_handle: case from_file: break; case from_process: if (!(fmap->u.elf.target_copy = HeapAlloc(GetProcessHeap(), 0, fmap->u.elf.elf_size))) @@ -558,6 +565,14 @@ static BOOL elf_map_file(struct elf_map_file_data* emfd, struct image_file_map* return TRUE; } +static BOOL elf_map_handle(HANDLE handle, struct image_file_map* fmap) +{ + struct elf_map_file_data emfd; + emfd.kind = from_handle; + emfd.u.handle = handle; + return elf_map_file(&emfd, fmap); +} + static void elf_module_remove(struct process* pcs, struct module_format* modfmt) { image_unmap_file(&modfmt->u.elf_info->file_map); @@ -968,21 +983,24 @@ static int elf_new_public_symbols(struct module* module, const struct hash_table static BOOL elf_check_debug_link(const WCHAR* file, struct image_file_map* fmap, DWORD link_crc) { - struct elf_map_file_data emfd; + HANDLE handle; + WCHAR *path; DWORD crc; + BOOL ret = FALSE; - emfd.kind = from_file; - emfd.u.file.filename = file; - if (!elf_map_file(&emfd, fmap)) return FALSE; + path = get_dos_file_name(file); + handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + heap_free(path); + if (handle == INVALID_HANDLE_VALUE) return FALSE; - crc = calc_crc32(fmap->u.elf.handle); + crc = calc_crc32(handle); if (crc != link_crc) - { WARN("Bad CRC for file %s (got %08x while expecting %08x)\n", debugstr_w(file), crc, link_crc); - image_unmap_file(fmap); - return FALSE; - } - return TRUE; + else + ret = elf_map_handle(handle, fmap); + + CloseHandle(handle); + return ret; } /******************************************************************
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
100
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200