From 5fcfb316a381fe4d855c18f3604a2d2add73088e Mon Sep 17 00:00:00 2001 From: Raphael <128667641+irp24@users.noreply.github.com> Date: Thu, 12 Mar 2026 10:22:28 +0100 Subject: [PATCH] Fix SymLoadModuleEx failing to find PDB files PDB loading fails when Alcatraz is run from a different directory than the target PE. Fixed by setting the symbol search path to the directory containing the target file. --- Alcatraz/pdbparser/pdbparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Alcatraz/pdbparser/pdbparser.cpp b/Alcatraz/pdbparser/pdbparser.cpp index 815eb47..c7a4597 100644 --- a/Alcatraz/pdbparser/pdbparser.cpp +++ b/Alcatraz/pdbparser/pdbparser.cpp @@ -51,6 +51,7 @@ pdbparser::pdbparser(pe64* pe) { } + SymSetSearchPath(GetCurrentProcess(), std::filesystem::path(pdb_path).parent_path().string().c_str()); this->module_base = reinterpret_cast(SymLoadModuleEx(GetCurrentProcess(), 0, pdb_path.c_str(), 0, 0x10000000, static_cast(std::filesystem::file_size(pdb_path)), 0, 0)); @@ -115,4 +116,4 @@ std::vectorpdbparser::parse_functions() { throw std::runtime_error("couldn't enum symbols"); return functions; -} \ No newline at end of file +}