gui-gui at netcourrier.com
Tue Sep 20 19:09:21 CEST 2016
> > 1. How can I compile neomutt with debug symbols? I tried setting CFLAGS,
> > but that didn't do anything...
> As Elimar said:
> ./configure --enable-debug
> though, this *ought* to be the same:
> make CFLAGS=-DDEBUG
> I don't think DEBUG actually enables much, except the `dprint` function.
Thanks for the information (thank you Elimar too), and dprint will be
useful. However, I'm looking for a way to compile neomutt so that the
resulting binary includes debug symbols, so that I can debug it with
gdb. --enable-debug doesn't do that.
> > 2. How can I send debug messages and errors? I didn't really look
> > around, but it could have helped me understanding what was going on.
> The `dprint` has the strangest prototype I've ever seen:
> dprint (DEBUG_LEVEL, (DEBUG_FILE, PRINTF_STRING, ARGS...));
> dprint (2, (debugfile, "error in the %s", name));
> This will be save to the debug file (~/.muttdebug0 by default) if you
> mutt -d LEVEL
> Where LEVEL is 2 or above. Each time you run `mutt -d` the debug files
> are rotated:
> .muttdebug0 -> .muttdebug0
> .muttdebug1 -> .muttdebug1
> .muttdebug2 -> .muttdebug2
> .muttdebug3 -> .muttdebug3
> .muttdebug4 (deleted)
> As for warning the user, there's: mutt_message() and mutt_error().
> mutt_message (_("Authenticating (%s)..."), method);
> mutt_error (_("%s authentication failed."), method);
> mutt_sleep (0);
> Note the use of the _() function to provide message translations.
> After printing an error, it's usual to call mutt_sleep(NUM_SECS) to make
> sure that the user notices. If the time is set to 0, then the wait is
> determined by the $sleep_time config variable.
Thanks for all that too.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 455 bytes
Desc: not available
More information about the neomutt-devel