This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [freenet-tech] Technology / Features



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]