On Sat, 5 Jan 2008, Bart Van Assche wrote:

> I'm not entirely happy with hardcoding the stack depth either. Please
> note that the problem of hardcoded stack depths does not only exist in
> drd but also in other Valgrind tools (helgrind/hg_main.c,
> msm__show_state_change()). Other tools (exp-omega) use
> VG_(clo_backtrace_size) as stack depth by including coregrind header
> files, which should be avoided.
> Do you think it would be a good idea to use the stack depth specified
> via the --num-callers=... command line option when printing a call
> stack ? Unfortunately this value (VG_(clo_backtrace_size)) is not
> available to tools. One way to overcome this is to define a special
> value for n_ips that selects the stack depth specified via
> --num-callers=..., e.g. as follows:

There are a couple of options that are tool-visible, eg. -v and --xml.  It 
would be reasonable to add --num-callers to that list if multiple tools need 
it, and assuming using the --num-callers numbers is reasonable -- eg. Massif 
has a --depth parameter which is similar, but different because reusing 
--num-callers didn't feel appropriate.  It's not a clear-cut decision either 
way... using --num-callers is probably ok for DRD and Helgrind.

Nick

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to