Seeing the __x86_64__ change, I wonder: Does the code work with 64
bit GCC builds? I mean 64 bit target not 64 bit host.
Am 19.07.2013 02:11, schrieb akhaldi@svn.reactos.org:
> Author: akhaldi
> Date: Fri Jul 19 00:11:08 2013
> New Revision: 59507
>
> URL:
http://svn.reactos.org/svn/reactos?rev=59507&view=rev
> Log:
> [DBGHELPHOST]
> * Fix some warnings. Brought to you by Thomas Faber.
>
> Modified:
> trunk/reactos/dll/win32/dbghelp/compat.h
> trunk/reactos/dll/win32/dbghelp/symbol.c
>
> Modified: trunk/reactos/dll/win32/dbghelp/compat.h
> URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/compat.h?rev=59507&r1=59506&r2=59507&view=diff
>
==============================================================================
> --- trunk/reactos/dll/win32/dbghelp/compat.h [iso-8859-1]
(original)
> +++ trunk/reactos/dll/win32/dbghelp/compat.h [iso-8859-1]
Fri Jul 19 00:11:08 2013
> @@ -15,7 +15,11 @@
> #define min(x, y) (((x) < (y)) ? (x) : (y))
> #define max(x, y) (((x) > (y)) ? (x) : (y))
>
> +#ifdef __i386__
> #define CDECL __cdecl
> +#else
> +#define CDECL
> +#endif
> typedef PVOID IUnknown, IDispatch, IRecordInfo;
>
> // windef.h
> @@ -719,7 +723,6 @@
>
> BOOL WINAPI SymEnumerateModulesW64(HANDLE hProcess,
PSYM_ENUMMODULES_CALLBACKW64 EnumModulesCallback, PVOID
UserContext);
>
> -#ifndef _LP64
> typedef struct _tagADDRESS
> {
> DWORD Offset;
> @@ -763,23 +766,6 @@
> typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR,
ULONG, ULONG, PVOID);
> typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR,
ULONG, ULONG, PVOID);
>
> -#else
> -#define ADDRESS ADDRESS64
> -#define LPADDRESS LPADDRESS64
> -#define IMAGEHLP_MODULE IMAGEHLP_MODULE64
> -#define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
> -#define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
> -#define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
> -#define PENUMLOADED_MODULES_CALLBACK
PENUMLOADED_MODULES_CALLBACK64
> -#define PFUNCTION_TABLE_ACCESS_ROUTINE
PFUNCTION_TABLE_ACCESS_ROUTINE64
> -#define PTRANSLATE_ADDRESS_ROUTINE
PTRANSLATE_ADDRESS_ROUTINE64
> -#define PSYMBOL_REGISTERED_CALLBACK
PSYMBOL_REGISTERED_CALLBACK64
> -#define PREAD_PROCESS_MEMORY_ROUTINE
PREAD_PROCESS_MEMORY_ROUTINE64
> -#define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
> -#define PSYM_ENUMMODULES_CALLBACK
PSYM_ENUMMODULES_CALLBACK64
> -#define PSYM_ENUMSYMBOLS_CALLBACK
PSYM_ENUMSYMBOLS_CALLBACK64
> -#define PSYM_ENUMSYMBOLS_CALLBACKW
PSYM_ENUMSYMBOLS_CALLBACKW64
> -#endif
> typedef struct _IMAGEHLP_MODULE64
> {
> DWORD SizeOfStruct;
>
> Modified: trunk/reactos/dll/win32/dbghelp/symbol.c
> URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/symbol.c?rev=59507&r1=59506&r2=59507&view=diff
>
==============================================================================
> --- trunk/reactos/dll/win32/dbghelp/symbol.c [iso-8859-1]
(original)
> +++ trunk/reactos/dll/win32/dbghelp/symbol.c [iso-8859-1]
Fri Jul 19 00:11:08 2013
> @@ -70,7 +70,7 @@
>
> DWORD symt_ptr2index(struct module* module,
const struct symt* sym)
> {
> -#ifdef _WIN64
> +#ifdef __x86_64__
> const struct symt** c;
> int len =
vector_length(&module->vsymt), i;
>
> @@ -91,7 +91,7 @@
>
> struct symt* symt_index2ptr(struct module* module,
DWORD id)
> {
> -#ifdef _WIN64
> +#ifdef __x86_64__
> if (!id-- || id >=
vector_length(&module->vsymt)) return NULL;
> return *(struct symt**)vector_at(&module->vsymt,
id);
> #else
>
>
>