+2013-09-06 Ricard Wanderlof <ricardw@axis.com>
+
+ * cris-tdep.c (cris_gdbarch_init): Add call to
+ get_gdbarch_fetch_tls_load_module_address.
+
2013-09-06 Ricard Wanderlof <ricardw@axis.com>
* cris-tdep.c (cris_elf_greg_t): Rename from elf_greg_t.
set_gdbarch_single_step_through_delay
(gdbarch, crisv32_single_step_through_delay);
+ /* FIXME: Ricard W/2013-09-03: Linux-specific stuff like this
+ should really go in (a new) cris-linux-tdep.c. */
+ set_gdbarch_fetch_tls_load_module_address (gdbarch,
+ svr4_fetch_objfile_link_map);
+
break;
default:
+2013-09-06 Ricard Wanderlof <ricardw@axis.com>
+
+ * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
+ (ps_get_thread_area): New function.
+
2013-09-06 Ricard Wanderlof <ricardw@axis.com>
* linux-crisv32-low.c (elf_gregset_t): Delete typedef.
/* CRISv32 */
#define cris_num_regs 49
+#ifndef PTRACE_GET_THREAD_AREA
+#define PTRACE_GET_THREAD_AREA 25
+#endif
+
/* Note: Ignoring USP (having the stack pointer in two locations causes trouble
without any significant gain). */
return eda;
}
+ps_err_e
+ps_get_thread_area (const struct ps_prochandle *ph,
+ lwpid_t lwpid, int idx, void **base)
+{
+ if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
+ return PS_ERR;
+
+ /* IDX is the bias from the thread pointer to the beginning of the
+ thread descriptor. It has to be subtracted due to implementation
+ quirks in libthread_db. */
+ *base = (void *) ((char *) *base - idx);
+ return PS_OK;
+}
+
static void
cris_fill_gregset (struct regcache *regcache, void *buf)
{