stack tracing {was assert(condition[, message]) patch}

Brad Roberts braddr at puremagic.com
Thu Jun 1 21:18:48 PDT 2006


On Thu, 1 Jun 2006, James Dunne wrote:

> I'm sorry but I really have to insert my skepticism here about stack traces.
> 
> Upon first glance it sounds like a wonderful idea, until you get to where Java
> is at.  Literally hundreds of lines of stack traces dumped into log files to
> wade thru, most of them completely useless because: THEY DON'T CONTAIN
> STATE!!!
> 
> Sure they have the call-stack state so you can see where the function calls
> came from but there are no local variables, no function parameter values, no
> class/struct dumps; basically nothing useful for anything more complex than
> the simplest case of a deterministic function call, and even then it's not too
> terribly useful.
> 
> While I agree that it is better than nothing, we can still do better. An
> entire run-time debugging framework is what we really want to shoot for.
> Exception logging, tracing, dumping of object contents, reading local
> variables, reading function parameters, etc.  This probably requires the help
> of a compile-time reflection system (where certain properties of objects are
> translated by the compiler into literal expressions).  Run-time reflection
> isn't really necessary.
> 
> -- 
> Regards,
> James Dunne

At that point, you really just want the core file.  Given the program 
image and the core, you can do all of the above.



More information about the Digitalmars-d mailing list