aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-09-21 12:31:51 +0100
committerYao Qi <yao.qi@linaro.org>2015-09-21 14:54:31 +0100
commit9812b2e60750cc7bbfa252d9ae8d85a72a399e01 (patch)
tree4c9aa81fd0fcee7f73af70ca34ecad459c0e44ff
parent18fe412be41dc4c1b0cce91499189dcf94e603f6 (diff)
downloadbinutils-9812b2e60750cc7bbfa252d9ae8d85a72a399e01.zip
binutils-9812b2e60750cc7bbfa252d9ae8d85a72a399e01.tar.gz
binutils-9812b2e60750cc7bbfa252d9ae8d85a72a399e01.tar.bz2
Wrap gdb_agent_op_sizes by #ifndef IN_PROCESS_AGENT
Hi, I see the following build warning with recent GCC built from mainline, aarch64-none-linux-gnu-gcc -g -O2 -I. -I/home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver -I/home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/../common -I/home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/../regformats -I/home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/.. -I/home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/../../include -I/home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/../gnulib/import -Ibuild-gnulib-gdbserver/import -Wall -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body -Wdeclaration-after-statement -Werror -DGDBSERVER -DCONFIG_UST_GDB_INTEGRATION -fPIC -DIN_PROCESS_AGENT -fvisibility=hidden -c -o ax-ipa.o -MT ax-ipa.o -MMD -MP -MF .deps/ax-ipa.Tpo `echo " -Wall -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body -Wdeclaration-after-statement " | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"` /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/ax.c /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/ax.c:73:28: error: 'gdb_agent_op_sizes' defined but not used [-Werror=unused-const-variable] static const unsigned char gdb_agent_op_sizes [gdb_agent_op_last] = ^ cc1: all warnings being treated as errors gdb_agent_op_sizes is only used in function is_goto_target, which is defined inside #ifndef IN_PROCESS_AGENT. This warning is not arch specific, so GCC mainline for other targets should produce this warning too, although this warning is triggered by enabling aarch64 fast tracepoint. The fix is to move gdb_agent_op_sizes to gdb/gdbserver: 2015-09-21 Yao Qi <yao.qi@linaro.org> * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/ax.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 0868f0b..16b02ca 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,9 @@
2015-09-21 Yao Qi <yao.qi@linaro.org>
+ * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
+
+2015-09-21 Yao Qi <yao.qi@linaro.org>
+
* tracepoint.c (max_jump_pad_size): Remove.
2015-09-18 Yao Qi <yao.qi@linaro.org>
diff --git a/gdb/gdbserver/ax.c b/gdb/gdbserver/ax.c
index d834fbb..3d0d93d 100644
--- a/gdb/gdbserver/ax.c
+++ b/gdb/gdbserver/ax.c
@@ -69,6 +69,7 @@ static const char *gdb_agent_op_names [gdb_agent_op_last] =
#undef DEFOP
};
+#ifndef IN_PROCESS_AGENT
static const unsigned char gdb_agent_op_sizes [gdb_agent_op_last] =
{
0
@@ -76,6 +77,7 @@ static const unsigned char gdb_agent_op_sizes [gdb_agent_op_last] =
#include "ax.def"
#undef DEFOP
};
+#endif
/* A wrapper for gdb_agent_op_names that does some bounds-checking. */