Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a37dec0c
Commit
a37dec0c
authored
Jun 08, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the main exe name in the CREATE_PROCESS debug event.
parent
06bf0176
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
18 deletions
+30
-18
module.h
include/module.h
+1
-1
server.h
include/server.h
+2
-1
builtin32.c
relay32/builtin32.c
+1
-3
process.c
scheduler/process.c
+23
-12
debugger.c
server/debugger.c
+1
-1
process.c
server/process.c
+1
-0
trace.c
server/trace.c
+1
-0
No files found.
include/module.h
View file @
a37dec0c
...
...
@@ -228,7 +228,7 @@ HGLOBAL16 NE_LoadPEResource( NE_MODULE *pModule, WORD type, LPVOID bits, DWORD s
/* relay32/builtin.c */
extern
WINE_MODREF
*
BUILTIN32_LoadLibraryExA
(
LPCSTR
name
,
DWORD
flags
);
extern
HMODULE
BUILTIN32_LoadExeModule
(
LPCSTR
*
filename
);
extern
HMODULE
BUILTIN32_LoadExeModule
(
void
);
extern
void
BUILTIN32_UnloadLibrary
(
WINE_MODREF
*
wm
);
extern
void
*
BUILTIN32_dlopen
(
const
char
*
name
);
extern
int
BUILTIN32_dlclose
(
void
*
handle
);
...
...
include/server.h
View file @
a37dec0c
...
...
@@ -170,6 +170,7 @@ struct init_process_done_request
{
IN
void
*
module
;
/* main module base address */
IN
void
*
entry
;
/* process entry point */
IN
void
*
name
;
/* ptr to ptr to name (in process addr space) */
IN
int
gui
;
/* is it a GUI process? */
OUT
int
debugged
;
/* being debugged? */
};
...
...
@@ -1297,7 +1298,7 @@ enum request
REQ_NB_REQUESTS
};
#define SERVER_PROTOCOL_VERSION 1
4
#define SERVER_PROTOCOL_VERSION 1
5
/* ### make_requests end ### */
/* Everything above this line is generated automatically by tools/make_requests */
...
...
relay32/builtin32.c
View file @
a37dec0c
...
...
@@ -389,7 +389,7 @@ WINE_MODREF *BUILTIN32_LoadLibraryExA(LPCSTR path, DWORD flags)
/***********************************************************************
* BUILTIN32_LoadExeModule
*/
HMODULE
BUILTIN32_LoadExeModule
(
LPCSTR
*
filename
)
HMODULE
BUILTIN32_LoadExeModule
(
void
)
{
int
i
,
exe
=
-
1
;
...
...
@@ -416,8 +416,6 @@ HMODULE BUILTIN32_LoadExeModule( LPCSTR *filename )
if
(
!
dll_modules
[
exe
]
)
if
(
!
(
dll_modules
[
exe
]
=
BUILTIN32_DoLoadImage
(
builtin_dlls
[
exe
]
))
)
return
0
;
*
filename
=
builtin_dlls
[
exe
]
->
filename
;
return
dll_modules
[
exe
];
}
...
...
scheduler/process.c
View file @
a37dec0c
...
...
@@ -338,6 +338,7 @@ static void start_process(void)
/* Signal the parent process to continue */
req
->
module
=
(
void
*
)
module
;
req
->
entry
=
entry
;
req
->
name
=
&
pdb
->
exe_modref
->
filename
;
req
->
gui
=
!
console_app
;
server_call
(
REQ_INIT_PROCESS_DONE
);
debugged
=
req
->
debugged
;
...
...
@@ -386,25 +387,38 @@ static void start_process(void)
* PROCESS_Start
*
* Startup routine of a new Win32 process once the main module has been loaded.
* The filename is free'd by this routine.
*/
static
void
PROCESS_Start
(
HMODULE
main_module
,
LP
C
STR
filename
)
WINE_NORETURN
;
static
void
PROCESS_Start
(
HMODULE
main_module
,
LP
C
STR
filename
)
static
void
PROCESS_Start
(
HMODULE
main_module
,
LPSTR
filename
)
WINE_NORETURN
;
static
void
PROCESS_Start
(
HMODULE
main_module
,
LPSTR
filename
)
{
if
(
!
filename
)
{
/* if no explicit filename, use argv[0] */
if
(
!
(
filename
=
malloc
(
MAX_PATH
)))
ExitProcess
(
1
);
if
(
!
GetFullPathNameA
(
argv0
,
MAX_PATH
,
filename
,
NULL
))
lstrcpynA
(
filename
,
argv0
,
MAX_PATH
);
}
/* load main module */
if
(
PE_HEADER
(
main_module
)
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DLL
)
ExitProcess
(
ERROR_BAD_EXE_FORMAT
);
/* Create 32-bit MODREF */
if
(
!
PE_CreateModule
(
main_module
,
filename
,
0
,
FALSE
))
ExitProcess
(
GetLastError
()
);
goto
error
;
free
(
filename
);
/* allocate main thread stack */
if
(
!
THREAD_InitStack
(
NtCurrentTeb
(),
PE_HEADER
(
main_module
)
->
OptionalHeader
.
SizeOfStackReserve
,
TRUE
))
ExitProcess
(
GetLastError
()
)
;
goto
error
;
/* switch to the new stack */
SYSDEPS_SwitchToThreadStack
(
start_process
);
error:
ExitProcess
(
GetLastError
()
);
}
...
...
@@ -469,13 +483,12 @@ void PROCESS_InitWine( int argc, char *argv[] )
case
SCS_WOW_BINARY
:
{
HMODULE
main_module
;
LPCSTR
filename
;
/* create 32-bit module for main exe */
if
(
!
(
main_module
=
BUILTIN32_LoadExeModule
(
&
filename
)))
goto
error
;
if
(
!
(
main_module
=
BUILTIN32_LoadExeModule
()))
goto
error
;
NtCurrentTeb
()
->
tibflags
&=
~
TEBF_WIN32
;
PROCESS_Current
()
->
flags
|=
PDB32_WIN16_PROC
;
SYSLEVEL_EnterWin16Lock
();
PROCESS_Start
(
main_module
,
filename
);
PROCESS_Start
(
main_module
,
NULL
);
}
break
;
...
...
@@ -505,16 +518,14 @@ void PROCESS_InitWine( int argc, char *argv[] )
void
PROCESS_InitWinelib
(
int
argc
,
char
*
argv
[]
)
{
HMODULE
main_module
;
LPCSTR
filename
;
if
(
!
MAIN_MainInit
(
argv
))
exit
(
1
);
main_exe_argv
=
argv
;
/* create 32-bit module for main exe */
if
(
!
(
main_module
=
BUILTIN32_LoadExeModule
(
&
filename
)))
ExitProcess
(
GetLastError
()
);
if
(
!
(
main_module
=
BUILTIN32_LoadExeModule
()))
ExitProcess
(
GetLastError
()
);
PROCESS_Start
(
main_module
,
filename
);
main_exe_argv
=
argv
;
PROCESS_Start
(
main_module
,
NULL
);
}
...
...
server/debugger.c
View file @
a37dec0c
...
...
@@ -140,7 +140,7 @@ static int fill_create_process_event( struct debug_event *event, void *arg )
event
->
data
.
info
.
create_process
.
start
=
arg
;
event
->
data
.
info
.
create_process
.
dbg_offset
=
process
->
exe
.
dbg_offset
;
event
->
data
.
info
.
create_process
.
dbg_size
=
process
->
exe
.
dbg_size
;
event
->
data
.
info
.
create_process
.
name
=
0
;
event
->
data
.
info
.
create_process
.
name
=
process
->
exe
.
name
;
event
->
data
.
info
.
create_process
.
unicode
=
0
;
return
1
;
}
...
...
server/process.c
View file @
a37dec0c
...
...
@@ -817,6 +817,7 @@ DECL_HANDLER(init_process_done)
return
;
}
process
->
exe
.
base
=
req
->
module
;
process
->
exe
.
name
=
req
->
name
;
generate_startup_debug_events
(
current
->
process
,
req
->
entry
);
set_event
(
process
->
init_event
);
release_object
(
process
->
init_event
);
...
...
server/trace.c
View file @
a37dec0c
...
...
@@ -285,6 +285,7 @@ static void dump_init_process_done_request( const struct init_process_done_reque
{
fprintf
(
stderr
,
" module=%p,"
,
req
->
module
);
fprintf
(
stderr
,
" entry=%p,"
,
req
->
entry
);
fprintf
(
stderr
,
" name=%p,"
,
req
->
name
);
fprintf
(
stderr
,
" gui=%d"
,
req
->
gui
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment