+2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * linux-low.c (regsets_fetch_inferior_registers): Rephrase
+ while-loop as for-loop.
+ (regsets_store_inferior_registers): Likewise.
+
2014-11-28 Yao Qi <yao@codesourcery.com>
* configure.ac(AC_CHECK_FUNCS): Remove readlink.
int pid;
struct iovec iov;
- regset = regsets_info->regsets;
-
pid = lwpid_of (current_thread);
- while (regset->size >= 0)
+ for (regset = regsets_info->regsets; regset->size >= 0; regset++)
{
void *buf, *data;
int nt_type, res;
if (regset->size == 0 || regset_disabled (regsets_info, regset))
- {
- regset ++;
- continue;
- }
+ continue;
buf = xmalloc (regset->size);
else if (regset->type == GENERAL_REGS)
saw_general_regs = 1;
regset->store_function (regcache, buf);
- regset ++;
free (buf);
}
if (saw_general_regs)
int pid;
struct iovec iov;
- regset = regsets_info->regsets;
-
pid = lwpid_of (current_thread);
- while (regset->size >= 0)
+ for (regset = regsets_info->regsets; regset->size >= 0; regset++)
{
void *buf, *data;
int nt_type, res;
if (regset->size == 0 || regset_disabled (regsets_info, regset))
- {
- regset ++;
- continue;
- }
+ continue;
buf = xmalloc (regset->size);
/* If we get EIO on a regset, do not try it again for
this process mode. */
disable_regset (regsets_info, regset);
- free (buf);
- continue;
}
else if (errno == ESRCH)
{
}
else if (regset->type == GENERAL_REGS)
saw_general_regs = 1;
- regset ++;
free (buf);
}
if (saw_general_regs)