qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tcg/i386: Use GDB JIT debugging interface only for hosts with ELF
@ 2012-04-06  6:08 Stefan Weil
  0 siblings, 0 replies; only message in thread
From: Stefan Weil @ 2012-04-06  6:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Stefan Weil, Richard Henderson

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 <rth@twiddle.net>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 tcg/i386/tcg-target.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 871a7e7..e34ea4b 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -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 */
-- 
1.7.9

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-06  6:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-06  6:08 [Qemu-devel] [PATCH] tcg/i386: Use GDB JIT debugging interface only for hosts with ELF Stefan Weil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).