diff options
author | Yao Qi <yao@codesourcery.com> | 2011-02-16 14:54:42 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2011-02-16 14:54:42 +0000 |
commit | a42244dbec4d58c5577a84215d92c85a6c067d1a (patch) | |
tree | 26c29b1b46afb067d5cc8d0fd227585b706c73d3 /gdb/infrun.c | |
parent | 3dfcbbd281d9c7f0a0f29a3aabf59e45a5142fd4 (diff) | |
download | gdb-a42244dbec4d58c5577a84215d92c85a6c067d1a.zip gdb-a42244dbec4d58c5577a84215d92c85a6c067d1a.tar.gz gdb-a42244dbec4d58c5577a84215d92c85a6c067d1a.tar.bz2 |
2011-02-16 Yao Qi <yao@qiyaows>
* infrun.c (get_displaced_step_closure_by_addr): New.
* inferior.h: Declare it.
* arm-tdep.c: (arm_pc_is_thumb): Call
get_displaced_step_closure_by_addr. Adjust MEMADDR if it
returns non-NULL.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index dd26af3..274082d 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1078,6 +1078,24 @@ add_displaced_stepping_state (int pid) return state; } +/* If inferior is in displaced stepping, and ADDR equals to starting address + of copy area, return corresponding displaced_step_closure. Otherwise, + return NULL. */ + +struct displaced_step_closure* +get_displaced_step_closure_by_addr (CORE_ADDR addr) +{ + struct displaced_step_inferior_state *displaced + = get_displaced_stepping_state (ptid_get_pid (inferior_ptid)); + + /* If checking the mode of displaced instruction in copy area. */ + if (displaced && !ptid_equal (displaced->step_ptid, null_ptid) + && (displaced->step_copy == addr)) + return displaced->step_closure; + + return NULL; +} + /* Remove the displaced stepping state of process PID. */ static void |