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: [RFC/RFA] add struct parse_context to all command functions


(just slowly catching up...)

I like the idea as well. Just one question: Why did you elect to pass
the structure as a pointer, rather than the structure itself? I wonder
if some of the complexity in terms of who owns the data, making a copy,
etc, could be removed if we passed the structure itself. In terms of
performance, it shouldn't be a problem, as I expect large structs to
be passed by reference anyway. The down-side is that the structure
cannot be opaque, but I don't think there is much value in that, since
conceptually our new structure is just a collection of settings.

This is actually a question I asked myself for struct parse_context
as well, and I think that the situation is the same, so I expect that
the same choice will be best for both.

-- 
Joel


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