diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-11-28 22:21:23 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-11-28 22:21:23 +0000 |
commit | 186947f7ca47d3c7ea8cf9b6cd5241b653edbd59 (patch) | |
tree | 5d4e6b8c14864202e130c2a4c48e6db31b32a4bb /gdb/gdbserver/thread-db.c | |
parent | 29709017e835906e3e95bc230d393331636234e1 (diff) | |
download | gdb-186947f7ca47d3c7ea8cf9b6cd5241b653edbd59.zip gdb-186947f7ca47d3c7ea8cf9b6cd5241b653edbd59.tar.gz gdb-186947f7ca47d3c7ea8cf9b6cd5241b653edbd59.tar.bz2 |
gdb/gdbserver/
* Makefile.in (clean): Remove reg-mips64.c.
(reg-mips64.c, reg-mips64.o): New rules.
* configure.srv: Handle mips64. Include regset support for mips.
* linux-mips-low.c (union mips_register): New.
(mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
(mips_breakpoint, mips_breakpoint_at): Use int.
(mips_collect_register, mips_supply_register)
(mips_collect_register_32bit, mips_supply_register_32bit)
(mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
(mips_store_fpregset, target_regsets): New.
* thread-db.c (thread_db_get_tls_address): Use uintptr_t.
gdb/
* regformats/reg-mips64.dat: New file.
Diffstat (limited to 'gdb/gdbserver/thread-db.c')
-rw-r--r-- | gdb/gdbserver/thread-db.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index 78bc6434..e1f0653d 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -33,6 +33,8 @@ extern int debug_threads; #include "gdb_proc_service.h" +#include <stdint.h> + /* Structure that identifies the child process for the <proc_service.h> interface. */ static struct ps_prochandle proc_handle; @@ -333,11 +335,14 @@ thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset, if (!process->thread_known) return TD_NOTHR; - err = td_thr_tls_get_addr (&process->th, (psaddr_t) load_module, offset, - &addr); + /* Note the cast through uintptr_t: this interface only works if + a target address fits in a psaddr_t, which is a host pointer. + So a 32-bit debugger can not access 64-bit TLS through this. */ + err = td_thr_tls_get_addr (&process->th, (psaddr_t) (uintptr_t) load_module, + offset, &addr); if (err == TD_OK) { - *address = (CORE_ADDR) addr; + *address = (CORE_ADDR) (uintptr_t) addr; return 0; } else |