From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWAgy-0005Px-Ct for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWAgt-0005iC-LW for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:40 -0400 Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:39371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWAgt-0005h4-IM for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:35 -0400 Received: by mail-qg0-f50.google.com with SMTP id q107so3472988qgd.23 for ; Mon, 22 Sep 2014 13:58:30 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 22 Sep 2014 13:57:40 -0700 Message-Id: <1411419461-24390-11-git-send-email-rth@twiddle.net> In-Reply-To: <1411419461-24390-1-git-send-email-rth@twiddle.net> References: <1411419461-24390-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 10/11] qemu/compiler: Define QEMU_ARTIFICIAL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org The combination of always_inline + artificial allows tiny inline functions to be written that do not interfere with debugging. In particular, gdb will not step into an artificial function. The always_inline attribute was introduced in gcc 4.2, and the artificial attribute was introduced in gcc 4.3. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/qemu/compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 155b358..ac7c4c4 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -24,6 +24,12 @@ #define QEMU_WARN_UNUSED_RESULT #endif +#if QEMU_GNUC_PREREQ(4, 3) +#define QEMU_ARTIFICIAL __attribute__((always_inline, artificial)) +#else +#define QEMU_ARTIFICIAL +#endif + #if defined(_WIN32) # define QEMU_PACKED __attribute__((gcc_struct, packed)) #else -- 1.9.3