Re: [RFC] register_to_value/value_to_register arguments?

Tom Tromey
2012-06-12T15:32:35Z

>>>>> "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