summaryrefslogtreecommitdiff
path: root/gdb/corelow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index a075d9e131..ecde9542b5 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);