Re: GCJ Stack Traces for arm-wince-pe on gcj 3.4.3
Andrew Haley <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
Craig Vanderborgh wrote: > We have been busy bringing up gcj 3.4.3 on arm-wince-pe (Windows CE 5 > and 6). At this point everything is pretty much working (garbage > collection, hash synchronization, reflection, class loading, etc.) on > real-world GCJ applications. > > What we are still lacking (and have always lacked..) is stack traces. > I understand that some work has been done in the most recent versions > to implement an arm-elf unwinder that supposedly works and that stack > traces are available now, at least for arm-elf-linux. We considered > porting this (gcc-4.1.1) and using this version of gcj, but the > classpath-based libgcj is too big for us to handle on WinCE embedded > systems. That's one reason why we're going for gcc-3.4.3. Fair enough, if it does what you need. > What could we do to implement stack traces on gcc-3.4.3? What would > be the best approach? One idea we're considering is to alter the code > generation in gcc/gcj so that the ARM function calls adhere to a > simpler (unwindable) format. It seems like this would be the least > invasive approach, since we then could continue to use SJLJ exceptions > in gcj. Is this the best approach, or would it be possible/prudent to > backport the ARM unwinder from gcc-4.1.1+? According to svn log, I added the ARM EABI backtrace on 2007-08-08. It is not present in any gcc release before 4.3.0. As I understand it, gcc-3.4.3 should be perfectly capable of generating APCS-compatible code that has a stack chain you can unwind. The only problem you'll have is converting a code address to the handle of a class. Andrew.