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
d337e7a6
Commit
d337e7a6
authored
Apr 22, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbgeng: Implement GetModuleParameters().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d33180ae
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
3 deletions
+83
-3
dbgeng.c
dlls/dbgeng/dbgeng.c
+52
-3
dbgeng.c
dlls/dbgeng/tests/dbgeng.c
+29
-0
dbgeng.h
include/dbgeng.h
+2
-0
No files found.
dlls/dbgeng/dbgeng.c
View file @
d337e7a6
...
...
@@ -144,6 +144,22 @@ static const struct module_info *debug_target_get_module_info(struct target_proc
return
&
target
->
modules
.
info
[
i
];
}
static
const
struct
module_info
*
debug_target_get_module_info_by_base
(
struct
target_process
*
target
,
ULONG64
base
)
{
unsigned
int
i
;
if
(
FAILED
(
debug_target_init_modules_info
(
target
)))
return
NULL
;
for
(
i
=
0
;
i
<
target
->
modules
.
loaded
;
++
i
)
{
if
(
target
->
modules
.
info
[
i
].
params
.
Base
==
base
)
return
&
target
->
modules
.
info
[
i
];
}
return
NULL
;
}
static
void
debug_client_detach_target
(
struct
target_process
*
target
)
{
NTSTATUS
status
;
...
...
@@ -1055,11 +1071,44 @@ static HRESULT STDMETHODCALLTYPE debugsymbols_GetModuleNames(IDebugSymbols3 *ifa
}
static
HRESULT
STDMETHODCALLTYPE
debugsymbols_GetModuleParameters
(
IDebugSymbols3
*
iface
,
ULONG
count
,
ULONG64
*
bases
,
ULONG
start
,
DEBUG_MODULE_PARAMETERS
*
param
eter
s
)
ULONG
start
,
DEBUG_MODULE_PARAMETERS
*
params
)
{
FIXME
(
"%p, %u, %p, %u, %p stub.
\n
"
,
iface
,
count
,
bases
,
start
,
parameters
);
struct
debug_client
*
debug_client
=
impl_from_IDebugSymbols3
(
iface
);
const
struct
module_info
*
info
;
struct
target_process
*
target
;
unsigned
int
i
;
return
E_NOTIMPL
;
TRACE
(
"%p, %u, %p, %u, %p.
\n
"
,
iface
,
count
,
bases
,
start
,
params
);
if
(
!
(
target
=
debug_client_get_target
(
debug_client
)))
return
E_UNEXPECTED
;
if
(
bases
)
{
for
(
i
=
0
;
i
<
count
;
++
i
)
{
if
((
info
=
debug_target_get_module_info_by_base
(
target
,
bases
[
i
])))
{
params
[
i
]
=
info
->
params
;
}
else
{
memset
(
&
params
[
i
],
0
,
sizeof
(
*
params
));
params
[
i
].
Base
=
DEBUG_INVALID_OFFSET
;
}
}
}
else
{
for
(
i
=
start
;
i
<
start
+
count
;
++
i
)
{
if
(
!
(
info
=
debug_target_get_module_info
(
target
,
i
)))
return
E_INVALIDARG
;
params
[
i
]
=
info
->
params
;
}
}
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
debugsymbols_GetSymbolModule
(
IDebugSymbols3
*
iface
,
const
char
*
symbol
,
ULONG64
*
base
)
...
...
dlls/dbgeng/tests/dbgeng.c
View file @
d337e7a6
...
...
@@ -322,11 +322,13 @@ todo_wine
static
void
test_module_information
(
void
)
{
static
const
char
*
event_name
=
"dbgeng_test_event"
;
DEBUG_MODULE_PARAMETERS
params
[
2
];
unsigned
int
loaded
,
unloaded
;
PROCESS_INFORMATION
info
;
IDebugSymbols
*
symbols
;
IDebugControl
*
control
;
IDebugClient
*
client
;
ULONG64
bases
[
2
];
ULONG64
base
;
HANDLE
event
;
HRESULT
hr
;
...
...
@@ -370,6 +372,33 @@ static void test_module_information(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!!
base
,
"Unexpected module base.
\n
"
);
/* Parameters. */
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
1
,
NULL
,
0
,
params
);
ok
(
hr
==
S_OK
,
"Failed to get module parameters, hr %#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
(
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
(
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
);
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
);
hr
=
symbols
->
lpVtbl
->
GetModuleParameters
(
symbols
,
1
,
NULL
,
loaded
,
params
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
client
->
lpVtbl
->
DetachProcesses
(
client
);
ok
(
hr
==
S_OK
,
"Failed to detach, hr %#x.
\n
"
,
hr
);
...
...
include/dbgeng.h
View file @
d337e7a6
...
...
@@ -162,6 +162,8 @@ DEFINE_GUID(IID_IDebugSystemObjects3, 0xe9676e2f, 0xe286, 0x4ea3, 0xb0, 0xf9
#define DEBUG_CDS_REFRESH_INLINESTEP 16
#define DEBUG_CDS_REFRESH_INLINESTEP_PSEUDO 17
#define DEBUG_INVALID_OFFSET ((ULONG64)-1)
typedef
struct
_DEBUG_MODULE_PARAMETERS
{
ULONG64
Base
;
...
...
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