This is the mail archive of the
mailing list for the frysk project.
Re: remote dwarf info using libunwind
Alexandre Oliva wrote:
Here's the patch I've just completed, that works on x86, and fixes a
potential libunwind memory leak while at that.
As it turns out, libunwind already has all that we need, we were just
missing the proper way to use it. dwarf_find_proc_info() was not it,
since it's specifically designed to operate on the local process.
Part of the libunwind-ptrace interface offers access to everything we
need as far as locating unwind tables et al is concerned, while still
using our own callbacks to interact with the process using ptrace or
I am not sure too why we didn't use libunwind-ptrace.a directly before. One reason might be that it
is not really a part of libunwind API. But my point is, as long as it is general enough, why can't
we make it part of libunwind API?
I'm not sure why we don't just bite the bullet and use all
of the libunwind interface (it looks like it would be much simpler and
would get us what we want), but I figured I wouldn't remove any such
code for now.
+lib::unwind::StackTraceCreator::unwind_destroy (unwargs *args)
+ unw_destroy_addr_space ((unw_addr_space_t)args->unwas);
+ args->unwas = 0;
+ _UPT_destroy ((void*)args->UPTarg);
+ args->UPTarg = 0;
This should be unwind_finish, I guess. There is no member function named unwind_destroy in
lib/unwind/StackTraceCreator.java, there is a member named unwind_finish instead.
- Wu Zhou