Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7d4194f5
Commit
7d4194f5
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 SymFromAddrW.
parent
d2d85a1b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
1 deletion
+72
-1
dbghelp.spec
dlls/dbghelp/dbghelp.spec
+1
-1
symbol.c
dlls/dbghelp/symbol.c
+51
-0
dbghelp.h
include/dbghelp.h
+20
-0
No files found.
dlls/dbghelp/dbghelp.spec
View file @
7d4194f5
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
@ stdcall SymFindFileInPath(long str str ptr long long long ptr ptr ptr)
@ stdcall SymFindFileInPath(long str str ptr long long long ptr ptr ptr)
@ stub SymFindFileInPathW
@ stub SymFindFileInPathW
@ stdcall SymFromAddr(ptr double ptr ptr)
@ stdcall SymFromAddr(ptr double ptr ptr)
@ st
ub SymFromAddrW
@ st
dcall SymFromAddrW(ptr double ptr ptr)
@ stub SymFromIndex
@ stub SymFromIndex
@ stub SymFromIndexW
@ stub SymFromIndexW
@ stdcall SymFromName(long str ptr)
@ stdcall SymFromName(long str ptr)
...
...
dlls/dbghelp/symbol.c
View file @
7d4194f5
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "wine/debug.h"
#include "wine/debug.h"
#include "dbghelp_private.h"
#include "dbghelp_private.h"
#include "winnls.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dbghelp
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dbghelp
);
WINE_DECLARE_DEBUG_CHANNEL
(
dbghelp_symt
);
WINE_DECLARE_DEBUG_CHANNEL
(
dbghelp_symt
);
...
@@ -763,6 +764,31 @@ static BOOL symt_enum_locals(struct process* pcs, const char* mask,
...
@@ -763,6 +764,31 @@ static BOOL symt_enum_locals(struct process* pcs, const char* mask,
}
}
/******************************************************************
/******************************************************************
* copy_symbolW
*
* Helper for transforming an ANSI symbol info into an UNICODE one.
* Assume that MaxNameLen is the same for both version (A & W).
*/
static
void
copy_symbolW
(
SYMBOL_INFOW
*
siw
,
const
SYMBOL_INFO
*
si
)
{
siw
->
SizeOfStruct
=
si
->
SizeOfStruct
;
siw
->
TypeIndex
=
si
->
TypeIndex
;
siw
->
Reserved
[
0
]
=
si
->
Reserved
[
0
];
siw
->
Reserved
[
1
]
=
si
->
Reserved
[
1
];
siw
->
Index
=
si
->
info
;
/* FIXME: see dbghelp.h */
siw
->
Size
=
si
->
Size
;
siw
->
ModBase
=
si
->
ModBase
;
siw
->
Flags
=
si
->
Flags
;
siw
->
Value
=
si
->
Value
;
siw
->
Address
=
si
->
Address
;
siw
->
Register
=
si
->
Register
;
siw
->
Scope
=
si
->
Scope
;
siw
->
Tag
=
si
->
Tag
;
siw
->
NameLen
=
si
->
NameLen
;
siw
->
MaxNameLen
=
si
->
MaxNameLen
;
MultiByteToWideChar
(
CP_ACP
,
0
,
si
->
Name
,
-
1
,
siw
->
Name
,
siw
->
MaxNameLen
);
}
/******************************************************************
* SymEnumSymbols (DBGHELP.@)
* SymEnumSymbols (DBGHELP.@)
*
*
* cases BaseOfDll = 0
* cases BaseOfDll = 0
...
@@ -901,6 +927,31 @@ BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address,
...
@@ -901,6 +927,31 @@ BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address,
}
}
/******************************************************************
/******************************************************************
* SymFromAddrW (DBGHELP.@)
*
*/
BOOL
WINAPI
SymFromAddrW
(
HANDLE
hProcess
,
DWORD64
Address
,
DWORD64
*
Displacement
,
PSYMBOL_INFOW
Symbol
)
{
PSYMBOL_INFO
si
;
unsigned
len
;
BOOL
ret
;
len
=
sizeof
(
*
si
)
+
Symbol
->
MaxNameLen
*
sizeof
(
WCHAR
);
si
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
si
)
return
FALSE
;
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
MaxNameLen
=
Symbol
->
MaxNameLen
;
if
((
ret
=
SymFromAddr
(
hProcess
,
Address
,
Displacement
,
si
)))
{
copy_symbolW
(
Symbol
,
si
);
}
HeapFree
(
GetProcessHeap
(),
0
,
si
);
return
ret
;
}
/******************************************************************
* SymGetSymFromAddr (DBGHELP.@)
* SymGetSymFromAddr (DBGHELP.@)
*
*
*/
*/
...
...
include/dbghelp.h
View file @
7d4194f5
...
@@ -817,6 +817,25 @@ typedef struct _SYMBOL_INFO
...
@@ -817,6 +817,25 @@ typedef struct _SYMBOL_INFO
CHAR
Name
[
1
];
CHAR
Name
[
1
];
}
SYMBOL_INFO
,
*
PSYMBOL_INFO
;
}
SYMBOL_INFO
,
*
PSYMBOL_INFO
;
typedef
struct
_SYMBOL_INFOW
{
ULONG
SizeOfStruct
;
ULONG
TypeIndex
;
ULONG64
Reserved
[
2
];
ULONG
Index
;
ULONG
Size
;
ULONG64
ModBase
;
ULONG
Flags
;
ULONG64
Value
;
ULONG64
Address
;
ULONG
Register
;
ULONG
Scope
;
ULONG
Tag
;
ULONG
NameLen
;
ULONG
MaxNameLen
;
WCHAR
Name
[
1
];
}
SYMBOL_INFOW
,
*
PSYMBOL_INFOW
;
typedef
enum
_IMAGEHLP_SYMBOL_TYPE_INFO
typedef
enum
_IMAGEHLP_SYMBOL_TYPE_INFO
{
{
TI_GET_SYMTAG
,
TI_GET_SYMTAG
,
...
@@ -881,6 +900,7 @@ BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PV
...
@@ -881,6 +900,7 @@ BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PV
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMERATESYMBOLS_CALLBACK
)(
PSYMBOL_INFO
,
ULONG
,
PVOID
);
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMERATESYMBOLS_CALLBACK
)(
PSYMBOL_INFO
,
ULONG
,
PVOID
);
BOOL
WINAPI
SymEnumTypes
(
HANDLE
,
ULONG64
,
PSYM_ENUMERATESYMBOLS_CALLBACK
,
PVOID
);
BOOL
WINAPI
SymEnumTypes
(
HANDLE
,
ULONG64
,
PSYM_ENUMERATESYMBOLS_CALLBACK
,
PVOID
);
BOOL
WINAPI
SymFromAddr
(
HANDLE
,
DWORD64
,
DWORD64
*
,
SYMBOL_INFO
*
);
BOOL
WINAPI
SymFromAddr
(
HANDLE
,
DWORD64
,
DWORD64
*
,
SYMBOL_INFO
*
);
BOOL
WINAPI
SymFromAddrW
(
HANDLE
,
DWORD64
,
DWORD64
*
,
SYMBOL_INFOW
*
);
BOOL
WINAPI
SymFromToken
(
HANDLE
,
DWORD64
,
DWORD
,
PSYMBOL_INFO
);
BOOL
WINAPI
SymFromToken
(
HANDLE
,
DWORD64
,
DWORD
,
PSYMBOL_INFO
);
BOOL
WINAPI
SymFromName
(
HANDLE
,
PCSTR
,
PSYMBOL_INFO
);
BOOL
WINAPI
SymFromName
(
HANDLE
,
PCSTR
,
PSYMBOL_INFO
);
BOOL
WINAPI
SymGetSymFromAddr
(
HANDLE
,
DWORD
,
PDWORD
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetSymFromAddr
(
HANDLE
,
DWORD
,
PDWORD
,
PIMAGEHLP_SYMBOL
);
...
...
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