[OBV/pushed] Rename min_size in get_core_register_section

Message ID 14123507-D435-47F7-BB00-BAC2A8378BD7@arm.com
State New, archived
Headers

Commit Message

Alan Hayward Aug. 10, 2018, 9:26 a.m. UTC
  Pushed as obvious. As suggested in https://sourceware.org/ml/gdb-patches/2018-08/msg00099.html


Make it clearer that the size field indicates the size of the section.

2018-08-10  Alan Hayward  <alan.hayward@arm.com>

	* corelow.c (core_target::get_core_register_section): Rename
	min_size to section_min_size.
  

Patch

diff --git a/gdb/corelow.c b/gdb/corelow.c
index 059ce2f6ebd33b994191b34f1e0cb7095567f2ea..d3336cf7857e7dc995901fdf5860ad24493acc87 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -106,7 +106,7 @@  public:
   void get_core_register_section (struct regcache *regcache,
 				  const struct regset *regset,
 				  const char *name,
-				  int min_size,
+				  int section_min_size,
 				  int which,
 				  const char *human_name,
 				  bool required);
@@ -569,7 +569,7 @@  void
 core_target::get_core_register_section (struct regcache *regcache,
 					const struct regset *regset,
 					const char *name,
-					int min_size,
+					int section_min_size,
 					int which,
 					const char *human_name,
 					bool required)
@@ -592,13 +592,13 @@  core_target::get_core_register_section (struct regcache *regcache,
     }

   size = bfd_section_size (core_bfd, section);
-  if (size < min_size)
+  if (size < section_min_size)
     {
       warning (_("Section `%s' in core file too small."),
 	       section_name.c_str ());
       return;
     }
-  if (size != min_size && !variable_size_section)
+  if (size != section_min_size && !variable_size_section)
     {
       warning (_("Unexpected size of section `%s' in core file."),
 	       section_name.c_str ());