Is there a way to get core when valgrind on invalid access? Am I missing 
something?


If you are running valgrind interactively and valgrind reports an error,
then one of the error options is to invoke gdb.  Gdb has a command:
   generate-core-file <filename>
See the gdb manual which is available online in html.

If you start valgrind with the option  --vgdb-error=<number>
then you have a gdbserver process which provides *much better*
service than attaching gdb only at the point of error.
See the valgrind manual, or "valgrind --help" for a synopsis.

In either case the core file will include the pieces of valgrind
which are running in the same process [and address space]
as "your" program.  So you might become confused while separating
what is "your" program from what is valgrind.

For practical purposes (shortest time to finding and fixing
the "first" error) it often is best to use the --vgdb-error=<number>
invocation, perhaps with --track-origins=yes.  And yes, this
means you are allowed to [you must] watch and help.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to