* @param page User page
* @param offset Function offset from the beginning of the page
* @param probe_i Pointer to the probe data.
+ * @param page Pointer to the parent sspt_page struct
* @return Pointer to the created us_ip struct
*/
-struct us_ip *create_ip(unsigned long offset, const struct probe_info *probe_i)
+struct us_ip *create_ip(unsigned long offset, const struct probe_info *probe_i,
+ struct sspt_page *page)
{
size_t len = probe_i->size;
struct us_ip *ip;
INIT_LIST_HEAD(&ip->list);
ip->offset = offset;
+ ip->page = page;
probe_info_copy(probe_i, &ip->probe_i);
probe_info_init(&ip->probe_i, ip);
#define to_us_ip(rp) container_of(rp, struct us_ip, retprobe)
-struct us_ip *create_ip(unsigned long offset, const struct probe_info *probe_i);
+struct us_ip *create_ip(unsigned long offset, const struct probe_info *probe_i,
+ struct sspt_page *page);
void free_ip(struct us_ip *ip);
#endif /* __IP__ */
struct sspt_page *page = sspt_find_page_or_new(file, offset & PAGE_MASK);
// FIXME: delete ip
- struct us_ip *ip = create_ip(offset, probe_i);
+ struct us_ip *ip = create_ip(offset, probe_i, page);
sspt_add_ip(page, ip);
}
static void sspt_list_add_ip(struct sspt_page *page, struct us_ip *ip)
{
list_add(&ip->list, &page->ip_list_no_inst);
- ip->page = page;
}
static void sspt_list_del_ip(struct us_ip *ip)