+2005-10-13 Andreas Schwab <schwab@suse.de>
+
+ * Makefile.in (linux-thread-db.o): Depend on $(gdbcore_h).
+
+ * linux-thread-db.c (enable_thread_event): Extend pointer value as
+ specified by target.
+ (thread_db_get_thread_local_address): Likewise.
+
2005-10-09 Joel Brobecker <brobecker@adacore.com>
* i386-tdep.c (i386_reg_struct_return_p): Allow array types as well.
linux-thread-db.o: linux-thread-db.c $(defs_h) $(gdb_assert_h) \
$(gdb_proc_service_h) $(gdb_thread_db_h) $(bfd_h) $(exceptions_h) \
$(gdbthread_h) $(inferior_h) $(symfile_h) $(objfiles_h) $(target_h) \
- $(regcache_h) $(solib_svr4_h)
+ $(regcache_h) $(solib_svr4_h) $(gdbcore_h)
lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(regcache_h)
m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
#include "target.h"
#include "regcache.h"
#include "solib-svr4.h"
+#include "gdbcore.h"
#ifdef HAVE_GNU_LIBC_VERSION_H
#include <gnu/libc-version.h>
return err;
/* Set up the breakpoint. */
- (*bp) = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
- (CORE_ADDR) notify.u.bptaddr,
- ¤t_target);
+ gdb_assert (exec_bfd);
+ (*bp) = (gdbarch_convert_from_func_ptr_addr
+ (current_gdbarch,
+ /* Do proper sign extension for the target. */
+ (bfd_get_sign_extend_vma (exec_bfd) > 0
+ ? (CORE_ADDR) (intptr_t) notify.u.bptaddr
+ : (CORE_ADDR) (uintptr_t) notify.u.bptaddr),
+ ¤t_target));
create_thread_event_breakpoint ((*bp));
return TD_OK;
(("%s")), thread_db_err_str (err));
/* Cast assuming host == target. Joy. */
- return (CORE_ADDR) address;
+ /* Do proper sign extension for the target. */
+ gdb_assert (exec_bfd);
+ return (bfd_get_sign_extend_vma (exec_bfd) > 0
+ ? (CORE_ADDR) (intptr_t) address
+ : (CORE_ADDR) (uintptr_t) address);
}
if (target_beneath->to_get_thread_local_address)