[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] _UPT_access_* functions don't seem to work.
From: |
Abhishek Kulkarni |
Subject: |
[Libunwind-devel] _UPT_access_* functions don't seem to work. |
Date: |
Mon, 20 Jun 2011 18:26:47 -0600 |
Hello,
Are the _UPT_access_* functions from libunwind-ptrace deprecated? The man-page documentation[1] for these functions is lacking and I don't really understand why they should be used over the corresponding unw_get_* functions. It seems like the former don't work as expected in some cases.
Like the documentation suggests, I am creating an address-space, a UPT-info structure and doing the remote initialization (using unw_init_remote) and then with:
while (unw_step(&cursor) > 0) {
_UPT_access_reg(uaddrspace, UNW_REG_IP, &ip, 0, upt_info);
_UPT_get_proc_name(uaddrspace, ip, name, 128, &val, upt_info);
printf("-- fn = %s, ip = %lx\n", name, (long)ip);
}
I was hoping to get the backtrace of the remote process, but it just prints the same thing multiple times (I tried to flush the cache explicitly but it didn't make a difference). Instead, I can get the backtrace successfully using the following:
while (unw_step(&cursor) > 0) {
unw_get_reg(&cursor, UNW_REG_IP, &ip);
unw_get_proc_name(&cursor, name, 128, 0);
//_UPT_access_reg(uaddrspace, UNW_REG_IP, &ip, 0, upt_info);
//_UPT_get_proc_name(uaddrspace, ip, name, 128, &val, upt_info);
printf("-- fn = %s, ip = %lx\n", name, (long)ip);
}
Am I missing something with how the _UPT_access_* functions are to be used?
Thanks,
Abhishek
- [Libunwind-devel] _UPT_access_* functions don't seem to work.,
Abhishek Kulkarni <=