summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
af19829)
gdbserver's init_register_cache has some preprocessor conditionals
awkwardly nested around an if..else block. This commit moves the
conditionals inside the braces to make the code more readable.
gdb/gdbserver/
2014-08-06 Gary Benson <gbenson@redhat.com>
* regcache.c (init_register_cache): Move conditionals inside if.
+2014-08-06 Gary Benson <gbenson@redhat.com>
+
+ * regcache.c (init_register_cache): Move conditionals inside if.
+
2014-08-06 Gary Benson <gbenson@redhat.com>
* linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2014-08-06 Gary Benson <gbenson@redhat.com>
* linux-low.c (linux_supports_non_stop): Use target_is_async_p.
const struct target_desc *tdesc,
unsigned char *regbuf)
{
const struct target_desc *tdesc,
unsigned char *regbuf)
{
-#ifndef IN_PROCESS_AGENT
+#ifndef IN_PROCESS_AGENT
/* Make sure to zero-initialize the register cache when it is
created, in case there are registers the target never
fetches. This way they'll read as zero instead of
/* Make sure to zero-initialize the register cache when it is
created, in case there are registers the target never
fetches. This way they'll read as zero instead of
regcache->registers_owned = 1;
regcache->register_status = xcalloc (1, tdesc->num_registers);
gdb_assert (REG_UNAVAILABLE == 0);
regcache->registers_owned = 1;
regcache->register_status = xcalloc (1, tdesc->num_registers);
gdb_assert (REG_UNAVAILABLE == 0);
- if (regbuf == NULL)
- fatal ("init_register_cache: can't allocate memory from the heap");
- else
+ fatal ("init_register_cache: can't allocate memory from the heap");
{
regcache->tdesc = tdesc;
regcache->registers = regbuf;
{
regcache->tdesc = tdesc;
regcache->registers = regbuf;