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
February 2007
----- 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
4 participants
839 discussions
Start a n
N
ew thread
Dmitry Timoshkov : comctl32: Make ImageList_Read and ImageList_Write compatible with each other, simplify the code.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 369749dcb2ba12ce8481503543afd18ad99805d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=369749dcb2ba12ce848150354…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Mon Feb 12 16:47:56 2007 +0800 comctl32: Make ImageList_Read and ImageList_Write compatible with each other, simplify the code. --- dlls/comctl32/imagelist.c | 200 ++++++++++++++++++++++----------------------- 1 files changed, 97 insertions(+), 103 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=369749dcb2ba12ce84815…
1
0
0
0
Mike McCormack : msi: Store dll based custom actions in a separate list.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 63e554994a8c6cabf13751d0e1f0f686fcd61bd3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=63e554994a8c6cabf13751d0e…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Mon Feb 12 11:31:41 2007 +0900 msi: Store dll based custom actions in a separate list. --- dlls/msi/custom.c | 179 +++++++++++++++++++++++++++++---------------------- dlls/msi/msipriv.h | 1 + dlls/msi/package.c | 1 + 3 files changed, 104 insertions(+), 77 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 4cb21fd..cca77b6 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -59,6 +59,7 @@ static UINT HANDLE_CustomType50(MSIPACKA static UINT HANDLE_CustomType34(MSIPACKAGE *package, LPCWSTR source, LPCWSTR target, const INT type, LPCWSTR action); +typedef UINT (WINAPI *MsiCustomActionEntryPoint)( MSIHANDLE ); static BOOL check_execution_scheduling_options(MSIPACKAGE *package, LPCWSTR action, UINT options) { @@ -396,125 +397,143 @@ static UINT wait_process_handle(MSIPACKA return rc; } -static UINT wait_thread_handle(MSIPACKAGE* package, UINT type, - HANDLE ThreadHandle, LPCWSTR name) +typedef struct _msi_custom_action_info { + struct list entry; + MSIPACKAGE *package; + LPWSTR dllname; + LPWSTR function; + HANDLE handle; + LPWSTR action; + INT type; +} msi_custom_action_info; + +static void free_custom_action_data( msi_custom_action_info *info ) +{ + list_remove( &info->entry ); + if (info->handle) + CloseHandle( info->handle ); + msi_free( info->action ); + msi_free( info->dllname ); + msi_free( info->function ); + msiobj_release( &info->package->hdr ); + msi_free( info ); +} + +static UINT wait_thread_handle( msi_custom_action_info *info ) { UINT rc = ERROR_SUCCESS; - if (!(type & msidbCustomActionTypeAsync)) + if (!(info->type & msidbCustomActionTypeAsync)) { - TRACE("waiting for %s\n", debugstr_w(name)); + TRACE("waiting for %s\n", debugstr_w( info->action )); - msi_dialog_check_messages(ThreadHandle); + msi_dialog_check_messages( info->handle ); - if (!(type & msidbCustomActionTypeContinue)) - rc = custom_get_thread_return(ThreadHandle); + if (!(info->type & msidbCustomActionTypeContinue)) + rc = custom_get_thread_return( info->handle ); - CloseHandle(ThreadHandle); + free_custom_action_data( info ); } else { - TRACE("%s running in background\n", debugstr_w(name)); + TRACE("%s running in background\n", debugstr_w( info->action )); - if (!(type & msidbCustomActionTypeContinue)) - file_running_action(package, ThreadHandle, FALSE, name); - else - CloseHandle(ThreadHandle); + if (info->type & msidbCustomActionTypeContinue) + free_custom_action_data( info ); } return rc; } -typedef UINT __stdcall CustomEntry(MSIHANDLE); - -typedef struct -{ - MSIPACKAGE *package; - WCHAR *target; - WCHAR *source; -} thread_struct; - -static DWORD WINAPI ACTION_CallDllFunction(thread_struct *stuff) +static DWORD WINAPI ACTION_CallDllFunction( msi_custom_action_info *info ) { + MsiCustomActionEntryPoint fn; + MSIHANDLE hPackage; HANDLE hModule; LPSTR proc; - CustomEntry *fn; - DWORD rc = ERROR_SUCCESS; + UINT r = ERROR_FUNCTION_FAILED; - TRACE("calling function (%s, %s)\n", debugstr_w(stuff->source), - debugstr_w(stuff->target)); + TRACE("%s %s\n", debugstr_w( info->dllname ), debugstr_w( info->function ) ); - hModule = LoadLibraryW(stuff->source); - if (hModule) + hModule = LoadLibraryW( info->dllname ); + if (!hModule) { - proc = strdupWtoA( stuff->target ); - fn = (CustomEntry*)GetProcAddress(hModule,proc); - if (fn) - { - MSIHANDLE hPackage; - MSIPACKAGE *package = stuff->package; + ERR("failed to load dll %s\n", debugstr_w( info->dllname ) ); + return r; + } - TRACE("Calling function %s\n", proc); - hPackage = alloc_msihandle( &package->hdr ); - if (hPackage) - { - rc = fn( hPackage ); - MsiCloseHandle( hPackage ); - } - else - ERR("Handle for object %p not found\n", package ); + proc = strdupWtoA( info->function ); + fn = (MsiCustomActionEntryPoint) GetProcAddress( hModule, proc ); + msi_free( proc ); + if (fn) + { + hPackage = alloc_msihandle( &info->package->hdr ); + if (hPackage) + { + TRACE("calling %s\n", debugstr_w( info->function ) ); + r = fn( hPackage ); + MsiCloseHandle( hPackage ); } else - ERR("failed to resolve functon %s\n", debugstr_a(proc)); - - msi_free(proc); - FreeLibrary(hModule); + ERR("failed to create handle for %p\n", info->package ); } else - ERR("failed to load dll %s\n", debugstr_w(stuff->source)); - msiobj_release( &stuff->package->hdr ); - msi_free(stuff->source); - msi_free(stuff->target); - msi_free(stuff); - return rc; + ERR("GetProcAddress(%s) failed\n", debugstr_w( info->function ) ); + + FreeLibrary(hModule); + + return r; } -static DWORD WINAPI DllThread(LPVOID info) +static DWORD WINAPI DllThread( LPVOID arg ) { - thread_struct *stuff; + msi_custom_action_info *info = arg; DWORD rc = 0; - TRACE("MSI Thread (%x) started for custom action\n", GetCurrentThreadId()); + TRACE("custom action (%x) started\n", GetCurrentThreadId() ); - stuff = (thread_struct*)info; - rc = ACTION_CallDllFunction(stuff); + rc = ACTION_CallDllFunction( info ); + + TRACE("custom action (%x) returned %i\n", GetCurrentThreadId(), rc ); - TRACE("MSI Thread (%x) finished (rc %i)\n",GetCurrentThreadId(), rc); - /* close all handles for this thread */ MsiCloseAllHandles(); return rc; } -static HANDLE do_msidbCustomActionTypeDll(MSIPACKAGE *package, LPCWSTR dll, LPCWSTR target) +static msi_custom_action_info *do_msidbCustomActionTypeDll( + MSIPACKAGE *package, INT type, LPCWSTR dllname, LPCWSTR function, LPCWSTR action ) { - thread_struct *info; + msi_custom_action_info *info; + + info = msi_alloc( sizeof *info ); + if (!info) + return NULL; - info = msi_alloc( sizeof(*info) ); msiobj_addref( &package->hdr ); info->package = package; - info->target = strdupW(target); - info->source = strdupW(dll); + info->type = type; + info->function = strdupW( function ); + info->dllname = strdupW( dllname ); + info->action = strdupW( action ); + list_add_tail( &package->pending_custom_actions, &info->entry ); + + info->handle = CreateThread( NULL, 0, DllThread, info, 0, NULL ); + if (!info->handle) + { + free_custom_action_data( info ); + return NULL; + } - return CreateThread(NULL, 0, DllThread, info, 0, NULL); + return info; } static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source, LPCWSTR target, const INT type, LPCWSTR action) { + msi_custom_action_info *info; WCHAR tmp_file[MAX_PATH]; - UINT r = ERROR_SUCCESS; - HANDLE ThreadHandle; + UINT r; r = store_binary_to_temp(package, source, tmp_file); if (r != ERROR_SUCCESS) @@ -529,11 +548,9 @@ static UINT HANDLE_CustomType1(MSIPACKAG strcatW(tmp_file,dot); } - ThreadHandle = do_msidbCustomActionTypeDll( package, tmp_file, target ); - - r = wait_thread_handle( package, type, ThreadHandle, action ); + info = do_msidbCustomActionTypeDll( package, type, tmp_file, target, action ); - return r; + return wait_thread_handle( info ); } static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source, @@ -594,7 +611,7 @@ static UINT HANDLE_CustomType2(MSIPACKAG static UINT HANDLE_CustomType17(MSIPACKAGE *package, LPCWSTR source, LPCWSTR target, const INT type, LPCWSTR action) { - HANDLE hThread; + msi_custom_action_info *info; MSIFILE *file; TRACE("%s %s\n", debugstr_w(source), debugstr_w(target)); @@ -606,9 +623,9 @@ static UINT HANDLE_CustomType17(MSIPACKA return ERROR_FUNCTION_FAILED; } - hThread = do_msidbCustomActionTypeDll( package, file->TargetPath, target ); + info = do_msidbCustomActionTypeDll( package, type, file->TargetPath, target, action ); - return wait_thread_handle(package, type, hThread, action); + return wait_thread_handle( info ); } static UINT HANDLE_CustomType18(MSIPACKAGE *package, LPCWSTR source, @@ -735,7 +752,6 @@ static UINT HANDLE_CustomType50(MSIPACKA rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, c_collen, &si, &info); - if ( !rc ) { ERR("Unable to execute command %s\n", debugstr_w(cmd)); @@ -806,4 +822,13 @@ void ACTION_FinishCustomActions(MSIPACKA msi_free( action->name ); msi_free( action ); } + + while ((item = list_head( &package->pending_custom_actions ))) + { + msi_custom_action_info *info; + + info = LIST_ENTRY( item, msi_custom_action_info, entry ); + msi_dialog_check_messages( info->handle ); + free_custom_action_data( info ); + } } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index b01bb27..09a3e55 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -230,6 +230,7 @@ typedef struct tagMSIPACKAGE struct tagMSISCRIPT *script; struct list RunningActions; + struct list pending_custom_actions; LPWSTR BaseURL; LPWSTR PackagePath; diff --git a/dlls/msi/package.c b/dlls/msi/package.c index b78910d..f0163c4 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -490,6 +490,7 @@ static MSIPACKAGE *msi_alloc_package( vo list_init( &package->extensions ); list_init( &package->progids ); list_init( &package->RunningActions ); + list_init( &package->pending_custom_actions ); for (i=0; i<PROPERTY_HASH_SIZE; i++) list_init( &package->props[i] );
1
0
0
0
Mike McCormack : msi: Simplify ACTION_FinishCustomActions.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 5927015726907075b2f0da30edd358ded3150377 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5927015726907075b2f0da30e…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Mon Feb 12 11:30:43 2007 +0900 msi: Simplify ACTION_FinishCustomActions. --- dlls/msi/custom.c | 20 ++++---------------- 1 files changed, 4 insertions(+), 16 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index fd6bae6..4cb21fd 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -789,30 +789,18 @@ static UINT HANDLE_CustomType34(MSIPACKA return wait_process_handle(package, type, info.hProcess, action); } - void ACTION_FinishCustomActions(MSIPACKAGE* package) { - struct list *item, *cursor; - DWORD rc; + struct list *item; - LIST_FOR_EACH_SAFE( item, cursor, &package->RunningActions ) + while ((item = list_head( &package->RunningActions ))) { MSIRUNNINGACTION *action = LIST_ENTRY( item, MSIRUNNINGACTION, entry ); - TRACE("Checking on action %s\n", debugstr_w(action->name)); - list_remove( &action->entry ); - if (action->process) - GetExitCodeProcess( action->handle, &rc ); - else - GetExitCodeThread( action->handle, &rc ); - - if (rc == STILL_ACTIVE) - { - TRACE("Waiting on action %s\n", debugstr_w( action->name) ); - msi_dialog_check_messages( action->handle ); - } + TRACE("waiting for %s\n", debugstr_w( action->name ) ); + msi_dialog_check_messages( action->handle ); CloseHandle( action->handle ); msi_free( action->name );
1
0
0
0
Chris Robinson : wined3d: Properly round negative values in shader_glsl_mov .
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 5f1a1bbc848f7ef9f72770057bd452e99cd4b21c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f1a1bbc848f7ef9f72770057…
Author: Chris Robinson <chris.kcat(a)gmail.com> Date: Sat Feb 10 23:04:55 2007 -0800 wined3d: Properly round negative values in shader_glsl_mov. --- dlls/wined3d/glsl_shader.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 30d0e52..d95391e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -923,9 +923,9 @@ void shader_glsl_mov(SHADER_OPCODE_ARG* /* We need to *round* to the nearest int here. */ size_t mask_size = shader_glsl_get_write_mask_size(write_mask); if (mask_size > 1) { - shader_addline(buffer, "ivec%d(floor(%s + vec%d(0.5))));\n", mask_size, src0_param.param_str, mask_size); + shader_addline(buffer, "ivec%d(floor(abs(%s) + vec%d(0.5)) * sign(%s)));\n", mask_size, src0_param.param_str, mask_size, src0_param.param_str); } else { - shader_addline(buffer, "int(floor(%s + 0.5)));\n", src0_param.param_str); + shader_addline(buffer, "int(floor(abs(%s) + 0.5) * sign(%s)));\n", src0_param.param_str, src0_param.param_str); } } else { shader_addline(buffer, "%s);\n", src0_param.param_str);
1
0
0
0
Hans Leidekker : wordpad: Open .wri files in wordpad.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: f3425cfe413c5475f50c2ff6a6c049775a5f870d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f3425cfe413c5475f50c2ff6a…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Sat Feb 10 22:55:29 2007 +0100 wordpad: Open .wri files in wordpad. --- programs/wordpad/wordpad.c | 120 +++++++++++++++++++++++++++++++++++++++++++- tools/wine.inf | 3 + 2 files changed, 121 insertions(+), 2 deletions(-) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 9afcc5d..7269272 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -41,7 +41,8 @@ static const WCHAR wszRichEditClass[] = static const WCHAR wszMainWndClass[] = {'W','O','R','D','P','A','D','T','O','P',0}; static const WCHAR wszAppTitle[] = {'W','i','n','e',' ','W','o','r','d','p','a','d',0}; -static HWND hMainWnd = NULL; +static HWND hMainWnd; +static HWND hEditorWnd; static void AddButton(HWND hwndToolBar, int nImage, int nCommand) { @@ -71,9 +72,122 @@ static void AddSeparator(HWND hwndToolBa SendMessage(hwndToolBar, TB_ADDBUTTONS, 1, (LPARAM)&button); } +static LPSTR stream_buffer; +static LONG stream_buffer_size; + +static DWORD CALLBACK stream_in(DWORD_PTR cookie, LPBYTE buffer, LONG cb, LONG *pcb) +{ + LONG size = min(stream_buffer_size, cb); + + memcpy(buffer, stream_buffer, size); + stream_buffer_size -= size; + stream_buffer += size; + *pcb = size; + return 0; +} + +static void DoOpenFile(LPCWSTR szFileName) +{ + HANDLE hFile; + LPSTR pTemp; + DWORD size; + DWORD dwNumRead; + EDITSTREAM es; + + hFile = CreateFileW(szFileName, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile == INVALID_HANDLE_VALUE) + return; + + size = GetFileSize(hFile, NULL); + if (size == INVALID_FILE_SIZE) + { + CloseHandle(hFile); + return; + } + size++; + + pTemp = HeapAlloc(GetProcessHeap(), 0, size); + if (!pTemp) + { + CloseHandle(hFile); + return; + } + + if (!ReadFile(hFile, pTemp, size, &dwNumRead, NULL)) + { + CloseHandle(hFile); + HeapFree(GetProcessHeap(), 0, pTemp); + return; + } + CloseHandle(hFile); + pTemp[dwNumRead] = 0; + + memset(&es, 0, sizeof(es)); + es.pfnCallback = stream_in; + + stream_buffer = pTemp; + stream_buffer_size = size; + + SendMessage(hEditorWnd, EM_STREAMIN, SF_RTF, (LPARAM)&es); + HeapFree(GetProcessHeap(), 0, pTemp); + + SetFocus(hEditorWnd); +} + +static void HandleCommandLine(LPWSTR cmdline) +{ + WCHAR delimiter; + int opt_print = 0; + + /* skip white space */ + while (*cmdline == ' ') cmdline++; + + /* skip executable name */ + delimiter = (*cmdline == '"' ? '"' : ' '); + + if (*cmdline == delimiter) cmdline++; + while (*cmdline && *cmdline != delimiter) cmdline++; + if (*cmdline == delimiter) cmdline++; + + while (*cmdline == ' ' || *cmdline == '-' || *cmdline == '/') + { + WCHAR option; + + if (*cmdline++ == ' ') continue; + + option = *cmdline; + if (option) cmdline++; + while (*cmdline == ' ') cmdline++; + + switch (option) + { + case 'p': + case 'P': + opt_print = 1; + break; + } + } + + if (*cmdline) + { + /* file name is passed on the command line */ + if (cmdline[0] == '"') + { + cmdline++; + cmdline[lstrlenW(cmdline) - 1] = 0; + } + DoOpenFile(cmdline); + InvalidateRect(hMainWnd, NULL, FALSE); + } + + if (opt_print) + MessageBox(hMainWnd, "Printing not implemented", "WordPad", MB_OK); +} + static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam) { - HWND hEditorWnd, hToolBarWnd, hReBarWnd; + HWND hToolBarWnd, hReBarWnd; HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE); HANDLE hDLL; TBADDBITMAP ab; @@ -500,6 +614,8 @@ int CALLBACK WinMain(HINSTANCE hInstance CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, hInstance, NULL); ShowWindow(hMainWnd, SW_SHOWMAXIMIZED); + HandleCommandLine(GetCommandLineW()); + while(GetMessage(&msg,0,0,0)) { if (TranslateAccelerator(hMainWnd, hAccel, &msg)) diff --git a/tools/wine.inf b/tools/wine.inf index f5672a6..5e68a2a 100644 --- a/tools/wine.inf +++ b/tools/wine.inf @@ -99,6 +99,7 @@ HKCR,.msi,,2,"Msi.Package" HKCR,.tif,"Content Type",2,"image/tiff" HKCR,.tiff,"Content Type",2,"image/tiff" HKCR,.txt,,2,"txtfile" +HKCR,.wri,,2,"wrifile" HKCR,.wav,"Content Type",2,"audio/wav" HKCR,.xml,"Content Type",2,"text/xml" HKCR,.xsl,"Content Type",2,"text/xsl" @@ -123,6 +124,8 @@ HKCR,Msi.Package\shell\Repair\command,,2 HKCR,Msi.Package\shell\Uninstall\command,,2,"msiexec /x %1" HKCR,txtfile\shell\open\command,,2,"%11%\notepad.exe %1" HKCR,txtfile\shell\print\command,,2,"%11%\notepad.exe /p %1" +HKCR,wrifile\shell\open\command,,2,"%11%\wordpad.exe %1" +HKCR,wrifile\shell\print\command,,2,"%11%\wordpad.exe /p %1" HKCR,http\shell\open\command,,2,"winebrowser" HKCR,https\shell\open\command,,2,"winebrowser" HKCR,mailto\shell\open\command,,2,"winebrowser %1"
1
0
0
0
Eric Pouech : winedump: Removed a couple of unused elements out of struct symbol.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 17cb1c827d21858502b2476b9c0423869d52547c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17cb1c827d21858502b2476b9…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sat Feb 10 09:10:20 2007 +0100 winedump: Removed a couple of unused elements out of struct symbol. --- tools/winedump/winedump.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index 506ab99..2e15e24 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -94,8 +94,6 @@ typedef struct __parsed_symbol char arg_flag [MAX_FUNCTION_ARGS]; char *arg_text [MAX_FUNCTION_ARGS]; char *arg_name [MAX_FUNCTION_ARGS]; - unsigned int n_u_refs; - char *u_ref [MAX_FUNCTION_ARGS]; } parsed_symbol; /* FIXME: Replace with some hash such as GHashTable */
1
0
0
0
Eric Pouech : winedump: Simplify guid dumping.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: ae48ede907bcfa24f0ffb7539343d0dd0ec86e7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae48ede907bcfa24f0ffb7539…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sat Feb 10 09:10:13 2007 +0100 winedump: Simplify guid dumping. --- tools/winedump/debug.c | 4 +--- tools/winedump/dump.c | 32 ++++++++++++++++++-------------- tools/winedump/lnk.c | 15 +++++++-------- tools/winedump/pdb.c | 3 +-- tools/winedump/winedump.h | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tools/winedump/debug.c b/tools/winedump/debug.c index 278b547..4f26c2b 100644 --- a/tools/winedump/debug.c +++ b/tools/winedump/debug.c @@ -425,11 +425,9 @@ static void dump_codeview_headers(unsign if (memcmp(signature, "RSDS", 4) == 0) { const OMFSignatureRSDS* rsds_data; - char guid_str[40]; rsds_data = (const void *)cv_base; - printf(" Guid: %s\n", - guid_to_string(&rsds_data->guid, guid_str, sizeof(guid_str))); + printf(" Guid: %s\n", get_guid_str(&rsds_data->guid)); printf(" Dunno: %08X\n", rsds_data->unknown); printf(" Filename: %s\n", rsds_data->name); return; diff --git a/tools/winedump/dump.c b/tools/winedump/dump.c index 2ed838c..25ae22f 100644 --- a/tools/winedump/dump.c +++ b/tools/winedump/dump.c @@ -1,7 +1,7 @@ /* * File dumping utility * - * Copyright 2001,2005 Eric Pouech + * Copyright 2001,2007 Eric Pouech * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -96,13 +96,9 @@ const char *get_time_str(unsigned long _ const time_t t = (const time_t)_t; const char *str = ctime(&t); size_t len; - static char buf[128]; + char* buf; - if (!str) /* not valid time */ - { - strcpy(buf, "not valid time"); - return buf; - } + if (!str) return "not valid time"; len = strlen(str); /* FIXME: I don't get the same values from MS' pedump running under Wine... @@ -110,8 +106,12 @@ const char *get_time_str(unsigned long _ */ if (len && str[len-1] == '\n') len--; if (len >= sizeof(buf)) len = sizeof(buf) - 1; - memcpy( buf, str, len ); - buf[len] = 0; + buf = dump_want_n(len + 1); + if (buf) + { + memcpy( buf, str, len ); + buf[len] = 0; + } return buf; } @@ -200,12 +200,16 @@ const char* get_symbol_str(const char* s return ret; } -char* guid_to_string(const GUID* guid, char* str, size_t sz) +const char* get_guid_str(const GUID* guid) { - snprintf(str, sz, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], - guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); + char* str; + + str = dump_want_n(39); + if (str) + sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + guid->Data1, guid->Data2, guid->Data3, + guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], + guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); return str; } diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c index 91f109c..661e48d 100644 --- a/tools/winedump/lnk.c +++ b/tools/winedump/lnk.c @@ -279,14 +279,14 @@ static int dump_advertise_info(const cha printf("%s = %s\n", type, avt->bufA); if (avt->magic == 0xa0000006) { - char prod_str[40], comp_str[40], feat_str[40]; - const char *feat, *comp; + char comp_str[40]; + const char *feat, *comp, *prod_str, *feat_str; GUID guid; if (base85_to_guid(avt->bufA, &guid)) - guid_to_string( &guid, prod_str, sizeof(prod_str) ); + prod_str = get_guid_str( &guid ); else - strcpy( prod_str, "?" ); + prod_str = "?"; comp = &avt->bufA[20]; feat = strchr(comp,'>'); @@ -303,9 +303,9 @@ static int dump_advertise_info(const cha } if (feat && feat[0] == '>' && base85_to_guid( &feat[1], &guid )) - guid_to_string( &guid, feat_str, sizeof(feat_str) ); + feat_str = get_guid_str( &guid ); else - feat_str[0] = 0; + feat_str = ""; printf(" product: %s\n", prod_str); printf(" component: %s\n", comp_str ); @@ -332,7 +332,6 @@ enum FileSig get_kind_lnk(void) void lnk_dump(void) { const LINK_HEADER* hdr; - char guid[40]; offset = 0; hdr = fetch_block(); @@ -340,7 +339,7 @@ void lnk_dump(void) printf("Header\n"); printf("------\n\n"); printf("Size: %04x\n", hdr->dwSize); - printf("GUID: %s\n", guid_to_string(&hdr->MagicGuid, guid, sizeof(guid))); + printf("GUID: %s\n", get_guid_str(&hdr->MagicGuid)); printf("FileAttr: %08x\n", hdr->dwFileAttr); printf("FileLength: %08x\n", hdr->dwFileLength); diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c index bd71ede..c03967c 100644 --- a/tools/winedump/pdb.c +++ b/tools/winedump/pdb.c @@ -625,7 +625,6 @@ static void pdb_ds_dump(void) if (root) { const char* ptr; - char guid_str[40]; printf("Root:\n" "\tVersion: %u\n" @@ -636,7 +635,7 @@ static void pdb_ds_dump(void) root->Version, root->TimeDateStamp, root->Age, - guid_to_string(&root->guid, guid_str, sizeof(guid_str)), + get_guid_str(&root->guid), root->cbNames); for (ptr = &root->names[0]; ptr < &root->names[0] + root->cbNames; ptr += strlen(ptr) + 1) printf("\tString: %s\n", ptr); diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index 55406ab..506ab99 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -236,11 +236,11 @@ void dump_data( const unsigne const char* get_time_str( unsigned long ); unsigned int strlenW( const unsigned short *str ); void dump_unicode_str( const unsigned short *str, int len ); +const char* get_guid_str(const GUID* guid); const char* get_symbol_str(const char* symname); void dump_file_header(const IMAGE_FILE_HEADER *); void dump_optional_header(const IMAGE_OPTIONAL_HEADER32 *, UINT); void dump_section(const IMAGE_SECTION_HEADER *); -char* guid_to_string(const GUID* guid, char *str, size_t sz); enum FileSig get_kind_exec(void); void dos_dump( void );
1
0
0
0
Eric Pouech : winedump: Larger usage of symbol demangling while dumping.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 72c52d6d9e6b05302dfeee4a60121c412a3847e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72c52d6d9e6b05302dfeee4a6…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sat Feb 10 09:10:07 2007 +0100 winedump: Larger usage of symbol demangling while dumping. --- tools/winedump/dump.c | 69 +++++++++++++++++++++++++++++++++++++++++++++ tools/winedump/main.c | 14 ++------- tools/winedump/msc.c | 17 ++++++----- tools/winedump/pe.c | 23 +------------- tools/winedump/winedump.h | 1 + 5 files changed, 84 insertions(+), 40 deletions(-) diff --git a/tools/winedump/dump.c b/tools/winedump/dump.c index bdd9e93..2ed838c 100644 --- a/tools/winedump/dump.c +++ b/tools/winedump/dump.c @@ -78,6 +78,19 @@ void dump_data( const unsigned char *ptr printf( "\n" ); } +static char* dump_want_n(unsigned sz) +{ + static char buffer[4 * 1024]; + static unsigned idx; + char* ret; + + assert(sz < sizeof(buffer)); + if (idx + sz >= sizeof(buffer)) idx = 0; + ret = &buffer[idx]; + idx += sz; + return ret; +} + const char *get_time_str(unsigned long _t) { const time_t t = (const time_t)_t; @@ -131,6 +144,62 @@ void dump_unicode_str( const WCHAR *str, printf( "\"" ); } +const char* get_symbol_str(const char* symname) +{ + char* tmp; + const char* ret; + + if (!symname) return "(nil)"; + if (globals.do_demangle) + { + parsed_symbol symbol; + + symbol_init(&symbol, symname); + if (symbol_demangle(&symbol) == -1) + ret = symname; + else if (symbol.flags & SYM_DATA) + { + ret = tmp = dump_want_n(strlen(symbol.arg_text[0]) + 1); + if (tmp) strcpy(tmp, symbol.arg_text[0]); + } + else + { + unsigned int i, len, start = symbol.flags & SYM_THISCALL ? 1 : 0; + + len = strlen(symbol.return_text) + 3 /* ' __' */ + + strlen(symbol_get_call_convention(&symbol)) + 1 /* ' ' */+ + strlen(symbol.function_name) + 1 /* ')' */; + if (!symbol.argc || (symbol.argc == 1 && symbol.flags & SYM_THISCALL)) + len += 4 /* "void" */; + else for (i = start; i < symbol.argc; i++) + len += (i > start ? 2 /* ", " */ : 0 /* "" */) + strlen(symbol.arg_text[i]); + if (symbol.varargs) len += 5 /* ", ..." */; + len += 2; /* ")\0" */ + + ret = tmp = dump_want_n(len); + if (tmp) + { + sprintf(tmp, "%s __%s %s(", + symbol.return_text, + symbol_get_call_convention(&symbol), + symbol.function_name); + if (!symbol.argc || (symbol.argc == 1 && symbol.flags & SYM_THISCALL)) + strcat(tmp, "void"); + else for (i = start; i < symbol.argc; i++) + { + if (i > start) strcat(tmp, ", "); + strcat(tmp, symbol.arg_text[i]); + } + if (symbol.varargs) strcat(tmp, ", ..."); + strcat(tmp, ")"); + } + } + symbol_clear(&symbol); + } + else ret = symname; + return ret; +} + char* guid_to_string(const GUID* guid, char* str, size_t sz) { snprintf(str, sz, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", diff --git a/tools/winedump/main.c b/tools/winedump/main.c index 93cd074..2aba30a 100644 --- a/tools/winedump/main.c +++ b/tools/winedump/main.c @@ -407,19 +407,11 @@ int main (int argc, char *argv[]) switch (globals.mode) { case DMGL: - globals.uc_dll_name = ""; VERBOSE = 1; - symbol_init (&symbol, globals.input_name); - globals.input_module = ""; - if (symbol_demangle (&symbol) == -1) - fatal( "Symbol hasn't got a mangled name\n"); - if (symbol.flags & SYM_DATA) - printf (symbol.arg_text[0]); - else - output_prototype (stdout, &symbol); - fputc ('\n', stdout); - symbol_clear(&symbol); + if (globals.input_name == NULL) + fatal("No symbol name has been given\n"); + printf("%s\n", get_symbol_str(globals.input_name)); break; case SPEC: diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 91ad8c1..4ef3387 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -852,9 +852,9 @@ int codeview_dump_symbols(const void* ro */ case S_GDATA_V2: case S_LDATA_V2: - printf("\tS-%s-Data V2 '%s' %04x:%08x type:%08x\n", + printf("\tS-%s-Data V2 '%s' %04x:%08x type:%08x\n", sym->generic.id == S_GDATA_V2 ? "Global" : "Local", - p_string(&sym->data_v2.p_name), + get_symbol_str(p_string(&sym->data_v2.p_name)), sym->data_v2.segment, sym->data_v2.offset, sym->data_v2.symtype); break; @@ -863,14 +863,14 @@ int codeview_dump_symbols(const void* ro /* EPP case S_DATA_V3: */ printf("\tS-%s-Data V3 '%s' (%04x:%08x) type:%08x\n", sym->generic.id == S_GDATA_V3 ? "Global" : "Local", - sym->data_v3.name, - sym->data_v3.segment, sym->data_v3.offset, + get_symbol_str(sym->data_v3.name), + sym->data_v3.segment, sym->data_v3.offset, sym->data_v3.symtype); break; case S_PUB_V2: printf("\tS-Public V2 '%s' %04x:%08x type:%08x\n", - p_string(&sym->public_v2.p_name), + get_symbol_str(p_string(&sym->public_v2.p_name)), sym->public_v2.segment, sym->public_v2.offset, sym->public_v2.symtype); break; @@ -882,7 +882,7 @@ int codeview_dump_symbols(const void* ro printf("\tS-Public%s V3 '%s' %04x:%08x type:%08x\n", sym->generic.id == S_PUB_V3 ? "" : (sym->generic.id == S_PUB_FUNC1_V3 ? "<subkind1" : "<subkind2"), - sym->public_v3.name, + get_symbol_str(sym->public_v3.name), sym->public_v3.segment, sym->public_v3.offset, sym->public_v3.symtype); break; @@ -1127,8 +1127,9 @@ int codeview_dump_symbols(const void* ro int val, vlen; vlen = numeric_leaf(&val, &sym->constant_v2.cvalue); - printf("\tS-Constant V2 '%s' = %u type:%x\n", - p_string(PSTRING(&sym->constant_v2.cvalue, vlen)), val, sym->constant_v2.type); + printf("\tS-Constant V2 '%s' = %u type:%x\n", + p_string(PSTRING(&sym->constant_v2.cvalue, vlen)), + val, sym->constant_v2.type); } break; diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index cbebba9..887a119 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -470,7 +470,6 @@ static void dump_dir_exported_functions( const DWORD* pName; const WORD* pOrdl; DWORD* map; - parsed_symbol symbol; if (!exportDir) return; @@ -503,28 +502,10 @@ static void dump_dir_exported_functions( for (i = 0; i < exportDir->NumberOfNames; i++, pName++, pOrdl++) { - const char* name; - map[*pOrdl / 32] |= 1 << (*pOrdl % 32); - name = (const char*)RVA(*pName, sizeof(DWORD)); - if (name && globals.do_demangle) - { - printf(" %08X %4u ", pFunc[*pOrdl], exportDir->Base + *pOrdl); - - symbol_init(&symbol, name); - if (symbol_demangle(&symbol) == -1) - printf(name); - else if (symbol.flags & SYM_DATA) - printf(symbol.arg_text[0]); - else - output_prototype(stdout, &symbol); - symbol_clear(&symbol); - } - else - { - printf(" %08X %4u %s", pFunc[*pOrdl], exportDir->Base + *pOrdl, name); - } + printf(" %08X %4u %s", pFunc[*pOrdl], exportDir->Base + *pOrdl, + get_symbol_str((const char*)RVA(*pName, sizeof(DWORD)))); /* check for forwarded function */ if ((const char *)RVA(pFunc[*pOrdl],sizeof(void*)) >= (const char *)exportDir && (const char *)RVA(pFunc[*pOrdl],sizeof(void*)) < (const char *)exportDir + size) diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index d6c1507..55406ab 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -236,6 +236,7 @@ void dump_data( const unsigne const char* get_time_str( unsigned long ); unsigned int strlenW( const unsigned short *str ); void dump_unicode_str( const unsigned short *str, int len ); +const char* get_symbol_str(const char* symname); void dump_file_header(const IMAGE_FILE_HEADER *); void dump_optional_header(const IMAGE_OPTIONAL_HEADER32 *, UINT); void dump_section(const IMAGE_SECTION_HEADER *);
1
0
0
0
Eric Pouech : winedbg: Support for debugging child processes.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: b795f8735dd367316ba5aa075da153b38a48cd70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b795f8735dd367316ba5aa075…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sat Feb 10 10:48:52 2007 +0100 winedbg: Support for debugging child processes. Added internal flag (AlsoDebugProcChild) to let winedbg debug both parent and child (in the same WineDbg session). --- programs/winedbg/debug.l | 2 +- programs/winedbg/debugger.h | 1 + programs/winedbg/intvar.h | 3 +++ programs/winedbg/tgt_active.c | 10 ++++++---- programs/winedbg/winedbg.c | 10 ++++++++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l index 9613fed..6be0f4c 100644 --- a/programs/winedbg/debug.l +++ b/programs/winedbg/debug.l @@ -95,7 +95,7 @@ STRING \"[^\n"]+\" %x NOPROCESS %% /* set to special state when no process is loaded. */ - if (!dbg_curr_process && YYSTATE == INITIAL) {BEGIN(NOPROCESS);} + if (!dbg_num_processes() && YYSTATE == INITIAL) {BEGIN(NOPROCESS);} <<EOF>> { return tEOF; } <*>\n { BEGIN(INITIAL); syntax_error = 0; return tEOL; } diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h index 0317247..3ad2bd3 100644 --- a/programs/winedbg/debugger.h +++ b/programs/winedbg/debugger.h @@ -421,6 +421,7 @@ extern int dbg_printf(const char #endif extern const struct dbg_internal_var* dbg_get_internal_var(const char*); extern BOOL dbg_interrupt_debuggee(void); +extern unsigned dbg_num_processes(void); extern struct dbg_process* dbg_add_process(const struct be_process_io* pio, DWORD pid, HANDLE h); extern void dbg_set_process_name(struct dbg_process* p, const char* name); extern struct dbg_process* dbg_get_process(DWORD pid); diff --git a/programs/winedbg/intvar.h b/programs/winedbg/intvar.h index 1864211..a9c335e 100644 --- a/programs/winedbg/intvar.h +++ b/programs/winedbg/intvar.h @@ -33,3 +33,6 @@ INTERNAL_VAR(ProcessId, FALSE, &dbg_c /* symbol manipulation */ INTERNAL_VAR(AlwaysShowThunks, FALSE, NULL, dbg_itype_unsigned_int) + + /* process manipulation */ +INTERNAL_VAR(AlsoDebugProcChild, FALSE, NULL, dbg_itype_unsigned_int) diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c index d7b744f..8730f41 100644 --- a/programs/winedbg/tgt_active.c +++ b/programs/winedbg/tgt_active.c @@ -664,7 +664,7 @@ static void wait_exception(void) { DEBUG_EVENT de; - while (dbg_curr_process && WaitForDebugEvent(&de, INFINITE)) + while (dbg_num_processes() && WaitForDebugEvent(&de, INFINITE)) { if (dbg_handle_debug_event(&de)) break; } @@ -704,6 +704,7 @@ static unsigned dbg_start_debuggee(LPSTR { PROCESS_INFORMATION info; STARTUPINFOA startup; + DWORD flags; memset(&startup, 0, sizeof(startup)); startup.cb = sizeof(startup); @@ -713,9 +714,10 @@ static unsigned dbg_start_debuggee(LPSTR /* FIXME: shouldn't need the CREATE_NEW_CONSOLE, but as usual CUI:s need it * while GUI:s don't */ - if (!CreateProcess(NULL, cmdLine, NULL, NULL, - FALSE, - DEBUG_PROCESS|DEBUG_ONLY_THIS_PROCESS|CREATE_NEW_CONSOLE, + flags = DEBUG_PROCESS | CREATE_NEW_CONSOLE; + if (!DBG_IVAR(AlsoDebugProcChild)) flags |= DEBUG_ONLY_THIS_PROCESS; + + if (!CreateProcess(NULL, cmdLine, NULL, NULL, FALSE, flags, NULL, NULL, &startup, &info)) { dbg_printf("Couldn't start process '%s'\n", cmdLine); diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c index 6b60386..f3e9c78 100644 --- a/programs/winedbg/winedbg.c +++ b/programs/winedbg/winedbg.c @@ -242,6 +242,16 @@ const struct dbg_internal_var* dbg_get_i return NULL; } +unsigned dbg_num_processes(void) +{ + struct dbg_process* p; + unsigned num = 0; + + for (p = dbg_process_list; p; p = p->next) + num++; + return num; +} + struct dbg_process* dbg_get_process(DWORD pid) { struct dbg_process* p;
1
0
0
0
Eric Pouech : winedbg: Correctly handle invalid read conditions.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 6cf2734574532408decadca3348249b4faaecb41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6cf2734574532408decadca33…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sat Feb 10 10:48:25 2007 +0100 winedbg: Correctly handle invalid read conditions. --- programs/winedbg/memory.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c index b51257e..d417610 100644 --- a/programs/winedbg/memory.c +++ b/programs/winedbg/memory.c @@ -82,7 +82,7 @@ static void memory_report_invalid_addr(c address.Offset = (unsigned long)addr; dbg_printf("*** Invalid address "); print_address(&address, FALSE); - dbg_printf("\n"); + dbg_printf(" ***\n"); } /*********************************************************************** @@ -108,7 +108,7 @@ BOOL memory_read_value(const struct dbg_ ret = TRUE; } } - return TRUE; + return ret; } /***********************************************************************
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
84
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
Results per page:
10
25
50
100
200