]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use target_desc fields expedite_regs and xmltarget ifndef IN_PROCESS_AGENT
authorYao Qi <yao.qi@linaro.org>
Mon, 22 May 2017 21:42:51 +0000 (22:42 +0100)
committerYao Qi <yao.qi@linaro.org>
Tue, 20 Jun 2017 10:34:12 +0000 (11:34 +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-06  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-06  Yao Qi  <yao.qi@linaro.org>

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

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

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);