[PATCH 12/13] Determine the kind of single step breakpoint
Pedro Alves
palves@redhat.com
Thu Oct 27 14:55:00 GMT 2016
On 08/31/2016 04:06 PM, Yao Qi wrote:
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -2607,7 +2607,18 @@ build_target_command_list (struct bp_location *bl)
> static int
> breakpoint_kind (struct bp_location *bl, CORE_ADDR *addr)
> {
> - return gdbarch_breakpoint_kind_from_pc (bl->gdbarch, addr);
> + if (bl->owner->type == bp_single_step)
> + {
> + struct thread_info *thr = find_thread_global_id (bl->owner->thread);
> + struct regcache *regcache;
> +
> + regcache = get_thread_regcache (thr->ptid);
> +
> + return gdbarch_breakpoint_kind_from_current_state (bl->gdbarch,
> + regcache, addr);
> + }
> + else
> + return gdbarch_breakpoint_kind_from_pc (bl->gdbarch, addr);
> }
This deserves a function intro comment update, I think.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list