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
3c04958b
Commit
3c04958b
authored
Mar 23, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Mar 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlLookupFunctionEntry on ARM.
parent
df7f4fb7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
2 deletions
+71
-2
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-1
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
signal_arm.c
dlls/ntdll/signal_arm.c
+68
-0
winnt.h
include/winnt.h
+1
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
3c04958b
...
...
@@ -1034,7 +1034,7 @@
@ stdcall -arch=x86_64 RtlCompareMemory(ptr ptr long) ntdll.RtlCompareMemory
@ cdecl -arch=arm,x86_64 RtlDeleteFunctionTable(ptr) ntdll.RtlDeleteFunctionTable
@ stdcall RtlFillMemory(ptr long long) ntdll.RtlFillMemory
@ stdcall -arch=x86_64 RtlLookupFunctionEntry(long ptr ptr) ntdll.RtlLookupFunctionEntry
@ stdcall -arch=
arm,
x86_64 RtlLookupFunctionEntry(long ptr ptr) ntdll.RtlLookupFunctionEntry
@ stdcall RtlMoveMemory(ptr ptr long) ntdll.RtlMoveMemory
@ stdcall -arch=x86_64,arm RtlPcToFileHeader(ptr ptr) ntdll.RtlPcToFileHeader
@ stdcall -arch=arm -register RtlRaiseException(ptr) ntdll.RtlRaiseException
...
...
dlls/ntdll/ntdll.spec
View file @
3c04958b
...
...
@@ -738,7 +738,7 @@
@ stdcall RtlLookupAtomInAtomTable(ptr wstr ptr)
@ stub RtlLookupElementGenericTable
# @ stub RtlLookupElementGenericTableAvl
@ stdcall -arch=x86_64 RtlLookupFunctionEntry(long ptr ptr)
@ stdcall -arch=
arm,
x86_64 RtlLookupFunctionEntry(long ptr ptr)
@ stdcall RtlMakeSelfRelativeSD(ptr ptr ptr)
@ stdcall RtlMapGenericMask(long ptr)
# @ stub RtlMapSecurityErrorToNtStatus
...
...
dlls/ntdll/signal_arm.c
View file @
3c04958b
...
...
@@ -47,6 +47,8 @@
# include <sys/signal.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
...
...
@@ -100,6 +102,15 @@ typedef int (*wine_signal_handler)(unsigned int sig);
static
wine_signal_handler
handlers
[
256
];
struct
UNWIND_INFO
{
WORD
function_length
;
WORD
unknown1
:
7
;
WORD
count
:
5
;
WORD
unknown2
:
4
;
};
/***********************************************************************
* dispatch_signal
*/
...
...
@@ -933,6 +944,63 @@ BOOLEAN CDECL RtlDeleteFunctionTable( RUNTIME_FUNCTION *table )
return
TRUE
;
}
/**********************************************************************
* find_function_info
*/
static
RUNTIME_FUNCTION
*
find_function_info
(
ULONG_PTR
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
;
DWORD
begin
=
(
func
[
pos
].
BeginAddress
&
~
1
),
end
;
if
(
func
[
pos
].
u
.
s
.
Flag
)
end
=
begin
+
func
[
pos
].
u
.
s
.
FunctionLength
*
2
;
else
{
struct
UNWIND_INFO
*
info
;
info
=
(
struct
UNWIND_INFO
*
)((
char
*
)
module
+
func
[
pos
].
u
.
UnwindData
);
end
=
begin
+
info
->
function_length
*
2
;
}
if
((
char
*
)
pc
<
(
char
*
)
module
+
begin
)
max
=
pos
-
1
;
else
if
((
char
*
)
pc
>=
(
char
*
)
module
+
end
)
min
=
pos
+
1
;
else
return
func
+
pos
;
}
return
NULL
;
}
/**********************************************************************
* RtlLookupFunctionEntry (NTDLL.@)
*/
PRUNTIME_FUNCTION
WINAPI
RtlLookupFunctionEntry
(
ULONG_PTR
pc
,
DWORD
*
base
,
UNWIND_HISTORY_TABLE
*
table
)
{
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
=
(
DWORD
)
module
->
BaseAddress
;
return
func
;
}
/***********************************************************************
* RtlUnwind (NTDLL.@)
*/
...
...
include/winnt.h
View file @
3c04958b
...
...
@@ -1710,6 +1710,7 @@ typedef struct _CONTEXT {
BOOLEAN
CDECL
RtlAddFunctionTable
(
RUNTIME_FUNCTION
*
,
DWORD
,
DWORD
);
BOOLEAN
CDECL
RtlDeleteFunctionTable
(
RUNTIME_FUNCTION
*
);
PRUNTIME_FUNCTION
WINAPI
RtlLookupFunctionEntry
(
ULONG_PTR
,
DWORD
*
,
UNWIND_HISTORY_TABLE
*
);
#endif
/* __arm__ */
...
...
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