aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2004-01-19 17:28:52 +0000
committerKevin Buettner <kevinb@redhat.com>2004-01-19 17:28:52 +0000
commit2dbd5e306825597face3151410744e7e321d737b (patch)
treed16d25a46b9ac35876c8b1ce0bd918726398615f /gdb
parent7e89635aac273e94af135eb3481f01fb03fb76c5 (diff)
downloadgdb-2dbd5e306825597face3151410744e7e321d737b.zip
gdb-2dbd5e306825597face3151410744e7e321d737b.tar.gz
gdb-2dbd5e306825597face3151410744e7e321d737b.tar.bz2
* infrun.c (step_into_function): Account for possible breakpoint
adjustment when computing ``stop_func_start''.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infrun.c23
2 files changed, 28 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4894432..1967a1e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2004-01-19 Kevin Buettner <kevinb@redhat.com>
+ * infrun.c (step_into_function): Account for possible breakpoint
+ adjustment when computing ``stop_func_start''.
+
+2004-01-19 Kevin Buettner <kevinb@redhat.com>
+
* target.c (default_region_size_ok_for_hw_watchpoint): Compare
the region size against the size of a pointer, not the size of
a register as given by DEPRECATED_REGISTER_SIZE.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 1ecbcc6..b10d65f 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2757,6 +2757,29 @@ step_into_function (struct execution_control_state *ecs)
&& ecs->sal.end < ecs->stop_func_end)
ecs->stop_func_start = ecs->sal.end;
+ /* Architectures which require breakpoint adjustment might not be able
+ to place a breakpoint at the computed address. If so, the test
+ ``ecs->stop_func_start == stop_pc'' will never succeed. Adjust
+ ecs->stop_func_start to an address at which a breakpoint may be
+ legitimately placed.
+
+ Note: kevinb/2004-01-19: On FR-V, if this adjustment is not
+ made, GDB will enter an infinite loop when stepping through
+ optimized code consisting of VLIW instructions which contain
+ subinstructions corresponding to different source lines. On
+ FR-V, it's not permitted to place a breakpoint on any but the
+ first subinstruction of a VLIW instruction. When a breakpoint is
+ set, GDB will adjust the breakpoint address to the beginning of
+ the VLIW instruction. Thus, we need to make the corresponding
+ adjustment here when computing the stop address. */
+
+ if (gdbarch_adjust_breakpoint_address_p (current_gdbarch))
+ {
+ ecs->stop_func_start
+ = gdbarch_adjust_breakpoint_address (current_gdbarch,
+ ecs->stop_func_start);
+ }
+
if (ecs->stop_func_start == stop_pc)
{
/* We are already there: stop now. */