tcg/i386: Use GDB JIT debugging interface only for hosts with ELF
PATCH 1/1 tcg/i386: Use GDB JIT debugging interface only for hosts with ELF
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 Richard Henderson <[email protected]>
Cc Blue Swirl <[email protected]>
Signed-off-by Stefan Weil <[email protected]>
--- tcg/i386/tcg-target.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
tcg/i386/tcg-target.c +3 -1
@@ -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_64static DebugFrame debug_frame = { .cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */
Signature · 1 line
1.7.9