]> Git Repo - qemu.git/commitdiff
tcg/i386: Use GDB JIT debugging interface only for hosts with ELF
authorStefan Weil <[email protected]>
Fri, 6 Apr 2012 06:06:41 +0000 (08:06 +0200)
committerStefan Weil <[email protected]>
Sun, 15 Apr 2012 19:25:15 +0000 (21:25 +0200)
Not all i386 / x86_64 hosts use ELF.
Ask the compiler whether ELF is used.

On w64, gdb crashes when ELF_HOST_MACHINE is defined.

Cc: Blue Swirl <[email protected]>
Acked-by: Richard Henderson <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
tcg/i386/tcg-target.c

index 871a7e74f57889eb0ed5dad2fd8d38135df9d3c3..79545e31c2dfdbecece9a48d9d34d19c16688edb 100644 (file)
@@ -2102,7 +2102,9 @@ typedef struct {
     DebugFrameFDE fde;
 } DebugFrame;
 
-#if TCG_TARGET_REG_BITS == 64
+#if !defined(__ELF__)
+    /* Host machine without ELF. */
+#elif TCG_TARGET_REG_BITS == 64
 #define ELF_HOST_MACHINE EM_X86_64
 static DebugFrame debug_frame = {
     .cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */
@@ -2156,6 +2158,7 @@ static DebugFrame debug_frame = {
 };
 #endif
 
+#if defined(ELF_HOST_MACHINE)
 void tcg_register_jit(void *buf, size_t buf_size)
 {
     /* We're expecting a 2 byte uleb128 encoded value.  */
@@ -2166,3 +2169,4 @@ void tcg_register_jit(void *buf, size_t buf_size)
 
     tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame));
 }
+#endif
This page took 0.024019 seconds and 4 git commands to generate.