Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: kettenis@gnu.org
To: jimb@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: use constructor to build 'struct regset' objects
Date: Wed, 19 May 2004 08:36:00 -0000	[thread overview]
Message-ID: <200405190836.i4J8aXKn030936@gatekeeper.osp.nl> (raw)
In-Reply-To: <vt2hdud2h0l.fsf@zenia.home>

   From: Jim Blandy <jimb@redhat.com>
   Date: 18 May 2004 23:11:06 -0500

   How's this:

   2004-05-17  Jim Blandy  <jimb@redhat.com>

	   Use a constructor function to create regset structures.
	   * regset.h (supply_regset_ftype, fill_regset_ftype): New typedefs.
	   (struct regset): Use supply_regset_ftype.  Add new
	   'fill_regset' member.
	   (regset_xmalloc): New declaration.
	   * regset.c: New file.
	   * am64-tdep.c (amd64_regset_from_core_section): Use
	   regset_xmalloc to construct regset structures.
	   * amd64obsd-tdep.c (amd64obsd_regset_from_core_section): Same.
	   * i386-tdep.c (i386_regset_from_core_section): Same.
	   * i386nbsd-tdep.c (i386nbsd_aout_regset_from_core_section): Same.
	   * i386obsd-tdep.c (i386obsd_aout_regset_from_core_section): Same.
	   * sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Same.
	   * sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Same.
	   * sparc64obsd-tdep.c (sparc64obsd_init_abi): Same.
	   * sparcnbsd-tdep.c (sparc32nbsd_init_abi): Same.
	   * Makefile.in (COMMON_OBS): Add regset.o.
	   (regset.o): New rule.

Could you use collect_regset instead of fill_regset.  I deliberately
added regcache_raw_collect instead of regcache_raw_fill.  Oh, and your
prototype for fill_regset_ftype is wrong.  Should be:

typedef void (collect_regset_ftype) (const struct regsecache *,
				     const struct regcache *,
				     int, void *, size_t);

(watch the `const').

Consider a patch with those changes pre-approved.

Mark


  reply	other threads:[~2004-05-19  8:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <vt2smdy93u9.fsf@zenia.home>
2004-05-17 21:32 ` Jim Blandy
2004-05-17 21:48   ` Mark Kettenis
2004-05-19  4:15     ` Jim Blandy
2004-05-19  8:36       ` kettenis [this message]
2004-05-20  3:11         ` Jim Blandy
2004-05-20  6:51           ` Jim Blandy
2004-05-19 14:56       ` Andrew Cagney
2004-05-20  3:11         ` Jim Blandy

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=200405190836.i4J8aXKn030936@gatekeeper.osp.nl \
    --to=kettenis@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@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