#include <ntstatus.h>
#include <windows.h>
#include <dbghelp.h>
#include <cvconst.h>
#include <stdio.h>
#include "wine/test.h"
Go to the source code of this file.
◆ INIT_PSYM
Value: do { \
} while (0)
struct _SYMBOL_INFO * PSYMBOL_INFO
static unsigned char buff[32768]
Definition at line 64 of file rsym.c.
◆ init_sym
◆ ok_ulonglong
Value: do { \
ok(_value == _result,
"Wrong value for '%s', expected: " #
result " (%s), got: %s\n", \
} while (0)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition at line 19 of file rsym.c.
◆ ok_ulonglong_
Value: do { \
ok_(
file,
line)(_value == _result,
"Wrong value for '%s', expected: " #
result " (%s), got: %s\n", \
#expression, wine_dbgstr_longlong(_result), wine_dbgstr_longlong(_value)); \
} while (0)
Definition at line 27 of file rsym.c.
◆ WIN32_NO_STATUS
◆ test_context
◆ cleanup_gcc_dll()
Definition at line 120 of file data.c.
121{
125
131}
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
static const char * tmpdir()
#define sprintf(buf, format,...)
DWORD WINAPI GetLastError(void)
Referenced by START_TEST().
◆ deinit_sym()
static void deinit_sym |
( |
| ) |
|
|
static |
Definition at line 57 of file rsym.c.
58{
60}
BOOL WINAPI SymCleanup(HANDLE hProcess)
Referenced by START_TEST().
◆ dump_rsym()
◆ EnumSymProc()
Definition at line 252 of file rsym.c.
253{
255
257 {
261 else
265
267 }
268 else
269 {
271 }
272
274}
#define ok_hex_(expression, result)
#define ok_ulonglong_(file, line, expression, result)
#define ok_str_(file, line, x, y)
Referenced by test_SymEnumSymbols().
◆ extract_gcc_dll()
int extract_gcc_dll |
( |
char |
szFile[MAX_PATH] | ) |
|
Definition at line 107 of file data.c.
108{
112
115 return 0;
116
117 return 1;
118}
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
static int extract_one(const char *filename, const char *resid)
Referenced by START_TEST().
◆ init_sym_imp()
Definition at line 46 of file rsym.c.
47{
49 {
53 }
55}
BOOL WINAPI SymInitialize(HANDLE hProcess, PCSTR UserSearchPath, BOOL fInvadeProcess)
◆ proc()
◆ START_TEST()
Definition at line 297 of file rsym.c.
298{
300#ifdef _M_IX86
302#endif
305
308
310
312 {
313 ok(0,
"Failed extracting files\n");
314 return;
315 }
316
318 {
322
325
327 {
328 trace(
"Module loaded by SymLoadModule64\n");
332 }
333
335 }
336
337#ifdef _M_IX86
339 if (hMod)
340 {
342
344 {
345 trace(
"Module loaded by LoadLibraryA\n");
349
351 }
352
354 }
355#endif
357}
static const WCHAR szDllName[]
DWORD WINAPI SymSetOptions(DWORD opts)
DWORD WINAPI SymGetOptions(void)
DWORD64 WINAPI SymLoadModule64(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName, DWORD64 BaseOfDll, DWORD SizeOfDll)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
#define ERROR_FILE_NOT_FOUND
int extract_gcc_dll(char szFile[MAX_PATH])
static void test_SymEnumSymbols(HANDLE hProc, DWORD64 BaseAddress)
#define init_sym(fInvadeProcess)
#define ok_ulonglong(expression, result)
static void test_SymFromAddr(HANDLE hProc, DWORD64 BaseAddress)
static void test_SymFromName(HANDLE hProc, DWORD64 BaseAddress)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
◆ supports_rsym()
Definition at line 70 of file rsym.c.
71{
74
78
79 return Ret &&
81 ModuleInfo.CVSig == (
'R' | (
'S' << 8) | (
'Y' << 16) | (
'M' << 24));
82}
_In_ ULONG _Out_writes_bytes_opt_ InformationLength PAUX_MODULE_EXTENDED_INFO ModuleInfo
BOOL WINAPI SymGetModuleInfo64(HANDLE hProcess, DWORD64 dwAddr, PIMAGEHLP_MODULE64 ModuleInfo)
Referenced by test_SymEnumSymbols(), test_SymFromAddr(), and test_SymFromName().
◆ test_SymEnumSymbols()
Definition at line 276 of file rsym.c.
277{
280
283
285 {
286 skip(
"dbghelp.dll cannot parse rsym\n");
287 }
288 else
289 {
293 }
294}
#define ok_int(expression, result)
static BOOL CALLBACK EnumSymProc(PSYMBOL_INFO pSymInfo, ULONG SymbolSize, PVOID UserContext)
static BOOL supports_rsym(HANDLE hProc, DWORD64 BaseAddress)
BOOL WINAPI SymEnumSymbols(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask, PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext)
Referenced by START_TEST().
◆ test_SymFromAddr()
Definition at line 126 of file rsym.c.
127{
131
134
136 {
137 skip(
"dbghelp.dll cannot parse rsym\n");
138 }
139 else
140 {
141
142 Displacement = 0;
148
149
150 Displacement = 0;
153
155 {
163 }
164
165
166 Displacement = 0;
176
177
178 Displacement = 0;
188
189
190 Displacement = 0;
200
201
202 Displacement = 0;
211 ok_str(pSymbol->
Name,
"_head_dll_ntdll_libntdll_a");
212 }
213}
#define ok_hex(expression, result)
BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address, DWORD64 *Displacement, PSYMBOL_INFO Symbol)
#define ERROR_MOD_NOT_FOUND
struct _SYMBOL_INFO SYMBOL_INFO
Referenced by START_TEST().
◆ test_SymFromName()
Definition at line 85 of file rsym.c.
86{
90
92 {
93 skip(
"dbghelp.dll cannot parse rsym\n");
94 }
95 else
96 {
105
114
123 }
124}
BOOL WINAPI SymFromName(HANDLE hProcess, PCSTR Name, PSYMBOL_INFO Symbol)
Referenced by START_TEST().
◆ test_data