backtrace() vs. _Unwind_Backtrace()
Andrew Haley
aph@redhat.com
Fri Dec 5 12:55:00 GMT 2003
Andrew Haley writes:
> 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.
Ah, sorry. You're talking about the Windows unwinder, not the Linux one.
I'll try not to post before the second cup of coffee in future.
Andrew.
More information about the Java
mailing list