diff options
author | Pedro Alves <palves@redhat.com> | 2008-12-10 21:32:15 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-12-10 21:32:15 +0000 |
commit | 1c7819ef32f4a2bfff86d67440134bc1dfd45755 (patch) | |
tree | b298751fea907b7ae052cb42677f03ebccc3ceb2 /gdb | |
parent | 2756a25828e5a0ccdbaa54dd92b44a69a5f2ee30 (diff) | |
download | gdb-1c7819ef32f4a2bfff86d67440134bc1dfd45755.zip gdb-1c7819ef32f4a2bfff86d67440134bc1dfd45755.tar.gz gdb-1c7819ef32f4a2bfff86d67440134bc1dfd45755.tar.bz2 |
* infcmd.c (until_next_command, finish_backward): Use get_frame_pc
instead of read_pc.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/infcmd.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb3917f..67b6515 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-12-10 Pedro Alves <pedro@codesourcery.com> + + * infcmd.c (until_next_command, finish_backward): Use get_frame_pc + instead of read_pc. + 2008-12-09 Tom Tromey <tromey@redhat.com> PR gdb/1815: diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 9bfe2d4..d6772d3 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1181,7 +1181,7 @@ until_next_command (int from_tty) than the current line (if in symbolic section) or pc (if not). */ - pc = read_pc (); + pc = get_frame_pc (frame); func = find_pc_function (pc); if (!func) @@ -1405,11 +1405,13 @@ finish_backward (struct symbol *function) struct thread_info *tp = inferior_thread (); struct breakpoint *breakpoint; struct cleanup *old_chain; + CORE_ADDR pc; CORE_ADDR func_addr; int back_up; - if (find_pc_partial_function (get_frame_pc (get_current_frame ()), - NULL, &func_addr, NULL) == 0) + pc = get_frame_pc (get_current_frame ()); + + if (find_pc_partial_function (pc, NULL, &func_addr, NULL) == 0) internal_error (__FILE__, __LINE__, _("Finish: couldn't find function.")); @@ -1426,7 +1428,7 @@ finish_backward (struct symbol *function) no way that a function up the stack can have a return address that's equal to its entry point. */ - if (sal.pc != read_pc ()) + if (sal.pc != pc) { /* Set breakpoint and continue. */ breakpoint = |