mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 18:32:32 +08:00
2012-01-19 Pedro Alves <palves@redhat.com>
* linux-nat.c (linux_nat_close): Call linux_nat_is_async_p and linux_nat_async directly instead of going through the target vector. * target.c (unpush_target): Close target after unpushing it, not before.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2012-01-19 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* linux-nat.c (linux_nat_close): Call linux_nat_is_async_p and
|
||||||
|
linux_nat_async directly instead of going through the target
|
||||||
|
vector.
|
||||||
|
* target.c (unpush_target): Close target after unpushing it, not
|
||||||
|
before.
|
||||||
|
|
||||||
2012-01-19 Gary Benson <gbenson@redhat.com>
|
2012-01-19 Gary Benson <gbenson@redhat.com>
|
||||||
|
|
||||||
* mdebugread.c (sort_blocks): Replace integer constants with ones
|
* mdebugread.c (sort_blocks): Replace integer constants with ones
|
||||||
|
@ -5717,8 +5717,8 @@ static void
|
|||||||
linux_nat_close (int quitting)
|
linux_nat_close (int quitting)
|
||||||
{
|
{
|
||||||
/* Unregister from the event loop. */
|
/* Unregister from the event loop. */
|
||||||
if (target_is_async_p ())
|
if (linux_nat_is_async_p ())
|
||||||
target_async (NULL, 0);
|
linux_nat_async (NULL, 0);
|
||||||
|
|
||||||
if (linux_ops->to_close)
|
if (linux_ops->to_close)
|
||||||
linux_ops->to_close (quitting);
|
linux_ops->to_close (quitting);
|
||||||
|
17
gdb/target.c
17
gdb/target.c
@ -1010,16 +1010,10 @@ unpush_target (struct target_ops *t)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If we don't find target_ops, quit. Only open targets should be
|
||||||
|
closed. */
|
||||||
if ((*cur) == NULL)
|
if ((*cur) == NULL)
|
||||||
return 0; /* Didn't find target_ops, quit now. */
|
return 0;
|
||||||
|
|
||||||
/* NOTE: cagney/2003-12-06: In '94 the close call was made
|
|
||||||
unconditional by moving it to before the above check that the
|
|
||||||
target was in the target stack (something about "Change the way
|
|
||||||
pushing and popping of targets work to support target overlays
|
|
||||||
and inheritance"). This doesn't make much sense - only open
|
|
||||||
targets should be closed. */
|
|
||||||
target_close (t, 0);
|
|
||||||
|
|
||||||
/* Unchain the target. */
|
/* Unchain the target. */
|
||||||
tmp = (*cur);
|
tmp = (*cur);
|
||||||
@ -1028,6 +1022,11 @@ unpush_target (struct target_ops *t)
|
|||||||
|
|
||||||
update_current_target ();
|
update_current_target ();
|
||||||
|
|
||||||
|
/* Finally close the target. Note we do this after unchaining, so
|
||||||
|
any target method calls from within the target_close
|
||||||
|
implementation don't end up in T anymore. */
|
||||||
|
target_close (t, 0);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user