On Wed, 2015-12-09 at 10:32 -0800, Nikolaus Rath wrote:
> On 12/09/2015 10:00 AM, Nikolaus Rath wrote:

> Interestingly enough, but stacktraces are incorrect: gdb is missing the call 
> to taehdf5_mp_h5append_data_double_0d_,


>  and valgrind is missing the call to h5dump_attr_int. 
The missing valgrind entry has the same "look" as an inlining
"not understood":
we see a a function, but with a source that is another function.

Maybe you could try by recompiling with an option that fully disable
inlining ?


> 
> This is with valgrind 3.10.0 and gdb 7.7.1 (as above).
At least for valgrind, it would be better to upgrade to the last
released version (3.11).

> 
> (I also tried compiling with just "-O3" (should be using dwarf-3), "-O3 
> -gdwarf-4", and just "-O2",
>  but the stacktrace difference was there in every case).
If this is related to inlining, then as far as I know, you need at least
dwarf-3.

> 
> 
> Short of only using -O1 and -O0, is there a way to fix this?
Without more info on the origin of the wrong stack trace, difficult to
to say. You might try by using -O1, and then add individual optimisation
flags one by one, till you see which optimisation flag causes the
wrong stacktrace (assuming your compiler is like gcc, i.e. has very
fine grained optimisation control).

Alternatively, you could investigate by using the valgrind monitor
command   (gdb) monitor v.info unwind <addr> <len>
to investigate the unwind info around the missing stacktrace entry
and/or by activating the debug trace of valgrind e.g.
    --trace-symtab=no|yes     show symbol table details? [no]
    --trace-symtab-patt=<patt> limit debuginfo tracing to obj name <patt>
    --trace-cfi=no|yes        show call-frame-info details? [no]
and/or by using objdump to look at the dwarf info.

Philippe



------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to