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
9fb20dda
Commit
9fb20dda
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 GetModuleByOffset().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d337e7a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
dbgeng.c
dlls/dbgeng/dbgeng.c
+23
-2
dbgeng.c
dlls/dbgeng/tests/dbgeng.c
+21
-1
No files found.
dlls/dbgeng/dbgeng.c
View file @
9fb20dda
...
...
@@ -1053,9 +1053,30 @@ static HRESULT STDMETHODCALLTYPE debugsymbols_GetModuleByModuleName(IDebugSymbol
static
HRESULT
STDMETHODCALLTYPE
debugsymbols_GetModuleByOffset
(
IDebugSymbols3
*
iface
,
ULONG64
offset
,
ULONG
start_index
,
ULONG
*
index
,
ULONG64
*
base
)
{
FIXME
(
"%p, %s, %u, %p, %p stub.
\n
"
,
iface
,
wine_dbgstr_longlong
(
offset
),
start_index
,
index
,
base
);
struct
debug_client
*
debug_client
=
impl_from_IDebugSymbols3
(
iface
);
static
struct
target_process
*
target
;
const
struct
module_info
*
info
;
return
E_NOTIMPL
;
TRACE
(
"%p, %s, %u, %p, %p.
\n
"
,
iface
,
wine_dbgstr_longlong
(
offset
),
start_index
,
index
,
base
);
if
(
!
(
target
=
debug_client_get_target
(
debug_client
)))
return
E_UNEXPECTED
;
while
((
info
=
debug_target_get_module_info
(
target
,
start_index
)))
{
if
(
offset
>=
info
->
params
.
Base
&&
offset
<
info
->
params
.
Base
+
info
->
params
.
Size
)
{
if
(
index
)
*
index
=
start_index
;
if
(
base
)
*
base
=
info
->
params
.
Base
;
return
S_OK
;
}
start_index
++
;
}
return
E_INVALIDARG
;
}
static
HRESULT
STDMETHODCALLTYPE
debugsymbols_GetModuleNames
(
IDebugSymbols3
*
iface
,
ULONG
index
,
ULONG64
base
,
...
...
dlls/dbgeng/tests/dbgeng.c
View file @
9fb20dda
...
...
@@ -322,8 +322,8 @@ todo_wine
static
void
test_module_information
(
void
)
{
static
const
char
*
event_name
=
"dbgeng_test_event"
;
unsigned
int
loaded
,
unloaded
,
index
;
DEBUG_MODULE_PARAMETERS
params
[
2
];
unsigned
int
loaded
,
unloaded
;
PROCESS_INFORMATION
info
;
IDebugSymbols
*
symbols
;
IDebugControl
*
control
;
...
...
@@ -372,7 +372,27 @@ static void test_module_information(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#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
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
base
,
0
,
&
index
,
&
base
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#x.
\n
"
,
hr
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
base
,
0
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to get module, hr %#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
);
hr
=
symbols
->
lpVtbl
->
GetModuleByOffset
(
symbols
,
base
,
loaded
,
NULL
,
NULL
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
/* Parameters. */
base
=
0
;
hr
=
symbols
->
lpVtbl
->
GetModuleByIndex
(
symbols
,
0
,
&
base
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#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
(
params
[
0
].
Base
==
base
,
"Unexpected module base.
\n
"
);
...
...
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