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] register_to_value/value_to_register arguments?


>>>>> "Maciej" == Maciej W Rozycki <macro@codesourcery.com> writes:

Maciej>  However this rises a question: it is relatively expensive to
Maciej> retrieve gdbarch from frame, most target implementations of
Maciej> these methods need it and it is already readily available to the
Maciej> caller (retrieved from the very frame) -- wouldn't it therefore
Maciej> make sense to pass it along frame?

It seems to me that the frame's arch is cached, so retrieving it is only
expensive the first time.  Given that, the current approach is clearer
and safer, since there's no possibility of arguments being out of sync.

Tom


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