title: How does GDB determine ARM architecture
body: <p>I am using gdb (arm-none-eabi) with a Texas Instruments Hercules (Cortex-R4F) processor. I'm using Texas Instrument's XDS agent as a remote GDB server</p>
  
  <p>After running </p>
  
  <pre><code>target remote ip:port 
  </code></pre>
  
  <p>in GDB, GDB will connect with the XDS GDBserver. I can then print the registers</p>
  
  <pre><code>info all-registers
  </code></pre>
  
  <p>It shows me the CPU registers, but also  f7 and fpa registers which lead me to conclude that the CPU has an floating point coprocessor (FPA). This is however not the case. The processor has vfpv3. So GDB is using the wrong register definitions which leads to problems.</p>
  
  <p>I tried to find the info in the packets sent by XDS GDB server by setting</p>
  
  <pre><code>set debug remote 1
  </code></pre>
  
  <p>but could not find any info. How does GDB determine the register definitions to use?</p>
  
  <p>Update:
  I found the set architecture command:</p>
  
  <pre><code>set architecture
  
  &gt;Requires an argument. Valid arguments are arm, armv2, armv2a, armv3, armv3m, armv4, armv4t, armv5, armv5t, armv5te, xscale, ep9312, iwmmxt, iwmmxt2, arm_any, auto.
  </code></pre>
  
  <p>Cortex-R4f is armv7 with vfpv3. How can I set it?</p>