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
6c80346d
Commit
6c80346d
authored
Feb 09, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbgeng/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5a446236
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
69 deletions
+68
-69
Makefile.in
dlls/dbgeng/tests/Makefile.in
+0
-1
dbgeng.c
dlls/dbgeng/tests/dbgeng.c
+68
-68
No files found.
dlls/dbgeng/tests/Makefile.in
View file @
6c80346d
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
dbgeng.dll
IMPORTS
=
dbgeng
...
...
dlls/dbgeng/tests/dbgeng.c
View file @
6c80346d
...
...
@@ -35,67 +35,67 @@ static void test_engine_options(void)
HRESULT
hr
;
hr
=
DebugCreate
(
&
IID_IDebugControl
,
(
void
**
)
&
control
);
ok
(
hr
==
S_OK
,
"Failed to create engine object, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create engine object, hr %#
l
x.
\n
"
,
hr
);
options
=
0xf
;
hr
=
control
->
lpVtbl
->
GetEngineOptions
(
control
,
&
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#x.
\n
"
,
hr
);
ok
(
options
==
0
,
"Unexpected options %#x.
\n
"
,
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#
l
x.
\n
"
,
hr
);
ok
(
options
==
0
,
"Unexpected options %#
l
x.
\n
"
,
options
);
hr
=
control
->
lpVtbl
->
AddEngineOptions
(
control
,
DEBUG_ENGOPT_INITIAL_BREAK
);
ok
(
hr
==
S_OK
,
"Failed to add engine options, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to add engine options, hr %#
l
x.
\n
"
,
hr
);
options
=
0
;
hr
=
control
->
lpVtbl
->
GetEngineOptions
(
control
,
&
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#x.
\n
"
,
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#
l
x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#
l
x.
\n
"
,
options
);
hr
=
control
->
lpVtbl
->
AddEngineOptions
(
control
,
0x01000000
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
options
=
0
;
hr
=
control
->
lpVtbl
->
GetEngineOptions
(
control
,
&
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#x.
\n
"
,
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#
l
x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#
l
x.
\n
"
,
options
);
hr
=
control
->
lpVtbl
->
RemoveEngineOptions
(
control
,
0x01000000
);
ok
(
hr
==
S_OK
,
"Failed to remove options, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to remove options, hr %#
l
x.
\n
"
,
hr
);
hr
=
control
->
lpVtbl
->
AddEngineOptions
(
control
,
DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION
);
ok
(
hr
==
S_OK
,
"Failed to add engine options, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to add engine options, hr %#
l
x.
\n
"
,
hr
);
options
=
0
;
hr
=
control
->
lpVtbl
->
GetEngineOptions
(
control
,
&
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#
l
x.
\n
"
,
hr
);
ok
(
options
==
(
DEBUG_ENGOPT_INITIAL_BREAK
|
DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION
),
"Unexpected options %#x.
\n
"
,
options
);
"Unexpected options %#
l
x.
\n
"
,
options
);
hr
=
control
->
lpVtbl
->
RemoveEngineOptions
(
control
,
DEBUG_ENGOPT_INITIAL_BREAK
);
ok
(
hr
==
S_OK
,
"Failed to remove options, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to remove options, hr %#
l
x.
\n
"
,
hr
);
options
=
0
;
hr
=
control
->
lpVtbl
->
GetEngineOptions
(
control
,
&
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION
,
"Unexpected options %#x.
\n
"
,
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#
l
x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION
,
"Unexpected options %#
l
x.
\n
"
,
options
);
hr
=
control
->
lpVtbl
->
SetEngineOptions
(
control
,
DEBUG_ENGOPT_INITIAL_BREAK
);
ok
(
hr
==
S_OK
,
"Failed to set options, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to set options, hr %#
l
x.
\n
"
,
hr
);
options
=
0
;
hr
=
control
->
lpVtbl
->
GetEngineOptions
(
control
,
&
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#x.
\n
"
,
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#
l
x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#
l
x.
\n
"
,
options
);
hr
=
control
->
lpVtbl
->
SetEngineOptions
(
control
,
0x01000000
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
hr
=
control
->
lpVtbl
->
SetEngineOptions
(
control
,
0x01000000
|
DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
options
=
0
;
hr
=
control
->
lpVtbl
->
GetEngineOptions
(
control
,
&
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#x.
\n
"
,
options
);
ok
(
hr
==
S_OK
,
"Failed to get engine options, hr %#
l
x.
\n
"
,
hr
);
ok
(
options
==
DEBUG_ENGOPT_INITIAL_BREAK
,
"Unexpected options %#
l
x.
\n
"
,
options
);
control
->
lpVtbl
->
Release
(
control
);
}
...
...
@@ -264,13 +264,13 @@ static void test_attach(void)
BOOL
ret
;
hr
=
DebugCreate
(
&
IID_IDebugClient
,
(
void
**
)
&
client
);
ok
(
hr
==
S_OK
,
"Failed to create engine object, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create engine object, hr %#
l
x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
QueryInterface
(
client
,
&
IID_IDebugControl
,
(
void
**
)
&
control
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#
l
x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
SetEventCallbacks
(
client
,
&
event_callbacks
);
ok
(
hr
==
S_OK
,
"Failed to set event callbacks, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to set event callbacks, hr %#
l
x.
\n
"
,
hr
);
event
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
event_name
);
ok
(
event
!=
NULL
,
"Failed to create event.
\n
"
);
...
...
@@ -284,7 +284,7 @@ static void test_attach(void)
/* Non-invasive mode. */
hr
=
client
->
lpVtbl
->
AttachProcess
(
client
,
0
,
info
.
dwProcessId
,
DEBUG_ATTACH_NONINVASIVE
);
ok
(
hr
==
S_OK
,
"Failed to attach to process, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to attach to process, hr %#
l
x.
\n
"
,
hr
);
is_debugged
=
TRUE
;
ret
=
CheckRemoteDebuggerPresent
(
info
.
hProcess
,
&
is_debugged
);
...
...
@@ -292,7 +292,7 @@ static void test_attach(void)
ok
(
!
is_debugged
,
"Unexpected mode.
\n
"
);
hr
=
control
->
lpVtbl
->
WaitForEvent
(
control
,
0
,
INFINITE
);
ok
(
hr
==
S_OK
,
"Waiting for event failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Waiting for event failed, hr %#
l
x.
\n
"
,
hr
);
is_debugged
=
TRUE
;
ret
=
CheckRemoteDebuggerPresent
(
info
.
hProcess
,
&
is_debugged
);
...
...
@@ -300,11 +300,11 @@ static void test_attach(void)
ok
(
!
is_debugged
,
"Unexpected mode.
\n
"
);
hr
=
client
->
lpVtbl
->
DetachProcesses
(
client
);
ok
(
hr
==
S_OK
,
"Failed to detach, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to detach, hr %#
l
x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
EndSession
(
client
,
DEBUG_END_ACTIVE_DETACH
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to end session, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to end session, hr %#
l
x.
\n
"
,
hr
);
SetEvent
(
event
);
...
...
@@ -322,7 +322,7 @@ static void test_attach(void)
static
void
test_module_information
(
void
)
{
static
const
char
*
event_name
=
"dbgeng_test_event"
;
unsigned
int
loaded
,
unloaded
,
index
,
length
;
ULONG
loaded
,
unloaded
,
index
,
length
;
DEBUG_MODULE_PARAMETERS
params
[
2
];
IDebugDataSpaces
*
dataspaces
;
PROCESS_INFORMATION
info
;
...
...
@@ -336,19 +336,19 @@ static void test_module_information(void)
BOOL
ret
;
hr
=
DebugCreate
(
&
IID_IDebugClient
,
(
void
**
)
&
client
);
ok
(
hr
==
S_OK
,
"Failed to create engine object, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create engine object, hr %#
l
x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
QueryInterface
(
client
,
&
IID_IDebugControl
,
(
void
**
)
&
control
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#
l
x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
QueryInterface
(
client
,
&
IID_IDebugSymbols2
,
(
void
**
)
&
symbols
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#
l
x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
QueryInterface
(
client
,
&
IID_IDebugDataSpaces
,
(
void
**
)
&
dataspaces
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#
l
x.
\n
"
,
hr
);
hr
=
control
->
lpVtbl
->
IsPointer64Bit
(
control
);
ok
(
hr
==
E_UNEXPECTED
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_UNEXPECTED
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
event
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
event_name
);
ok
(
event
!=
NULL
,
"Failed to create event.
\n
"
);
...
...
@@ -357,120 +357,120 @@ static void test_module_information(void)
ok
(
ret
,
"Failed to create target process.
\n
"
);
hr
=
control
->
lpVtbl
->
SetEngineOptions
(
control
,
DEBUG_ENGOPT_INITIAL_BREAK
);
ok
(
hr
==
S_OK
,
"Failed to set engine options, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to set engine options, hr %#
l
x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
AttachProcess
(
client
,
0
,
info
.
dwProcessId
,
DEBUG_ATTACH_NONINVASIVE
);
ok
(
hr
==
S_OK
,
"Failed to attach to process, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to attach to process, hr %#
l
x.
\n
"
,
hr
);
hr
=
control
->
lpVtbl
->
IsPointer64Bit
(
control
);
ok
(
hr
==
E_UNEXPECTED
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_UNEXPECTED
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
hr
=
control
->
lpVtbl
->
WaitForEvent
(
control
,
0
,
INFINITE
);
ok
(
hr
==
S_OK
,
"Waiting for event failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Waiting for event failed, hr %#
l
x.
\n
"
,
hr
);
hr
=
control
->
lpVtbl
->
IsPointer64Bit
(
control
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get pointer length, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get pointer length, hr %#
l
x.
\n
"
,
hr
);
/* Number of modules. */
hr
=
symbols
->
lpVtbl
->
GetNumberModules
(
symbols
,
&
loaded
,
&
unloaded
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
loaded
>
0
,
"Unexpected module count %u.
\n
"
,
loaded
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
ok
(
loaded
>
0
,
"Unexpected module count %
l
u.
\n
"
,
loaded
);
/* Module base. */
hr
=
symbols
->
lpVtbl
->
GetModuleByIndex
(
symbols
,
loaded
,
&
base
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#
l
x.
\n
"
,
hr
);
base
=
0
;
hr
=
symbols
->
lpVtbl
->
GetModuleByIndex
(
symbols
,
0
,
&
base
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
ok
(
!!
base
,
"Unexpected module base.
\n
"
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
0
,
0
,
&
index
,
&
base
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#
l
x.
\n
"
,
hr
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
base
,
0
,
&
index
,
&
base
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#
l
x.
\n
"
,
hr
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
base
,
0
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#
l
x.
\n
"
,
hr
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
base
+
1
,
0
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#
l
x.
\n
"
,
hr
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
base
,
loaded
,
NULL
,
NULL
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#
l
x.
\n
"
,
hr
);
/* Parameters. */
base
=
0
;
hr
=
symbols
->
lpVtbl
->
GetModuleByIndex
(
symbols
,
0
,
&
base
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
ok
(
!!
base
,
"Unexpected module base.
\n
"
);
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
1
,
NULL
,
0
,
params
);
ok
(
hr
==
S_OK
,
"Failed to get module parameters, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get module parameters, hr %#
l
x.
\n
"
,
hr
);
ok
(
params
[
0
].
Base
==
base
,
"Unexpected module base.
\n
"
);
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
1
,
&
base
,
100
,
params
);
ok
(
hr
==
S_OK
,
"Failed to get module parameters, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get module parameters, hr %#
l
x.
\n
"
,
hr
);
ok
(
params
[
0
].
Base
==
base
,
"Unexpected module base.
\n
"
);
bases
[
0
]
=
base
+
1
;
bases
[
1
]
=
base
;
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
2
,
bases
,
0
,
params
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* XP */
,
"Failed to get module parameters, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* XP */
,
"Failed to get module parameters, hr %#
l
x.
\n
"
,
hr
);
ok
(
params
[
0
].
Base
==
DEBUG_INVALID_OFFSET
,
"Unexpected module base.
\n
"
);
ok
(
params
[
0
].
Size
==
0
,
"Unexpected module size.
\n
"
);
ok
(
params
[
1
].
Base
==
base
,
"Unexpected module base.
\n
"
);
ok
(
params
[
1
].
Size
!=
0
,
"Unexpected module size.
\n
"
);
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
1
,
bases
,
0
,
params
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* XP */
,
"Failed to get module parameters, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* XP */
,
"Failed to get module parameters, hr %#
l
x.
\n
"
,
hr
);
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
1
,
bases
,
loaded
,
params
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* XP */
,
"Failed to get module parameters, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* XP */
,
"Failed to get module parameters, hr %#
l
x.
\n
"
,
hr
);
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
1
,
NULL
,
loaded
,
params
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#
l
x.
\n
"
,
hr
);
/* Image name. */
hr
=
symbols
->
lpVtbl
->
GetModuleNameString
(
symbols
,
DEBUG_MODNAME_IMAGE
,
0
,
0
,
buffer
,
sizeof
(
buffer
),
&
length
);
ok
(
hr
==
S_OK
,
"Failed to get image name, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get image name, hr %#
l
x.
\n
"
,
hr
);
ok
(
strlen
(
buffer
)
+
1
==
length
,
"Unexpected length.
\n
"
);
hr
=
symbols
->
lpVtbl
->
GetModuleNameString
(
symbols
,
DEBUG_MODNAME_IMAGE
,
0
,
0
,
NULL
,
sizeof
(
buffer
),
&
length
);
ok
(
hr
==
S_OK
,
"Failed to get image name, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get image name, hr %#
l
x.
\n
"
,
hr
);
ok
(
length
>
0
,
"Unexpected length.
\n
"
);
hr
=
symbols
->
lpVtbl
->
GetModuleNameString
(
symbols
,
DEBUG_MODNAME_IMAGE
,
DEBUG_ANY_ID
,
base
,
buffer
,
sizeof
(
buffer
),
&
length
);
ok
(
hr
==
S_OK
,
"Failed to get image name, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get image name, hr %#
l
x.
\n
"
,
hr
);
ok
(
strlen
(
buffer
)
+
1
==
length
,
"Unexpected length.
\n
"
);
hr
=
symbols
->
lpVtbl
->
GetModuleNameString
(
symbols
,
DEBUG_MODNAME_IMAGE
,
0
,
0
,
buffer
,
length
-
1
,
&
length
);
ok
(
hr
==
S_FALSE
,
"Failed to get image name, hr %#x.
\n
"
,
hr
);
ok
(
strlen
(
buffer
)
+
2
==
length
,
"Unexpected length %u.
\n
"
,
length
);
ok
(
hr
==
S_FALSE
,
"Failed to get image name, hr %#
l
x.
\n
"
,
hr
);
ok
(
strlen
(
buffer
)
+
2
==
length
,
"Unexpected length %
l
u.
\n
"
,
length
);
hr
=
symbols
->
lpVtbl
->
GetModuleNameString
(
symbols
,
DEBUG_MODNAME_IMAGE
,
0
,
0
,
NULL
,
length
-
1
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Failed to get image name, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Failed to get image name, hr %#
l
x.
\n
"
,
hr
);
/* Read memory. */
base
=
0
;
hr
=
symbols
->
lpVtbl
->
GetModuleByIndex
(
symbols
,
0
,
&
base
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#
l
x.
\n
"
,
hr
);
ok
(
!!
base
,
"Unexpected module base.
\n
"
);
hr
=
dataspaces
->
lpVtbl
->
ReadVirtual
(
dataspaces
,
base
,
buffer
,
sizeof
(
buffer
),
&
length
);
ok
(
hr
==
S_OK
,
"Failed to read process memory, hr %#x.
\n
"
,
hr
);
ok
(
length
==
sizeof
(
buffer
),
"Unexpected length %u.
\n
"
,
length
);
ok
(
hr
==
S_OK
,
"Failed to read process memory, hr %#
l
x.
\n
"
,
hr
);
ok
(
length
==
sizeof
(
buffer
),
"Unexpected length %
l
u.
\n
"
,
length
);
ok
(
buffer
[
0
]
==
'M'
&&
buffer
[
1
]
==
'Z'
,
"Unexpected contents.
\n
"
);
memset
(
buffer
,
0
,
sizeof
(
buffer
));
hr
=
dataspaces
->
lpVtbl
->
ReadVirtual
(
dataspaces
,
base
,
buffer
,
sizeof
(
buffer
),
NULL
);
ok
(
hr
==
S_OK
,
"Failed to read process memory, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to read process memory, hr %#
l
x.
\n
"
,
hr
);
ok
(
buffer
[
0
]
==
'M'
&&
buffer
[
1
]
==
'Z'
,
"Unexpected contents.
\n
"
);
hr
=
client
->
lpVtbl
->
DetachProcesses
(
client
);
ok
(
hr
==
S_OK
,
"Failed to detach, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to detach, hr %#
l
x.
\n
"
,
hr
);
SetEvent
(
event
);
wait_child_process
(
info
.
hProcess
);
...
...
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