This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
a target creates an inferior
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb at sources dot redhat dot com
- Date: Thu, 06 May 2004 12:02:27 -0400
- Subject: a target creates an inferior
Ref: interface VS target (or something else wrong with the target vector)
http://sources.redhat.com/ml/gdb/2003-10/msg00218.html
I think the theory is right but the names are wrong. Since we're always
refering to the inferior we might as well refer to the currently running
instance (well ignoring core files) as the "inferior".
This gives rise to:
- the exec target's run command creates a new "struct inferior" (or is
that struct inferior_info).
- read the inferior's memory (inferior->memory_read_partial(...))
At present it is read the target's memory.
- the inferior changed
At present we say the target changed
- the inferior has threads
...
does anyone see problems with this arangement.
Andrew
PS: Initially there will likely be the arangement:
current_target->inferior == ¤t_inferior
current_inferior->target == ¤t_target
that way we can incrementally migrate inferior methods across to the
inferior object from the target.