From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7nHBDcM68GigaTYAWB0awg (envelope-from ) for ; Wed, 15 Oct 2025 20:22:27 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=Cm1EquO1; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 227BD1E0BA; Wed, 15 Oct 2025 20:22:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D3B6C1E047 for ; Wed, 15 Oct 2025 20:22:24 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56E4F3858023 for ; Thu, 16 Oct 2025 00:22:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56E4F3858023 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=Cm1EquO1 Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 21E8D3857C58 for ; Thu, 16 Oct 2025 00:18:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21E8D3857C58 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 21E8D3857C58 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760573887; cv=none; b=GpLNm7RVhnX9UxoKlVh0EpRbHTp/G6h+OAzotId+76uhUqnQ2xJITDpqY2O3cM1VagQdUlw/EOj6sD9YM1dcwqG9AOIovVd93e58NO/b1zGW65O79F6SYHc5RwxqXTmDg0fhIu4Q8LoGZLPlgGPPr2aySfSVd/oDNNH7FkDm/VA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760573887; c=relaxed/simple; bh=+XbpGNgeDh/7tXdShI2dJ7qOJb+PowLsOFrv5+4MVN0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hdq64FNTMF2CNWHkY9mN2hyCgQRsafEUWLvcWXGr/FLyBWOpb5fXyVKPqHArDajk5G71zNDAcMTVqxb9067/Db2ngA8p5/DRY7HddQiERhKXw1y85Aa1Yo7QoKGKn+i/T2UgoYse/ltnJEMJrdMPQUXGFAm5P9WIlNGiGGytu3U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21E8D3857C58 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 59G0I1KD071296 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Oct 2025 20:18:06 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 59G0I1KD071296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1760573886; bh=fqi1ofHSujOLw28QcVqyacvdJJTQssnYn7JRmPd0FtA=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=Cm1EquO1fpRjTBQZMHCRvKdXHkjTKOf3t/94Ihp++11cb3+rhIIcoVaC04oRHd3a3 A3byiwtl+l5aWI4HgKPSwtiFc2rCFYrUOFWbh2FzTf//r6aRQ80dr+a1DENFncI/Ry aToPdOko7hsCy3OwWyZQyVPmKFE66NEaPuskj1wU2/CKKU+RUiA8tJTmXYg9zLByRK 8oijrm7TY/uDBFn/Cc4DPfaK+LnUVt23bZfulneiddbGB+JG+6TVpcCZ0CrgnqTjWD 0HutCYzvdx+1IOEtp0JxgZhazk5kByG/uo2SKZH3kl7xbgQAtzCfvSGBHKfu/38+K1 84v6w0rePLVHA== Received: by simark.ca (Postfix) id DCB851E120; Wed, 15 Oct 2025 20:11:59 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 07/10] gdb: rename find_pc_line -> find_sal_for_pc Date: Wed, 15 Oct 2025 20:08:01 -0400 Message-ID: <20251016001154.3969223-8-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251016001154.3969223-1-simon.marchi@polymtl.ca> References: <20251016001154.3969223-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 16 Oct 2025 00:18:01 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Simon Marchi Change-Id: I293b655e8753fc650f3ec10bb4e34a9632d8e377 --- gdb/aarch64-tdep.c | 2 +- gdb/alpha-tdep.c | 2 +- gdb/arc-tdep.c | 2 +- gdb/arm-linux-tdep.c | 2 +- gdb/arm-tdep.c | 2 +- gdb/breakpoint.c | 14 +++++++------- gdb/c-exp.y | 2 +- gdb/cli/cli-cmds.c | 2 +- gdb/compile/compile-c-support.c | 2 +- gdb/cp-namespace.c | 2 +- gdb/cris-tdep.c | 2 +- gdb/disasm.c | 8 ++++---- gdb/elfread.c | 2 +- gdb/frame.c | 2 +- gdb/frv-tdep.c | 2 +- gdb/ft32-tdep.c | 2 +- gdb/guile/scm-symtab.c | 2 +- gdb/h8300-tdep.c | 2 +- gdb/hppa-tdep.c | 2 +- gdb/ia64-tdep.c | 4 ++-- gdb/infcmd.c | 10 +++++----- gdb/infrun.c | 8 ++++---- gdb/iq2000-tdep.c | 6 +++--- gdb/linespec.c | 2 +- gdb/linux-fork.c | 2 +- gdb/loongarch-tdep.c | 2 +- gdb/m32r-tdep.c | 2 +- gdb/m68hc11-tdep.c | 2 +- gdb/macroscope.c | 2 +- gdb/microblaze-tdep.c | 2 +- gdb/moxie-tdep.c | 2 +- gdb/namespace.c | 2 +- gdb/or1k-tdep.c | 2 +- gdb/python/py-progspace.c | 2 +- gdb/python/py-record-btrace.c | 2 +- gdb/record-btrace.c | 2 +- gdb/reverse.c | 2 +- gdb/rs6000-tdep.c | 4 ++-- gdb/sparc64-tdep.c | 2 +- gdb/symtab.c | 28 ++++++++++++++-------------- gdb/symtab.h | 4 ++-- gdb/tracepoint.c | 8 ++++---- gdb/tui/tui-winsource.c | 6 +++--- gdb/v850-tdep.c | 2 +- gdb/xstormy16-tdep.c | 2 +- gdb/xtensa-tdep.c | 4 ++-- gdb/z80-tdep.c | 2 +- 47 files changed, 87 insertions(+), 87 deletions(-) diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 500ac77d75a8..89142e0a2149 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -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) { diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 59e01620ae6d..654cef2c2f23 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -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; diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index f5ae11c4ecb9..d7c908b1c6cb 100644 --- a/gdb/arc-tdep.c +++ b/gdb/arc-tdep.c @@ -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. */ diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index ff20ed88d466..200ba9d35af6 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -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; diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index b03e67b1aa82..ad708e9bd45b 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -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; diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index de98a2327d7e..a2c326b9f3fe 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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; diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 11f0d88bfc02..9f1cb1b2e2a4 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -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 ()) diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 1007af46cbad..1eda034ff12e 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -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 diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c index ac8888fb16bb..2ff1a9ff371c 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -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 ()) diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index 009ea4b4c96c..caece67d0bf7 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -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 diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 9cfc1ebd6fb3..5c04c7cb8cc6 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -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; } diff --git a/gdb/disasm.c b/gdb/disasm.c index 73b094b11732..b2e795d5c69c 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -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) { diff --git a/gdb/elfread.c b/gdb/elfread.c index 152576d3523a..20c124cf14f4 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -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; diff --git a/gdb/frame.c b/gdb/frame.c index 4162a35b7533..b84e30c23903 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -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 diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index b2d6e1a1eabf..9bd719cd2fff 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -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) { diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c index 33849290bb0b..860c98370325 100644 --- a/gdb/ft32-tdep.c +++ b/gdb/ft32-tdep.c @@ -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. */ diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c index e337a4b5927c..09887a41be07 100644 --- a/gdb/guile/scm-symtab.c +++ b/gdb/guile/scm-symtab.c @@ -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) { diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 15b0002b8d28..b088b2a342cb 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -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; diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index acd002863b31..230e9beba39c 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -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 diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 370973a652f5..a626cb22fbdf 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -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 diff --git a/gdb/infcmd.c b/gdb/infcmd.c index ff49c2e29253..220938221add 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -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, diff --git a/gdb/infrun.c b/gdb/infrun.c index 959393d3e5e7..84c1545f06bf 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -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 ()) diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c index 58a4dfbdb835..782f8b729c81 100644 --- a/gdb/iq2000-tdep.c +++ b/gdb/iq2000-tdep.c @@ -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; diff --git a/gdb/linespec.c b/gdb/linespec.c index b6fe4e170bf3..05f676ee38d4 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -2161,7 +2161,7 @@ static std::vector 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; diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 48732b70ec35..9e8e1a1f6a94 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -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 "); diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c index e94b88bc010a..5e09125e400c 100644 --- a/gdb/loongarch-tdep.c +++ b/gdb/loongarch-tdep.c @@ -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) { diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index 4ac08fdd6c80..ae233a1e94d5 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -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) { diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 5389fee9ffd0..a61a49e43bb3 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -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; } diff --git a/gdb/macroscope.c b/gdb/macroscope.c index a8b78c9906c9..563ef9931b39 100644 --- a/gdb/macroscope.c +++ b/gdb/macroscope.c @@ -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 diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 404e4cde2ad9..3953a96a4e12 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -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) diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index bb4887799bd3..7aa9b0536d5f 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -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 diff --git a/gdb/namespace.c b/gdb/namespace.c index 52eb1eae3756..ace854251319 100644 --- a/gdb/namespace.c +++ b/gdb/namespace.c @@ -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); } diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 2db207dafdd1..442bdaf9fab9 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -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 (); diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c index a0afc7b7dba3..7ca9d88bbd20 100644 --- a/gdb/python/py-progspace.c +++ b/gdb/python/py-progspace.c @@ -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) diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c index 620f033e679e..7acf70ec83b8 100644 --- a/gdb/python/py-record-btrace.c +++ b/gdb/python/py-record-btrace.c @@ -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) { diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 51121817da1c..cc9365d2fa1b 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -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; diff --git a/gdb/reverse.c b/gdb/reverse.c index dc35bca70faa..376435deab2c 100644 --- a/gdb/reverse.c +++ b/gdb/reverse.c @@ -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); diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 75079b9e211c..7c8a6f70ef63 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -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)) diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 68464212802f..a16f5c4111a9 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -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) diff --git a/gdb/symtab.c b/gdb/symtab.c index f3377ff2a7eb..f36d5b262955 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -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 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; } @@ -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 diff --git a/gdb/symtab.h b/gdb/symtab.h index 1d419dd16e68..9f6a6c361221 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -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 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); diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index ce5418b87913..c0db7c8e6fa4 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -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) { diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 2fe4914f2706..e66c4596586e 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -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); } } diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index d592344e2e3e..0b77cf38d3fd 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -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; diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index b63dfa04be00..64aa16f5a13a 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -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. */ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 8a2f129c7580..19bec106364a 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -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 diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c index 9ae8b7a5857d..31d319392ddb 100644 --- a/gdb/z80-tdep.c +++ b/gdb/z80-tdep.c @@ -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 (); -- 2.51.0