"run", and executable file/symtab association?
Randolph Chung
randolph@tausq.org
Sat Feb 18 11:10:00 GMT 2006
> If kill_inferior calls pop_target it'd better be expecting to close a
> native target, not the exec target further down the stack. This looks
> like a bug in the checkpoint code somewhere. Ugh, the bits in
> kill_inferior are a little scary. First thing to do: figure out what's
> on the target stack (follow current_target.beneath), and why it's got
> execution if it's popping exec_close.
The target stack looks like:
(top-gdb) print current_target->to_shortname
$2 = 0x334298 "child"
(top-gdb) print current_target->beneath->to_shortname
$3 = 0x334298 "child"
(top-gdb) print current_target->beneath->beneath->to_shortname
$4 = 0x2d7d6c "exec"
(top-gdb) print current_target->beneath->beneath->beneath->to_shortname
$5 = 0x312614 "None"
And to_close is:
(top-gdb) print current_target->to_close
$6 = (void (*)(int)) @0x38465a: 0x47954 <exec_close>
kill_inferior() says:
/* First cut -- let's crudely do everything inline. */
if (forks_exist_p ())
{
linux_fork_killall ();
pop_target ();
generic_mourn_inferior ();
}
else
{
...
}
I don't pretend to understand this code and why if there are forks, we
should be popping the target to kill everything.
Michael Snyder added/changed this when he checked in the checkpoint
code, perhaps he can comment?
randolph
More information about the Gdb
mailing list