This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 12/23] regcache: Add functions suitable for regset_supply/collect.
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: arnez at linux dot vnet dot ibm dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 5 May 2014 12:02:19 +0200 (CEST)
- Subject: Re: [RFC 12/23] regcache: Add functions suitable for regset_supply/collect.
- Authentication-results: sourceware.org; auth=none
- References: <87eh0h6bkq dot fsf at br87z6lw dot de dot ibm dot com> <87vbtt3hkr dot fsf at br87z6lw dot de dot ibm dot com>
> From: Andreas Arnez <arnez@linux.vnet.ibm.com>
> Date: Mon, 28 Apr 2014 11:54:12 +0200
>
> These functions are intended to suit all targets that don't require too
> special logic in their regset supply/collect methods. Having such
> generic functions helps reducing target-specific complexity.
>
> gdb/
> * regcache.c: Include "regset.h".
> (regcache_supply_regset, regcache_collect_regset): New functions.
> * regcache.h (struct regcache_map_entry): New structure.
> (REGCACHE_MAP_SKIP_BYTES): New enum value.
> (regcache_supply_regset, regcache_collect_regset): New prototypes.
Sorry, but this doesn't strike me as a particular good interface.
I'd say an approach that uses explicit offsets would be much better.