This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA] add struct parse_context to all command functions
> Joel> I like the idea as well. Just one question: Why did you elect to
> Joel> pass the structure as a pointer, rather than the structure
> Joel> itself?
>
> To avoid copying. Most users just reference fields from the
> structure, or pass it through unmodified. So, this is more efficient
> in the common cases.
Ah, yes, of course. I was just confused with the pass-by-reference at
the ABI level. I think the same reasons apply to struct parse_context,
so I'll adjust my approach accordingly - even if the structure is small
right now (3 words for now), it's still bigger than 1 address...
--
Joel