> Here's a question: does a multi-targetted gdb know what it's targetting
at
> the point of reading the .gdbinit or is this determined later? Is it
> switchable per session? I'm thinking that another possibility is to
have it
> check for .gdbinit-$TARGET at the time that the target is determined.
To clarify something here, target and architecture are separate but very
related. GDB configured for a certain TARGET, will support one or more
architectures. The x86-64, for instance, also supports i386.
For a normal GDB session, an architecture will be selected twice. Once
for the default, and once based on the file that is loaded. The second
selection may occure before, during or after, .gdbinit parsing. The
`target' however, won't change.
So, to clarify further, a single gdb binary can only support a single target
but multiple architectures?
A single gdb executable can support multiple `target architectures'.
Those architectures, as with i386 / x86-64 are not necessarily of the
same family.