]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename find_pc_line -> find_sal_for_pc
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 Oct 2025 00:08:01 +0000 (20:08 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 20 Oct 2025 19:12:40 +0000 (15:12 -0400)
Change-Id: I293b655e8753fc650f3ec10bb4e34a9632d8e377
Approved-by: Kevin Buettner <kevinb@redhat.com>
47 files changed:
gdb/aarch64-tdep.c
gdb/alpha-tdep.c
gdb/arc-tdep.c
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/breakpoint.c
gdb/c-exp.y
gdb/cli/cli-cmds.c
gdb/compile/compile-c-support.c
gdb/cp-namespace.c
gdb/cris-tdep.c
gdb/disasm.c
gdb/elfread.c
gdb/frame.c
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/guile/scm-symtab.c
gdb/h8300-tdep.c
gdb/hppa-tdep.c
gdb/ia64-tdep.c
gdb/infcmd.c
gdb/infrun.c
gdb/iq2000-tdep.c
gdb/linespec.c
gdb/linux-fork.c
gdb/loongarch-tdep.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/macroscope.c
gdb/microblaze-tdep.c
gdb/moxie-tdep.c
gdb/namespace.c
gdb/or1k-tdep.c
gdb/python/py-progspace.c
gdb/python/py-record-btrace.c
gdb/record-btrace.c
gdb/reverse.c
gdb/rs6000-tdep.c
gdb/sparc64-tdep.c
gdb/symtab.c
gdb/symtab.h
gdb/tracepoint.c
gdb/tui/tui-winsource.c
gdb/v850-tdep.c
gdb/xstormy16-tdep.c
gdb/xtensa-tdep.c
gdb/z80-tdep.c

index 500ac77d75a8f3f551618e411f3b7d82e21155bb..89142e0a2149fd3992f0e0a4e505917018c4ac0b 100644 (file)
@@ -1026,7 +1026,7 @@ aarch64_scan_prologue (const frame_info_ptr &this_frame,
   if (find_pc_partial_function (block_addr, NULL, &prologue_start,
                                &prologue_end))
     {
-      struct symtab_and_line sal = find_pc_line (prologue_start, 0);
+      struct symtab_and_line sal = find_sal_for_pc (prologue_start, 0);
 
       if (sal.line == 0)
        {
index 59e01620ae6dfff5531c267ea7f5c91fa72b3be8..654cef2c2f23b5376c6a48f118d491956b323f2e 100644 (file)
@@ -637,7 +637,7 @@ alpha_after_prologue (CORE_ADDR pc)
   if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
     return 0;
 
-  sal = find_pc_line (func_addr, 0);
+  sal = find_sal_for_pc (func_addr, 0);
   if (sal.end < func_end)
     return sal.end;
 
index f5ae11c4ecb9ef97b22ed19505d58d8c1983480e..d7c908b1c6cb079c8b93ea2326ebc51dba1bfb24 100644 (file)
@@ -1663,7 +1663,7 @@ arc_make_frame_cache (const frame_info_ptr &this_frame)
   CORE_ADDR entrypoint, prologue_end;
   if (find_pc_partial_function (block_addr, NULL, &entrypoint, &prologue_end))
     {
-      struct symtab_and_line sal = find_pc_line (entrypoint, 0);
+      struct symtab_and_line sal = find_sal_for_pc (entrypoint, 0);
       CORE_ADDR prev_pc = get_frame_pc (this_frame);
       if (sal.line == 0)
        /* No line info so use current PC.  */
index ff20ed88d466af54f3e92fbc507eefae35586a02..200ba9d35af64112283a981f1793a2515aec1f26 100644 (file)
@@ -1035,7 +1035,7 @@ arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs,
       gdb_assert (inferior_thread ()->control.step_resume_breakpoint
                  == NULL);
 
-      sal = find_pc_line (return_to, 0);
+      sal = find_sal_for_pc (return_to, 0);
       sal.pc = return_to;
       sal.section = find_pc_overlay (return_to);
       sal.explicit_pc = 1;
index b03e67b1aa82f2d8db8b9db9e37e1d1974d3569d..ad708e9bd45b1d200ae736fe62ec2f5f3337c4e3 100644 (file)
@@ -2238,7 +2238,7 @@ arm_scan_prologue (const frame_info_ptr &this_frame,
       /* One way to find the end of the prologue (which works well
         for unoptimized code) is to do the following:
 
-           struct symtab_and_line sal = find_pc_line (prologue_start, 0);
+           struct symtab_and_line sal = find_sal_for_pc (prologue_start, 0);
 
            if (sal.line == 0)
              prologue_end = prev_pc;
index de98a2327d7e3bc7fa0f122e7fff5c4a070facef..a2c326b9f3fe5f3f9562a4a70948d91ca0bf414a 100644 (file)
@@ -8537,7 +8537,7 @@ set_momentary_breakpoint_at_pc (struct gdbarch *gdbarch, CORE_ADDR pc,
 {
   struct symtab_and_line sal;
 
-  sal = find_pc_line (pc, 0);
+  sal = find_sal_for_pc (pc, 0);
   sal.pc = pc;
   sal.section = find_pc_overlay (pc);
   sal.explicit_pc = 1;
@@ -9009,11 +9009,11 @@ parse_breakpoint_sals (location_spec *locspec,
                 corresponding to the last call to print_frame_info.
                 Be sure to reinitialize LINE with NOTCURRENT == 0
                 as the breakpoint line number is inappropriate otherwise.
-                find_pc_line would adjust PC, re-set it back.  */
+                find_sal_for_pc would adjust PC, re-set it back.  */
              symtab_and_line sal = get_last_displayed_sal ();
              CORE_ADDR pc = sal.pc;
 
-             sal = find_pc_line (pc, 0);
+             sal = find_sal_for_pc (pc, 0);
 
              /* "break" without arguments is equivalent to "break *PC"
                 where PC is the last displayed codepoint's address.  So
@@ -9131,7 +9131,7 @@ decode_static_tracepoint_spec (const char **arg_p)
 
   for (const static_tracepoint_marker &marker : markers)
     {
-      symtab_and_line sal = find_pc_line (marker.address, 0);
+      symtab_and_line sal = find_sal_for_pc (marker.address, 0);
       sal.pc = marker.address;
       sals.push_back (sal);
    }
@@ -10979,7 +10979,7 @@ until_break_command (const char *arg, int from_tty, int anywhere)
       struct symtab_and_line sal2;
       struct gdbarch *caller_gdbarch;
 
-      sal2 = find_pc_line (frame_unwind_caller_pc (frame), 0);
+      sal2 = find_sal_for_pc (frame_unwind_caller_pc (frame), 0);
       sal2.pc = frame_unwind_caller_pc (frame);
       caller_gdbarch = frame_unwind_caller_arch (frame);
 
@@ -12890,7 +12890,7 @@ update_static_tracepoint (tracepoint *tp, struct symtab_and_line sal)
                     "found at previous line number"),
                   tp->number, tp->static_trace_marker_id.c_str ());
 
-         symtab_and_line sal2 = find_pc_line (tpmarker->address, 0);
+         symtab_and_line sal2 = find_sal_for_pc (tpmarker->address, 0);
          sym = find_symbol_for_pc_sect (tpmarker->address, NULL);
          uiout->text ("Now in ");
          if (sym)
@@ -13989,7 +13989,7 @@ insert_single_step_breakpoint (struct gdbarch *gdbarch,
        = add_to_breakpoint_chain (std::move (b));
     }
 
-  sal = find_pc_line (pc, 0);
+  sal = find_sal_for_pc (pc, 0);
   sal.pc = pc;
   sal.section = find_pc_overlay (pc);
   sal.explicit_pc = 1;
index 11f0d88bfc02b4d8ad55a7039897d2a01daf1fa3..9f1cb1b2e2a4da5e0aae7825c8830cf81c51cb4f 100644 (file)
@@ -3504,7 +3504,7 @@ c_parse (struct parser_state *par_state)
 
   if (par_state->expression_context_block)
     macro_scope
-      = sal_macro_scope (find_pc_line (par_state->expression_context_pc, 0));
+      = sal_macro_scope (find_sal_for_pc (par_state->expression_context_pc, 0));
   else
     macro_scope = default_macro_scope ();
   if (!macro_scope.is_valid ())
index 1007af46cbadf28fc44f4fba6def813228f205fe..1eda034ff12e850f9977d1170c9bb1a1a013be73 100644 (file)
@@ -1312,7 +1312,7 @@ list_command (const char *arg, int from_tty)
                 selected frame, and finding the line associated to it.  */
              frame_info_ptr frame = get_selected_frame (nullptr);
              CORE_ADDR curr_pc = get_frame_pc (frame);
-             cursal = find_pc_line (curr_pc, 0);
+             cursal = find_sal_for_pc (curr_pc, 0);
 
              if (cursal.symtab == nullptr)
                error
index ac8888fb16bbcc70a025e3dc517411dcfb3f0907..2ff1a9ff371c49d04fe5f59a29a9b50ee78f50cd 100644 (file)
@@ -188,7 +188,7 @@ write_macro_definitions (const struct block *block, CORE_ADDR pc,
   macro_scope scope;
 
   if (block != NULL)
-    scope = sal_macro_scope (find_pc_line (pc, 0));
+    scope = sal_macro_scope (find_sal_for_pc (pc, 0));
   else
     scope = default_macro_scope ();
   if (!scope.is_valid ())
index 009ea4b4c96c2f093b08be9b300559946aa36c19..caece67d0bf72a36c5c9d868bcb295e8689300b2 100644 (file)
@@ -416,7 +416,7 @@ cp_lookup_symbol_via_imports (const char *scope,
 
   /* Due to a GCC bug, we need to know the boundaries of the current block
      to know if a certain using directive is valid.  */
-  symtab_and_line boundary_sal = find_pc_line (block->end () - 1, 0);
+  symtab_and_line boundary_sal = find_sal_for_pc (block->end () - 1, 0);
 
   /* Go through the using directives.  If any of them add new names to
      the namespace we're searching in, see if we can find a match by
index 9cfc1ebd6fb3d27b50efd11f892edaba855834e3..5c04c7cb8cc6a4b400a1edc71429f4ea01bfd1a1 100644 (file)
@@ -1343,7 +1343,7 @@ cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
      should the first assembly instruction of the first source line.  */
   if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
     {
-      sal = find_pc_line (func_addr, 0);
+      sal = find_sal_for_pc (func_addr, 0);
       if (sal.end > 0 && sal.end < func_end)
        return sal.end;
     }
index 73b094b11732c9dc1860b12c3e090128f9b4c75b..b2e795d5c69c174b7104e4ff73a59153ca6892e6 100644 (file)
@@ -594,7 +594,7 @@ do_mixed_source_and_assembly_deprecated
     {
       mle[newlines].line = le[i].line;
       mle[newlines].start_pc = le[i].pc (objfile);
-      sal = find_pc_line (le[i].pc (objfile), 0);
+      sal = find_sal_for_pc (le[i].pc (objfile), 0);
       mle[newlines].end_pc = sal.end;
       newlines++;
     }
@@ -712,7 +712,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch,
 
   /* The prologue may be empty, but there may still be a line number entry
      for the opening brace which is distinct from the first line of code.
-     If the prologue has been eliminated find_pc_line may return the source
+     If the prologue has been eliminated find_sal_for_pc may return the source
      line after the opening brace.  We still want to print this opening brace.
      first_le is used to implement this.  */
 
@@ -733,7 +733,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch,
       struct symtab_and_line sal;
       int length;
 
-      sal = find_pc_line (pc, 0);
+      sal = find_sal_for_pc (pc, 0);
       length = gdb_insn_length (gdbarch, pc);
       pc += length;
 
@@ -782,7 +782,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch,
       int end_preceding_line_to_display = 0;
       int new_source_line = 0;
 
-      sal = find_pc_line (pc, 0);
+      sal = find_sal_for_pc (pc, 0);
 
       if (sal.symtab != last_symtab)
        {
index 152576d3523ae133ae713af4c4fa450079f18de4..20c124cf14f49bef1a956315a38bc12799705bb7 100644 (file)
@@ -973,7 +973,7 @@ elf_gnu_ifunc_resolver_stop (code_breakpoint *b)
 
   if (b_return == b)
     {
-      /* No need to call find_pc_line for symbols resolving as this is only
+      /* No need to call find_sal_for_pc for symbols resolving as this is only
         a helper breakpoint never shown to the user.  */
 
       symtab_and_line sal;
index 4162a35b75332b01aa7612134fc930277cfcdf2f..b84e30c23903883017931d30311f01ed47143ccc 100644 (file)
@@ -2916,7 +2916,7 @@ find_frame_sal (const frame_info_ptr &frame)
     return {};
 
   notcurrent = (*pc != get_frame_address_in_block (frame));
-  return find_pc_line (*pc, notcurrent);
+  return find_sal_for_pc (*pc, notcurrent);
 }
 
 /* Per "frame.h", return the ``address'' of the frame.  Code should
index b2d6e1a1eabf6ad4869c4c083113510fc35b3d5b..9bd719cd2fff1f09f8a7e0e37f4ee43f2a502d81 100644 (file)
@@ -986,7 +986,7 @@ frv_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
     {
       struct symtab_and_line sal;
 
-      sal = find_pc_line (func_addr, 0);
+      sal = find_sal_for_pc (func_addr, 0);
 
       if (sal.line != 0 && sal.end < func_end)
        {
index 33849290bb0b1747f34184c57c1ce2c9e93aa93d..860c98370325288dbe27c1e6f0840f6e6ddce34a 100644 (file)
@@ -303,7 +303,7 @@ ft32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
          /* Don't use line number debug info for assembly source files.  */
          if ((sym != NULL) && sym->language () != language_asm)
            {
-             sal = find_pc_line (func_addr, 0);
+             sal = find_sal_for_pc (func_addr, 0);
              if (sal.end && sal.end < func_end)
                {
                  /* Found a line number, use it as end of prologue.  */
index e337a4b5927cbe26e089c96ea76a6237a2a07e2a..09887a41be07ecff7f657015e3095643c125a794 100644 (file)
@@ -592,7 +592,7 @@ gdbscm_find_pc_line (SCM pc_scm)
     {
       CORE_ADDR pc = (CORE_ADDR) pc_ull;
 
-      sal = find_pc_line (pc, 0);
+      sal = find_sal_for_pc (pc, 0);
     }
   catch (const gdb_exception &except)
     {
index 15b0002b8d280d2bf575a095829db7b89df17bb5..b088b2a342cbb2ec55f6ca75d8444cae060f7a93 100644 (file)
@@ -536,7 +536,7 @@ h8300_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
       struct h8300_frame_cache cache;
 
       /* Found a function.  */
-      sal = find_pc_line (func_addr, 0);
+      sal = find_sal_for_pc (func_addr, 0);
       if (sal.end && sal.end < func_end)
        /* Found a line number, use it as end of prologue.  */
        return sal.end;
index acd002863b31bd2d636279aa753c62ae83eaa02e..230e9beba39c4f89ae64a622ead09bee9cded38e 100644 (file)
@@ -1774,7 +1774,7 @@ after_prologue (CORE_ADDR pc)
     return 0;
 
   /* Get the line associated with FUNC_ADDR.  */
-  sal = find_pc_line (func_addr, 0);
+  sal = find_sal_for_pc (func_addr, 0);
 
   /* There are only two cases to consider.  First, the end of the source line
      is within the function bounds.  In that case we return the end of the
index 370973a652f513c0cb751772241a2ac793ec4a58..a626cb22fbdf5492bb1f642d43d30f07106d44cf 100644 (file)
@@ -1283,7 +1283,7 @@ refine_prologue_limit (CORE_ADDR pc, CORE_ADDR lim_pc, int *trust_limit)
   /* Start off not trusting the limit.  */
   *trust_limit = 0;
 
-  prologue_sal = find_pc_line (pc, 0);
+  prologue_sal = find_sal_for_pc (pc, 0);
   if (prologue_sal.line != 0)
     {
       int i;
@@ -1302,7 +1302,7 @@ refine_prologue_limit (CORE_ADDR pc, CORE_ADDR lim_pc, int *trust_limit)
        {
          struct symtab_and_line sal;
 
-         sal = find_pc_line (addr, 0);
+         sal = find_sal_for_pc (addr, 0);
          if (sal.line == 0)
            break;
          if (sal.line <= prologue_sal.line 
index 285086ebb1c661cce968fce6f4cc7a8f5b599766..4e9bdda5a6d9aab73c4e03357fa47bad736e316e 100644 (file)
@@ -970,9 +970,9 @@ prepare_one_step (thread_info *tp, struct step_command_fsm *sm)
 
          if (execution_direction == EXEC_REVERSE)
            {
-             symtab_and_line sal = find_pc_line (pc, 0);
+             symtab_and_line sal = find_sal_for_pc (pc, 0);
              symtab_and_line sal_start
-               = find_pc_line (tp->control.step_range_start, 0);
+               = find_sal_for_pc (tp->control.step_range_start, 0);
 
              if (sal.line == sal_start.line)
                /* Executing in reverse, the step_range_start address is in
@@ -1368,7 +1368,7 @@ until_next_command (int from_tty)
     }
   else
     {
-      sal = find_pc_line (pc, 0);
+      sal = find_sal_for_pc (pc, 0);
 
       tp->control.step_range_start = func->value_block ()->entry_pc ();
       tp->control.step_range_end = sal.end;
@@ -1669,7 +1669,7 @@ finish_backward (struct finish_command_fsm *sm)
   if (find_pc_partial_function (pc, nullptr, &func_addr, nullptr) == 0)
     error (_("Cannot find bounds of current function"));
 
-  sal = find_pc_line (func_addr, 0);
+  sal = find_sal_for_pc (func_addr, 0);
   alt_entry_point = sal.pc;
   entry_point = alt_entry_point;
 
@@ -1728,7 +1728,7 @@ finish_forward (struct finish_command_fsm *sm, const frame_info_ptr &frame)
   struct symtab_and_line sal;
   struct thread_info *tp = inferior_thread ();
 
-  sal = find_pc_line (get_frame_pc (frame), 0);
+  sal = find_sal_for_pc (get_frame_pc (frame), 0);
   sal.pc = get_frame_pc (frame);
 
   sm->breakpoint = set_momentary_breakpoint (gdbarch, sal,
index 959393d3e5e76e29c7c015bb835aee10e83e64f4..84c1545f06bf98dddbee43f9afd0ee4659a40fc2 100644 (file)
@@ -7969,7 +7969,7 @@ process_event_stop_test (struct execution_control_state *ecs)
       {
        struct symtab_and_line tmp_sal;
 
-       tmp_sal = find_pc_line (ecs->stop_func_start, 0);
+       tmp_sal = find_sal_for_pc (ecs->stop_func_start, 0);
        if (tmp_sal.line != 0
            && !function_name_is_marked_for_skip (ecs->stop_func_name,
                                                  tmp_sal)
@@ -8058,7 +8058,7 @@ process_event_stop_test (struct execution_control_state *ecs)
      stack of inlined frames, even if GDB actually believes that it is in a
      more outer frame.  This is checked for below by calls to
      inline_skipped_frames.  */
-  stop_pc_sal = find_pc_line (ecs->event_thread->stop_pc (), 0);
+  stop_pc_sal = find_sal_for_pc (ecs->event_thread->stop_pc (), 0);
 
   /* NOTE: tausq/2004-05-24: This if block used to be done before all
      the trampoline processing logic, however, there are some trampolines 
@@ -8676,7 +8676,7 @@ handle_step_into_function (struct gdbarch *gdbarch,
     ecs->stop_func_start
       = gdbarch_skip_prologue_noexcept (gdbarch, ecs->stop_func_start);
 
-  symtab_and_line stop_func_sal = find_pc_line (ecs->stop_func_start, 0);
+  symtab_and_line stop_func_sal = find_sal_for_pc (ecs->stop_func_start, 0);
   /* Use the step_resume_break to step until the end of the prologue,
      even if that involves jumps (as it seems to on the vax under
      4.2).  */
@@ -8755,7 +8755,7 @@ handle_step_into_function_backward (struct gdbarch *gdbarch,
     ecs->stop_func_start
       = gdbarch_skip_prologue_noexcept (gdbarch, ecs->stop_func_start);
 
-  stop_func_sal = find_pc_line (ecs->event_thread->stop_pc (), 0);
+  stop_func_sal = find_sal_for_pc (ecs->event_thread->stop_pc (), 0);
 
   /* OK, we're just going to keep stepping here.  */
   if (stop_func_sal.pc == ecs->event_thread->stop_pc ())
index 58a4dfbdb8350a94fd2a5b2025d4be93bb95f53d..782f8b729c819702e447c38d39b029758e193c79 100644 (file)
@@ -170,7 +170,7 @@ iq2000_register_name (struct gdbarch *gdbarch, int regnum)
 static struct symtab_and_line
 find_last_line_symbol (CORE_ADDR start, CORE_ADDR end, int notcurrent)
 {
-  struct symtab_and_line sal = find_pc_line (start, notcurrent);
+  struct symtab_and_line sal = find_sal_for_pc (start, notcurrent);
   struct symtab_and_line best_sal = sal;
 
   if (sal.pc == 0 || sal.line == 0 || sal.end == 0)
@@ -180,7 +180,7 @@ find_last_line_symbol (CORE_ADDR start, CORE_ADDR end, int notcurrent)
     {
       if (sal.line && sal.line <= best_sal.line)
        best_sal = sal;
-      sal = find_pc_line (sal.end, notcurrent);
+      sal = find_sal_for_pc (sal.end, notcurrent);
     }
   while (sal.pc && sal.pc < end);
 
@@ -343,7 +343,7 @@ iq2000_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
       struct iq2000_frame_cache cache;
 
       /* Found a function.  */
-      sal = find_pc_line (func_addr, 0);
+      sal = find_sal_for_pc (func_addr, 0);
       if (sal.end && sal.end < func_end)
        /* Found a line number, use it as end of prologue.  */
        return sal.end;
index b6fe4e170bf3c6c02d5d850de984db0092b42e11..05f676ee38d46b2ae7233ed67e38aa0e8b11cbbe 100644 (file)
@@ -2161,7 +2161,7 @@ static std::vector<symtab_and_line>
 convert_address_location_to_sals (struct linespec_state *self,
                                  CORE_ADDR address)
 {
-  symtab_and_line sal = find_pc_line (address, 0);
+  symtab_and_line sal = find_sal_for_pc (address, 0);
   sal.pc = address;
   sal.section = find_pc_overlay (address);
   sal.explicit_pc = 1;
index 48732b70ec35375daa25caf63401b390506753ee..9e8e1a1f6a9414265133830efb345ba418321129 100644 (file)
@@ -904,7 +904,7 @@ print_checkpoints (struct ui_out *uiout, inferior *req_inf, fork_info *req_fi)
                   : fi.pc);
              uiout->field_core_addr ("addr", get_current_arch (), pc);
 
-             symtab_and_line sal = find_pc_line (pc, 0);
+             symtab_and_line sal = find_sal_for_pc (pc, 0);
              if (sal.symtab)
                {
                  uiout->text (", file ");
index e94b88bc010aebd408f1d6670fbb1e99fcf95895..5e09125e400c2bb2ea29d3c32dc98349c5f5004e 100644 (file)
@@ -595,7 +595,7 @@ loongarch_analyze_prologue (const frame_info_ptr &this_frame,
   if (find_pc_partial_function (block_addr, NULL, &prologue_start,
                                &prologue_end))
     {
-      struct symtab_and_line sal = find_pc_line (prologue_start, 0);
+      struct symtab_and_line sal = find_sal_for_pc (prologue_start, 0);
 
       if (sal.line == 0)
        {
index 4ac08fdd6c8032202042746ba901f006514664a8..ae233a1e94d5a3ef913be5da71d882cd37b21667 100644 (file)
@@ -463,7 +463,7 @@ m32r_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
   if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
     {
-      sal = find_pc_line (func_addr, 0);
+      sal = find_sal_for_pc (func_addr, 0);
 
       if (sal.line != 0 && sal.end <= func_end)
        {
index 5389fee9ffd0a03a4ebe18305a5d541df2ca3bea..a61a49e43bb37264b961b9df3c962a2c6da565d3 100644 (file)
@@ -758,7 +758,7 @@ m68hc11_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
      first source line.  */
   if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
     {
-      sal = find_pc_line (func_addr, 0);
+      sal = find_sal_for_pc (func_addr, 0);
       if (sal.end && sal.end < func_end)
        return sal.end;
     }
index a8b78c9906c95ca676b1f6248ff8ecf057b119d1..563ef9931b390746d828748af740155b1c828354 100644 (file)
@@ -102,7 +102,7 @@ default_macro_scope ()
   /* If there's a selected frame, use its PC.  */
   frame = deprecated_safe_get_selected_frame ();
   if (frame && (pc = get_frame_pc_if_available (frame)))
-    sal = find_pc_line (*pc, 0);
+    sal = find_sal_for_pc (*pc, 0);
 
   /* Fall back to the current listing position.  */
   else
index 404e4cde2ad99b29349db6002135511b5a00e56d..3953a96a4e12826fb3a653652104e91c01489b11 100644 (file)
@@ -399,7 +399,7 @@ microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
      Always analyze the prologue.  */
   if (find_pc_partial_function (start_pc, NULL, &func_start, &func_end))
     {
-      sal = find_pc_line (func_start, 0);
+      sal = find_sal_for_pc (func_start, 0);
 
       if (sal.end < func_end
          && start_pc <= sal.end)
index bb4887799bd33c73881cc00eec43e8e2f7e5a159..7aa9b0536d5f1ffe1b5f86bb377d333737972beb 100644 (file)
@@ -232,7 +232,7 @@ moxie_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
             files.  */
          if (sym && sym->language () != language_asm)
            {
-             sal = find_pc_line (func_addr, 0);
+             sal = find_sal_for_pc (func_addr, 0);
              if (sal.end && sal.end < func_end)
                {
                  /* Found a line number, use it as end of
index 52eb1eae37564796b4c5211ea0155d0136b15abe..ace8542513194c20ce7af95a5aa0971dec7bb5c9 100644 (file)
@@ -112,7 +112,7 @@ using_direct::valid_line (unsigned int boundary) const
   try
     {
       CORE_ADDR curr_pc = get_frame_pc (get_selected_frame (nullptr));
-      symtab_and_line curr_sal = find_pc_line (curr_pc, 0);
+      symtab_and_line curr_sal = find_sal_for_pc (curr_pc, 0);
       return (decl_line <= curr_sal.line)
             || (decl_line >= boundary);
     }
index 2db207dafdd1439fbc0f8490c20bdcfdcc8b4e02..442bdaf9fab95cc52ff688f88f0726355eeabcc3 100644 (file)
@@ -467,7 +467,7 @@ or1k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
       if (0 != prologue_end)
        {
-         struct symtab_and_line prologue_sal = find_pc_line (start_pc, 0);
+         struct symtab_and_line prologue_sal = find_sal_for_pc (start_pc, 0);
          struct compunit_symtab *compunit
            = prologue_sal.symtab->compunit ();
          const char *debug_format = compunit->debugformat ();
index a0afc7b7dba3edd7bbd3cf3267122d9da786f1f7..7ca9d88bbd20dfa062294d2e0c0655f7b47a60ae 100644 (file)
@@ -559,7 +559,7 @@ pspy_find_pc_line (PyObject *o, PyObject *args)
 
       set_current_program_space (self->pspace);
 
-      sal = find_pc_line (pc, 0);
+      sal = find_sal_for_pc (pc, 0);
       result = symtab_and_line_to_sal_object (sal);
     }
   catch (const gdb_exception &except)
index 620f033e679ea6ff07d92d19475c3c63c8c20755..7acf70ec83b8f90a5b15ae3b42dbfbabb44ec214 100644 (file)
@@ -213,7 +213,7 @@ recpy_bt_insn_sal (PyObject *self, void *closure)
 
   try
     {
-      result = symtab_and_line_to_sal_object (find_pc_line (insn->pc, 0));
+      result = symtab_and_line_to_sal_object (find_sal_for_pc (insn->pc, 0));
     }
   catch (const gdb_exception &except)
     {
index 51121817da1c922e81fbbb8cfd761852099865d1..cc9365d2fa1b90d87adb57f7366982a779880af6 100644 (file)
@@ -1093,7 +1093,7 @@ btrace_compute_src_line_range (const struct btrace_function *bfun,
     {
       struct symtab_and_line sal;
 
-      sal = find_pc_line (insn.pc, 0);
+      sal = find_sal_for_pc (insn.pc, 0);
       if (sal.symtab != symtab || sal.line == 0)
        continue;
 
index dc35bca70faaf9956540c2283bee3663b4f93c33..376435deab2c5797cfe90bdc308c7970d73e6fdb 100644 (file)
@@ -125,7 +125,7 @@ save_bookmark_command (const char *args, int from_tty)
   bookmark &b = all_bookmarks.emplace_back ();
   b.number = ++bookmark_count;
   b.pc = regcache_read_pc (regcache);
-  b.sal = find_pc_line (b.pc, 0);
+  b.sal = find_sal_for_pc (b.pc, 0);
   b.sal.pspace = get_frame_program_space (get_current_frame ());
   b.opaque_data.reset (bookmark_id);
 
index 75079b9e211ce007c2f9732c763b7aab93d4f850..7c8a6f70ef63f911c92634a10a97d038e1aa65c8 100644 (file)
@@ -1827,8 +1827,8 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
             associated with the prologue.  */
          if ((pc - orig_pc) > 8)
            {
-             struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0);
-             struct symtab_and_line this_sal = find_pc_line (pc, 0);
+             struct symtab_and_line prologue_sal = find_sal_for_pc (orig_pc, 0);
+             struct symtab_and_line this_sal = find_sal_for_pc (pc, 0);
 
              if ((prologue_sal.line == 0)
                  || (prologue_sal.line != this_sal.line))
index 68464212802f58e5ff65fd469bcf292aeb069cd1..a16f5c4111a9a58e5fb8d0572f2b8c07e0efeb98 100644 (file)
@@ -1048,7 +1048,7 @@ sparc64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
      using the debugging information.  */
   if (find_pc_partial_function (start_pc, NULL, &func_start, &func_end))
     {
-      sal = find_pc_line (func_start, 0);
+      sal = find_sal_for_pc (func_start, 0);
 
       if (sal.end < func_end
          && start_pc <= sal.end)
index f3377ff2a7eb722757d05cca02f17d8f26419142..f36d5b262955ae0a4ab96cd919c96d240cc89e4a 100644 (file)
@@ -3020,7 +3020,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
              internal_error (_("Infinite recursion detected in find_pc_sect_line;"
                  "please file a bug report"));
 
-           return find_pc_line (mfunsym.value_address (), 0);
+           return find_sal_for_pc (mfunsym.value_address (), 0);
          }
       }
 
@@ -3175,7 +3175,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
 /* Backward compatibility (no section).  */
 
 struct symtab_and_line
-find_pc_line (CORE_ADDR pc, int notcurrent)
+find_sal_for_pc (CORE_ADDR pc, int notcurrent)
 {
   struct obj_section *section;
 
@@ -3213,12 +3213,12 @@ sal_line_symtab_matches_p (const symtab_and_line &sal1,
 std::optional<CORE_ADDR>
 find_line_range_start (CORE_ADDR pc)
 {
-  struct symtab_and_line current_sal = find_pc_line (pc, 0);
+  struct symtab_and_line current_sal = find_sal_for_pc (pc, 0);
 
   if (current_sal.line == 0)
     return {};
 
-  struct symtab_and_line prev_sal = find_pc_line (current_sal.pc - 1, 0);
+  struct symtab_and_line prev_sal = find_sal_for_pc (current_sal.pc - 1, 0);
 
   /* If the previous entry is for a different line, that means we are already
      at the entry with the start PC for this line.  */
@@ -3233,7 +3233,7 @@ find_line_range_start (CORE_ADDR pc)
     {
       prev_pc = prev_sal.pc;
 
-      prev_sal = find_pc_line (prev_pc - 1, 0);
+      prev_sal = find_sal_for_pc (prev_pc - 1, 0);
 
       /* Did we notice a line change?  If so, we are done searching.  */
       if (!sal_line_symtab_matches_p (prev_sal, current_sal))
@@ -3250,9 +3250,9 @@ find_pc_line_symtab (CORE_ADDR pc)
 {
   struct symtab_and_line sal;
 
-  /* This always passes zero for NOTCURRENT to find_pc_line.
+  /* This always passes zero for NOTCURRENT to find_sal_for_pc.
      There are currently no callers that ever pass non-zero.  */
-  sal = find_pc_line (pc, 0);
+  sal = find_sal_for_pc (pc, 0);
   return sal.symtab;
 }
 \f
@@ -3509,7 +3509,7 @@ find_line_pc_range_for_pc (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr)
 {
   struct symtab_and_line sal;
 
-  sal = find_pc_line (pc, 0);
+  sal = find_sal_for_pc (pc, 0);
   *startptr = sal.pc;
   *endptr = sal.end;
   return sal.symtab != 0;
@@ -3642,7 +3642,7 @@ skip_prologue_using_linetable (CORE_ADDR func_addr)
   if (!find_pc_partial_function (func_addr, nullptr, &start_pc, &end_pc))
     return {};
 
-  const struct symtab_and_line prologue_sal = find_pc_line (start_pc, 0);
+  const struct symtab_and_line prologue_sal = find_sal_for_pc (start_pc, 0);
   if (prologue_sal.symtab != nullptr
       && prologue_sal.symtab->language () != language_asm)
     {
@@ -3888,7 +3888,7 @@ skip_prologue_using_sal (struct gdbarch *gdbarch, CORE_ADDR func_addr)
   find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc);
   start_pc += gdbarch_deprecated_function_start_offset (gdbarch);
 
-  prologue_sal = find_pc_line (start_pc, 0);
+  prologue_sal = find_sal_for_pc (start_pc, 0);
   if (prologue_sal.line != 0)
     {
       /* For languages other than assembly, treat two consecutive line
@@ -3927,7 +3927,7 @@ skip_prologue_using_sal (struct gdbarch *gdbarch, CORE_ADDR func_addr)
        {
          struct symtab_and_line sal;
 
-         sal = find_pc_line (prologue_sal.end, 0);
+         sal = find_sal_for_pc (prologue_sal.end, 0);
          if (sal.line == 0)
            break;
          /* Assume that a consecutive SAL for the same (or larger)
@@ -3994,10 +3994,10 @@ find_epilogue_using_linetable (CORE_ADDR func_addr)
      The lines of a function can be described by several line tables in case
      there are different files involved.  There's a corner case where a
      function epilogue is in a different file than a function start, and using
-     start_pc as argument to find_pc_line will mean we won't find the
+     start_pc as argument to find_sal_for_pc will mean we won't find the
      epilogue.  Instead, use "end_pc - 1" to maximize our chances of picking
      the line table containing an epilogue.  */
-  const struct symtab_and_line sal = find_pc_line (end_pc - 1, 0);
+  const struct symtab_and_line sal = find_sal_for_pc (end_pc - 1, 0);
   if (sal.symtab != nullptr && sal.symtab->language () != language_asm)
     {
       struct objfile *objfile = sal.symtab->compunit ()->objfile ();
@@ -4032,7 +4032,7 @@ find_epilogue_using_linetable (CORE_ADDR func_addr)
             This can happen when the linetable doesn't describe the full
             extent of the function.  This can be triggered with:
             - compiler-generated debug info, in the cornercase that the pc
-              with which we call find_pc_line resides in a different file
+              with which we call find_sal_for_pc resides in a different file
               than unrel_end, or
             - invalid dwarf assembly debug info.
             In the former case, there's no point in iterating further, simply
index 1d419dd16e680c59e54c74f4e2732c677e4ba97a..9f6a6c361221c606d22be68c422584f084e3e735 100644 (file)
@@ -2405,7 +2405,7 @@ struct symtab_and_line
 /* Given a pc value, return line number it is in.  Second arg nonzero means
    if pc is on the boundary use the previous statement's line number.  */
 
-extern struct symtab_and_line find_pc_line (CORE_ADDR, int);
+extern struct symtab_and_line find_sal_for_pc (CORE_ADDR, int);
 
 /* Same function, but specify a section as well as an address.  */
 
@@ -2428,7 +2428,7 @@ extern struct symtab_and_line find_pc_sect_line (CORE_ADDR,
 
 extern std::optional<CORE_ADDR> find_line_range_start (CORE_ADDR pc);
 
-/* Wrapper around find_pc_line to just return the symtab.  */
+/* Wrapper around find_sal_for_pc to just return the symtab.  */
 
 extern struct symtab *find_pc_line_symtab (CORE_ADDR);
 
index ce5418b87913f2cf5affd604a17c00d952d36c0e..c0db7c8e6fa45e60ed15cba9f3c1cdfc0a91dc78 100644 (file)
@@ -216,7 +216,7 @@ set_traceframe_context (const frame_info_ptr &trace_frame)
   if (trace_frame != NULL
       && (trace_pc = get_frame_pc_if_available (trace_frame)))
     {
-      traceframe_sal = find_pc_line (*trace_pc, 0);
+      traceframe_sal = find_sal_for_pc (*trace_pc, 0);
       traceframe_fun = find_symbol_for_pc (*trace_pc);
 
       /* Save linenumber as "$trace_line", a debugger variable visible to
@@ -2334,7 +2334,7 @@ tfind_line_command (const char *args, int from_tty)
   symtab_and_line sal;
   if (args == 0 || *args == 0)
     {
-      sal = find_pc_line (get_frame_pc (get_current_frame ()), 0);
+      sal = find_sal_for_pc (get_frame_pc (get_current_frame ()), 0);
     }
   else
     {
@@ -2360,7 +2360,7 @@ tfind_line_command (const char *args, int from_tty)
          print_address (get_current_arch (), start_pc, gdb_stdout);
          gdb_stdout->wrap_here (2);
          gdb_printf (" but contains no code.\n");
-         sal = find_pc_line (start_pc, 0);
+         sal = find_sal_for_pc (start_pc, 0);
          if (sal.line > 0
              && find_line_pc_range (sal, &start_pc, &end_pc)
              && start_pc != end_pc)
@@ -3617,7 +3617,7 @@ print_one_static_tracepoint_marker (int count,
 
   uiout->field_core_addr ("addr", marker.gdbarch, marker.address);
 
-  sal = find_pc_line (marker.address, 0);
+  sal = find_sal_for_pc (marker.address, 0);
   sym = find_symbol_for_pc_sect (marker.address, NULL);
   if (sym)
     {
index 2fe4914f2706c69806315817b4dcbe95cf9302bf..e66c4596586e24628e50d035092d053d7363868a 100644 (file)
@@ -182,7 +182,7 @@ tui_source_window_base::update_source_window_with_addr (struct gdbarch *gdbarch,
 {
   struct symtab_and_line sal {};
   if (addr != 0)
-    sal = find_pc_line (addr, 0);
+    sal = find_sal_for_pc (addr, 0);
 
   maybe_update (gdbarch, sal);
 }
@@ -194,7 +194,7 @@ tui_update_source_windows_with_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
   struct symtab_and_line sal {};
   if (addr != 0)
-    sal = find_pc_line (addr, 0);
+    sal = find_sal_for_pc (addr, 0);
 
   for (struct tui_source_window_base *win_info : tui_source_windows ())
     win_info->update_source_window (gdbarch, sal);
@@ -493,7 +493,7 @@ tui_source_window_base::refill ()
        {
          frame_info_ptr fi = deprecated_safe_get_selected_frame ();
          if (fi != nullptr)
-           sal = find_pc_line (get_frame_pc (fi), 0);
+           sal = find_sal_for_pc (get_frame_pc (fi), 0);
        }
     }
 
index d592344e2e3ee4223710bce4c42d9f786cd52b8a..0b77cf38d3fd91684d995239d6deb9e061ccbbb4 100644 (file)
@@ -952,7 +952,7 @@ v850_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
     {
       struct symtab_and_line sal;
 
-      sal = find_pc_line (func_addr, 0);
+      sal = find_sal_for_pc (func_addr, 0);
       if (sal.line != 0 && sal.end < func_end)
        return sal.end;
 
index b63dfa04be00a72ec2ec3b78e28618caf6ed98e2..64aa16f5a13ac69f6a952f4214426b95511ba669 100644 (file)
@@ -428,7 +428,7 @@ xstormy16_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
       /* Don't use line number debug info for assembly source files.  */
       if (sym && sym->language () != language_asm)
        {
-         sal = find_pc_line (func_addr, 0);
+         sal = find_sal_for_pc (func_addr, 0);
          if (sal.end && sal.end < func_end)
            {
              /* Found a line number, use it as end of prologue.  */
index 8a2f129c7580dd198a6ea9fd8341329d47e559c3..19bec106364a6aa419b914f8e1fa1dcaa3388755 100644 (file)
@@ -2378,7 +2378,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch,
   end_pc = 0;
 
   /* Find out, if we have an information about the prologue from DWARF.  */
-  prologue_sal = find_pc_line (start, 0);
+  prologue_sal = find_sal_for_pc (start, 0);
   if (prologue_sal.line != 0) /* Found debug info.  */
     body_pc = prologue_sal.end;
 
@@ -3000,7 +3000,7 @@ xtensa_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 
  /* Try to find first body line from debug info.  */
 
-  prologue_sal = find_pc_line (start_pc, 0);
+  prologue_sal = find_sal_for_pc (start_pc, 0);
   if (prologue_sal.line != 0) /* Found debug info.  */
     {
       /* In Call0,  it is possible to have a function with only one instruction
index 9ae8b7a5857d87646a7d09452c0c83a3a964cb45..31d319392ddbac25d5bd28c2c872713f57981a9f 100644 (file)
@@ -494,7 +494,7 @@ z80_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
   if (prologue_end != 0)
     {
-      struct symtab_and_line prologue_sal = find_pc_line (func_addr, 0);
+      struct symtab_and_line prologue_sal = find_sal_for_pc (func_addr, 0);
       struct compunit_symtab *compunit = prologue_sal.symtab->compunit ();
       const char *debug_format = compunit->debugformat ();