]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gprof: rename min_insn_size to insn_boundary
authorRichard Allen <rsaxvc@gmail.com>
Sun, 16 Feb 2025 22:50:01 +0000 (16:50 -0600)
committerAlan Modra <amodra@gmail.com>
Sat, 1 Mar 2025 00:47:13 +0000 (11:17 +1030)
This distinction is important for architecures like Xtensa,
where 2B and 3B instructions are common, but the correct
value for instruction iteration is 1B, not 2B.

Signed-off-by: Richard Allen <rsaxvc@gmail.com>
gprof/corefile.c

index 65d8ccf54762a400b1500e28c0059703e84f399c..bd8e60d4e68bf0c77afb6ce1d1fd94512166963e 100644 (file)
@@ -36,7 +36,8 @@ static asymbol **core_syms;
 asection *core_text_sect;
 void * core_text_space;
 
-static int min_insn_size;
+/* Greatest common divisor of instruction sizes and alignments.  */
+static int insn_boundary;
 int offset_to_code;
 
 /* For mapping symbols to specific .o files during file ordering.  */
@@ -245,7 +246,7 @@ core_init (const char * aout_name)
       *symp = 0;
     }
 
-  min_insn_size = 1;
+  insn_boundary = 1;
   offset_to_code = 0;
 
   switch (bfd_get_arch (core_bfd))
@@ -255,7 +256,7 @@ core_init (const char * aout_name)
       break;
 
     case bfd_arch_alpha:
-      min_insn_size = 4;
+      insn_boundary = 4;
       break;
 
     default:
@@ -791,7 +792,7 @@ core_create_line_syms (void)
   prev_line_num = 0;
 
   vma_high = core_text_sect->vma + bfd_section_size (core_text_sect);
-  for (vma = core_text_sect->vma; vma < vma_high; vma += min_insn_size)
+  for (vma = core_text_sect->vma; vma < vma_high; vma += insn_boundary)
     {
       unsigned int len;
 
@@ -857,7 +858,7 @@ core_create_line_syms (void)
      lot cleaner now.  */
   prev = 0;
 
-  for (vma = core_text_sect->vma; vma < vma_high; vma += min_insn_size)
+  for (vma = core_text_sect->vma; vma < vma_high; vma += insn_boundary)
     {
       sym_init (ltab.limit);