[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libunwind] Some basic questions about libunwind
From: |
David Mosberger |
Subject: |
Re: [libunwind] Some basic questions about libunwind |
Date: |
Mon, 22 Nov 2004 14:37:44 -0800 |
>>>>> On Mon, 22 Nov 2004 16:01:58 -0600, Archie Cobbs <address@hidden> said:
Archie> Up until now JC has had a non-conservative (liberal? :-) GC,
Archie> i.e., it expects all references to be "real"
Archie> references.
Ah, ok, that explains it, thanks.
Archie> Of course it's still necessary to crawl the stack for
Archie> constructing exception stack traces (JC knows how to map PC
Archie> addresses to original Java method and source code line
Archie> numbers).
Yes, but for that, there are more APIs. For example, glibc provides
backtrace() and GCC 3.x provides _Unwind_Backtrace().
Again, I don't mind at all if libunwind is the answer, but I wanted to
point out potential alternatives that I'm aware of.
Archie> 1. What is the state of x86 (32 bit) support in libunwind
Archie> with respect to the above requirements?
>> I'd say "improving". I'm actively working on it.
Archie> Great.. specifically, what work remains?
bug hunting & fixing.
libunwind-ptrace isn't there yet.
dynamic unwind-support isn't there yet.
Archie> I'm already loading and relocating all the sections myself,
Why is this better than just dlopen()()ing a shared object?
Archie> so ideally what I'd prefer to do is just say "Here
Archie> libunwind, this is the .debug_foo section"... i.e., if
Archie> libunwind already knows how to parse DWARF2 then it would be
Archie> nice to reuse that capability. Would that require new
Archie> libunwind API functions?
No, you can do that via _U_dyn_register(). Assuming your objects have
a binary search-table (they should), you'd just have to fill in a
unw_dyn_info_t structure, with "format" set to UNW_INFO_FORMAT_TABLE
and fill in the other info (such table-length and the starting/ending
instruction-pointer covered by the table). All the DWARF2 parsing
will be done by libunwind.
--david