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
7634ce15
Commit
7634ce15
authored
May 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implemented RtlLookupFunctionEntry for x86_64.
parent
bced77fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
4 deletions
+46
-4
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+46
-4
No files found.
dlls/ntdll/signal_x86_64.c
View file @
7634ce15
...
...
@@ -620,6 +620,31 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
/**********************************************************************
* find_function_info
*/
static
RUNTIME_FUNCTION
*
find_function_info
(
ULONG64
pc
,
HMODULE
module
,
RUNTIME_FUNCTION
*
func
,
ULONG
size
)
{
int
min
=
0
;
int
max
=
size
/
sizeof
(
*
func
)
-
1
;
while
(
min
<=
max
)
{
int
pos
=
(
min
+
max
)
/
2
;
if
((
char
*
)
pc
<
(
char
*
)
module
+
func
[
pos
].
BeginAddress
)
max
=
pos
-
1
;
else
if
((
char
*
)
pc
>=
(
char
*
)
module
+
func
[
pos
].
EndAddress
)
min
=
pos
+
1
;
else
{
func
+=
pos
;
while
(
func
->
UnwindData
&
1
)
/* follow chained entry */
func
=
(
RUNTIME_FUNCTION
*
)((
char
*
)
module
+
(
func
->
UnwindData
&
~
1
));
return
func
;
}
}
return
NULL
;
}
/**********************************************************************
* call_stack_handlers
*
* Call the stack handlers chain.
...
...
@@ -1019,11 +1044,28 @@ void signal_init_process(void)
/**********************************************************************
* RtlLookupFunctionEntry (NTDLL.@)
*/
PRUNTIME_FUNCTION
WINAPI
RtlLookupFunctionEntry
(
ULONG64
pc
,
ULONG64
*
base
,
UNWIND_HISTORY_TABLE
*
table
)
PRUNTIME_FUNCTION
WINAPI
RtlLookupFunctionEntry
(
ULONG64
pc
,
ULONG64
*
base
,
UNWIND_HISTORY_TABLE
*
table
)
{
FIXME
(
"stub
\n
"
);
return
NULL
;
LDR_MODULE
*
module
;
RUNTIME_FUNCTION
*
func
;
ULONG
size
;
/* FIXME: should use the history table to make things faster */
if
(
LdrFindEntryForAddress
(
(
void
*
)
pc
,
&
module
))
{
WARN
(
"module not found for %lx
\n
"
,
pc
);
return
NULL
;
}
if
(
!
(
func
=
RtlImageDirectoryEntryToData
(
module
->
BaseAddress
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_EXCEPTION
,
&
size
)))
{
WARN
(
"no exception table found in module %p pc %lx
\n
"
,
module
->
BaseAddress
,
pc
);
return
NULL
;
}
func
=
find_function_info
(
pc
,
module
->
BaseAddress
,
func
,
size
);
if
(
func
)
*
base
=
(
ULONG64
)
module
->
BaseAddress
;
return
func
;
}
static
ULONG64
get_int_reg
(
CONTEXT
*
context
,
int
reg
)
...
...
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