aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorCarl Love <cel@us.ibm.com>2023-01-18 11:12:13 -0500
committerCarl Love <cel@us.ibm.com>2023-01-18 11:12:13 -0500
commit15d2b36c5b60795067cec773a66d2627d2bf9266 (patch)
treebd02005878169b35b22105f52f658c8bc2f71c62 /gdb/infcmd.c
parent722e0dd9e4f03d66666c5b62e162da31cafe6d9f (diff)
downloadgdb-15d2b36c5b60795067cec773a66d2627d2bf9266.zip
gdb-15d2b36c5b60795067cec773a66d2627d2bf9266.tar.gz
gdb-15d2b36c5b60795067cec773a66d2627d2bf9266.tar.bz2
Revert "PowerPC: fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp"
This reverts commit 92e07580db6a5572573d5177ca23933064158f89. Reverting patch as the patch series is causing regressions.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c40
1 files changed, 14 insertions, 26 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 978c07f..5fcd2ab 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1720,25 +1720,22 @@ finish_backward (struct finish_command_fsm *sm)
sal = find_pc_line (func_addr, 0);
frame_info_ptr frame = get_selected_frame (nullptr);
- struct gdbarch *gdbarch = get_frame_arch (frame);
- CORE_ADDR alt_entry_point = sal.pc;
- CORE_ADDR entry_point = alt_entry_point;
- if (gdbarch_skip_entrypoint_p (gdbarch))
+ if (sal.pc != pc)
{
- /* Some architectures, like PowerPC use local and global entry points.
- There is only one Entry Point (GEP = LEP) for other architectures.
- The GEP is an alternate entry point. The LEP is the normal entry
- point. The value of entry_point was initialized to the alternate
- entry point (GEP). It will be adjusted if the normal entry point
- (LEP) was used. */
- entry_point = gdbarch_skip_entrypoint (gdbarch, entry_point);
- }
+ struct gdbarch *gdbarch = get_frame_arch (frame);
- if (alt_entry_point <= pc && pc <= entry_point)
+ /* Set a step-resume at the function's entry point. Once that's
+ hit, we'll do one more step backwards. */
+ symtab_and_line sr_sal;
+ sr_sal.pc = sal.pc;
+ sr_sal.pspace = get_frame_program_space (frame);
+ insert_step_resume_breakpoint_at_sal (gdbarch,
+ sr_sal, null_frame_id);
+ }
+ else
{
- /* We are exactly at the function entry point, or between the entry
- point on platforms that have two (like PowerPC). Note that this
+ /* We are exactly at the function entry point. Note that this
can only happen at frame #0.
When setting a step range, need to call set_step_info
@@ -1747,17 +1744,8 @@ finish_backward (struct finish_command_fsm *sm)
/* Return using a step range so we will keep stepping back
to the first instruction in the source code line. */
- tp->control.step_range_start = alt_entry_point;
- tp->control.step_range_end = entry_point;
- }
- else
- {
- symtab_and_line sr_sal;
- /* Set a step-resume at the function's entry point. */
- sr_sal.pc = entry_point;
- sr_sal.pspace = get_frame_program_space (frame);
- insert_step_resume_breakpoint_at_sal (gdbarch,
- sr_sal, null_frame_id);
+ tp->control.step_range_start = sal.pc;
+ tp->control.step_range_end = sal.pc;
}
proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
}