qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] tcg/i386: Use GDB JIT debugging interface on


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH v2] tcg/i386: Use GDB JIT debugging interface only for hosts with ELF
Date: Sat, 07 Apr 2012 19:51:48 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120317 Iceowl/1.0b1 Icedove/3.0.11

Am 07.04.2012 18:23, schrieb Peter Maydell:
On 7 April 2012 16:53, Stefan Weil <address@hidden> wrote:
Not all i386 / x86_64 hosts use ELF.
Ask the compiler whether ELF is used.
 tcg/i386/tcg-target.c |    6 +++++-

+#if !defined(__ELF__)
+    /* Host machine without ELF. */

Hmm, should this check maybe go in the generic tcg code
rather than the i386 specific bits?

-- PMM

Extract from tcg/tcg.c:

#ifdef ELF_HOST_MACHINE
/* In order to use this feature, the backend needs to do three things:

   (1) Define ELF_HOST_MACHINE to indicate both what value to
       put into the ELF image and to indicate support for the feature.

   (2) Define tcg_register_jit.  This should create a buffer containing
       the contents of a .debug_frame section that describes the post-
       prologue unwind info for the tcg machine.

   (3) Call tcg_register_jit_int, with the constructed .debug_frame.
*/

So the generic tcg code checks ELF_HOST_MACHINE.

I see no reasonable way to simplify the checks, because each tcg target
must decide whether it supports that feature or not.

Happy Easter

Stefan W.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]