Hello,

I'm trying to debug a memory error.  memcheck has helpfully located an
error and provided a stack trace showing where the error is occurring.
 However, I really want the line number of my function that the error
is occurring in, but I can't find it.

$ valgrind --tool=memcheck --trace-children=yes ./myApp
(myApp top secret output omitted)
...
==26269== Memcheck, a memory error detector
==26269== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==26269== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==26269== Command: ../starfactory/starfactory
==26269==
==26269== Warning: set address range perms: large range [0x407a58000,
0x7f8147000) (defined)
==26330== Thread 2:
==26330== Conditional jump or move depends on uninitialised value(s)
==26330==    at 0x803CA1:
boost::multi_index::detail::ordered_index<boost::multi_index::composite_key<...(remainder
of my top secret type arguments omitted) (composite_key.hpp:381)
==26330==    by 0x7EED1D: ...about 4000 characters of my top secret
arguments later we are still going...,
boost::multi_index::detail::ordered_index<
...
(remainder of valgrind output omitted)

Unfortunately, on that last line starting with "by 0x7EED1D", the line
appears to be truncated before the line number in the file is
specified.

Is there a way to increase the buffer or whatever so that this line is
not truncated?

Is there a work around to this?  I tried the "--db-attach=yes"
argument, hoping that I could just attach a debugger and see what line
it is on that way.  However, I was never prompted to attach a debugger
with this flag.  Are warnings supposed to prompt you to attach a
debugger?  Maybe it failed because the warning happens in a forked
child process and not the original process?

Thanks for your time,
John

PS
I know that it is ridiculous that my function arguments take over 4000
characters to write out.  I'm sorry.

--
John DiMatteo
Princeton Consultants, Inc.
2 Research Way
Princeton, NJ 08540
609.987.8787 x250

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to