forked from Imagelibrary/binutils-gdb
* target.c (target_resize_to_sections): Check
current_target.to_sections for an old value when updating.
This commit is contained in:
@@ -1415,6 +1415,13 @@ target_resize_to_sections (struct target_ops *target, int num_added)
|
||||
(*t)->to_sections_end = target->to_sections_end;
|
||||
}
|
||||
}
|
||||
/* There is a flattened view of the target stack in current_target,
|
||||
so its to_sections pointer might also need updating. */
|
||||
if (current_target.to_sections == old_value)
|
||||
{
|
||||
current_target.to_sections = target->to_sections;
|
||||
current_target.to_sections_end = target->to_sections_end;
|
||||
}
|
||||
}
|
||||
|
||||
return old_count;
|
||||
|
||||
Reference in New Issue
Block a user