[PATCH 6/4] libbacktrace: Add loaded dlls after initialize
Eli Zaretskii
eliz@gnu.org
Sun Jan 7 06:50:31 GMT 2024
> Date: Sat, 6 Jan 2024 23:15:24 +0100
> From: Björn Schäpers <gcc@hazardy.de>
> Cc: gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org
>
> This patch adds libraries which are loaded after backtrace_initialize, like
> plugins or similar.
>
> I don't know what style is preferred for the Win32 typedefs, should the code use
> PVOID or void*?
It doesn't matter, at least not if the source file includes the
Windows header files (where PVOID is defined).
> + if (reason != /*LDR_DLL_NOTIFICATION_REASON_LOADED*/1)
IMO, it would be better to supply a #define if undefined:
#ifndef LDR_DLL_NOTIFICATION_REASON_LOADED
# define LDR_DLL_NOTIFICATION_REASON_LOADED 1
#endif
> + if (!GetModuleHandleEx (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
> + | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
> + (TCHAR*) notification_data->dll_base,
Is TCHAR correct here? does libbacktrace indeed use TCHAR and relies
on compile-time definition of UNICODE? (I'm not familiar with the
internals of libbacktrace, so apologies if this is a silly question.)
Thanks.
More information about the Gcc
mailing list