aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-fbsd-tdep.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-04-04 14:28:07 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2017-04-04 14:28:07 -0700
commit4c7bf4f91b7dd3ccbd12be55316fca8817059a24 (patch)
tree2b8f8a774d7e871e6c9222b4069bf26708c182a1 /gdb/amd64-fbsd-tdep.c
parent1e1a8bef60db2f524c5eb1d27be22cfa9ff82a84 (diff)
downloadgdb-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/amd64-fbsd-tdep.c')
-rw-r--r--gdb/amd64-fbsd-tdep.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/gdb/amd64-fbsd-tdep.c b/gdb/amd64-fbsd-tdep.c
index b8ef258..48bb209 100644
--- a/gdb/amd64-fbsd-tdep.c
+++ b/gdb/amd64-fbsd-tdep.c
@@ -28,7 +28,6 @@
#include "x86-xstate.h"
#include "amd64-tdep.h"
-#include "bsd-uthread.h"
#include "fbsd-tdep.h"
#include "solib-svr4.h"
@@ -150,28 +149,6 @@ int amd64fbsd_sc_reg_offset[] =
-1 /* %gs */
};
-/* From /usr/src/lib/libc/amd64/gen/_setjmp.S. */
-static int amd64fbsd_jmp_buf_reg_offset[] =
-{
- -1, /* %rax */
- 1 * 8, /* %rbx */
- -1, /* %rcx */
- -1, /* %rdx */
- -1, /* %rsi */
- -1, /* %rdi */
- 3 * 8, /* %rbp */
- 2 * 8, /* %rsp */
- -1, /* %r8 ... */
- -1,
- -1,
- -1, /* ... %r11 */
- 4 * 8, /* %r12 ... */
- 5 * 8,
- 6 * 8,
- 7 * 8, /* ... %r15 */
- 0 * 8 /* %rip */
-};
-
/* Implement the core_read_description gdbarch method. */
static const struct target_desc *
@@ -226,46 +203,6 @@ amd64fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
}
static void
-amd64fbsd_supply_uthread (struct regcache *regcache,
- int regnum, CORE_ADDR addr)
-{
- gdb_byte buf[8];
- int i;
-
- gdb_assert (regnum >= -1);
-
- for (i = 0; i < ARRAY_SIZE (amd64fbsd_jmp_buf_reg_offset); i++)
- {
- if (amd64fbsd_jmp_buf_reg_offset[i] != -1
- && (regnum == -1 || regnum == i))
- {
- read_memory (addr + amd64fbsd_jmp_buf_reg_offset[i], buf, 8);
- regcache_raw_supply (regcache, i, buf);
- }
- }
-}
-
-static void
-amd64fbsd_collect_uthread (const struct regcache *regcache,
- int regnum, CORE_ADDR addr)
-{
- gdb_byte buf[8];
- int i;
-
- gdb_assert (regnum >= -1);
-
- for (i = 0; i < ARRAY_SIZE (amd64fbsd_jmp_buf_reg_offset); i++)
- {
- if (amd64fbsd_jmp_buf_reg_offset[i] != -1
- && (regnum == -1 || regnum == i))
- {
- regcache_raw_collect (regcache, i, buf);
- write_memory (addr + amd64fbsd_jmp_buf_reg_offset[i], buf, 8);
- }
- }
-}
-
-static void
amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -298,10 +235,6 @@ amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_core_read_description (gdbarch,
amd64fbsd_core_read_description);
- /* FreeBSD provides a user-level threads implementation. */
- bsd_uthread_set_supply_uthread (gdbarch, amd64fbsd_supply_uthread);
- bsd_uthread_set_collect_uthread (gdbarch, amd64fbsd_collect_uthread);
-
/* FreeBSD uses SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_lp64_fetch_link_map_offsets);