This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH v3 2.6.39-rc1-tip 13/26] 13: uprobes: get the breakpoint address.
- From: Peter Zijlstra <peterz at infradead dot org>
- To: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Steven Rostedt <rostedt at goodmis dot org>, Linux-mm <linux-mm at kvack dot org>, Arnaldo Carvalho de Melo <acme at infradead dot org>, Linus Torvalds <torvalds at linux-foundation dot org>, Andi Kleen <andi at firstfloor dot org>, Christoph Hellwig <hch at infradead dot org>, Jonathan Corbet <corbet at lwn dot net>, Thomas Gleixner <tglx at linutronix dot de>, Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Oleg Nesterov <oleg at redhat dot com>, LKML <linux-kernel at vger dot kernel dot org>, SystemTap <systemtap at sources dot redhat dot com>, Jim Keniston <jkenisto at linux dot vnet dot ibm dot com>, Roland McGrath <roland at hack dot frob dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Andrew Morton <akpm at linux-foundation dot org>
- Date: Mon, 18 Apr 2011 18:47:22 +0200
- Subject: Re: [PATCH v3 2.6.39-rc1-tip 13/26] 13: uprobes: get the breakpoint address.
- References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> <20110401143507.15455.87968.sendpatchset@localhost6.localdomain6>
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?