[freenet-tech] Technology / Features

Adam Megacz gcj@lists.megacz.com
Thu Feb 28 14:46:00 GMT 2002


Jeff Sturm <jsturm@one-point.com> writes:
> void backtrace(void) {
> register void *_ebp __asm__("%ebp");
> unsigned int *rfp;
>> for (rfp = _ebp; rfp; rfp = *(unsigned int **)rfp)
> printf("%p\n", rfp[1]-5);
> }

Ok, let me revise that from "gcj-mingw will never have stack traces"
to "gcj-mingw will have stack traces very soon" =)
Thanks for the code snippet, I haven't done x86 assembly in eight
years, and I wasn't looking forward to going back to it =)
I'll probably get around to putting this in sometime after 3.1 is
released.
Interestingly, why does gcj use DWARF2 info to generate stack traces
on Linux instead of just doing this?
 - a
-- 
"If I put copyrighted material into the 'chewy nougat center', I can
 claim the crunchy chocolate coating is an 'Access Control
 Mechanism'." --lynx_user_abroad
Why Windows NT/2k/XP is unreliable: www.zappadoodle.com


More information about the Java mailing list

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