Re: RFA: move value_from_contents_and_address to value.c

Joel Brobecker
2008-11-22T05:06:27Z

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