UTNianos

Versión completa: Valgrind con ncurses
Actualmente estas viendo una versión simplificada de nuestro contenido. Ver la versión completa con el formato correcto.
Alguno sabe como debuggear una app que usa ncurses con valgrind? O hacer que me mande la salida del valgrind a un archivo?
¡Por un momento pensé que habías encontrado una interfaz con ncurses para valgrind!

man valgrind escribió:--log-file=<filename>
Specifies that Valgrind should send all of its messages to the specified file. If the file name is empty, it causes an abort. There are three special format specifiers that can
be used in the file name.

%p is replaced with the current process ID. This is very useful for program that invoke multiple processes. WARNING: If you use --trace-children=yes and your program invokes
multiple processes OR your program forks without calling exec afterwards, and you don't use this specifier (or the %q specifier below), the Valgrind output from all those
processes will go into one file, possibly jumbled up, and possibly incomplete.

%q{FOO} is replaced with the contents of the environment variable FOO. If the {FOO} part is malformed, it causes an abort. This specifier is rarely needed, but very useful in
certain circumstances (eg. when running MPI programs). The idea is that you specify a variable which will be set differently for each process in the job, for example BPROC_RANK
or whatever is applicable in your MPI setup. If the named environment variable is not set, it causes an abort. Note that in some shells, the { and } characters may need to be
escaped with a backslash.

%% is replaced with %.

If an % is followed by any other character, it causes an abort.

Tal vez redirigir la stderr también funcione (valgrind miPrograma 2>archivo.log), pero esta forma puede ser más feliz (sobretodo si ncurses interfiere con la otra).
Gratzie
URLs de referencia