diff options
author | John Baldwin <jhb@FreeBSD.org> | 2019-03-12 13:39:02 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2019-03-12 13:39:02 -0700 |
commit | 1163a4b7a38a79ebd153dc5ee76ce93877d21dbd (patch) | |
tree | a05739b03daf22efcb07be32a1526f26ca19a9fd /gdb/i386-linux-tdep.c | |
parent | 7cde5fc2ec2e32e8a81ac613d26cf86bf8623816 (diff) | |
download | gdb-1163a4b7a38a79ebd153dc5ee76ce93877d21dbd.zip gdb-1163a4b7a38a79ebd153dc5ee76ce93877d21dbd.tar.gz gdb-1163a4b7a38a79ebd153dc5ee76ce93877d21dbd.tar.bz2 |
Support the fs_base and gs_base registers on i386.
As on amd64, these registers hold the base address of the fs and gs
segments, respectively. For i386 these two registers are 32 bits.
gdb/ChangeLog:
* amd64-fbsd-nat.c (amd64_fbsd_nat_target::read_description):
Update calls to i386_target_description to add 'segments'
parameter.
* amd64-tdep.c (amd64_init_abi): Set tdep->fsbase_regnum. Don't
add segment base registers.
* arch/i386.c (i386_create_target_description): Add 'segments'
parameter to enable segment base registers.
* arch/i386.h (i386_create_target_description): Likewise.
* features/i386/32bit-segments.xml: New file.
* features/i386/32bit-segments.c: Generate.
* i386-fbsd-nat.c (i386_fbsd_nat_target::read_description): Update
call to i386_target_description to add 'segments' parameter.
* i386-fbsd-tdep.c (i386fbsd_core_read_description): Likewise.
* i386-go32-tdep.c (i386_go32_init_abi): Likewise.
* i386-linux-tdep.c (i386_linux_read_description): Likewise.
* i386-tdep.c (i386_validate_tdesc_p): Add segment base registers
if feature is present.
(i386_gdbarch_init): Pass I386_NUM_REGS to set_gdbarch_num_regs.
Add 'segments' parameter to call to i386_target_description.
(i386_target_description): Add 'segments' parameter to enable
segment base registers.
(_initialize_i386_tdep) [GDB_SELF_TEST]: Add 'segments' parameter
to call to i386_target_description.
* i386-tdep.h (struct gdbarch_tdep): Add 'fsbase_regnum'.
(enum i386_regnum): Add I386_FSBASE_REGNUM and I386_GSBASE_REGNUM.
Define I386_NUM_REGS.
(i386_target_description): Add 'segments' parameter to enable
segment base registers.
gdb/gdbserver/ChangeLog:
* linux-x86-tdesc.c (i386_linux_read_description): Update call to
i386_create_target_description for 'segments' parameter.
* lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
* nto-x86-low.c (nto_x86_arch_setup): Likewise.
* win32-i386-low.c (i386_arch_setup): Likewise.
Diffstat (limited to 'gdb/i386-linux-tdep.c')
-rw-r--r-- | gdb/i386-linux-tdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index da81715..fa6b86f 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -694,7 +694,7 @@ i386_linux_read_description (uint64_t xcr0) [(xcr0 & X86_XSTATE_PKRU) ? 1 : 0]; if (*tdesc == NULL) - *tdesc = i386_create_target_description (xcr0, true); + *tdesc = i386_create_target_description (xcr0, true, false); return *tdesc; } |