diff options
author | John Baldwin <jhb@FreeBSD.org> | 2017-04-04 14:28:07 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2017-04-04 14:28:07 -0700 |
commit | 4c7bf4f91b7dd3ccbd12be55316fca8817059a24 (patch) | |
tree | 2b8f8a774d7e871e6c9222b4069bf26708c182a1 /gdb/i386-fbsd-tdep.c | |
parent | 1e1a8bef60db2f524c5eb1d27be22cfa9ff82a84 (diff) | |
download | gdb-4c7bf4f91b7dd3ccbd12be55316fca8817059a24.zip gdb-4c7bf4f91b7dd3ccbd12be55316fca8817059a24.tar.gz gdb-4c7bf4f91b7dd3ccbd12be55316fca8817059a24.tar.bz2 |
Remove support for using the bsd-uthread target on FreeBSD.
The bsd-uthread target supports an old thread library ("libc_r") that
was last included in FreeBSD release 6.4 released in 2008. However,
this library has not been used as the default library since FreeBSD
5.0 (2003) and 4.11 (2005). Thread support for modern FreeBSD binaries
is provided via "normal" LWP support in core files and the native
FreeBSD target.
gdb/ChangeLog:
* amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
(amd64fbsd_jmp_buf_reg_offset): Remove.
(amd64fbsd_supply_uthread): Remove function.
(amd64fbsd_collect_uthread): Remove function.
(amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
* configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
(x86_64-*-freebsd*): Remove bsd-uthread.o.
(fbsd-nat.c): Update comment.
* i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
(i386fbsd_jmp_buf_reg_offset): Remove.
(i386fbsd_supply_uthread): Remove function.
(i386fbsd_collect_uthread): Remove function.
(i386fbsd_init_abi): Don't set bsd-uthread callbacks.
Diffstat (limited to 'gdb/i386-fbsd-tdep.c')
-rw-r--r-- | gdb/i386-fbsd-tdep.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/gdb/i386-fbsd-tdep.c b/gdb/i386-fbsd-tdep.c index b0bf727..594b8f6 100644 --- a/gdb/i386-fbsd-tdep.c +++ b/gdb/i386-fbsd-tdep.c @@ -28,7 +28,6 @@ #include "i386-tdep.h" #include "i387-tdep.h" -#include "bsd-uthread.h" #include "fbsd-tdep.h" #include "solib-svr4.h" @@ -224,20 +223,6 @@ int i386fbsd_sc_reg_offset[] = 8 + 16 * 4 /* %gs */ }; -/* From /usr/src/lib/libc/i386/gen/_setjmp.S. */ -static int i386fbsd_jmp_buf_reg_offset[] = -{ - -1, /* %eax */ - -1, /* %ecx */ - -1, /* %edx */ - 1 * 4, /* %ebx */ - 2 * 4, /* %esp */ - 3 * 4, /* %ebp */ - 4 * 4, /* %esi */ - 5 * 4, /* %edi */ - 0 * 4 /* %eip */ -}; - /* Get XSAVE extended state xcr0 from core dump. */ uint64_t @@ -333,46 +318,6 @@ i386fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch, } static void -i386fbsd_supply_uthread (struct regcache *regcache, - int regnum, CORE_ADDR addr) -{ - gdb_byte buf[4]; - int i; - - gdb_assert (regnum >= -1); - - for (i = 0; i < ARRAY_SIZE (i386fbsd_jmp_buf_reg_offset); i++) - { - if (i386fbsd_jmp_buf_reg_offset[i] != -1 - && (regnum == -1 || regnum == i)) - { - read_memory (addr + i386fbsd_jmp_buf_reg_offset[i], buf, 4); - regcache_raw_supply (regcache, i, buf); - } - } -} - -static void -i386fbsd_collect_uthread (const struct regcache *regcache, - int regnum, CORE_ADDR addr) -{ - gdb_byte buf[4]; - int i; - - gdb_assert (regnum >= -1); - - for (i = 0; i < ARRAY_SIZE (i386fbsd_jmp_buf_reg_offset); i++) - { - if (i386fbsd_jmp_buf_reg_offset[i] != -1 - && (regnum == -1 || regnum == i)) - { - regcache_raw_collect (regcache, i, buf); - write_memory (addr + i386fbsd_jmp_buf_reg_offset[i], buf, 4); - } - } -} - -static void i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -400,10 +345,6 @@ i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) tdep->sc_reg_offset = i386fbsd_sc_reg_offset; tdep->sc_num_regs = ARRAY_SIZE (i386fbsd_sc_reg_offset); - /* FreeBSD provides a user-level threads implementation. */ - bsd_uthread_set_supply_uthread (gdbarch, i386fbsd_supply_uthread); - bsd_uthread_set_collect_uthread (gdbarch, i386fbsd_collect_uthread); - i386_elf_init_abi (info, gdbarch); /* FreeBSD uses SVR4-style shared libraries. */ |