This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA v2 12/13] Conditionally define xmltarget_${name} variable in regdat.sh
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Sat, 21 Jul 2018 12:47:19 -0600
- Subject: [RFA v2 12/13] Conditionally define xmltarget_${name} variable in regdat.sh
- References: <20180721184720.3263-1-tom@tromey.com>
This changes regdat.sh to emit the xmltarget_${name} variable inside
the #ifndef IN_PROCESS_AGENT block. This avoids a -Wunused-variable
warning for some builds. Thanks to Pedro for investigating this one.
gdb/ChangeLog
2018-07-21 Tom Tromey <tom@tromey.com>
* regformats/regdat.sh: Define xmltarget_${name} inside
#ifndef IN_PROCESS_AGENT.
---
gdb/ChangeLog | 5 +++++
gdb/regformats/regdat.sh | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh
index 5a8564ac50c..06f1ffc4305 100755
--- a/gdb/regformats/regdat.sh
+++ b/gdb/regformats/regdat.sh
@@ -163,6 +163,8 @@ done
echo
echo "static const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };"
+
+echo "#ifndef IN_PROCESS_AGENT"
if test "${feature}" != x; then
echo "static const char *xmltarget_${name} = 0;"
elif test "${xmltarget}" = x; then
@@ -184,7 +186,6 @@ fi
echo
cat <<EOF
-#ifndef IN_PROCESS_AGENT
result->xmltarget = xmltarget_${name};
#endif
--
2.13.6