Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B6D2645B for ; Thu, 9 Jun 2011 13:26:53 +0000 (UTC) Received: (qmail 32205 invoked by uid 500); 9 Jun 2011 13:26:53 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 32148 invoked by uid 500); 9 Jun 2011 13:26:53 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 32141 invoked by uid 99); 9 Jun 2011 13:26:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2011 13:26:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2011 13:26:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0D12B23889BF; Thu, 9 Jun 2011 13:26:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1133865 - in /subversion/trunk/subversion: include/private/svn_debug.h libsvn_subr/debug.c Date: Thu, 09 Jun 2011 13:26:27 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110609132628.0D12B23889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stsp Date: Thu Jun 9 13:26:27 2011 New Revision: 1133865 URL: http://svn.apache.org/viewvc?rev=1133865&view=rev Log: Make SVN_DBG() print the name of the current function in addition to printing the file and line number. * subversion/include/private/svn_debug.h (svn_dbg__preamble): Add FUNC parameter. (SVN_DBG): Make both definitions of this macro pass __func__ for the FUNC paramter to svn_dbg__preamble(). * subversion/libsvn_subr/debug.c (svn_dbg__preamble): Add FUNC parameter and print its value in output. Modified: subversion/trunk/subversion/include/private/svn_debug.h subversion/trunk/subversion/libsvn_subr/debug.c Modified: subversion/trunk/subversion/include/private/svn_debug.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_debug.h?rev=1133865&r1=1133864&r2=1133865&view=diff ============================================================================== --- subversion/trunk/subversion/include/private/svn_debug.h (original) +++ subversion/trunk/subversion/include/private/svn_debug.h Thu Jun 9 13:26:27 2011 @@ -39,7 +39,8 @@ extern "C" { /* A couple helper functions for the macros below. */ void -svn_dbg__preamble(const char *file, long line, FILE *output); +svn_dbg__preamble(const char *file, long line, const char *func, + FILE *output); void svn_dbg__printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); @@ -54,7 +55,7 @@ svn_dbg__printf(const char *fmt, ...) for breakpoints. */ #ifdef SVN_DBG_QUIET -#define SVN_DBG(ARGS) svn_dbg__preamble(__FILE__, __LINE__, NULL) +#define SVN_DBG(ARGS) svn_dbg__preamble(__FILE__, __LINE__, __func__, NULL) #else @@ -75,8 +76,8 @@ svn_dbg__printf(const char *fmt, ...) * Note that these output lines are filtered by our test suite automatically, * so you don't have to worry about throwing off expected output. */ -#define SVN_DBG(ARGS) (svn_dbg__preamble(__FILE__, __LINE__, SVN_DBG_OUTPUT), \ - svn_dbg__printf ARGS) +#define SVN_DBG(ARGS) (svn_dbg__preamble(__FILE__, __LINE__, __func__, \ + SVN_DBG_OUTPUT), svn_dbg__printf ARGS) #endif Modified: subversion/trunk/subversion/libsvn_subr/debug.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/debug.c?rev=1133865&r1=1133864&r2=1133865&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_subr/debug.c (original) +++ subversion/trunk/subversion/libsvn_subr/debug.c Thu Jun 9 13:26:27 2011 @@ -43,7 +43,8 @@ quiet_mode(void) void -svn_dbg__preamble(const char *file, long line, FILE *output) +svn_dbg__preamble(const char *file, long line, const char *func, + FILE *output) { debug_output = output; @@ -59,7 +60,7 @@ svn_dbg__preamble(const char *file, long else ++slash; - fprintf(output, "DBG: %s:%4ld: ", slash, line); + fprintf(output, "DBG: %s:%4ld:%s(): ", slash, line, func); } }