From: Joel Rosdahl Date: Sat, 29 Sep 2018 19:48:41 +0000 (+0200) Subject: Merge remote-tracking branch 'afbjorklund/hash_debug' into pr/279 X-Git-Tag: v3.5~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3a76d795f7be07974bb4ec4f9d20be29a552556;p=thirdparty%2Fccache.git Merge remote-tracking branch 'afbjorklund/hash_debug' into pr/279 * afbjorklund/hash_debug: Register debug_end as an exit function instead Avoid using strcat and small realloc Rename helper functions, as suggested in review Save debug file streams, instead of reopening Add section markers, to the text file Rename hash_debug, add matching end function Improve documentation with example file names Output log to debug, even without a logfile Avoid global md variable in mdfour file Add --hash-file command, for convenience Add functionality to debug the hashing Add feature to also log into a memory buffer Add config for debug option ($CCACHE_DEBUG) Add util to return the command as a string --- b3a76d795f7be07974bb4ec4f9d20be29a552556 diff --cc src/ccache.c index 1fc04d3f5,28046a0f8..93558be1b --- a/src/ccache.c +++ b/src/ccache.c @@@ -893,9 -910,10 +912,9 @@@ process_preprocessed_file(struct mdfou // hash it. See also how debug_prefix_map is handled. should_hash_inc_path = false; } - free(cwd); } if (should_hash_inc_path) { - hash_string(hash, inc_path); + hash_buffer(hash, inc_path, strlen(inc_path)); } remember_include_file(inc_path, hash, system);