From: Daniel Jacobowitz Date: Thu, 12 Jul 2007 19:59:00 +0000 (+0000) Subject: * configure.srv: Set srv_linux_regsets for sh*-*-linux*. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d37add96298857bfc56467b9cb81e1d38c88b41;p=binutils-gdb.git * configure.srv: Set srv_linux_regsets for sh*-*-linux*. * linux-sh-low.c (sh_fill_gregset, target_regsets): New. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 76561ffa413..ee411702401 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2007-07-12 Daniel Jacobowitz + + * configure.srv: Set srv_linux_regsets for sh*-*-linux*. + * linux-sh-low.c (sh_fill_gregset, target_regsets): New. + 2007-07-08 Pedro Alves * win32-low.c (handle_output_debug_string): Ignore event if not diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv index ff14adc02bc..f62d276c184 100644 --- a/gdb/gdbserver/configure.srv +++ b/gdb/gdbserver/configure.srv @@ -126,6 +126,7 @@ case "${target}" in sh*-*-linux*) srv_regobj=reg-sh.o srv_tgtobj="linux-low.o linux-sh-low.o" srv_linux_usrregs=yes + srv_linux_regsets=yes srv_linux_thread_db=yes ;; spu*-*-*) srv_regobj=reg-spu.o diff --git a/gdb/gdbserver/linux-sh-low.c b/gdb/gdbserver/linux-sh-low.c index 8eef9ba5d2a..8b9f1f278f9 100644 --- a/gdb/gdbserver/linux-sh-low.c +++ b/gdb/gdbserver/linux-sh-low.c @@ -90,6 +90,23 @@ sh_breakpoint_at (CORE_ADDR where) return 0; } +/* Provide only a fill function for the general register set. ps_lgetregs + will use this for NPTL support. */ + +static void sh_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < 23; i++) + if (sh_regmap[i] != -1) + collect_register (i, (char *) buf + sh_regmap[i]); +} + +struct regset_info target_regsets[] = { + { 0, 0, 0, GENERAL_REGS, sh_fill_gregset, NULL }, + { 0, 0, -1, -1, NULL, NULL } +}; + struct linux_target_ops the_low_target = { sh_num_regs, sh_regmap,