backtrace() vs. _Unwind_Backtrace()

Andrew Haley aph@redhat.com
Fri Dec 5 12:33:00 GMT 2003


Bryce McKinlay writes:
 > On Dec 5, 2003, at 5:26 PM, David Mosberger wrote:
 > 
 > >>>>>> On Fri, 5 Dec 2003 15:39:52 +1300, Bryce McKinlay 
 > >>>>>> <bryce@mckinlay.net.nz> said:
 > >
 > > Bryce> But on Windows, breaking stack traces would be a regression
 > > Bryce> because they do partially work there, although the current
 > > Bryce> implementation is pretty bogus when it comes to the
 > > Bryce> calling-classloader checks etc.
 > >
 > > Is this win32.cc:backtrace()?
 > 
 > Well, there's a bit more to it - somehow we need to get from the 
 > frame's IP to the Class and Method ID it belongs to. Using the DWARF 
 > info that can be done with _Unwind_GetRegionStart / 
 > _Unwind_FindEnclosingFunction and a hashtable. The existing code 
 > (StackTrace and NameFinder stuff in gnu/gcj/runtime) does it by looking 
 > up symbols and demangling, but thats not robust and not a safe solution 
 > for security checks.
No it doesn't. We've been through this before.
The existing code uses _Unwind_FindEnclosingFunction and a hash table.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /