* target.c (add_target): Don't call clean_target on target
vectors anymore. * (unpush_target): Test for to_close being set before calling. * (target_xfer_memory, target_info): Check for to_has_memory before playing with memory.
This commit is contained in:
parent
a1e0ba7a1a
commit
a3ecbe7c52
|
@ -1,5 +1,11 @@
|
||||||
Thu Aug 4 10:26:36 1994 Stu Grossman (grossman@rtl.cygnus.com)
|
Thu Aug 4 10:26:36 1994 Stu Grossman (grossman@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* target.c (add_target): Don't call clean_target on target
|
||||||
|
vectors anymore.
|
||||||
|
* (unpush_target): Test for to_close being set before calling.
|
||||||
|
* (target_xfer_memory, target_info): Check for to_has_memory
|
||||||
|
before playing with memory.
|
||||||
|
|
||||||
* remote.c (remote_open): Set inferior_pid to make kill command
|
* remote.c (remote_open): Set inferior_pid to make kill command
|
||||||
happy.
|
happy.
|
||||||
* inflow.c (kill_command): Revert change of Aug 2. Use
|
* inflow.c (kill_command): Revert change of Aug 2. Use
|
||||||
|
|
10
gdb/target.c
10
gdb/target.c
|
@ -154,7 +154,7 @@ add_target (t)
|
||||||
target_struct_allocsize * sizeof (*target_structs));
|
target_struct_allocsize * sizeof (*target_structs));
|
||||||
}
|
}
|
||||||
target_structs[target_struct_size++] = t;
|
target_structs[target_struct_size++] = t;
|
||||||
cleanup_target (t);
|
/* cleanup_target (t);*/
|
||||||
|
|
||||||
if (targetlist == NULL)
|
if (targetlist == NULL)
|
||||||
add_prefix_cmd ("target", class_run, target_command,
|
add_prefix_cmd ("target", class_run, target_command,
|
||||||
|
@ -445,7 +445,8 @@ unpush_target (t)
|
||||||
{
|
{
|
||||||
struct target_stack_item *cur, *prev;
|
struct target_stack_item *cur, *prev;
|
||||||
|
|
||||||
t->to_close (0); /* Let it clean up */
|
if (t->to_close)
|
||||||
|
t->to_close (0); /* Let it clean up */
|
||||||
|
|
||||||
/* Look for the specified target. Note that we assume that a target
|
/* Look for the specified target. Note that we assume that a target
|
||||||
can only occur once in the target stack. */
|
can only occur once in the target stack. */
|
||||||
|
@ -668,6 +669,8 @@ target_xfer_memory (memaddr, myaddr, len, write)
|
||||||
for (item = target_stack; item; item = item->next)
|
for (item = target_stack; item; item = item->next)
|
||||||
{
|
{
|
||||||
t = item->target_ops;
|
t = item->target_ops;
|
||||||
|
if (!t->to_has_memory)
|
||||||
|
continue;
|
||||||
|
|
||||||
res = t->to_xfer_memory (memaddr, myaddr, curlen, write, t);
|
res = t->to_xfer_memory (memaddr, myaddr, curlen, write, t);
|
||||||
if (res > 0)
|
if (res > 0)
|
||||||
|
@ -718,6 +721,9 @@ target_info (args, from_tty)
|
||||||
{
|
{
|
||||||
t = item->target_ops;
|
t = item->target_ops;
|
||||||
|
|
||||||
|
if (!t->to_has_memory)
|
||||||
|
continue;
|
||||||
|
|
||||||
if ((int)(t->to_stratum) <= (int)dummy_stratum)
|
if ((int)(t->to_stratum) <= (int)dummy_stratum)
|
||||||
continue;
|
continue;
|
||||||
if (has_all_mem)
|
if (has_all_mem)
|
||||||
|
|
Loading…
Reference in New Issue