diff options
author | Pedro Alves <palves@redhat.com> | 2013-06-11 17:26:25 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-06-11 17:26:25 +0000 |
commit | 5da6eb0a109d09cf64a82417e92bdf2f80bbda0e (patch) | |
tree | 848e27d07d079b74c5cac55fa7fecd0d45aff379 /gdb/gdbserver/linux-low.c | |
parent | 7e5aaa093cea562f88d02bd0b4b58c7d8329708c (diff) | |
download | gdb-5da6eb0a109d09cf64a82417e92bdf2f80bbda0e.zip gdb-5da6eb0a109d09cf64a82417e92bdf2f80bbda0e.tar.gz gdb-5da6eb0a109d09cf64a82417e92bdf2f80bbda0e.tar.bz2 |
Fix regression from multi-arch patch.
This fixes the regression reported at
<http://sourceware.org/ml/gdb-patches/2013-06/msg00185.html>.
GDBserver was reaching:
static int
regsets_fetch_inferior_registers (struct regsets_info *regsets_info,
struct regcache *regcache)
{
struct regset_info *regset;
int saw_general_regs = 0;
int pid;
struct iovec iov;
regset = regsets_info->regsets;
pid = lwpid_of (get_thread_lwp (current_inferior));
while (regset->size >= 0)
{
void *buf, *data;
int nt_type, res;
if (regset->size == 0
|| regsets_info->disabled_regsets[regset - regsets_info->regsets])
{
>>>>>>> regset ++; <<<<<<< HERE
continue;
}
Because info->disabled_regsets[] was not being initialized, and that
causes all sorts of wrong.
gdb/gdbserver/
2013-06-11 Pedro Alves <palves@redhat.com>
* linux-low.c (initialize_regsets_info): Use xcalloc instead of
xmalloc.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r-- | gdb/gdbserver/linux-low.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index f7e510e..2114b07 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -6072,7 +6072,7 @@ initialize_regsets_info (struct regsets_info *info) info->regsets[info->num_regsets].size >= 0; info->num_regsets++) ; - info->disabled_regsets = xmalloc (info->num_regsets); + info->disabled_regsets = xcalloc (1, info->num_regsets); } #endif |