Don't write to inferior_ptid in linux_get_siginfo_data
[deliverable/binutils-gdb.git] / sim / common / sim-core.c
index b14799ff15f7242269b25beb322970bd133e819c..df46def27573e34f91224d03b4d961eb7ff3a798 100644 (file)
@@ -1,6 +1,6 @@
 /* The common simulator framework for GDB, the GNU Debugger.
 
-   Copyright 2002-2016 Free Software Foundation, Inc.
+   Copyright 2002-2020 Free Software Foundation, Inc.
 
    Contributed by Andrew Cagney and Red Hat.
 
@@ -30,6 +30,8 @@
 #include "sim-hw.h"
 #endif
 
+#include <stdlib.h>
+
 /* "core" module install handler.
 
    This is called via sim_module_install to install the "core"
@@ -587,7 +589,7 @@ sim_core_set_xor (SIM_DESC sd,
            mask = 0;
          while (i - 1 < WITH_XOR_ENDIAN)
            {
-             cpu_core->xor[i-1] = mask;
+             cpu_core->byte_xor[i-1] = mask;
              mask = (mask << 1) & (WITH_XOR_ENDIAN - 1);
              i = (i << 1);
            }
@@ -634,7 +636,8 @@ sim_core_xor_read_buffer (SIM_DESC sd,
                          address_word addr,
                          unsigned nr_bytes)
 {
-  address_word byte_xor = (cpu == NULL ? STATE_CORE (sd)->byte_xor : CPU_CORE (cpu)->xor[0]);
+  address_word byte_xor
+    = (cpu == NULL ? STATE_CORE (sd)->byte_xor : CPU_CORE (cpu)->byte_xor[0]);
   if (!WITH_XOR_ENDIAN || !byte_xor)
     return sim_core_read_buffer (sd, cpu, map, buffer, addr, nr_bytes);
   else
@@ -686,7 +689,8 @@ sim_core_xor_write_buffer (SIM_DESC sd,
                           address_word addr,
                           unsigned nr_bytes)
 {
-  address_word byte_xor = (cpu == NULL ? STATE_CORE (sd)->byte_xor : CPU_CORE (cpu)->xor[0]);
+  address_word byte_xor
+    = (cpu == NULL ? STATE_CORE (sd)->byte_xor : CPU_CORE (cpu)->byte_xor[0]);
   if (!WITH_XOR_ENDIAN || !byte_xor)
     return sim_core_write_buffer (sd, cpu, map, buffer, addr, nr_bytes);
   else
This page took 0.537104 seconds and 4 git commands to generate.