Reminder: Illegal Package-Private Accesses in libgcj
Bryce McKinlay
bryce@mckinlay.net.nz
Mon Nov 3 22:12:00 GMT 2003
On Nov 4, 2003, at 11:01 AM, Andrew Haley wrote:
> Bryce McKinlay writes:
>>
>> On Nov 4, 2003, at 12:25 AM, Andrew Haley wrote:
>>
>>> Bryce McKinlay writes:
>>>>
>>>> If there are targets that will never support the unwinder (are
>>>> there?), then it might make sense to allow platforms to define some
>>>> platform-specific unwinding functions, but ideally, by far the
>>>> cleanest and most efficient solution is to get the libgcc DWARF2
>>>> unwinder working.
>>>
>>> Efficient? I don't think so. The glibc backtrace() function simply
>>> walks a linked list, and there's no more efficient way to do it than
>>> that. The DWARF unwinder is a couple of orders of magnitude slower.
>>
>> OK, but how do you get the java.lang.Class object from the IP value
>> which backtrace() gives you?
>
> We look it up in a hash table. We sure don't call external programs!
But you can't map a backtrace IP directly to a Class in the hashtable,
you have to find the function entry point first. I don't know of a way
to do that apart from using _Unwind_FindEnclosingFunction.
Regards
Bryce.
More information about the Java
mailing list