From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYgDm-0002eO-SU for qemu-devel@nongnu.org; Mon, 29 Sep 2014 15:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYgDg-0001zP-LJ for qemu-devel@nongnu.org; Mon, 29 Sep 2014 15:02:54 -0400 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]:53860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYgDg-0001yH-GR for qemu-devel@nongnu.org; Mon, 29 Sep 2014 15:02:48 -0400 Received: by mail-ie0-f173.google.com with SMTP id lx4so4786156iec.18 for ; Mon, 29 Sep 2014 12:02:43 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 29 Sep 2014 12:01:57 -0700 Message-Id: <1412017318-4331-9-git-send-email-rth@twiddle.net> In-Reply-To: <1412017318-4331-1-git-send-email-rth@twiddle.net> References: <1412017318-4331-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL v2 8/9] 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. 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