From: Joel Brobecker <brobecker@adacore.com>
To: Andrew Stubbs <ams@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH][SH] Implement core-file support for sh-linux
Date: Wed, 14 Oct 2009 04:56:00 -0000 [thread overview]
Message-ID: <20091014045558.GT5272@adacore.com> (raw)
In-Reply-To: <4AD33C69.2070301@codesourcery.com>
> 2009-10-12 Andrew Stubbs <ams@codesourcery.com>
>
> * configure.tgt (sh*-*-linux*): Add corelow.o to gdb_target_obs.
> * sh-linux-tdep.c: Include gdb_assert.h, gdb_string.h, regcache.h,
> regset.h and sh-tdep.h.
> (struct sh_linux_pt_regs, struct sh_linux_user_fpu_struct): New types.
> (sh_linux_supply_gregset, sh_linux_collect_gregset): New functions.
> (sh_linux_supply_fpregset, sh_linux_collect_fpregset): New functions.
> (sh_linux_gregset, sh_linux_fpregset): New variables.
> (sh_linux_regset_from_core_section): New function.
> (sh_linux_init_abi): Call set_gdbarch_regset_from_core_section.
It seems a shame that this code is almost a complete duplication of
the code in shnbsd. I think we can avoid that simply by having an
array in the SH tdep structure that provides the offsets to the various
registers, indexed by register number.
Then the code from shnbsd can be moved to sh-tdep.c and the only
remaining bit is to initialize the array appropriately in shbnsd-tdep
and sh-linux-tdep.
--
Joel
next prev parent reply other threads:[~2009-10-14 4:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 14:26 Andrew Stubbs
2009-10-14 4:56 ` Joel Brobecker [this message]
2009-10-15 13:27 ` Andrew Stubbs
2009-10-15 16:20 ` Joel Brobecker
2009-10-19 17:27 ` Andrew Stubbs
2009-10-19 19:33 ` Joel Brobecker
2009-10-21 14:18 ` Andrew Stubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091014045558.GT5272@adacore.com \
--to=brobecker@adacore.com \
--cc=ams@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox