lkml.org 
[lkml]   [2011]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2.6.39-rc1-tip 13/26] 13: uprobes: get the breakpoint address.
From
Date
On Fri, 2011-04-01 at 20:05 +0530, Srikar Dronamraju wrote:
> +/**
> + * uprobes_get_bkpt_addr - compute address of bkpt given post-bkpt regs
> + * @regs: Reflects the saved state of the task after it has hit a breakpoint
> + * instruction.
> + * Return the address of the breakpoint instruction.
> + */
> +unsigned long uprobes_get_bkpt_addr(struct pt_regs *regs)
> +{
> + return instruction_pointer(regs) - UPROBES_BKPT_INSN_SIZE;
> +}

This assumes the breakpoint instruction is trap like, not fault like, is
that true for all architectures?


\
 
 \ /
  Last update: 2011-04-18 18:51    [W:0.228 / U:0.060 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site