]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename find_pc_sect_line -> find_sal_for_pc_sect
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 Oct 2025 00:08:02 +0000 (20:08 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 20 Oct 2025 19:12:40 +0000 (15:12 -0400)
Change-Id: I9c2a72de57a4ea9c316fc949db4fb0bf7f78eb4b
Approved-by: Kevin Buettner <kevinb@redhat.com>
gdb/amd64-tdep.c
gdb/linespec.c
gdb/printcmd.c
gdb/symtab.c
gdb/symtab.h

index b1021c071c559cc4eae7c7be66a28acfc374d44d..b670586050b201224fcf74bc8642ac5b755fbb87 100755 (executable)
@@ -2784,14 +2784,14 @@ amd64_skip_xmm_prologue (CORE_ADDR pc, CORE_ADDR start_pc)
   if (pc == start_pc)
     return pc;
 
-  start_pc_sal = find_pc_sect_line (start_pc, NULL, 0);
+  start_pc_sal = find_sal_for_pc_sect (start_pc, NULL, 0);
   if (start_pc_sal.symtab == NULL
       || producer_is_gcc_ge_4 (start_pc_sal.symtab->compunit ()
                               ->producer ()) < 6
       || start_pc_sal.pc != start_pc || pc >= start_pc_sal.end)
     return pc;
 
-  next_sal = find_pc_sect_line (start_pc_sal.end, NULL, 0);
+  next_sal = find_sal_for_pc_sect (start_pc_sal.end, NULL, 0);
   if (next_sal.line != start_pc_sal.line)
     return pc;
 
index 05f676ee38d46b2ae7233ed67e38aa0e8b11cbbe..703af9ccdb95cd13c4620bbea0e5dae1c8c449a6 100644 (file)
@@ -4113,7 +4113,7 @@ add_minsym (struct minimal_symbol *minsym, struct objfile *objfile,
       CORE_ADDR func_addr;
       if (msymbol_is_function (objfile, minsym, &func_addr))
        {
-         symtab_and_line sal = find_pc_sect_line (func_addr, NULL, 0);
+         symtab_and_line sal = find_sal_for_pc_sect (func_addr, NULL, 0);
 
          if (symtab != sal.symtab)
            return;
index 047833a261d9ac2608cb97560aa1bf1f7428f5f9..887c8546c424909ef34e12b5cb88a9f838b0c4f0 100644 (file)
@@ -719,7 +719,7 @@ build_address_symbolic (struct gdbarch *gdbarch,
     {
       struct symtab_and_line sal;
 
-      sal = find_pc_sect_line (addr, section, 0);
+      sal = find_sal_for_pc_sect (addr, section, 0);
 
       if (sal.symtab)
        {
@@ -815,7 +815,7 @@ find_instruction_backward (struct gdbarch *gdbarch, CORE_ADDR addr,
   do
     {
       pcs.clear ();
-      sal = find_pc_sect_line (loop_start, NULL, 1);
+      sal = find_sal_for_pc_sect (loop_start, NULL, 1);
       if (sal.line <= 0)
        {
          /* We reach here when line info is not available.  In this case,
index f36d5b262955ae0a4ab96cd919c96d240cc89e4a..fab16f7ad48cbac9bfd34d071b2f1c6fd9bfce0a 100644 (file)
@@ -2902,7 +2902,7 @@ find_symbol_at_address (CORE_ADDR address)
    symtab.  */
 
 struct symtab_and_line
-find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
+find_sal_for_pc_sect (CORE_ADDR pc, struct obj_section *section, int notcurrent)
 {
   /* Info on best line seen so far, and where it starts, and its file.  */
   const linetable_entry *best = NULL;
@@ -3017,7 +3017,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
               should occur, we'd like to know about it, so error out,
               fatally.  */
            if (mfunsym.value_address () == pc)
-             internal_error (_("Infinite recursion detected in find_pc_sect_line;"
+             internal_error (_("Infinite recursion detected in find_sal_for_pc_sect;"
                  "please file a bug report"));
 
            return find_sal_for_pc (mfunsym.value_address (), 0);
@@ -3181,14 +3181,14 @@ find_sal_for_pc (CORE_ADDR pc, int notcurrent)
 
   section = find_pc_overlay (pc);
   if (!pc_in_unmapped_range (pc, section))
-    return find_pc_sect_line (pc, section, notcurrent);
+    return find_sal_for_pc_sect (pc, section, notcurrent);
 
   /* If the original PC was an unmapped address then we translate this to a
      mapped address in order to lookup the sal.  However, as the user
      passed us an unmapped address it makes more sense to return a result
      that has the pc and end fields translated to unmapped addresses.  */
   pc = overlay_mapped_address (pc, section);
-  symtab_and_line sal = find_pc_sect_line (pc, section, notcurrent);
+  symtab_and_line sal = find_sal_for_pc_sect (pc, section, notcurrent);
   sal.pc = overlay_unmapped_address (sal.pc, section);
   sal.end = overlay_unmapped_address (sal.end, section);
   return sal;
@@ -3434,7 +3434,7 @@ find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr,
      This also insures that we never give a range like "starts at 0x134
      and ends at 0x12c".  */
 
-  found_sal = find_pc_sect_line (startaddr, sal.section, 0);
+  found_sal = find_sal_for_pc_sect (startaddr, sal.section, 0);
   if (found_sal.line != sal.line)
     {
       /* The specified line (sal) has zero bytes.  */
@@ -3522,7 +3522,7 @@ static symtab_and_line
 find_function_start_sal_1 (CORE_ADDR func_addr, obj_section *section,
                           bool funfirstline)
 {
-  symtab_and_line sal = find_pc_sect_line (func_addr, section, 0);
+  symtab_and_line sal = find_sal_for_pc_sect (func_addr, section, 0);
 
   if (funfirstline && sal.symtab != NULL
       && (sal.symtab->compunit ()->locations_valid ()
@@ -3760,7 +3760,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
          if (linetable_pc)
            {
              pc = *linetable_pc;
-             start_sal = find_pc_sect_line (pc, section, 0);
+             start_sal = find_sal_for_pc_sect (pc, section, 0);
              force_skip = 1;
              continue;
            }
@@ -3782,7 +3782,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
       pc = overlay_mapped_address (pc, section);
 
       /* Calculate line number.  */
-      start_sal = find_pc_sect_line (pc, section, 0);
+      start_sal = find_sal_for_pc_sect (pc, section, 0);
 
       /* Check if gdbarch_skip_prologue left us in mid-line, and the next
         line is still part of the same function.  */
@@ -3795,7 +3795,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
          /* First pc of next line */
          pc = start_sal.end;
          /* Recalculate the line number (might not be N+1).  */
-         start_sal = find_pc_sect_line (pc, section, 0);
+         start_sal = find_sal_for_pc_sect (pc, section, 0);
        }
 
       /* On targets with executable formats that don't have a concept of
@@ -3807,7 +3807,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
        {
          pc = gdbarch_skip_main_prologue (gdbarch, pc);
          /* Recalculate the line number (might not be N+1).  */
-         start_sal = find_pc_sect_line (pc, section, 0);
+         start_sal = find_sal_for_pc_sect (pc, section, 0);
          force_skip = 1;
        }
     }
@@ -3825,7 +3825,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
     {
       pc = skip_prologue_using_lineinfo (pc, sym->symtab ());
       /* Recalculate the line number.  */
-      start_sal = find_pc_sect_line (pc, section, 0);
+      start_sal = find_sal_for_pc_sect (pc, section, 0);
     }
 
   /* If we're already past the prologue, leave SAL unchanged.  Otherwise
index 9f6a6c361221c606d22be68c422584f084e3e735..6e82832806238ccb407a809f282b29d5c2549739 100644 (file)
@@ -2409,8 +2409,8 @@ extern struct symtab_and_line find_sal_for_pc (CORE_ADDR, int);
 
 /* Same function, but specify a section as well as an address.  */
 
-extern struct symtab_and_line find_pc_sect_line (CORE_ADDR,
-                                                struct obj_section *, int);
+extern struct symtab_and_line find_sal_for_pc_sect (CORE_ADDR,
+                                                   obj_section *, int);
 
 /* Given PC, and assuming it is part of a range of addresses that is part of
    a line, go back through the linetable and find the starting PC of that