aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-08-19 15:16:11 +0100
committerGary Benson <gbenson@redhat.com>2014-09-02 16:54:08 +0100
commitdf7e526582809b829ee8651a1315a17627cfea4d (patch)
tree2d5413c08d265c8ff58710341d50b2e3e0b437d3 /gdb/gdbserver
parented859da732b00d5928f0b311454fa6474c04c15b (diff)
downloadgdb-df7e526582809b829ee8651a1315a17627cfea4d.zip
gdb-df7e526582809b829ee8651a1315a17627cfea4d.tar.gz
gdb-df7e526582809b829ee8651a1315a17627cfea4d.tar.bz2
Rename 32- and 64-bit Intel files from "i386" to "x86"
This commit renames nine files that contain code used by both 32- and 64-bit Intel ports such that their names are prefixed with "x86" rather than "i386". All types, functions and variables within these files are likewise renamed such that their names are prefixed with "x86" rather than "i386". This makes GDB follow the convention used by gdbserver such that 32-bit Intel code lives in files called "i386-*", 64-bit Intel code lives in files called "amd64-*", and code for both 32- and 64-bit Intel lives in files called "x86-*". This commit only renames OS-independent files. The Linux ports of both GDB and gdbserver now follow the i386/amd64/x86 convention fully. Some ports still use the old convention where "i386" in file/function/ type/variable names can mean "32-bit only" or "32- and 64-bit" but I don't want to touch ports I can't fully test except where absolutely necessary. gdb/ChangeLog: * i386-nat.h: Renamed as... * x86-nat.h: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. * i386-nat.c: Renamed as... * x86-nat.c: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. * common/i386-xstate.h: Renamed as... * common/x86-xstate.h: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. * nat/i386-cpuid.h: Renamed as... * nat/x86-cpuid.h: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. * nat/i386-gcc-cpuid.h: Renamed as... * nat/x86-gcc-cpuid.h: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. * nat/i386-dregs.h: Renamed as... * nat/x86-dregs.h: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. * nat/i386-dregs.c: Renamed as... * nat/x86-dregs.c: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. gdb/gdbserver/ChangeLog: * i386-low.h: Renamed as... * x86-low.h: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated. * i386-low.c: Renamed as... * x86-low.c: New file. All type, function and variable name prefixes changed from "i386_" to "x86_". All references updated.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog9
-rw-r--r--gdb/gdbserver/Makefile.in4
-rw-r--r--gdb/gdbserver/configure.srv14
-rw-r--r--gdb/gdbserver/i387-fp.c92
-rw-r--r--gdb/gdbserver/linux-x86-low.c80
-rw-r--r--gdb/gdbserver/win32-i386-low.c54
-rw-r--r--gdb/gdbserver/x86-low.c (renamed from gdb/gdbserver/i386-low.c)6
-rw-r--r--gdb/gdbserver/x86-low.h (renamed from gdb/gdbserver/i386-low.h)6
8 files changed, 137 insertions, 128 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index b1e8117..c2c86df 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,14 @@
2014-09-02 Gary Benson <gbenson@redhat.com>
+ * i386-low.h: Renamed as...
+ * x86-low.h: New file. All type, function and variable name
+ prefixes changed from "i386_" to "x86_". All references updated.
+ * i386-low.c: Renamed as...
+ * x86-low.c: New file. All type, function and variable name
+ prefixes changed from "i386_" to "x86_". All references updated.
+
+2014-09-02 Gary Benson <gbenson@redhat.com>
+
* linux-x86-low.c (x86_linux_new_process): Use XCNEW.
(x86_linux_new_thread): Likewise.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 21ac6f2..1447e61 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -149,7 +149,7 @@ SFILES= $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c $(srcdir)/dll.c \
$(srcdir)/thread-db.c $(srcdir)/utils.c $(srcdir)/debug.c \
$(srcdir)/linux-arm-low.c $(srcdir)/linux-bfin-low.c \
$(srcdir)/linux-cris-low.c $(srcdir)/linux-crisv32-low.c \
- ${srcdir}/i386-low.c $(srcdir)/i387-fp.c \
+ ${srcdir}/x86-low.c $(srcdir)/i387-fp.c \
$(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \
$(srcdir)/linux-m32r-low.c \
$(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \
@@ -558,7 +558,7 @@ waitstatus.o: ../target/waitstatus.c
# Native object files rules from ../nat
-i386-dregs.o: ../nat/i386-dregs.c
+x86-dregs.o: ../nat/x86-dregs.c
$(COMPILE) $<
$(POSTCOMPILE)
linux-btrace.o: ../nat/linux-btrace.c
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 8ff9c28..679fc9f 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -99,7 +99,7 @@ case "${target}" in
srv_linux_thread_db=yes
;;
i[34567]86-*-cygwin*) srv_regobj="$srv_i386_regobj"
- srv_tgtobj="i386-low.o i386-dregs.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
srv_xmlfiles="$srv_i386_xmlfiles"
;;
i[34567]86-*-linux*) srv_regobj="$srv_i386_linux_regobj"
@@ -108,7 +108,7 @@ case "${target}" in
srv_regobj="$srv_regobj $srv_amd64_linux_regobj"
srv_xmlfiles="${srv_xmlfiles} $srv_amd64_linux_xmlfiles"
fi
- srv_tgtobj="$srv_linux_obj linux-x86-low.o i386-low.o i386-dregs.o i387-fp.o"
+ srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
srv_tgtobj="${srv_tgtobj} linux-btrace.o"
srv_linux_usrregs=yes
srv_linux_regsets=yes
@@ -125,7 +125,7 @@ case "${target}" in
;;
i[34567]86-*-mingw32ce*)
srv_regobj="$srv_i386_regobj"
- srv_tgtobj="i386-low.o i386-dregs.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
srv_tgtobj="${srv_tgtobj} wincecompat.o"
srv_xmlfiles="$srv_i386_xmlfiles"
# hostio_last_error implementation is in win32-low.c
@@ -134,7 +134,7 @@ case "${target}" in
srv_mingwce=yes
;;
i[34567]86-*-mingw*) srv_regobj="$srv_i386_regobj"
- srv_tgtobj="i386-low.o i386-dregs.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
srv_xmlfiles="$srv_i386_xmlfiles"
srv_mingw=yes
;;
@@ -315,7 +315,7 @@ case "${target}" in
srv_linux_thread_db=yes
;;
x86_64-*-linux*) srv_regobj="$srv_amd64_linux_regobj $srv_i386_linux_regobj"
- srv_tgtobj="$srv_linux_obj linux-x86-low.o i386-low.o i386-dregs.o i387-fp.o"
+ srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
srv_tgtobj="${srv_tgtobj} linux-btrace.o"
srv_xmlfiles="$srv_i386_linux_xmlfiles $srv_amd64_linux_xmlfiles"
srv_linux_usrregs=yes # This is for i386 progs.
@@ -325,12 +325,12 @@ case "${target}" in
ipa_obj="${ipa_amd64_linux_regobj} linux-amd64-ipa.o"
;;
x86_64-*-mingw*) srv_regobj="$srv_amd64_regobj"
- srv_tgtobj="i386-low.o i386-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
srv_xmlfiles="$srv_i386_xmlfiles $srv_amd64_xmlfiles"
srv_mingw=yes
;;
x86_64-*-cygwin*) srv_regobj="$srv_amd64_regobj"
- srv_tgtobj="i386-low.o i386-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
srv_xmlfiles="$srv_i386_xmlfiles"
;;
diff --git a/gdb/gdbserver/i387-fp.c b/gdb/gdbserver/i387-fp.c
index c2d0bdf..f5e20a7 100644
--- a/gdb/gdbserver/i387-fp.c
+++ b/gdb/gdbserver/i387-fp.c
@@ -18,7 +18,7 @@
#include "server.h"
#include "i387-fp.h"
-#include "i386-xstate.h"
+#include "x86-xstate.h"
static const int num_mpx_bnd_registers = 4;
static const int num_mpx_cfg_registers = 2;
@@ -288,35 +288,35 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
zero. */
if (clear_bv)
{
- if ((clear_bv & I386_XSTATE_X87))
+ if ((clear_bv & X86_XSTATE_X87))
for (i = 0; i < 8; i++)
memset (((char *) &fp->st_space[0]) + i * 16, 0, 10);
- if ((clear_bv & I386_XSTATE_SSE))
+ if ((clear_bv & X86_XSTATE_SSE))
for (i = 0; i < num_xmm_registers; i++)
memset (((char *) &fp->xmm_space[0]) + i * 16, 0, 16);
- if ((clear_bv & I386_XSTATE_AVX))
+ if ((clear_bv & X86_XSTATE_AVX))
for (i = 0; i < num_xmm_registers; i++)
memset (((char *) &fp->ymmh_space[0]) + i * 16, 0, 16);
- if ((clear_bv & I386_XSTATE_BNDREGS))
+ if ((clear_bv & X86_XSTATE_BNDREGS))
for (i = 0; i < num_mpx_bnd_registers; i++)
memset (((char *) &fp->mpx_bnd_space[0]) + i * 16, 0, 16);
- if ((clear_bv & I386_XSTATE_BNDCFG))
+ if ((clear_bv & X86_XSTATE_BNDCFG))
for (i = 0; i < num_mpx_cfg_registers; i++)
memset (((char *) &fp->mpx_cfg_space[0]) + i * 8, 0, 8);
- if ((clear_bv & I386_XSTATE_K))
+ if ((clear_bv & X86_XSTATE_K))
for (i = 0; i < num_avx512_k_registers; i++)
memset (((char *) &fp->k_space[0]) + i * 8, 0, 8);
- if ((clear_bv & I386_XSTATE_ZMM_H))
+ if ((clear_bv & X86_XSTATE_ZMM_H))
for (i = 0; i < num_avx512_zmmh_low_registers; i++)
memset (((char *) &fp->zmmh_low_space[0]) + i * 32, 0, 32);
- if ((clear_bv & I386_XSTATE_ZMM))
+ if ((clear_bv & X86_XSTATE_ZMM))
{
for (i = 0; i < num_avx512_zmmh_high_registers; i++)
memset (((char *) &fp->zmmh_low_space[0]) + 32 + i * 64, 0, 32);
@@ -328,7 +328,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
}
/* Check if any x87 registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_X87))
+ if ((x86_xcr0 & X86_XSTATE_X87))
{
int st0_regnum = find_regno (regcache->tdesc, "st0");
@@ -338,14 +338,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->st_space[0]) + i * 16;
if (memcmp (raw, p, 10))
{
- xstate_bv |= I386_XSTATE_X87;
+ xstate_bv |= X86_XSTATE_X87;
memcpy (p, raw, 10);
}
}
}
/* Check if any SSE registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_SSE))
+ if ((x86_xcr0 & X86_XSTATE_SSE))
{
int xmm0_regnum = find_regno (regcache->tdesc, "xmm0");
@@ -355,14 +355,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->xmm_space[0]) + i * 16;
if (memcmp (raw, p, 16))
{
- xstate_bv |= I386_XSTATE_SSE;
+ xstate_bv |= X86_XSTATE_SSE;
memcpy (p, raw, 16);
}
}
}
/* Check if any AVX registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_AVX))
+ if ((x86_xcr0 & X86_XSTATE_AVX))
{
int ymm0h_regnum = find_regno (regcache->tdesc, "ymm0h");
@@ -372,14 +372,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->ymmh_space[0]) + i * 16;
if (memcmp (raw, p, 16))
{
- xstate_bv |= I386_XSTATE_AVX;
+ xstate_bv |= X86_XSTATE_AVX;
memcpy (p, raw, 16);
}
}
}
/* Check if any bound register has changed. */
- if ((x86_xcr0 & I386_XSTATE_BNDREGS))
+ if ((x86_xcr0 & X86_XSTATE_BNDREGS))
{
int bnd0r_regnum = find_regno (regcache->tdesc, "bnd0raw");
@@ -389,14 +389,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->mpx_bnd_space[0]) + i * 16;
if (memcmp (raw, p, 16))
{
- xstate_bv |= I386_XSTATE_BNDREGS;
+ xstate_bv |= X86_XSTATE_BNDREGS;
memcpy (p, raw, 16);
}
}
}
/* Check if any status register has changed. */
- if ((x86_xcr0 & I386_XSTATE_BNDCFG))
+ if ((x86_xcr0 & X86_XSTATE_BNDCFG))
{
int bndcfg_regnum = find_regno (regcache->tdesc, "bndcfgu");
@@ -406,14 +406,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->mpx_cfg_space[0]) + i * 8;
if (memcmp (raw, p, 8))
{
- xstate_bv |= I386_XSTATE_BNDCFG;
+ xstate_bv |= X86_XSTATE_BNDCFG;
memcpy (p, raw, 8);
}
}
}
/* Check if any K registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_K))
+ if ((x86_xcr0 & X86_XSTATE_K))
{
int k0_regnum = find_regno (regcache->tdesc, "k0");
@@ -423,14 +423,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->k_space[0]) + i * 8;
if (memcmp (raw, p, 8) != 0)
{
- xstate_bv |= I386_XSTATE_K;
+ xstate_bv |= X86_XSTATE_K;
memcpy (p, raw, 8);
}
}
}
/* Check if any of ZMM0H-ZMM15H registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_ZMM_H))
+ if ((x86_xcr0 & X86_XSTATE_ZMM_H))
{
int zmm0h_regnum = find_regno (regcache->tdesc, "zmm0h");
@@ -440,14 +440,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->zmmh_low_space[0]) + i * 32;
if (memcmp (raw, p, 32) != 0)
{
- xstate_bv |= I386_XSTATE_ZMM_H;
+ xstate_bv |= X86_XSTATE_ZMM_H;
memcpy (p, raw, 32);
}
}
}
/* Check if any of ZMM16H-ZMM31H registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_ZMM))
+ if ((x86_xcr0 & X86_XSTATE_ZMM))
{
int zmm16h_regnum = find_regno (regcache->tdesc, "zmm16h");
@@ -457,14 +457,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->zmmh_low_space[0]) + 32 + i * 64;
if (memcmp (raw, p, 32) != 0)
{
- xstate_bv |= I386_XSTATE_ZMM;
+ xstate_bv |= X86_XSTATE_ZMM;
memcpy (p, raw, 32);
}
}
}
/* Check if any XMM_AVX512 registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_ZMM))
+ if ((x86_xcr0 & X86_XSTATE_ZMM))
{
int xmm_avx512_regnum = find_regno (regcache->tdesc, "xmm16");
@@ -474,14 +474,14 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->zmmh_high_space[0]) + i * 64;
if (memcmp (raw, p, 16) != 0)
{
- xstate_bv |= I386_XSTATE_ZMM;
+ xstate_bv |= X86_XSTATE_ZMM;
memcpy (p, raw, 16);
}
}
}
/* Check if any YMMH_AVX512 registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_ZMM))
+ if ((x86_xcr0 & X86_XSTATE_ZMM))
{
int ymmh_avx512_regnum = find_regno (regcache->tdesc, "ymm16h");
@@ -491,7 +491,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
p = ((char *) &fp->zmmh_high_space[0]) + 16 + i * 64;
if (memcmp (raw, p, 16) != 0)
{
- xstate_bv |= I386_XSTATE_ZMM;
+ xstate_bv |= X86_XSTATE_ZMM;
memcpy (p, raw, 16);
}
}
@@ -653,11 +653,11 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
clear_bv = (~fp->xstate_bv) & x86_xcr0;
/* Check if any x87 registers are changed. */
- if ((x86_xcr0 & I386_XSTATE_X87) != 0)
+ if ((x86_xcr0 & X86_XSTATE_X87) != 0)
{
int st0_regnum = find_regno (regcache->tdesc, "st0");
- if ((clear_bv & I386_XSTATE_X87) != 0)
+ if ((clear_bv & X86_XSTATE_X87) != 0)
{
for (i = 0; i < 8; i++)
supply_register_zeroed (regcache, i + st0_regnum);
@@ -670,11 +670,11 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
}
- if ((x86_xcr0 & I386_XSTATE_SSE) != 0)
+ if ((x86_xcr0 & X86_XSTATE_SSE) != 0)
{
int xmm0_regnum = find_regno (regcache->tdesc, "xmm0");
- if ((clear_bv & I386_XSTATE_SSE))
+ if ((clear_bv & X86_XSTATE_SSE))
{
for (i = 0; i < num_xmm_registers; i++)
supply_register_zeroed (regcache, i + xmm0_regnum);
@@ -687,11 +687,11 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
}
- if ((x86_xcr0 & I386_XSTATE_AVX) != 0)
+ if ((x86_xcr0 & X86_XSTATE_AVX) != 0)
{
int ymm0h_regnum = find_regno (regcache->tdesc, "ymm0h");
- if ((clear_bv & I386_XSTATE_AVX) != 0)
+ if ((clear_bv & X86_XSTATE_AVX) != 0)
{
for (i = 0; i < num_xmm_registers; i++)
supply_register_zeroed (regcache, i + ymm0h_regnum);
@@ -704,12 +704,12 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
}
- if ((x86_xcr0 & I386_XSTATE_BNDREGS))
+ if ((x86_xcr0 & X86_XSTATE_BNDREGS))
{
int bnd0r_regnum = find_regno (regcache->tdesc, "bnd0raw");
- if ((clear_bv & I386_XSTATE_BNDREGS) != 0)
+ if ((clear_bv & X86_XSTATE_BNDREGS) != 0)
{
for (i = 0; i < num_mpx_bnd_registers; i++)
supply_register_zeroed (regcache, i + bnd0r_regnum);
@@ -723,11 +723,11 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
- if ((x86_xcr0 & I386_XSTATE_BNDCFG))
+ if ((x86_xcr0 & X86_XSTATE_BNDCFG))
{
int bndcfg_regnum = find_regno (regcache->tdesc, "bndcfgu");
- if ((clear_bv & I386_XSTATE_BNDCFG) != 0)
+ if ((clear_bv & X86_XSTATE_BNDCFG) != 0)
{
for (i = 0; i < num_mpx_cfg_registers; i++)
supply_register_zeroed (regcache, i + bndcfg_regnum);
@@ -740,11 +740,11 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
}
- if ((x86_xcr0 & I386_XSTATE_K) != 0)
+ if ((x86_xcr0 & X86_XSTATE_K) != 0)
{
int k0_regnum = find_regno (regcache->tdesc, "k0");
- if ((clear_bv & I386_XSTATE_K) != 0)
+ if ((clear_bv & X86_XSTATE_K) != 0)
{
for (i = 0; i < num_avx512_k_registers; i++)
supply_register_zeroed (regcache, i + k0_regnum);
@@ -757,11 +757,11 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
}
- if ((x86_xcr0 & I386_XSTATE_ZMM_H) != 0)
+ if ((x86_xcr0 & X86_XSTATE_ZMM_H) != 0)
{
int zmm0h_regnum = find_regno (regcache->tdesc, "zmm0h");
- if ((clear_bv & I386_XSTATE_ZMM_H) != 0)
+ if ((clear_bv & X86_XSTATE_ZMM_H) != 0)
{
for (i = 0; i < num_avx512_zmmh_low_registers; i++)
supply_register_zeroed (regcache, i + zmm0h_regnum);
@@ -774,13 +774,13 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
}
- if ((x86_xcr0 & I386_XSTATE_ZMM) != 0)
+ if ((x86_xcr0 & X86_XSTATE_ZMM) != 0)
{
int zmm16h_regnum = find_regno (regcache->tdesc, "zmm16h");
int ymm16h_regnum = find_regno (regcache->tdesc, "ymm16h");
int xmm16_regnum = find_regno (regcache->tdesc, "xmm16");
- if ((clear_bv & I386_XSTATE_ZMM) != 0)
+ if ((clear_bv & X86_XSTATE_ZMM) != 0)
{
for (i = 0; i < num_avx512_zmmh_high_registers; i++)
supply_register_zeroed (regcache, i + zmm16h_regnum);
@@ -837,4 +837,4 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
/* Default to SSE. */
-unsigned long long x86_xcr0 = I386_XSTATE_SSE_MASK;
+unsigned long long x86_xcr0 = X86_XSTATE_SSE_MASK;
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 8666f6f..6b73886 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -23,8 +23,8 @@
#include <inttypes.h>
#include "linux-low.h"
#include "i387-fp.h"
-#include "i386-low.h"
-#include "i386-xstate.h"
+#include "x86-low.h"
+#include "x86-xstate.h"
#include "gdb_proc_service.h"
/* Don't include elf/common.h if linux/elf.h got included by
@@ -148,7 +148,7 @@ static const char *xmltarget_amd64_linux_no_xml = "@<target>\
struct arch_process_info
{
- struct i386_debug_reg_state debug_reg_state;
+ struct x86_debug_reg_state debug_reg_state;
};
/* Per-thread arch-specific data we want to keep. */
@@ -587,7 +587,7 @@ update_debug_registers_callback (struct inferior_list_entry *entry,
/* Update the inferior's debug register REGNUM from STATE. */
static void
-i386_dr_low_set_addr (int regnum, CORE_ADDR addr)
+x86_dr_low_set_addr (int regnum, CORE_ADDR addr)
{
/* Only update the threads of this process. */
int pid = pid_of (current_inferior);
@@ -600,7 +600,7 @@ i386_dr_low_set_addr (int regnum, CORE_ADDR addr)
/* Return the inferior's debug register REGNUM. */
static CORE_ADDR
-i386_dr_low_get_addr (int regnum)
+x86_dr_low_get_addr (int regnum)
{
ptid_t ptid = ptid_of (current_inferior);
@@ -612,7 +612,7 @@ i386_dr_low_get_addr (int regnum)
/* Update the inferior's DR7 debug control register from STATE. */
static void
-i386_dr_low_set_control (unsigned long control)
+x86_dr_low_set_control (unsigned long control)
{
/* Only update the threads of this process. */
int pid = pid_of (current_inferior);
@@ -623,7 +623,7 @@ i386_dr_low_set_control (unsigned long control)
/* Return the inferior's DR7 debug control register. */
static unsigned long
-i386_dr_low_get_control (void)
+x86_dr_low_get_control (void)
{
ptid_t ptid = ptid_of (current_inferior);
@@ -634,7 +634,7 @@ i386_dr_low_get_control (void)
and record it in STATE. */
static unsigned long
-i386_dr_low_get_status (void)
+x86_dr_low_get_status (void)
{
ptid_t ptid = ptid_of (current_inferior);
@@ -642,13 +642,13 @@ i386_dr_low_get_status (void)
}
/* Low-level function vector. */
-struct i386_dr_low_type i386_dr_low =
+struct x86_dr_low_type x86_dr_low =
{
- i386_dr_low_set_control,
- i386_dr_low_set_addr,
- i386_dr_low_get_addr,
- i386_dr_low_get_status,
- i386_dr_low_get_control,
+ x86_dr_low_set_control,
+ x86_dr_low_set_addr,
+ x86_dr_low_get_addr,
+ x86_dr_low_get_status,
+ x86_dr_low_get_control,
sizeof (void *),
};
@@ -686,10 +686,10 @@ x86_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
{
enum target_hw_bp_type hw_type
= raw_bkpt_type_to_target_hw_bp_type (type);
- struct i386_debug_reg_state *state
+ struct x86_debug_reg_state *state
= &proc->private->arch_private->debug_reg_state;
- return i386_dr_insert_watchpoint (state, hw_type, addr, size);
+ return x86_dr_insert_watchpoint (state, hw_type, addr, size);
}
default:
@@ -715,10 +715,10 @@ x86_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
{
enum target_hw_bp_type hw_type
= raw_bkpt_type_to_target_hw_bp_type (type);
- struct i386_debug_reg_state *state
+ struct x86_debug_reg_state *state
= &proc->private->arch_private->debug_reg_state;
- return i386_dr_remove_watchpoint (state, hw_type, addr, size);
+ return x86_dr_remove_watchpoint (state, hw_type, addr, size);
}
default:
/* Unsupported. */
@@ -730,7 +730,7 @@ static int
x86_stopped_by_watchpoint (void)
{
struct process_info *proc = current_process ();
- return i386_dr_stopped_by_watchpoint (&proc->private->arch_private->debug_reg_state);
+ return x86_dr_stopped_by_watchpoint (&proc->private->arch_private->debug_reg_state);
}
static CORE_ADDR
@@ -738,8 +738,8 @@ x86_stopped_data_address (void)
{
struct process_info *proc = current_process ();
CORE_ADDR addr;
- if (i386_dr_stopped_data_address (&proc->private->arch_private->debug_reg_state,
- &addr))
+ if (x86_dr_stopped_data_address (&proc->private->arch_private->debug_reg_state,
+ &addr))
return addr;
return 0;
}
@@ -751,7 +751,7 @@ x86_linux_new_process (void)
{
struct arch_process_info *info = XCNEW (struct arch_process_info);
- i386_low_init_dregs (&info->debug_reg_state);
+ x86_low_init_dregs (&info->debug_reg_state);
return info;
}
@@ -782,7 +782,7 @@ x86_linux_prepare_to_resume (struct lwp_info *lwp)
int i;
int pid = ptid_get_pid (ptid);
struct process_info *proc = find_process_pid (pid);
- struct i386_debug_reg_state *state
+ struct x86_debug_reg_state *state
= &proc->private->arch_private->debug_reg_state;
x86_linux_dr_set (ptid, DR_CONTROL, 0);
@@ -794,7 +794,7 @@ x86_linux_prepare_to_resume (struct lwp_info *lwp)
/* If we're setting a watchpoint, any change the inferior
had done itself to the debug registers needs to be
- discarded, otherwise, i386_dr_stopped_data_address can
+ discarded, otherwise, x86_dr_stopped_data_address can
get confused. */
clear_status = 1;
}
@@ -1334,7 +1334,7 @@ x86_linux_read_description (void)
if (!use_xml)
{
- x86_xcr0 = I386_XSTATE_SSE_MASK;
+ x86_xcr0 = X86_XSTATE_SSE_MASK;
/* Don't use XML. */
#ifdef __x86_64__
@@ -1347,7 +1347,7 @@ x86_linux_read_description (void)
if (have_ptrace_getregset == -1)
{
- uint64_t xstateregs[(I386_XSTATE_SSE_SIZE / sizeof (uint64_t))];
+ uint64_t xstateregs[(X86_XSTATE_SSE_SIZE / sizeof (uint64_t))];
struct iovec iov;
iov.iov_base = xstateregs;
@@ -1369,7 +1369,7 @@ x86_linux_read_description (void)
for (regset = x86_regsets;
regset->fill_function != NULL; regset++)
if (regset->get_request == PTRACE_GETREGSET)
- regset->size = I386_XSTATE_SIZE (xcr0);
+ regset->size = X86_XSTATE_SIZE (xcr0);
else if (regset->type != GENERAL_REGS)
regset->size = 0;
}
@@ -1377,7 +1377,7 @@ x86_linux_read_description (void)
/* Check the native XCR0 only if PTRACE_GETREGSET is available. */
xcr0_features = (have_ptrace_getregset
- && (xcr0 & I386_XSTATE_ALL_MASK));
+ && (xcr0 & X86_XSTATE_ALL_MASK));
if (xcr0_features)
x86_xcr0 = xcr0;
@@ -1389,15 +1389,15 @@ x86_linux_read_description (void)
{
if (xcr0_features)
{
- switch (xcr0 & I386_XSTATE_ALL_MASK)
+ switch (xcr0 & X86_XSTATE_ALL_MASK)
{
- case I386_XSTATE_AVX512_MASK:
+ case X86_XSTATE_AVX512_MASK:
return tdesc_amd64_avx512_linux;
- case I386_XSTATE_MPX_MASK:
+ case X86_XSTATE_MPX_MASK:
return tdesc_amd64_mpx_linux;
- case I386_XSTATE_AVX_MASK:
+ case X86_XSTATE_AVX_MASK:
return tdesc_amd64_avx_linux;
default:
@@ -1411,13 +1411,13 @@ x86_linux_read_description (void)
{
if (xcr0_features)
{
- switch (xcr0 & I386_XSTATE_ALL_MASK)
+ switch (xcr0 & X86_XSTATE_ALL_MASK)
{
- case I386_XSTATE_AVX512_MASK:
+ case X86_XSTATE_AVX512_MASK:
return tdesc_x32_avx512_linux;
- case I386_XSTATE_MPX_MASK: /* No MPX on x32. */
- case I386_XSTATE_AVX_MASK:
+ case X86_XSTATE_MPX_MASK: /* No MPX on x32. */
+ case X86_XSTATE_AVX_MASK:
return tdesc_x32_avx_linux;
default:
@@ -1433,15 +1433,15 @@ x86_linux_read_description (void)
{
if (xcr0_features)
{
- switch (xcr0 & I386_XSTATE_ALL_MASK)
+ switch (xcr0 & X86_XSTATE_ALL_MASK)
{
- case (I386_XSTATE_AVX512_MASK):
+ case (X86_XSTATE_AVX512_MASK):
return tdesc_i386_avx512_linux;
- case (I386_XSTATE_MPX_MASK):
+ case (X86_XSTATE_MPX_MASK):
return tdesc_i386_mpx_linux;
- case (I386_XSTATE_AVX_MASK):
+ case (X86_XSTATE_AVX_MASK):
return tdesc_i386_avx_linux;
default:
diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c
index 39149f3..b4b99e8 100644
--- a/gdb/gdbserver/win32-i386-low.c
+++ b/gdb/gdbserver/win32-i386-low.c
@@ -17,7 +17,7 @@
#include "server.h"
#include "win32-low.h"
-#include "i386-low.h"
+#include "x86-low.h"
#ifndef CONTEXT_EXTENDED_REGISTERS
#define CONTEXT_EXTENDED_REGISTERS 0
@@ -38,7 +38,7 @@ void init_registers_i386 (void);
extern const struct target_desc *tdesc_i386;
#endif
-static struct i386_debug_reg_state debug_reg_state;
+static struct x86_debug_reg_state debug_reg_state;
static int debug_registers_changed = 0;
static int debug_registers_used = 0;
@@ -46,7 +46,7 @@ static int debug_registers_used = 0;
/* Update the inferior's debug register REGNUM from STATE. */
static void
-i386_dr_low_set_addr (int regnum, CORE_ADDR addr)
+x86_dr_low_set_addr (int regnum, CORE_ADDR addr)
{
gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
@@ -58,7 +58,7 @@ i386_dr_low_set_addr (int regnum, CORE_ADDR addr)
}
static CORE_ADDR
-i386_dr_low_get_addr (int regnum)
+x86_dr_low_get_addr (int regnum)
{
gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
@@ -68,7 +68,7 @@ i386_dr_low_get_addr (int regnum)
/* Update the inferior's DR7 debug control register from STATE. */
static void
-i386_dr_low_set_control (unsigned long control)
+x86_dr_low_set_control (unsigned long control)
{
/* debug_reg_state.dr_control_mirror is already set.
Just notify i386_set_thread_context, i386_thread_added
@@ -78,7 +78,7 @@ i386_dr_low_set_control (unsigned long control)
}
static unsigned long
-i386_dr_low_get_control (void)
+x86_dr_low_get_control (void)
{
return debug_reg_state.dr_control_mirror;
}
@@ -87,7 +87,7 @@ i386_dr_low_get_control (void)
and record it in STATE. */
static unsigned long
-i386_dr_low_get_status (void)
+x86_dr_low_get_status (void)
{
/* We don't need to do anything here, the last call to thread_rec for
current_event.dwThreadId id has already set it. */
@@ -95,13 +95,13 @@ i386_dr_low_get_status (void)
}
/* Low-level function vector. */
-struct i386_dr_low_type i386_dr_low =
+struct x86_dr_low_type x86_dr_low =
{
- i386_dr_low_set_control,
- i386_dr_low_set_addr,
- i386_dr_low_get_addr,
- i386_dr_low_get_status,
- i386_dr_low_get_control,
+ x86_dr_low_set_control,
+ x86_dr_low_set_addr,
+ x86_dr_low_get_addr,
+ x86_dr_low_get_status,
+ x86_dr_low_get_control,
sizeof (void *),
};
@@ -132,8 +132,8 @@ i386_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
enum target_hw_bp_type hw_type
= raw_bkpt_type_to_target_hw_bp_type (type);
- return i386_dr_insert_watchpoint (&debug_reg_state,
- hw_type, addr, size);
+ return x86_dr_insert_watchpoint (&debug_reg_state,
+ hw_type, addr, size);
}
default:
/* Unsupported. */
@@ -153,8 +153,8 @@ i386_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
enum target_hw_bp_type hw_type
= raw_bkpt_type_to_target_hw_bp_type (type);
- return i386_dr_remove_watchpoint (&debug_reg_state,
- hw_type, addr, size);
+ return x86_dr_remove_watchpoint (&debug_reg_state,
+ hw_type, addr, size);
}
default:
/* Unsupported. */
@@ -163,16 +163,16 @@ i386_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
}
static int
-i386_stopped_by_watchpoint (void)
+x86_stopped_by_watchpoint (void)
{
- return i386_dr_stopped_by_watchpoint (&debug_reg_state);
+ return x86_dr_stopped_by_watchpoint (&debug_reg_state);
}
static CORE_ADDR
-i386_stopped_data_address (void)
+x86_stopped_data_address (void)
{
CORE_ADDR addr;
- if (i386_dr_stopped_data_address (&debug_reg_state, &addr))
+ if (x86_dr_stopped_data_address (&debug_reg_state, &addr))
return addr;
return 0;
}
@@ -180,7 +180,7 @@ i386_stopped_data_address (void)
static void
i386_initial_stuff (void)
{
- i386_low_init_dregs (&debug_reg_state);
+ x86_low_init_dregs (&debug_reg_state);
debug_registers_changed = 0;
debug_registers_used = 0;
}
@@ -216,7 +216,7 @@ i386_get_thread_context (win32_thread_info *th, DEBUG_EVENT* current_event)
if (th->tid == current_event->dwThreadId)
{
/* Copy dr values from the current thread. */
- struct i386_debug_reg_state *dr = &debug_reg_state;
+ struct x86_debug_reg_state *dr = &debug_reg_state;
dr->dr_mirror[0] = th->context.Dr0;
dr->dr_mirror[1] = th->context.Dr1;
dr->dr_mirror[2] = th->context.Dr2;
@@ -231,7 +231,7 @@ i386_set_thread_context (win32_thread_info *th, DEBUG_EVENT* current_event)
{
if (debug_registers_changed)
{
- struct i386_debug_reg_state *dr = &debug_reg_state;
+ struct x86_debug_reg_state *dr = &debug_reg_state;
th->context.Dr0 = dr->dr_mirror[0];
th->context.Dr1 = dr->dr_mirror[1];
th->context.Dr2 = dr->dr_mirror[2];
@@ -250,7 +250,7 @@ i386_thread_added (win32_thread_info *th)
/* Set the debug registers for the new thread if they are used. */
if (debug_registers_used)
{
- struct i386_debug_reg_state *dr = &debug_reg_state;
+ struct x86_debug_reg_state *dr = &debug_reg_state;
th->context.ContextFlags = CONTEXT_DEBUG_REGISTERS;
GetThreadContext (th->h, &th->context);
@@ -460,6 +460,6 @@ struct win32_target_ops the_low_target = {
i386_supports_z_point_type,
i386_insert_point,
i386_remove_point,
- i386_stopped_by_watchpoint,
- i386_stopped_data_address
+ x86_stopped_by_watchpoint,
+ x86_stopped_data_address
};
diff --git a/gdb/gdbserver/i386-low.c b/gdb/gdbserver/x86-low.c
index 845c3b0..aaa110e 100644
--- a/gdb/gdbserver/i386-low.c
+++ b/gdb/gdbserver/x86-low.c
@@ -1,4 +1,4 @@
-/* Debug register code for the i386.
+/* Low level support for x86 (i386 and x86-64).
Copyright (C) 2009-2014 Free Software Foundation, Inc.
@@ -18,13 +18,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "server.h"
-#include "i386-low.h"
+#include "x86-low.h"
/* Clear the reference counts and forget everything we knew about the
debug registers. */
void
-i386_low_init_dregs (struct i386_debug_reg_state *state)
+x86_low_init_dregs (struct x86_debug_reg_state *state)
{
int i;
diff --git a/gdb/gdbserver/i386-low.h b/gdb/gdbserver/x86-low.h
index e726038..9aecff4 100644
--- a/gdb/gdbserver/i386-low.h
+++ b/gdb/gdbserver/x86-low.h
@@ -1,4 +1,4 @@
-/* Misc. low level support for i386.
+/* Low level support for x86 (i386 and x86-64).
Copyright (C) 2009-2014 Free Software Foundation, Inc.
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "nat/i386-dregs.h"
+#include "nat/x86-dregs.h"
/* Initialize STATE. */
-extern void i386_low_init_dregs (struct i386_debug_reg_state *state);
+extern void x86_low_init_dregs (struct x86_debug_reg_state *state);