diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/corelow.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4e85fcd..ce3f317 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com> + + * corelow.c (get_core_register_section): Check for regset + existence before checking for REGSET_VARIABLE_SIZE. + 2017-01-26 Yao Qi <yao.qi@linaro.org> Pedro Alves <palves@redhat.com> diff --git a/gdb/corelow.c b/gdb/corelow.c index a075d9e..ecde954 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -515,6 +515,8 @@ get_core_register_section (struct regcache *regcache, struct bfd_section *section; bfd_size_type size; char *contents; + bool variable_size_section = (regset != NULL + && regset->flags & REGSET_VARIABLE_SIZE); xfree (section_name); @@ -539,7 +541,7 @@ get_core_register_section (struct regcache *regcache, warning (_("Section `%s' in core file too small."), section_name); return; } - if (size != min_size && !(regset->flags & REGSET_VARIABLE_SIZE)) + if (size != min_size && !variable_size_section) { warning (_("Unexpected size of section `%s' in core file."), section_name); |