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
6c50556e
Commit
6c50556e
authored
Oct 11, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix function and structure field types so we are compatible with the
native dbghelp.
parent
20505913
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
67 deletions
+73
-67
dbghelp.spec
dlls/dbghelp/dbghelp.spec
+5
-5
source.c
dlls/dbghelp/source.c
+1
-1
symbol.c
dlls/dbghelp/symbol.c
+13
-8
type.c
dlls/dbghelp/type.c
+7
-6
dbghelp.h
include/dbghelp.h
+36
-36
dbgchnl.c
programs/taskmgr/dbgchnl.c
+1
-1
memory.c
programs/winedbg/memory.c
+9
-9
symbol.c
programs/winedbg/symbol.c
+1
-1
No files found.
dlls/dbghelp/dbghelp.spec
View file @
6c50556e
...
@@ -26,10 +26,10 @@
...
@@ -26,10 +26,10 @@
@ stdcall StackWalk(long long long ptr ptr ptr ptr ptr ptr)
@ stdcall StackWalk(long long long ptr ptr ptr ptr ptr ptr)
@ stub StackWalk64
@ stub StackWalk64
@ stdcall SymCleanup(long)
@ stdcall SymCleanup(long)
@ stdcall SymEnumSourceFiles(long long str ptr ptr)
@ stdcall SymEnumSourceFiles(
ptr
long long str ptr ptr)
@ stub SymEnumSym
@ stub SymEnumSym
@ stdcall SymEnumSymbols(long long str ptr ptr)
@ stdcall SymEnumSymbols(long long str ptr ptr)
@ stdcall SymEnumTypes(long long ptr ptr)
@ stdcall SymEnumTypes(
ptr
long long ptr ptr)
@ stdcall SymEnumerateModules(long ptr ptr)
@ stdcall SymEnumerateModules(long ptr ptr)
@ stub SymEnumerateModules64
@ stub SymEnumerateModules64
@ stdcall SymEnumerateSymbols(long long ptr ptr)
@ stdcall SymEnumerateSymbols(long long ptr ptr)
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
@ stub SymEnumerateSymbolsW
@ stub SymEnumerateSymbolsW
@ stub SymEnumerateSymbolsW64
@ stub SymEnumerateSymbolsW64
@ stdcall SymFindFileInPath(long str str ptr long long long ptr ptr ptr)
@ stdcall SymFindFileInPath(long str str ptr long long long ptr ptr ptr)
@ stdcall SymFromAddr(long long ptr ptr)
@ stdcall SymFromAddr(
ptr
long long ptr ptr)
@ stdcall SymFromName(long str ptr)
@ stdcall SymFromName(long str ptr)
@ stdcall SymFunctionTableAccess(long long)
@ stdcall SymFunctionTableAccess(long long)
@ stub SymFunctionTableAccess64
@ stub SymFunctionTableAccess64
...
@@ -66,8 +66,8 @@
...
@@ -66,8 +66,8 @@
@ stub SymGetSymNext64
@ stub SymGetSymNext64
@ stdcall SymGetSymPrev(long ptr)
@ stdcall SymGetSymPrev(long ptr)
@ stub SymGetSymPrev64
@ stub SymGetSymPrev64
@ stdcall SymGetTypeFromName(long long str ptr)
@ stdcall SymGetTypeFromName(
ptr
long long str ptr)
@ stdcall SymGetTypeInfo(long long long long ptr)
@ stdcall SymGetTypeInfo(
ptr
long long long long ptr)
@ stdcall SymInitialize(long str long)
@ stdcall SymInitialize(long str long)
@ stdcall SymLoadModule(long long str str long long)
@ stdcall SymLoadModule(long long str str long long)
@ stub SymLoadModule64
@ stub SymLoadModule64
...
...
dlls/dbghelp/source.c
View file @
6c50556e
...
@@ -94,7 +94,7 @@ const char* source_get(const struct module* module, unsigned idx)
...
@@ -94,7 +94,7 @@ const char* source_get(const struct module* module, unsigned idx)
* SymEnumSourceFiles (DBGHELP.@)
* SymEnumSourceFiles (DBGHELP.@)
*
*
*/
*/
BOOL
WINAPI
SymEnumSourceFiles
(
HANDLE
hProcess
,
ULONG
ModBase
,
LPSTR
Mask
,
BOOL
WINAPI
SymEnumSourceFiles
(
HANDLE
hProcess
,
ULONG
64
ModBase
,
LPSTR
Mask
,
PSYM_ENUMSOURCFILES_CALLBACK
cbSrcFiles
,
PSYM_ENUMSOURCFILES_CALLBACK
cbSrcFiles
,
void
*
UserContext
)
void
*
UserContext
)
{
{
...
...
dlls/dbghelp/symbol.c
View file @
6c50556e
...
@@ -535,8 +535,9 @@ static void symt_fill_sym_info(const struct module* module,
...
@@ -535,8 +535,9 @@ static void symt_fill_sym_info(const struct module* module,
strncpy
(
sym_info
->
Name
,
name
,
min
(
sym_info
->
NameLen
,
sym_info
->
MaxNameLen
));
strncpy
(
sym_info
->
Name
,
name
,
min
(
sym_info
->
NameLen
,
sym_info
->
MaxNameLen
));
sym_info
->
Name
[
sym_info
->
MaxNameLen
-
1
]
=
'\0'
;
sym_info
->
Name
[
sym_info
->
MaxNameLen
-
1
]
=
'\0'
;
}
}
TRACE_
(
dbghelp_symt
)(
"%p => %s %lu %lx
\n
"
,
TRACE_
(
dbghelp_symt
)(
"%p => %s %lu %s
\n
"
,
sym
,
sym_info
->
Name
,
sym_info
->
Size
,
sym_info
->
Address
);
sym
,
sym_info
->
Name
,
sym_info
->
Size
,
wine_dbgstr_longlong
(
sym_info
->
Address
));
}
}
static
BOOL
symt_enum_module
(
struct
module
*
module
,
regex_t
*
regex
,
static
BOOL
symt_enum_module
(
struct
module
*
module
,
regex_t
*
regex
,
...
@@ -759,7 +760,7 @@ static BOOL symt_enum_locals(struct process* pcs, const char* mask,
...
@@ -759,7 +760,7 @@ static BOOL symt_enum_locals(struct process* pcs, const char* mask,
* !foo fails always (despite what MSDN states)
* !foo fails always (despite what MSDN states)
* RE1!RE2 gets RE2 from BaseOfDll (whatever RE1 is)
* RE1!RE2 gets RE2 from BaseOfDll (whatever RE1 is)
*/
*/
BOOL
WINAPI
SymEnumSymbols
(
HANDLE
hProcess
,
ULONG
BaseOfDll
,
PCSTR
Mask
,
BOOL
WINAPI
SymEnumSymbols
(
HANDLE
hProcess
,
ULONG
64
BaseOfDll
,
PCSTR
Mask
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
PVOID
UserContext
)
PVOID
UserContext
)
{
{
...
@@ -769,8 +770,9 @@ BOOL WINAPI SymEnumSymbols(HANDLE hProcess, ULONG BaseOfDll, PCSTR Mask,
...
@@ -769,8 +770,9 @@ BOOL WINAPI SymEnumSymbols(HANDLE hProcess, ULONG BaseOfDll, PCSTR Mask,
const
char
*
bang
;
const
char
*
bang
;
regex_t
mod_regex
,
sym_regex
;
regex_t
mod_regex
,
sym_regex
;
TRACE
(
"(%p %08lx %s %p %p)
\n
"
,
TRACE
(
"(%p %s %s %p %p)
\n
"
,
hProcess
,
BaseOfDll
,
debugstr_a
(
Mask
),
EnumSymbolsCallback
,
UserContext
);
hProcess
,
wine_dbgstr_longlong
(
BaseOfDll
),
debugstr_a
(
Mask
),
EnumSymbolsCallback
,
UserContext
);
if
(
!
pcs
)
return
FALSE
;
if
(
!
pcs
)
return
FALSE
;
...
@@ -864,8 +866,8 @@ BOOL WINAPI SymEnumerateSymbols(HANDLE hProcess, DWORD BaseOfDll,
...
@@ -864,8 +866,8 @@ BOOL WINAPI SymEnumerateSymbols(HANDLE hProcess, DWORD BaseOfDll,
* SymFromAddr (DBGHELP.@)
* SymFromAddr (DBGHELP.@)
*
*
*/
*/
BOOL
WINAPI
SymFromAddr
(
HANDLE
hProcess
,
DWORD
Address
,
BOOL
WINAPI
SymFromAddr
(
HANDLE
hProcess
,
DWORD
64
Address
,
DWORD
*
Displacement
,
PSYMBOL_INFO
Symbol
)
DWORD
64
*
Displacement
,
PSYMBOL_INFO
Symbol
)
{
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
struct
module
*
module
;
struct
module
*
module
;
...
@@ -894,13 +896,16 @@ BOOL WINAPI SymGetSymFromAddr(HANDLE hProcess, DWORD Address,
...
@@ -894,13 +896,16 @@ BOOL WINAPI SymGetSymFromAddr(HANDLE hProcess, DWORD Address,
char
buffer
[
sizeof
(
SYMBOL_INFO
)
+
256
];
char
buffer
[
sizeof
(
SYMBOL_INFO
)
+
256
];
SYMBOL_INFO
*
si
=
(
SYMBOL_INFO
*
)
buffer
;
SYMBOL_INFO
*
si
=
(
SYMBOL_INFO
*
)
buffer
;
size_t
len
;
size_t
len
;
DWORD64
Displacement64
;
if
(
Symbol
->
SizeOfStruct
<
sizeof
(
*
Symbol
))
return
FALSE
;
if
(
Symbol
->
SizeOfStruct
<
sizeof
(
*
Symbol
))
return
FALSE
;
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
MaxNameLen
=
256
;
si
->
MaxNameLen
=
256
;
if
(
!
SymFromAddr
(
hProcess
,
Address
,
Displacement
,
si
))
if
(
!
SymFromAddr
(
hProcess
,
Address
,
&
Displacement64
,
si
))
return
FALSE
;
return
FALSE
;
if
(
Displacement
)
*
Displacement
=
Displacement64
;
Symbol
->
Address
=
si
->
Address
;
Symbol
->
Address
=
si
->
Address
;
Symbol
->
Size
=
si
->
Size
;
Symbol
->
Size
=
si
->
Size
;
Symbol
->
Flags
=
si
->
Flags
;
Symbol
->
Flags
=
si
->
Flags
;
...
...
dlls/dbghelp/type.c
View file @
6c50556e
...
@@ -359,7 +359,7 @@ struct symt_typedef* symt_new_typedef(struct module* module, struct symt* ref,
...
@@ -359,7 +359,7 @@ struct symt_typedef* symt_new_typedef(struct module* module, struct symt* ref,
* SymEnumTypes (DBGHELP.@)
* SymEnumTypes (DBGHELP.@)
*
*
*/
*/
BOOL
WINAPI
SymEnumTypes
(
HANDLE
hProcess
,
unsigned
long
BaseOfDll
,
BOOL
WINAPI
SymEnumTypes
(
HANDLE
hProcess
,
ULONG64
BaseOfDll
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
void
*
UserContext
)
void
*
UserContext
)
{
{
...
@@ -371,8 +371,9 @@ BOOL WINAPI SymEnumTypes(HANDLE hProcess, unsigned long BaseOfDll,
...
@@ -371,8 +371,9 @@ BOOL WINAPI SymEnumTypes(HANDLE hProcess, unsigned long BaseOfDll,
struct
symt
*
type
;
struct
symt
*
type
;
void
*
pos
=
NULL
;
void
*
pos
=
NULL
;
TRACE
(
"(%p %08lx %p %p)
\n
"
,
TRACE
(
"(%p %s %p %p)
\n
"
,
hProcess
,
BaseOfDll
,
EnumSymbolsCallback
,
UserContext
);
hProcess
,
wine_dbgstr_longlong
(
BaseOfDll
),
EnumSymbolsCallback
,
UserContext
);
if
(
!
(
pcs
=
process_find_by_handle
(
hProcess
)))
return
FALSE
;
if
(
!
(
pcs
=
process_find_by_handle
(
hProcess
)))
return
FALSE
;
module
=
module_find_by_addr
(
pcs
,
BaseOfDll
,
DMT_UNKNOWN
);
module
=
module_find_by_addr
(
pcs
,
BaseOfDll
,
DMT_UNKNOWN
);
...
@@ -742,7 +743,7 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req,
...
@@ -742,7 +743,7 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req,
* SymGetTypeInfo (DBGHELP.@)
* SymGetTypeInfo (DBGHELP.@)
*
*
*/
*/
BOOL
WINAPI
SymGetTypeInfo
(
HANDLE
hProcess
,
unsigned
long
ModBase
,
BOOL
WINAPI
SymGetTypeInfo
(
HANDLE
hProcess
,
DWORD64
ModBase
,
ULONG
TypeId
,
IMAGEHLP_SYMBOL_TYPE_INFO
GetType
,
ULONG
TypeId
,
IMAGEHLP_SYMBOL_TYPE_INFO
GetType
,
PVOID
pInfo
)
PVOID
pInfo
)
{
{
...
@@ -754,7 +755,7 @@ BOOL WINAPI SymGetTypeInfo(HANDLE hProcess, unsigned long ModBase,
...
@@ -754,7 +755,7 @@ BOOL WINAPI SymGetTypeInfo(HANDLE hProcess, unsigned long ModBase,
module
=
module_find_by_addr
(
pcs
,
ModBase
,
DMT_UNKNOWN
);
module
=
module_find_by_addr
(
pcs
,
ModBase
,
DMT_UNKNOWN
);
if
(
!
(
module
=
module_get_debug
(
pcs
,
module
)))
if
(
!
(
module
=
module_get_debug
(
pcs
,
module
)))
{
{
FIXME
(
"Someone didn't properly set ModBase (
0x%08lx)
\n
"
,
ModBase
);
FIXME
(
"Someone didn't properly set ModBase (
%s)
\n
"
,
wine_dbgstr_longlong
(
ModBase
)
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -765,7 +766,7 @@ BOOL WINAPI SymGetTypeInfo(HANDLE hProcess, unsigned long ModBase,
...
@@ -765,7 +766,7 @@ BOOL WINAPI SymGetTypeInfo(HANDLE hProcess, unsigned long ModBase,
* SymGetTypeFromName (DBGHELP.@)
* SymGetTypeFromName (DBGHELP.@)
*
*
*/
*/
BOOL
WINAPI
SymGetTypeFromName
(
HANDLE
hProcess
,
unsigned
long
BaseOfDll
,
BOOL
WINAPI
SymGetTypeFromName
(
HANDLE
hProcess
,
ULONG64
BaseOfDll
,
LPSTR
Name
,
PSYMBOL_INFO
Symbol
)
LPSTR
Name
,
PSYMBOL_INFO
Symbol
)
{
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
...
...
include/dbghelp.h
View file @
6c50556e
...
@@ -154,7 +154,7 @@ typedef struct _SOURCEFILE
...
@@ -154,7 +154,7 @@ typedef struct _SOURCEFILE
typedef
struct
_IMAGEHLP_CBA_READ_MEMORY
typedef
struct
_IMAGEHLP_CBA_READ_MEMORY
{
{
DWORD
addr
;
DWORD
64
addr
;
PVOID
buf
;
PVOID
buf
;
DWORD
bytes
;
DWORD
bytes
;
DWORD
*
bytesread
;
DWORD
*
bytesread
;
...
@@ -219,14 +219,14 @@ typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
...
@@ -219,14 +219,14 @@ typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
typedef
struct
_IMAGEHLP_STACK_FRAME
typedef
struct
_IMAGEHLP_STACK_FRAME
{
{
ULONG
InstructionOffset
;
ULONG
64
InstructionOffset
;
ULONG
ReturnOffset
;
ULONG
64
ReturnOffset
;
ULONG
FrameOffset
;
ULONG
64
FrameOffset
;
ULONG
StackOffset
;
ULONG
64
StackOffset
;
ULONG
BackingStoreOffset
;
ULONG
64
BackingStoreOffset
;
ULONG
FuncTableEntry
;
ULONG
64
FuncTableEntry
;
ULONG
Params
[
4
];
ULONG
64
Params
[
4
];
ULONG
Reserved
[
5
];
ULONG
64
Reserved
[
5
];
BOOL
Virtual
;
BOOL
Virtual
;
ULONG
Reserved2
;
ULONG
Reserved2
;
}
IMAGEHLP_STACK_FRAME
,
*
PIMAGEHLP_STACK_FRAME
;
}
IMAGEHLP_STACK_FRAME
,
*
PIMAGEHLP_STACK_FRAME
;
...
@@ -542,25 +542,25 @@ BOOL WINAPI MiniDumpReadDumpStream(PVOID,ULONG,PMINIDUMP_DIRECTORY*,PVOID*,ULONG
...
@@ -542,25 +542,25 @@ BOOL WINAPI MiniDumpReadDumpStream(PVOID,ULONG,PMINIDUMP_DIRECTORY*,PVOID*,ULONG
*************************/
*************************/
typedef
BOOL
(
CALLBACK
*
PENUMLOADED_MODULES_CALLBACK
)(
PSTR
ModuleName
,
DWORD
ModuleBase
,
typedef
BOOL
(
CALLBACK
*
PENUMLOADED_MODULES_CALLBACK
)(
PSTR
ModuleName
,
DWORD
ModuleBase
,
ULONG
ModuleSize
,
PVOID
UserContext
);
ULONG
ModuleSize
,
PVOID
UserContext
);
extern
BOOL
WINAPI
EnumerateLoadedModules
(
HANDLE
hProcess
,
BOOL
WINAPI
EnumerateLoadedModules
(
HANDLE
hProcess
,
PENUMLOADED_MODULES_CALLBACK
EnumLoadedModulesCallback
,
PENUMLOADED_MODULES_CALLBACK
EnumLoadedModulesCallback
,
PVOID
UserContext
);
PVOID
UserContext
);
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMMODULES_CALLBACK
)(
PSTR
ModuleName
,
DWORD
BaseOfDll
,
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMMODULES_CALLBACK
)(
PSTR
ModuleName
,
DWORD
BaseOfDll
,
PVOID
UserContext
);
PVOID
UserContext
);
extern
BOOL
WINAPI
SymEnumerateModules
(
HANDLE
hProcess
,
BOOL
WINAPI
SymEnumerateModules
(
HANDLE
hProcess
,
PSYM_ENUMMODULES_CALLBACK
EnumModulesCallback
,
PSYM_ENUMMODULES_CALLBACK
EnumModulesCallback
,
PVOID
UserContext
);
PVOID
UserContext
);
extern
BOOL
WINAPI
SymGetModuleInfo
(
HANDLE
hProcess
,
DWORD
dwAddr
,
BOOL
WINAPI
SymGetModuleInfo
(
HANDLE
hProcess
,
DWORD
dwAddr
,
PIMAGEHLP_MODULE
ModuleInfo
);
PIMAGEHLP_MODULE
ModuleInfo
);
extern
BOOL
WINAPI
SymGetModuleInfoW
(
HANDLE
hProcess
,
DWORD
dwAddr
,
BOOL
WINAPI
SymGetModuleInfoW
(
HANDLE
hProcess
,
DWORD
dwAddr
,
PIMAGEHLP_MODULEW
ModuleInfo
);
PIMAGEHLP_MODULEW
ModuleInfo
);
extern
DWORD
WINAPI
SymGetModuleBase
(
HANDLE
hProcess
,
DWORD
dwAddr
);
DWORD
WINAPI
SymGetModuleBase
(
HANDLE
hProcess
,
DWORD
dwAddr
);
extern
DWORD
WINAPI
SymLoadModule
(
HANDLE
hProcess
,
HANDLE
hFile
,
PSTR
ImageName
,
DWORD
WINAPI
SymLoadModule
(
HANDLE
hProcess
,
HANDLE
hFile
,
PSTR
ImageName
,
PSTR
ModuleName
,
DWORD
BaseOfDll
,
DWORD
SizeOfDll
);
PSTR
ModuleName
,
DWORD
BaseOfDll
,
DWORD
SizeOfDll
);
extern
DWORD
WINAPI
SymLoadModuleEx
(
HANDLE
hProcess
,
HANDLE
hFile
,
PSTR
ImageName
,
DWORD64
WINAPI
SymLoadModuleEx
(
HANDLE
hProcess
,
HANDLE
hFile
,
PSTR
ImageName
,
PSTR
ModuleName
,
DWORD
BaseOfDll
,
DWORD
DllSize
,
PSTR
ModuleName
,
DWORD64
BaseOfDll
,
DWORD
DllSize
,
PMODLOAD_DATA
Data
,
DWORD
Flags
);
PMODLOAD_DATA
Data
,
DWORD
Flags
);
extern
BOOL
WINAPI
SymUnloadModule
(
HANDLE
hProcess
,
DWORD
BaseOfDll
);
BOOL
WINAPI
SymUnloadModule
(
HANDLE
hProcess
,
DWORD
BaseOfDll
);
/*************************
/*************************
* Symbol Handling *
* Symbol Handling *
...
@@ -593,13 +593,13 @@ typedef struct _SYMBOL_INFO
...
@@ -593,13 +593,13 @@ typedef struct _SYMBOL_INFO
{
{
ULONG
SizeOfStruct
;
ULONG
SizeOfStruct
;
ULONG
TypeIndex
;
ULONG
TypeIndex
;
ULONG
Reserved
[
2
];
ULONG
64
Reserved
[
2
];
ULONG
info
;
/* sdk states info, while MSDN says it's Index... */
ULONG
info
;
/* sdk states info, while MSDN says it's Index... */
ULONG
Size
;
ULONG
Size
;
ULONG
ModBase
;
ULONG
64
ModBase
;
ULONG
Flags
;
ULONG
Flags
;
ULONG
Value
;
ULONG
64
Value
;
ULONG
Address
;
ULONG
64
Address
;
ULONG
Register
;
ULONG
Register
;
ULONG
Scope
;
ULONG
Scope
;
ULONG
Tag
;
ULONG
Tag
;
...
@@ -664,23 +664,23 @@ typedef struct _TI_FINDCHILDREN_PARAMS
...
@@ -664,23 +664,23 @@ typedef struct _TI_FINDCHILDREN_PARAMS
#define UNDNAME_NO_ARGUMENTS (0x2000)
#define UNDNAME_NO_ARGUMENTS (0x2000)
#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
BOOL
WINAPI
SymGetTypeInfo
(
HANDLE
hProcess
,
DWORD
ModBase
,
ULONG
TypeId
,
BOOL
WINAPI
SymGetTypeInfo
(
HANDLE
hProcess
,
DWORD
64
ModBase
,
ULONG
TypeId
,
IMAGEHLP_SYMBOL_TYPE_INFO
GetType
,
PVOID
);
IMAGEHLP_SYMBOL_TYPE_INFO
GetType
,
PVOID
);
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMERATESYMBOLS_CALLBACK
)(
PSYMBOL_INFO
pSymInfo
,
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMERATESYMBOLS_CALLBACK
)(
PSYMBOL_INFO
pSymInfo
,
ULONG
SymbolSize
,
PVOID
UserContext
);
ULONG
SymbolSize
,
PVOID
UserContext
);
BOOL
WINAPI
SymEnumTypes
(
HANDLE
hProcess
,
DWORD
BaseOfDll
,
BOOL
WINAPI
SymEnumTypes
(
HANDLE
hProcess
,
ULONG64
BaseOfDll
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
PVOID
UserContext
);
PVOID
UserContext
);
BOOL
WINAPI
SymFromAddr
(
HANDLE
hProcess
,
DWORD
addr
,
DWORD
*
displacement
,
BOOL
WINAPI
SymFromAddr
(
HANDLE
hProcess
,
DWORD
64
addr
,
DWORD64
*
displacement
,
SYMBOL_INFO
*
sym_info
);
SYMBOL_INFO
*
sym_info
);
BOOL
WINAPI
SymFromName
(
HANDLE
hProcess
,
LPSTR
Name
,
PSYMBOL_INFO
Symbol
);
BOOL
WINAPI
SymFromName
(
HANDLE
hProcess
,
LPSTR
Name
,
PSYMBOL_INFO
Symbol
);
BOOL
WINAPI
SymGetSymFromAddr
(
HANDLE
,
DWORD
,
PDWORD
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetSymFromAddr
(
HANDLE
,
DWORD
,
PDWORD
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetSymFromName
(
HANDLE
,
PSTR
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetSymFromName
(
HANDLE
,
PSTR
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetTypeFromName
(
HANDLE
hProcess
,
DWORD
BaseOfDll
,
LPSTR
Name
,
BOOL
WINAPI
SymGetTypeFromName
(
HANDLE
hProcess
,
ULONG64
BaseOfDll
,
LPSTR
Name
,
PSYMBOL_INFO
Symbol
);
PSYMBOL_INFO
Symbol
);
BOOL
WINAPI
SymGetSymNext
(
HANDLE
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetSymNext
(
HANDLE
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetSymPrev
(
HANDLE
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymGetSymPrev
(
HANDLE
,
PIMAGEHLP_SYMBOL
);
BOOL
WINAPI
SymEnumSymbols
(
HANDLE
hProcess
,
ULONG
BaseOfDll
,
PCSTR
Mask
,
BOOL
WINAPI
SymEnumSymbols
(
HANDLE
hProcess
,
ULONG
64
BaseOfDll
,
PCSTR
Mask
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
PSYM_ENUMERATESYMBOLS_CALLBACK
EnumSymbolsCallback
,
PVOID
UserContext
);
PVOID
UserContext
);
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMSYMBOLS_CALLBACK
)(
PSTR
SymbolName
,
DWORD
SymbolAddress
,
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMSYMBOLS_CALLBACK
)(
PSTR
SymbolName
,
DWORD
SymbolAddress
,
...
@@ -703,7 +703,7 @@ DWORD WINAPI UnDecorateSymbolName(LPCSTR DecoratedName, LPSTR UnDecoratedName,
...
@@ -703,7 +703,7 @@ DWORD WINAPI UnDecorateSymbolName(LPCSTR DecoratedName, LPSTR UnDecoratedName,
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMSOURCFILES_CALLBACK
)(
PSOURCEFILE
pSourceFile
,
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMSOURCFILES_CALLBACK
)(
PSOURCEFILE
pSourceFile
,
PVOID
UserContext
);
PVOID
UserContext
);
BOOL
WINAPI
SymEnumSourceFiles
(
HANDLE
hProcess
,
ULONG
ModBase
,
LPSTR
Mask
,
BOOL
WINAPI
SymEnumSourceFiles
(
HANDLE
hProcess
,
ULONG
64
ModBase
,
LPSTR
Mask
,
PSYM_ENUMSOURCFILES_CALLBACK
cbSrcFiles
,
PSYM_ENUMSOURCFILES_CALLBACK
cbSrcFiles
,
PVOID
UserContext
);
PVOID
UserContext
);
BOOL
WINAPI
SymGetLineFromAddr
(
HANDLE
hProcess
,
DWORD
dwAddr
,
BOOL
WINAPI
SymGetLineFromAddr
(
HANDLE
hProcess
,
DWORD
dwAddr
,
...
...
programs/taskmgr/dbgchnl.c
View file @
6c50556e
...
@@ -173,7 +173,7 @@ void* get_symbol(HANDLE hProcess, char* name, char* lib)
...
@@ -173,7 +173,7 @@ void* get_symbol(HANDLE hProcess, char* name, char* lib)
si
->
MaxNameLen
=
sizeof
(
buffer
)
-
sizeof
(
IMAGEHLP_SYMBOL
);
si
->
MaxNameLen
=
sizeof
(
buffer
)
-
sizeof
(
IMAGEHLP_SYMBOL
);
if
(
pSymLoadModule
(
hProcess
,
NULL
,
lib
,
NULL
,
0
,
0
)
&&
if
(
pSymLoadModule
(
hProcess
,
NULL
,
lib
,
NULL
,
0
,
0
)
&&
pSymFromName
(
hProcess
,
name
,
si
))
pSymFromName
(
hProcess
,
name
,
si
))
ret
=
(
void
*
)
si
->
Address
;
ret
=
(
void
*
)
(
ULONG_PTR
)
si
->
Address
;
pSymCleanup
(
hProcess
);
pSymCleanup
(
hProcess
);
}
}
return
ret
;
return
ret
;
...
...
programs/winedbg/memory.c
View file @
6c50556e
...
@@ -483,25 +483,25 @@ void print_address(const ADDRESS* addr, BOOLEAN with_line)
...
@@ -483,25 +483,25 @@ void print_address(const ADDRESS* addr, BOOLEAN with_line)
char
buffer
[
sizeof
(
SYMBOL_INFO
)
+
256
];
char
buffer
[
sizeof
(
SYMBOL_INFO
)
+
256
];
SYMBOL_INFO
*
si
=
(
SYMBOL_INFO
*
)
buffer
;
SYMBOL_INFO
*
si
=
(
SYMBOL_INFO
*
)
buffer
;
void
*
lin
=
memory_to_linear_addr
(
addr
);
void
*
lin
=
memory_to_linear_addr
(
addr
);
DWORD
disp
;
DWORD
64
disp
;
print_bare_address
(
addr
);
print_bare_address
(
addr
);
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
MaxNameLen
=
256
;
si
->
MaxNameLen
=
256
;
if
(
!
SymFromAddr
(
dbg_curr_process
->
handle
,
(
unsigned
long
)
lin
,
&
disp
,
si
))
return
;
if
(
!
SymFromAddr
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
disp
,
si
))
return
;
dbg_printf
(
" %s"
,
si
->
Name
);
dbg_printf
(
" %s"
,
si
->
Name
);
if
(
disp
)
dbg_printf
(
"+0x%lx"
,
disp
);
if
(
disp
)
dbg_printf
(
"+0x%lx"
,
(
DWORD_PTR
)
disp
);
if
(
with_line
)
if
(
with_line
)
{
{
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
il
;
IMAGEHLP_MODULE
im
;
IMAGEHLP_MODULE
im
;
il
.
SizeOfStruct
=
sizeof
(
il
);
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
(
unsigned
long
)
lin
,
NULL
,
&
il
))
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
NULL
,
&
il
))
dbg_printf
(
" [%s:%lu]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" [%s:%lu]"
,
il
.
FileName
,
il
.
LineNumber
);
im
.
SizeOfStruct
=
sizeof
(
im
);
im
.
SizeOfStruct
=
sizeof
(
im
);
if
(
SymGetModuleInfo
(
dbg_curr_process
->
handle
,
(
unsigned
long
)
lin
,
&
im
))
if
(
SymGetModuleInfo
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
im
))
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
}
}
}
}
...
@@ -544,15 +544,15 @@ void print_addr_and_args(const ADDRESS* pc, const ADDRESS* frame)
...
@@ -544,15 +544,15 @@ void print_addr_and_args(const ADDRESS* pc, const ADDRESS* frame)
IMAGEHLP_MODULE
im
;
IMAGEHLP_MODULE
im
;
struct
sym_enum
se
;
struct
sym_enum
se
;
char
tmp
[
1024
];
char
tmp
[
1024
];
DWORD
disp
;
DWORD
64
disp
;
if
(
pc
->
Mode
!=
AddrModeFlat
)
if
(
pc
->
Mode
!=
AddrModeFlat
)
dbg_printf
(
"0x%04x:0x%04lx"
,
pc
->
Segment
,
pc
->
Offset
);
dbg_printf
(
"0x%04x:0x%04lx"
,
pc
->
Segment
,
pc
->
Offset
);
else
else
dbg_printf
(
"0x%08lx"
,
pc
->
Offset
);
dbg_printf
(
"0x%08lx"
,
pc
->
Offset
);
isf
.
InstructionOffset
=
(
unsigned
long
)
memory_to_linear_addr
(
pc
);
isf
.
InstructionOffset
=
(
DWORD_PTR
)
memory_to_linear_addr
(
pc
);
isf
.
FrameOffset
=
(
unsigned
long
)
memory_to_linear_addr
(
frame
);
isf
.
FrameOffset
=
(
DWORD_PTR
)
memory_to_linear_addr
(
frame
);
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
MaxNameLen
=
256
;
si
->
MaxNameLen
=
256
;
...
@@ -560,7 +560,7 @@ void print_addr_and_args(const ADDRESS* pc, const ADDRESS* frame)
...
@@ -560,7 +560,7 @@ void print_addr_and_args(const ADDRESS* pc, const ADDRESS* frame)
return
;
return
;
dbg_printf
(
" %s"
,
si
->
Name
);
dbg_printf
(
" %s"
,
si
->
Name
);
if
(
disp
)
dbg_printf
(
"+0x%lx"
,
disp
);
if
(
disp
)
dbg_printf
(
"+0x%lx"
,
(
DWORD_PTR
)
disp
);
SymSetContext
(
dbg_curr_process
->
handle
,
&
isf
,
NULL
);
SymSetContext
(
dbg_curr_process
->
handle
,
&
isf
,
NULL
);
se
.
tmp
=
tmp
;
se
.
tmp
=
tmp
;
...
...
programs/winedbg/symbol.c
View file @
6c50556e
...
@@ -614,7 +614,7 @@ static BOOL CALLBACK symbols_info_cb(SYMBOL_INFO* sym, ULONG size, void* ctx)
...
@@ -614,7 +614,7 @@ static BOOL CALLBACK symbols_info_cb(SYMBOL_INFO* sym, ULONG size, void* ctx)
mi
.
ModuleName
[
len
-
5
]
=
'\0'
;
mi
.
ModuleName
[
len
-
5
]
=
'\0'
;
}
}
dbg_printf
(
"%08lx: %s!%s"
,
sym
->
Address
,
mi
.
ModuleName
,
sym
->
Name
);
dbg_printf
(
"%08lx: %s!%s"
,
(
ULONG_PTR
)
sym
->
Address
,
mi
.
ModuleName
,
sym
->
Name
);
type
.
id
=
sym
->
TypeIndex
;
type
.
id
=
sym
->
TypeIndex
;
type
.
module
=
sym
->
ModBase
;
type
.
module
=
sym
->
ModBase
;
...
...
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