This is the mail archive of the java-patches@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: StackTraceElement support


Hi,

On Tue, 2002-07-23 at 06:04, Bryce McKinlay wrote:
> Mark Wielaard wrote:
> 
> >I must say that parsing
> >strings in C(++) is a challenge and I don't want to admit how long it
> >took to get it all right or how many seg faults I created... 
> >
> OK, I'm curious - why didn't you do it in Java, using java.lang.Process 
> to run addr2line and long[] to represent the raw stack trace? I guess 
> there might be some complications in ensuring that the void *'s always 
> convert correctly to longs and back, but it should still be simpler than 
> the C++ version.

Because I thought it would be simpler to reuse the existing code. I was
wrong... There is also the dladdr() call and I first thought that we
could maybe use the gcc/include/demangle.h funtions, but those are
GPLed. Also I just wanted to refresh my C programming just to remember
why doing things in java is so much nicer :)

But I might rewrite part of it in java anyway soon. I am trying to track
down a bug in the implementation that makes the last few lines of the
stacktrace disappear. I have already rewritten/simplified the java part
in Throwable but that didn't solve it, so I guess the bug is in the
native code.

Cheers,

Mark


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