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
4a80e63a
Commit
4a80e63a
authored
May 10, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
May 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Implemented SymRegisterCallbackW64 and 64 -> 64W mapping function.
parent
2e7d3c38
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
8 deletions
+84
-8
dbghelp.c
dlls/dbghelp/dbghelp.c
+69
-7
dbghelp.spec
dlls/dbghelp/dbghelp.spec
+1
-1
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-0
dbghelp.h
include/dbghelp.h
+13
-0
No files found.
dlls/dbghelp/dbghelp.c
View file @
4a80e63a
...
...
@@ -479,10 +479,64 @@ static BOOL CALLBACK reg_cb64to32(HANDLE hProcess, ULONG action, ULONG64 data, U
BOOL
pcs_callback
(
const
struct
process
*
pcs
,
ULONG
action
,
void
*
data
)
{
TRACE
(
"%p %lu %p
\n
"
,
pcs
,
action
,
data
);
if
(
!
pcs
->
reg_cb
)
return
FALSE
;
if
(
pcs
->
reg_is_unicode
)
{
IMAGEHLP_DEFERRED_SYMBOL_LOAD64
*
idsl
;
IMAGEHLP_DEFERRED_SYMBOL_LOADW64
idslW
;
switch
(
action
)
{
case
CBA_DEBUG_INFO
:
case
CBA_DEFERRED_SYMBOL_LOAD_CANCEL
:
case
CBA_SET_OPTIONS
:
case
CBA_SYMBOLS_UNLOADED
:
break
;
case
CBA_DEFERRED_SYMBOL_LOAD_COMPLETE
:
case
CBA_DEFERRED_SYMBOL_LOAD_FAILURE
:
case
CBA_DEFERRED_SYMBOL_LOAD_PARTIAL
:
case
CBA_DEFERRED_SYMBOL_LOAD_START
:
idsl
=
(
IMAGEHLP_DEFERRED_SYMBOL_LOAD64
*
)(
DWORD
)
data
;
idslW
.
SizeOfStruct
=
sizeof
(
idslW
);
idslW
.
BaseOfImage
=
idsl
->
BaseOfImage
;
idslW
.
CheckSum
=
idsl
->
CheckSum
;
idslW
.
TimeDateStamp
=
idsl
->
TimeDateStamp
;
MultiByteToWideChar
(
CP_ACP
,
0
,
idsl
->
FileName
,
-
1
,
idslW
.
FileName
,
sizeof
(
idslW
.
FileName
)
/
sizeof
(
WCHAR
));
idslW
.
Reparse
=
idsl
->
Reparse
;
data
=
&
idslW
;
break
;
case
CBA_DUPLICATE_SYMBOL
:
case
CBA_EVENT
:
case
CBA_READ_MEMORY
:
default:
FIXME
(
"No mapping for action %lu
\n
"
,
action
);
return
FALSE
;
}
}
return
pcs
->
reg_cb
(
pcs
->
handle
,
action
,
(
ULONG64
)(
DWORD_PTR
)
data
,
pcs
->
reg_user
);
}
/******************************************************************
* sym_register_cb
*
* Helper for registering a callback.
*/
static
BOOL
sym_register_cb
(
HANDLE
hProcess
,
PSYMBOL_REGISTERED_CALLBACK64
cb
,
DWORD64
user
,
BOOL
unicode
)
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
if
(
!
pcs
)
return
FALSE
;
pcs
->
reg_cb
=
cb
;
pcs
->
reg_is_unicode
=
unicode
;
pcs
->
reg_user
=
user
;
return
TRUE
;
}
/***********************************************************************
* SymRegisterCallback (DBGHELP.@)
*/
...
...
@@ -491,7 +545,9 @@ BOOL WINAPI SymRegisterCallback(HANDLE hProcess,
PVOID
UserContext
)
{
DWORD64
tmp
=
((
ULONGLONG
)(
DWORD
)
CallbackFunction
<<
32
)
|
(
DWORD
)
UserContext
;
return
SymRegisterCallback64
(
hProcess
,
reg_cb64to32
,
tmp
);
TRACE
(
"(%p, %p, %p)
\n
"
,
hProcess
,
CallbackFunction
,
UserContext
);
return
sym_register_cb
(
hProcess
,
reg_cb64to32
,
tmp
,
FALSE
);
}
/***********************************************************************
...
...
@@ -501,15 +557,21 @@ BOOL WINAPI SymRegisterCallback64(HANDLE hProcess,
PSYMBOL_REGISTERED_CALLBACK64
CallbackFunction
,
ULONG64
UserContext
)
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
TRACE
(
"(%p, %p, %s)
\n
"
,
hProcess
,
CallbackFunction
,
wine_dbgstr_longlong
(
UserContext
));
if
(
!
pcs
)
return
FALSE
;
pcs
->
reg_cb
=
CallbackFunction
;
pcs
->
reg_user
=
UserContext
;
return
sym_register_cb
(
hProcess
,
CallbackFunction
,
UserContext
,
FALSE
);
}
return
TRUE
;
/***********************************************************************
* SymRegisterCallbackW64 (DBGHELP.@)
*/
BOOL
WINAPI
SymRegisterCallbackW64
(
HANDLE
hProcess
,
PSYMBOL_REGISTERED_CALLBACK64
CallbackFunction
,
ULONG64
UserContext
)
{
TRACE
(
"(%p, %p, %s)
\n
"
,
hProcess
,
CallbackFunction
,
wine_dbgstr_longlong
(
UserContext
));
return
sym_register_cb
(
hProcess
,
CallbackFunction
,
UserContext
,
TRUE
);
}
/* This is imagehlp version not dbghelp !! */
...
...
dlls/dbghelp/dbghelp.spec
View file @
4a80e63a
...
...
@@ -130,7 +130,7 @@
@ stub SymRefreshModuleList
@ stdcall SymRegisterCallback(long ptr ptr)
@ stdcall SymRegisterCallback64(long ptr double)
@ st
ub SymRegisterCallbackW64
@ st
dcall SymRegisterCallbackW64(long ptr double)
@ stdcall SymRegisterFunctionEntryCallback(ptr ptr ptr)
@ stdcall SymRegisterFunctionEntryCallback64(ptr ptr double)
@ stdcall SymSearch(long double long long str double ptr ptr long)
...
...
dlls/dbghelp/dbghelp_private.h
View file @
4a80e63a
...
...
@@ -294,6 +294,7 @@ struct process
WCHAR
*
search_path
;
PSYMBOL_REGISTERED_CALLBACK64
reg_cb
;
BOOL
reg_is_unicode
;
DWORD64
reg_user
;
struct
module
*
lmodules
;
...
...
include/dbghelp.h
View file @
4a80e63a
...
...
@@ -287,6 +287,18 @@ typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
DWORD
Flags
;
}
IMAGEHLP_DEFERRED_SYMBOL_LOAD64
,
*
PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
;
typedef
struct
_IMAGEHLP_DEFERRED_SYMBOL_LOADW64
{
DWORD
SizeOfStruct
;
DWORD64
BaseOfImage
;
DWORD
CheckSum
;
DWORD
TimeDateStamp
;
WCHAR
FileName
[
MAX_PATH
+
1
];
BOOLEAN
Reparse
;
HANDLE
hFile
;
DWORD
Flags
;
}
IMAGEHLP_DEFERRED_SYMBOL_LOADW64
,
*
PIMAGEHLP_DEFERRED_SYMBOL_LOADW64
;
typedef
struct
_IMAGEHLP_DUPLICATE_SYMBOL
{
DWORD
SizeOfStruct
;
...
...
@@ -889,6 +901,7 @@ typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID
BOOL
WINAPI
SymRegisterCallback
(
HANDLE
,
PSYMBOL_REGISTERED_CALLBACK
,
PVOID
);
typedef
BOOL
(
CALLBACK
*
PSYMBOL_REGISTERED_CALLBACK64
)(
HANDLE
,
ULONG
,
ULONG64
,
ULONG64
);
BOOL
WINAPI
SymRegisterCallback64
(
HANDLE
,
PSYMBOL_REGISTERED_CALLBACK64
,
ULONG64
);
BOOL
WINAPI
SymRegisterCallbackW64
(
HANDLE
,
PSYMBOL_REGISTERED_CALLBACK64
,
ULONG64
);
BOOL
WINAPI
SymUnDName
(
PIMAGEHLP_SYMBOL
,
PSTR
,
DWORD
);
BOOL
WINAPI
SymUnDName64
(
PIMAGEHLP_SYMBOL64
,
PSTR
,
DWORD
);
DWORD
WINAPI
UnDecorateSymbolName
(
LPCSTR
,
LPSTR
,
DWORD
,
DWORD
);
...
...
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