Use target_desc fields expedite_regs and xmltarget ifndef IN_PROCESS_AGENT
authorYao Qi <yao.qi@linaro.org>
Thu, 29 Jun 2017 11:41:50 +0000 (12:41 +0100)
committerYao Qi <yao.qi@linaro.org>
Thu, 29 Jun 2017 11:41:50 +0000 (12:41 +0100)
struct target_desc is used by both GDBserver and IPA, but fields
expedite_regs and xmltarget are only used in GDBserver, so this patch wraps
these two fields by ifndef IN_PROCESS_AGENT.  This patch also changes
regformats/regdat.sh to generate .c files in this way too.

gdb/gdbserver:

2017-06-29  Yao Qi  <yao.qi@linaro.org>

* tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
Remove.
[IN_PROCESS_AGENT] <xmltarget>: Likewise.

gdb:

2017-06-29  Yao Qi  <yao.qi@linaro.org>

* regformats/regdat.sh: Generate code with
"ifndef IN_PROCESS_AGENT".

gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/tdesc.h
gdb/regformats/regdat.sh

index a82026f95e65f51d9ffae4d0f9b255df871c1d00..9be08dda1fe6bc0c2f6c7d9cbc252f6076e9f618 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-29  Yao Qi  <yao.qi@linaro.org>
+
+       * regformats/regdat.sh: Generate code with
+       "ifndef IN_PROCESS_AGENT".
+
 2017-06-28  Pedro Alves  <palves@redhat.com>
 
        * command.h: Include "common/scoped_restore.h".
index 63b54f6f77ba7460059370b062642c0f7db839a8..4ae5b33b5914cce2a7e8da8f8f555a2e0cb9ebb9 100644 (file)
@@ -1,3 +1,9 @@
+2017-06-29  Yao Qi  <yao.qi@linaro.org>
+
+       * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
+       Remove.
+       [IN_PROCESS_AGENT] <xmltarget>: Likewise.
+
 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
 
        * Makefile.in (IPA_OBJS): Sort and format one item per line.
index ada879dfa91a9fd4ff6cbf774c3fe90fccc3b1c7..034127864beec4ec52bc66e46e0a885284fc5bd8 100644 (file)
@@ -36,6 +36,7 @@ struct target_desc
   /* The register cache size, in bytes.  */
   int registers_size;
 
+#ifndef IN_PROCESS_AGENT
   /* An array of register names.  These are the "expedite" registers:
      registers whose values are sent along with stop replies.  */
   const char **expedite_regs;
@@ -45,6 +46,7 @@ struct target_desc
      verbatim XML code (prefixed with a '@') or else the name of the
      actual XML file to be used in place of "target.xml".  */
   const char *xmltarget;
+#endif
 };
 
 /* Copy target description SRC to DEST.  */
index 4c73352108683bb00ab64f3ee69e011aa6484b4c..651f70392caa7890beb7acede0d087d4916fefac 100755 (executable)
@@ -179,8 +179,11 @@ init_registers_${name} (void)
 
   result->reg_defs = regs_${name};
   result->num_registers = sizeof (regs_${name}) / sizeof (regs_${name}[0]);
+
+#ifndef IN_PROCESS_AGENT
   result->expedite_regs = expedite_regs_${name};
   result->xmltarget = xmltarget_${name};
+#endif
 
   init_target_desc (result);
 
This page took 0.037428 seconds and 4 git commands to generate.