Implemented SymGet{Next|Prev}Line64.
This commit is contained in:
parent
8bd3c060ec
commit
82aa9210df
|
@ -43,13 +43,13 @@
|
|||
@ stub SymFunctionTableAccess64
|
||||
@ stdcall SymFunctionTableAccess(long long)
|
||||
@ stub SymGetFileLineOffsets64
|
||||
@ stub SymGetLineFromAddr64
|
||||
@ stdcall SymGetLineFromAddr64(long double ptr ptr)
|
||||
@ stdcall SymGetLineFromAddr(long long ptr ptr)
|
||||
@ stub SymGetLineFromName64
|
||||
@ stub SymGetLineFromName
|
||||
@ stub SymGetLineNext64
|
||||
@ stdcall SymGetLineNext64(long ptr)
|
||||
@ stdcall SymGetLineNext(long ptr)
|
||||
@ stub SymGetLinePrev64
|
||||
@ stdcall SymGetLinePrev64(long ptr)
|
||||
@ stdcall SymGetLinePrev(long ptr)
|
||||
@ stub SymGetModuleBase64
|
||||
@ stdcall SymGetModuleBase(long long)
|
||||
|
|
|
@ -1072,6 +1072,50 @@ BOOL WINAPI SymGetLineFromAddr(HANDLE hProcess, DWORD dwAddr,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* copy_line_64_from_32 (internal)
|
||||
*
|
||||
*/
|
||||
static void copy_line_64_from_32(IMAGEHLP_LINE64* l64, const IMAGEHLP_LINE* l32)
|
||||
|
||||
{
|
||||
l64->Key = l32->Key;
|
||||
l64->LineNumber = l32->LineNumber;
|
||||
l64->FileName = l32->FileName;
|
||||
l64->Address = l32->Address;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* copy_line_32_from_64 (internal)
|
||||
*
|
||||
*/
|
||||
static void copy_line_32_from_64(IMAGEHLP_LINE* l32, const IMAGEHLP_LINE64* l64)
|
||||
|
||||
{
|
||||
l32->Key = l64->Key;
|
||||
l32->LineNumber = l64->LineNumber;
|
||||
l32->FileName = l64->FileName;
|
||||
l32->Address = l64->Address;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* SymGetLineFromAddr64 (DBGHELP.@)
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI SymGetLineFromAddr64(HANDLE hProcess, DWORD64 dwAddr,
|
||||
PDWORD pdwDisplacement, PIMAGEHLP_LINE64 Line)
|
||||
{
|
||||
IMAGEHLP_LINE line32;
|
||||
|
||||
if (Line->SizeOfStruct < sizeof(*Line)) return FALSE;
|
||||
if (!validate_addr64(dwAddr)) return FALSE;
|
||||
line32.SizeOfStruct = sizeof(line32);
|
||||
if (!SymGetLineFromAddr(hProcess, (DWORD)dwAddr, pdwDisplacement, &line32))
|
||||
return FALSE;
|
||||
copy_line_64_from_32(Line, &line32);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* SymGetLinePrev (DBGHELP.@)
|
||||
*
|
||||
|
@ -1122,6 +1166,21 @@ BOOL WINAPI SymGetLinePrev(HANDLE hProcess, PIMAGEHLP_LINE Line)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* SymGetLinePrev64 (DBGHELP.@)
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI SymGetLinePrev64(HANDLE hProcess, PIMAGEHLP_LINE64 Line)
|
||||
{
|
||||
IMAGEHLP_LINE line32;
|
||||
|
||||
line32.SizeOfStruct = sizeof(line32);
|
||||
copy_line_32_from_64(&line32, Line);
|
||||
if (!SymGetLinePrev(hProcess, &line32)) return FALSE;
|
||||
copy_line_64_from_32(Line, &line32);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL symt_get_func_line_next(struct module* module, PIMAGEHLP_LINE line)
|
||||
{
|
||||
struct line_info* li;
|
||||
|
@ -1164,6 +1223,21 @@ BOOL WINAPI SymGetLineNext(HANDLE hProcess, PIMAGEHLP_LINE Line)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* SymGetLineNext64 (DBGHELP.@)
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI SymGetLineNext64(HANDLE hProcess, PIMAGEHLP_LINE64 Line)
|
||||
{
|
||||
IMAGEHLP_LINE line32;
|
||||
|
||||
line32.SizeOfStruct = sizeof(line32);
|
||||
copy_line_32_from_64(&line32, Line);
|
||||
if (!SymGetLineNext(hProcess, &line32)) return FALSE;
|
||||
copy_line_64_from_32(Line, &line32);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SymFunctionTableAccess (DBGHELP.@)
|
||||
*/
|
||||
|
|
|
@ -163,6 +163,15 @@ typedef struct _IMAGEHLP_LINE
|
|||
DWORD Address;
|
||||
} IMAGEHLP_LINE, *PIMAGEHLP_LINE;
|
||||
|
||||
typedef struct _IMAGEHLP_LINE64
|
||||
{
|
||||
DWORD SizeOfStruct;
|
||||
PVOID Key;
|
||||
DWORD LineNumber;
|
||||
PCHAR FileName;
|
||||
DWORD64 Address;
|
||||
} IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
|
||||
|
||||
typedef struct _SOURCEFILE
|
||||
{
|
||||
DWORD64 ModBase;
|
||||
|
@ -779,8 +788,12 @@ typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(PSOURCEFILE, PVOID);
|
|||
BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, LPSTR, PSYM_ENUMSOURCEFILES_CALLBACK,
|
||||
PVOID);
|
||||
BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
|
||||
BOOL WINAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64);
|
||||
BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
|
||||
BOOL WINAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64);
|
||||
BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
|
||||
BOOL WINAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64);
|
||||
|
||||
typedef struct _SRCCODEINFO
|
||||
{
|
||||
DWORD SizeOfStruct;
|
||||
|
|
Loading…
Reference in New Issue