From: Luca Falavigna <dktrkranz@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: EIP and VMA
Date: Fri, 18 Mar 2005 01:23:20 +0000 [thread overview]
Message-ID: <423A2D88.8090408@gmail.com> (raw)
Hi,
I am working on this piece of code (simplified):
void ip_vma(struct task_struct *task, struct pt_regs *regs)
{
struct mm_struct *mm;
struct vm_area_struct *vma;
if(task) {
mm = get_task_mm(task);
if(mm) {
vma = find_vma(mm, regs->eip);
if(vma) {
/* Some code */
}
else
printk("WARNING: No VMA\n");
mmput(mm);
}
}
}
I would like to get instruction pointer's VMA of a task. In order to do so, I
use find_vma function, using regs->eip as instruction pointer value.
Unfortunately I always get "WARNING: No VMA" message because find_vma isn't able
to find the right VMA regs->eip address belongs to.
Is regs->eip the right place where istruction pointer is located or I should
find that value elsewhere?
Thank you,
Luca
next reply other threads:[~2005-03-18 0:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-18 1:23 Luca Falavigna [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-03-18 0:57 EIP and VMA Luca Falavigna
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=423A2D88.8090408@gmail.com \
--to=dktrkranz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox