From b7e8110a3089d51ae08a3c4fb63a36de1652702c Mon Sep 17 00:00:00 2001
From: vaxerski <vaxry@vaxry.net>
Date: Wed, 27 Dec 2023 19:23:06 +0100
Subject: [PATCH] pluginapi: log assembler return

---
 src/plugins/HookSystem.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/HookSystem.cpp b/src/plugins/HookSystem.cpp
index e09fb4f72..abce7a3e1 100644
--- a/src/plugins/HookSystem.cpp
+++ b/src/plugins/HookSystem.cpp
@@ -104,7 +104,9 @@ CFunctionHook::SAssembly CFunctionHook::fixInstructionProbeRIPCalls(const SInstr
     std::ofstream ofs("/tmp/hypr/.hookcode.asm", std::ios::trunc);
     ofs << assemblyBuilder;
     ofs.close();
-    execAndGet("cc -x assembler -c /tmp/hypr/.hookcode.asm -o /tmp/hypr/.hookbinary.o && objcopy -O binary -j .text /tmp/hypr/.hookbinary.o /tmp/hypr/.hookbinary2.o");
+    std::string ret = execAndGet(
+        "cc -x assembler -c /tmp/hypr/.hookcode.asm -o /tmp/hypr/.hookbinary.o 2>&1 && objcopy -O binary -j .text /tmp/hypr/.hookbinary.o /tmp/hypr/.hookbinary2.o 2>&1");
+    Debug::log(LOG, "[functionhook] assembler returned:\n{}", ret);
     if (!std::filesystem::exists("/tmp/hypr/.hookbinary2.o")) {
         std::filesystem::remove("/tmp/hypr/.hookcode.asm");
         std::filesystem::remove("/tmp/hypr/.hookbinary.asm");