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
bf97b03d
Commit
bf97b03d
authored
Mar 20, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Implemented SymFunctionTableAccess.
parent
2ed8b9f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
18 deletions
+58
-18
cpu_i386.c
dlls/dbghelp/cpu_i386.c
+1
-0
cpu_ppc.c
dlls/dbghelp/cpu_ppc.c
+1
-0
cpu_x86_64.c
dlls/dbghelp/cpu_x86_64.c
+30
-0
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+3
-0
module.c
dlls/dbghelp/module.c
+23
-0
symbol.c
dlls/dbghelp/symbol.c
+0
-18
No files found.
dlls/dbghelp/cpu_i386.c
View file @
bf97b03d
...
...
@@ -409,4 +409,5 @@ struct cpu cpu_i386 = {
4
,
i386_get_addr
,
i386_stack_walk
,
NULL
,
};
dlls/dbghelp/cpu_ppc.c
View file @
bf97b03d
...
...
@@ -59,4 +59,5 @@ struct cpu cpu_ppc = {
4
,
ppc_get_addr
,
ppc_stack_walk
,
NULL
,
};
dlls/dbghelp/cpu_x86_64.c
View file @
bf97b03d
...
...
@@ -124,9 +124,39 @@ done_err:
return
FALSE
;
}
static
void
*
x86_64_find_runtime_function
(
struct
module
*
module
,
DWORD64
addr
)
{
#ifdef __x86_64__
RUNTIME_FUNCTION
*
rtf
;
ULONG
size
;
int
min
,
max
;
rtf
=
(
RUNTIME_FUNCTION
*
)
pe_map_directory
(
module
,
IMAGE_DIRECTORY_ENTRY_EXCEPTION
,
&
size
);
if
(
rtf
)
for
(
min
=
0
,
max
=
size
/
sizeof
(
*
rtf
);
min
<=
max
;
)
{
int
pos
=
(
min
+
max
)
/
2
;
if
(
addr
<
module
->
module
.
BaseOfImage
+
rtf
[
pos
].
BeginAddress
)
max
=
pos
-
1
;
else
if
(
addr
>=
module
->
module
.
BaseOfImage
+
rtf
[
pos
].
EndAddress
)
min
=
pos
+
1
;
else
{
rtf
+=
pos
;
while
(
rtf
->
UnwindData
&
1
)
/* follow chained entry */
{
FIXME
(
"RunTime_Function outside IMAGE_DIRECTORY_ENTRY_EXCEPTION unimplemented yet!
\n
"
);
/* we need to read into the other process */
/* rtf = (RUNTIME_FUNCTION*)(module->module.BaseOfImage + (rtf->UnwindData & ~1)); */
}
return
rtf
;
}
}
#endif
return
NULL
;
}
struct
cpu
cpu_x86_64
=
{
IMAGE_FILE_MACHINE_AMD64
,
8
,
x86_64_get_addr
,
x86_64_stack_walk
,
x86_64_find_runtime_function
,
};
dlls/dbghelp/dbghelp_private.h
View file @
bf97b03d
...
...
@@ -475,6 +475,9 @@ struct cpu
/* stack manipulation */
BOOL
(
*
stack_walk
)(
struct
cpu_stack_walk
*
csw
,
LPSTACKFRAME64
frame
);
/* module manipulation */
void
*
(
*
find_runtime_function
)(
struct
module
*
,
DWORD64
addr
);
};
extern
struct
cpu
*
dbghelp_current_cpu
;
...
...
dlls/dbghelp/module.c
View file @
bf97b03d
...
...
@@ -1087,3 +1087,26 @@ BOOL WINAPI SymRefreshModuleList(HANDLE hProcess)
return
refresh_module_list
(
pcs
);
}
/***********************************************************************
* SymFunctionTableAccess (DBGHELP.@)
*/
PVOID
WINAPI
SymFunctionTableAccess
(
HANDLE
hProcess
,
DWORD
AddrBase
)
{
return
SymFunctionTableAccess64
(
hProcess
,
AddrBase
);
}
/***********************************************************************
* SymFunctionTableAccess64 (DBGHELP.@)
*/
PVOID
WINAPI
SymFunctionTableAccess64
(
HANDLE
hProcess
,
DWORD64
AddrBase
)
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
struct
module
*
module
;
if
(
!
pcs
||
!
dbghelp_current_cpu
->
find_runtime_function
)
return
NULL
;
module
=
module_find_by_addr
(
pcs
,
AddrBase
,
DMT_UNKNOWN
);
if
(
!
module
)
return
NULL
;
return
dbghelp_current_cpu
->
find_runtime_function
(
module
,
AddrBase
);
}
dlls/dbghelp/symbol.c
View file @
bf97b03d
...
...
@@ -1794,24 +1794,6 @@ BOOL WINAPI SymGetLineNext(HANDLE hProcess, PIMAGEHLP_LINE Line)
}
/***********************************************************************
* SymFunctionTableAccess (DBGHELP.@)
*/
PVOID
WINAPI
SymFunctionTableAccess
(
HANDLE
hProcess
,
DWORD
AddrBase
)
{
WARN
(
"(%p, 0x%08x): stub
\n
"
,
hProcess
,
AddrBase
);
return
NULL
;
}
/***********************************************************************
* SymFunctionTableAccess64 (DBGHELP.@)
*/
PVOID
WINAPI
SymFunctionTableAccess64
(
HANDLE
hProcess
,
DWORD64
AddrBase
)
{
WARN
(
"(%p, %s): stub
\n
"
,
hProcess
,
wine_dbgstr_longlong
(
AddrBase
));
return
NULL
;
}
/***********************************************************************
* SymUnDName (DBGHELP.@)
*/
BOOL
WINAPI
SymUnDName
(
PIMAGEHLP_SYMBOL
sym
,
PSTR
UnDecName
,
DWORD
UnDecNameLength
)
...
...
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