From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/2] qemu/compiler: Define QEMU_ARTIFICIAL
Date: Tue, 16 Sep 2014 10:46:46 -0700 [thread overview]
Message-ID: <1410889607-27465-2-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1410889607-27465-1-git-send-email-rth@twiddle.net>
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 <rth@twiddle.net>
---
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
next prev parent reply other threads:[~2014-09-16 17:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 17:46 [Qemu-devel] [PATCH 0/2] Always enable TCGv type checking Richard Henderson
2014-09-16 17:46 ` Richard Henderson [this message]
2014-09-16 17:58 ` [Qemu-devel] [PATCH 1/2] qemu/compiler: Define QEMU_ARTIFICIAL Peter Maydell
2014-09-16 17:46 ` [Qemu-devel] [PATCH 2/2] tcg: Always enable TCGv type checking Richard Henderson
2014-09-16 18:06 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410889607-27465-2-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).