public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] PowerPC: regression fix for reverse-finish command.
@ 2023-03-21 15:09 Carl Love
0 siblings, 0 replies; only message in thread
From: Carl Love @ 2023-03-21 15:09 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=70ea5a46bd926149fb4a9c3da32c2fc14f6e83c3
commit 70ea5a46bd926149fb4a9c3da32c2fc14f6e83c3
Author: Carl Love <cel@us.ibm.com>
Date: Mon Mar 20 16:59:33 2023 -0400
PowerPC: regression fix for reverse-finish command.
The recent commit:
commit 2a8339b71f37f2d02f5b2194929c9d702ef27223
Author: Carl Love <cel@us.ibm.com>
Date: Thu Mar 9 16:10:18 2023 -0500
PowerPC: fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp
PPC64 multiple entry points, a normal entry point and an alternate entry
point. The alternate entry point is to setup the Table of Contents (TOC)
register before continuing at the normal entry point. When the TOC is
already valid, the normal entry point is used, this is typically the case.
The alternate entry point is typically referred to as the global entry
point (GEP) in IBM. The normal entry point is typically referred to as
the local entry point (LEP).
.....
Is causing regression failures on on PowerPC platforms. The regression
failures are in tests:
gdb.reverse/finish-precsave.exp
gdb.btrace/tailcall.exp
gdb.mi/mi-reverse.exp
gdb.btrace/step.exp
gdb.reverse/until-precsave.exp
gdb.reverse/finish-reverse.exp
gdb.btrace/tailcall-only.exp
The issue is in gdb/infcmd.c, function finish_command. The value of the
two new variables ALT_ENTRY_POINT and ENTRY_POINT are being initializezed
to SAL.PC. However, SAL has just been declared. The value of SAL.PC is
zero at this point. The intialization of ALT_ENTRY_POINT and ENTRY_POINT
needs to be after the initialization of SAL.
This patch moves the initialization of ALT_ENTRY_POINT and ENTRY_POINT
variables to fix the regression failures.
The patch has been tested on Power10 and on X86.
Diff:
---
gdb/infcmd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index f46461512fe..e2032d18564 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1710,8 +1710,8 @@ finish_backward (struct finish_command_fsm *sm)
struct thread_info *tp = inferior_thread ();
CORE_ADDR pc;
CORE_ADDR func_addr;
- CORE_ADDR alt_entry_point = sal.pc;
- CORE_ADDR entry_point = alt_entry_point;
+ CORE_ADDR alt_entry_point;
+ CORE_ADDR entry_point;
frame_info_ptr frame = get_selected_frame (nullptr);
struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1721,6 +1721,8 @@ finish_backward (struct finish_command_fsm *sm)
error (_("Cannot find bounds of current function"));
sal = find_pc_line (func_addr, 0);
+ alt_entry_point = sal.pc;
+ entry_point = alt_entry_point;
if (gdbarch_skip_entrypoint_p (gdbarch))
/* Some architectures, like PowerPC use local and global entry points.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-21 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 15:09 [binutils-gdb] PowerPC: regression fix for reverse-finish command Carl Love
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).