libbacktrace: load Windows modules

Patch from Björn Schäpers <bjoern@hazardy.de>.

	* configure.ac: Checked for tlhelp32.h
	* pecoff.c: Include <tlhelp32.h> if available.
	(backtrace_initialize): Use tlhelp32 api for a snapshot to
	detect loaded modules.
	(coff_add): New argument for the module handle of the file,
	to get the base address.
	* configure, config.h.in: Regenerate.
This commit is contained in:
Ian Lance Taylor
2024-04-28 11:14:17 -07:00
parent ae1e707dba
commit 0e933e763f
4 changed files with 87 additions and 8 deletions

View File

@@ -374,6 +374,10 @@ if test "$have_loadquery" = "yes"; then
fi
AC_CHECK_HEADERS(windows.h)
AC_CHECK_HEADERS(tlhelp32.h, [], [],
[#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif])
# Check for the fcntl function.
if test -n "${with_target_subdir}"; then