This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: move value_from_contents_and_address to value.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]