forked from Imagelibrary/binutils-gdb
* regcache.c (set_register_cache): Invalidate regcaches before
changing the register cache layout. (regcache_invalidate_one): Allow a NULL regcache. * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate regcaches before changing the register cache layout or the target regsets.
This commit is contained in:
@@ -61,6 +61,9 @@ regcache_invalidate_one (struct inferior_list_entry *entry)
|
||||
|
||||
regcache = (struct regcache *) inferior_regcache_data (thread);
|
||||
|
||||
if (regcache == NULL)
|
||||
return;
|
||||
|
||||
if (regcache->registers_valid)
|
||||
{
|
||||
struct thread_info *saved_inferior = current_inferior;
|
||||
@@ -149,6 +152,10 @@ set_register_cache (struct reg *regs, int n)
|
||||
{
|
||||
int offset, i;
|
||||
|
||||
/* Before changing the register cache internal layout, flush the
|
||||
contents of valid caches back to the threads. */
|
||||
regcache_invalidate ();
|
||||
|
||||
reg_defs = regs;
|
||||
num_registers = n;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user