This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: move value_from_contents_and_address to value.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 21 Nov 2008 21:05:46 -0800
- Subject: Re: RFA: move value_from_contents_and_address to value.c
- References: <m3skplevf4.fsf@fleche.redhat.com>
Generally speaking, I'm very happy to see the function being moved
out of ada-lang.c.
> +/* Return a new value constructed from some bytes. TYPE is the type
> + of the object. VALADDR is a pointer to the base of the enclosing
> + object. If VALADDR is NULL, the value is marked as lazy.
> + EMBEDDED_OFFSET is the offset into VALADDR of the bytes making up
> + the new object. ADDRESS is the inferior address of the object. */
> +
> +struct value *
> +value_from_contents_and_address (struct type *type, const gdb_byte *valaddr,
> + int embedded_offset, CORE_ADDR address)
I'm wondering whether the offset parameter is really necessary? Would it
be worse to call this function with valaddr+embedded_offset rather
than passing two arguments?
--
Joel