From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTwqL-0004qo-QD for qemu-devel@nongnu.org; Tue, 16 Sep 2014 13:47:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTwqE-0005Ds-Ud for qemu-devel@nongnu.org; Tue, 16 Sep 2014 13:47:09 -0400 Received: from mail-pd0-x22a.google.com ([2607:f8b0:400e:c02::22a]:52743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTwqE-0005Cz-Md for qemu-devel@nongnu.org; Tue, 16 Sep 2014 13:47:02 -0400 Received: by mail-pd0-f170.google.com with SMTP id fp1so262902pdb.1 for ; Tue, 16 Sep 2014 10:46:58 -0700 (PDT) Received: from pike.twiddle.home.com (70-35-38-154.static.wiline.com. [70.35.38.154]) by mx.google.com with ESMTPSA id ke2sm14631357pbc.90.2014.09.16.10.46.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 10:46:57 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Tue, 16 Sep 2014 10:46:46 -0700 Message-Id: <1410889607-27465-2-git-send-email-rth@twiddle.net> In-Reply-To: <1410889607-27465-1-git-send-email-rth@twiddle.net> References: <1410889607-27465-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 1/2] qemu/compiler: Define QEMU_ARTIFICIAL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.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