lkml.org 
[lkml]   [2011]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] [PATCH 2.6.37-rc5-tip 14/20] 14: uprobes: Handing int3 and singlestep exception.
From
Date
On Wed, 2011-01-26 at 20:44 +0530, Srikar Dronamraju wrote:
> So it simplifies to
>
> down_read(&mm->mmap_sem);
> vma = find_vma(mm, probept);
> if (valid_vma(vma)) {
> u = find_uprobe(vma->vm_file->f_mapping->host,
> probept - vma->vm_start);
> }
> up_read(&mm->mmap_sem);

Almost, the offset within a file is something like:

(address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT)




\
 
 \ /
  Last update: 2011-01-26 16:31    [W:0.094 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site