summaryrefslogtreecommitdiffstats
path: root/runtime/sym.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-03-19 14:28:14 +0100
committerMark Wielaard <mjw@redhat.com>2009-03-19 14:28:14 +0100
commit1882152af71f8339c91751ee17c97f1c4d18660a (patch)
treed350e3822596e85550ddc15c32a9088509343772 /runtime/sym.c
parentcb1468beb7b34ad988280fea9fb7c4558b47341a (diff)
downloadsystemtap-steved-1882152af71f8339c91751ee17c97f1c4d18660a.tar.gz
systemtap-steved-1882152af71f8339c91751ee17c97f1c4d18660a.tar.xz
systemtap-steved-1882152af71f8339c91751ee17c97f1c4d18660a.zip
Get rid of __stp_tf_get_vma_entry_addr function.
* runtime/task_finder_vma.c (__stp_tf_get_vma_entry_addr): Deleted. (struct __stp_tf_vma_entry): Replace module by user void* field. (stap_add_vma_map_info): Take a void *user arg. (stap_find_vma_map_info): Take a void **user arg. * runtime/sym.c (_stp_mod_sec_lookup): Use stap_find_vma_map_info.
Diffstat (limited to 'runtime/sym.c')
-rw-r--r--runtime/sym.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/runtime/sym.c b/runtime/sym.c
index 3788544e..1fe3f818 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -79,25 +79,29 @@ static struct _stp_module *_stp_mod_sec_lookup(unsigned long addr,
struct task_struct *task,
struct _stp_section **sec)
{
+ void *user;
struct _stp_module *m = NULL;
unsigned midx = 0;
unsigned long closest_section_offset = ~0;
// Try vma matching first if task given.
- struct __stp_tf_vma_entry *entry;
+ unsigned long vm_start;
if (task)
{
- entry = __stp_tf_get_vma_entry_addr(task, addr);
- if (entry != NULL && entry->module != NULL)
- {
- m = entry->module;
- *sec = &m->sections[0]; // XXX check actual section and relocate
- dbug_sym(1, "found section %s in module %s at 0x%lx\n",
- m->sections[0].name, m->name, entry->vm_start);
- if (strcmp(".dynamic", m->sections[0].name) == 0)
- m->sections[0].addr = entry->vm_start; // cheat...
- return m;
- }
+
+ if (stap_find_vma_map_info(task, addr,
+ &vm_start, NULL,
+ NULL, &user) == 0)
+ if (user != NULL)
+ {
+ m = (struct _stp_module *)user;
+ *sec = &m->sections[0]; // XXX check actual section and relocate
+ dbug_sym(1, "found section %s in module %s at 0x%lx\n",
+ m->sections[0].name, m->name, vm_start);
+ if (strcmp(".dynamic", m->sections[0].name) == 0)
+ m->sections[0].addr = vm_start; // cheat...
+ return m;
+ }
}
for (midx = 0; midx < _stp_num_modules; midx++)