Re: [PATCH] Multi-process + multi-arch: GDB

Michael Eager
2012-11-10T16:25:59Z

On 11/09/2012 11:07 AM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves<palves@redhat.com> writes:
> Pedro> I tried to follow the get_current_arch() precedent (was originally
> Pedro> current_gdbarch). Looking again, I messed up a bit, as get_target_arch()
> Pedro> would be even more in spirit.
>
> Pedro> But anyway is fine with me. You choose.;-)
>
> I picked 'target_gdbarch ()' just due to the long history of using this
> name.

I'd recommend get_target_arch() rather than recasting target_gdbarch
from a variable to a function. There are other get_target_* () functions
and this would parallel that usage. Another benefit: a more substantive
change in the name is less likely to be overlooked when adapting or backporting
patches.

--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077