aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-06-11 18:05:57 +0000
committerPedro Alves <palves@redhat.com>2013-06-11 18:05:57 +0000
commit030031eed5425623865069a6083de8210c3769df (patch)
tree50240ae320eca7a767bc40d27886206bc8d68a59 /gdb/gdbserver/linux-low.h
parent5da6eb0a109d09cf64a82417e92bdf2f80bbda0e (diff)
downloadgdb-030031eed5425623865069a6083de8210c3769df.zip
gdb-030031eed5425623865069a6083de8210c3769df.tar.gz
gdb-030031eed5425623865069a6083de8210c3769df.tar.bz2
Lazily allocate 'struct regsets_info'::disabled_regsets.
There's no need for every arch to pre-allocate disabled_regsets. Chances are the array won't be used. (I have a hunch that with some more work we could dispense with initialize_regsets_info.) Tested on x86_64 Fedora 17 w/ -lmcheck. gdb/gdbserver/ 2013-06-11 Pedro Alves <palves@redhat.com> * linux-low.c (regset_disabled, disable_regset): New functions. (regsets_fetch_inferior_registers) (regsets_store_inferior_registers): Use them. (initialize_regsets_info); Don't allocate the disabled_regsets array here. * linux-low.h (struct regsets_info) <disabled_regsets>: Extend comment.
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r--gdb/gdbserver/linux-low.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index bce0288..a8de378 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -60,7 +60,9 @@ struct regsets_info
/* If we get EIO on a regset, do not try it again. Note the set of
supported regsets may depend on processor mode on biarch
- machines. */
+ machines. This is a (lazily allocated) array holding one boolean
+ byte (0/1) per regset, with each element corresponding to the
+ regset in the REGSETS array above at the same offset. */
char *disabled_regsets;
};