This is the mail archive of the gdb@sources.redhat.com 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: patch to use target specific .gdbinit file


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

A single gdb executable can support multiple `target interfaces'. For instance, remote, pmon, and ptrace.

A single gdb executable's configuration options (target interfaces, target architectures, initial architecture, ....) are selected by the --target=TARGET option (and in the future --enable-targets=...).

 If this is the case then your method of
enabling this at config time would be just fine.  I was thinking of a (for
instance) ppc/x86 gdb but I didn't think that was possible which was what I
wanted to ask.
Er, that is a single gdb executable supporting ``multiple architectures''.

Andrew



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