SVN_DBG

View: New views
7 Messages — Rating Filter:   Alert me  

SVN_DBG

by Edmund Wong-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm still not understanding SVN_DBG, not because I don't know what it
does; but, because I keep on getting undefined errors.

As far as I know, I just need to do the following:

1)  python gen-make.py -t vcproj --vsnet-version=2008 --debug
    --with-httpd=..\apache --with-openssl=..\openssl --with-zlib=..\zlib
    --with-sqlite=..\sqlite --with-apr=..\apache\srclib\apr
    --with-apr-util=..\apache\srclib\apr-util
    --with-apr-iconv=..\apache\srclib\apr-iconv --with-neon=..\neon
    --with-serf=..\serf

2) nmake all1 all2 check

Is that all I need to do?  The last time I tried SVN_DBG, I got
undefined errors.  I gave up and used puts(apr_psprintf(...)).
Now, I've come across SVn_DBG() in dso.c (110).  It's from
r39886.  Compiling with the latest trunk (with VS2008 command
prompt and nmake all1), I get the following error:

..\..\..\subversion\libsvn_subr\dso.c(110): error C4103: \
    'SVN_DBG' undefined; assuming extern returning int


But grep'ing for SVN_DBG, it's clearly defined in
include\private\svn_debug.h. But it's with the following
code:

#ifdef SVN_DBG_QUIET

#define SVN_DBG(ARGS) svn_dbg__preamble(__FILE__, __LINE__, NULL)

#else

#define SVN_DBG(ARGS) (svn_dbg__preamble(__FILE__, __LINE__,
SVN_DBG_OUTPUT), \
                        svn_dbg__printf ARGS)

#endif

Of course, this SVN_DBG is only available when SVN_DEBUG
is defined.  Clearly adding --debug in the gen-make.py
should set the SVN_DEBUG in the projects; and they are.
I grep'd SVN_DEBUG and came up with lots of hits in the
*.vcproj files.

The last time on IRC I pestered Bert about this and came up
still without a clue as to why I can't get SVN_DBG to be
recognized.  I'm completely stumped by this.

Any help appreciated.

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415320

Re: SVN_DBG

by Julian Foad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Edmund Wong wrote:
> ..\..\..\subversion\libsvn_subr\dso.c(110): error C4103: \
>     'SVN_DBG' undefined; assuming extern returning int
[...]
> Of course, this SVN_DBG is only available when SVN_DEBUG
> is defined.  Clearly adding --debug in the gen-make.py
> should set the SVN_DEBUG in the projects; and they are.
> I grep'd SVN_DEBUG and came up with lots of hits in the
> *.vcproj files.

Just a thought: are you using "pre-compiled headers"? If so, maybe the
dependency info isn't smart enough to detect that it needs to re-build
them. When I used to use Visual Studio I normally turned them off.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415759

Re: SVN_DBG

by Hyrum K. Wright-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov 6, 2009, at 8:19 PM, Edmund Wong wrote:

> Hi,
>
> I'm still not understanding SVN_DBG, not because I don't know what it
> does; but, because I keep on getting undefined errors.
>
> As far as I know, I just need to do the following:
>
> 1)  python gen-make.py -t vcproj --vsnet-version=2008 --debug
>    --with-httpd=..\apache --with-openssl=..\openssl --with-zlib=..
> \zlib
>    --with-sqlite=..\sqlite --with-apr=..\apache\srclib\apr
>    --with-apr-util=..\apache\srclib\apr-util
>    --with-apr-iconv=..\apache\srclib\apr-iconv --with-neon=..\neon
>    --with-serf=..\serf
>
> 2) nmake all1 all2 check
>
> Is that all I need to do?  The last time I tried SVN_DBG, I got
> undefined errors.  I gave up and used puts(apr_psprintf(...)).
> Now, I've come across SVn_DBG() in dso.c (110).  It's from
> r39886.  Compiling with the latest trunk (with VS2008 command
> prompt and nmake all1), I get the following error:
>
> ..\..\..\subversion\libsvn_subr\dso.c(110): error C4103: \
>    'SVN_DBG' undefined; assuming extern returning int
>
>
> But grep'ing for SVN_DBG, it's clearly defined in
> include\private\svn_debug.h. But it's with the following
> code:
>
> #ifdef SVN_DBG_QUIET
>
> #define SVN_DBG(ARGS) svn_dbg__preamble(__FILE__, __LINE__, NULL)
>
> #else
>
> #define SVN_DBG(ARGS) (svn_dbg__preamble(__FILE__, __LINE__,
> SVN_DBG_OUTPUT), \
>                        svn_dbg__printf ARGS)
>
> #endif
>
> Of course, this SVN_DBG is only available when SVN_DEBUG
> is defined.  Clearly adding --debug in the gen-make.py
> should set the SVN_DEBUG in the projects; and they are.
> I grep'd SVN_DEBUG and came up with lots of hits in the
> *.vcproj files.
>
> The last time on IRC I pestered Bert about this and came up
> still without a clue as to why I can't get SVN_DBG to be
> recognized.  I'm completely stumped by this.

SVN_DBG is just for intra-commit debugging use by developers.  Any  
occurrences that have snuck into a commit should be removed.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415812

Re: SVN_DBG

by Greg Stein-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 9, 2009 at 10:36, Hyrum K. Wright <hyrum@...> wrote:
>...
>
> SVN_DBG is just for intra-commit debugging use by developers.  Any
> occurrences that have snuck into a commit should be removed.

Except for the one that I inserted into subr/dso.c since that is
properly protected by #ifdef SVN_DEBUG. I used the SVN_DBG() macro
there in order to provide the DBG: prefix and file/line information.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415816

Re: SVN_DBG

by Daniel Shahaf-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Julian Foad wrote on Mon, 9 Nov 2009 at 11:47 -0000:

> Edmund Wong wrote:
> > ..\..\..\subversion\libsvn_subr\dso.c(110): error C4103: \
> >     'SVN_DBG' undefined; assuming extern returning int
> [...]
> > Of course, this SVN_DBG is only available when SVN_DEBUG
> > is defined.  Clearly adding --debug in the gen-make.py
> > should set the SVN_DEBUG in the projects; and they are.
> > I grep'd SVN_DEBUG and came up with lots of hits in the
> > *.vcproj files.
>
> Just a thought: are you using "pre-compiled headers"? If so, maybe the
> dependency info isn't smart enough to detect that it needs to re-build
> them. When I used to use Visual Studio I normally turned them off.
>

In this case, shouldn't gen-make.py generate project files that have
pre-compiled headers turned off?  (Or does it already do so?)

Daniel

> - Julian
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415759
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415933

Re: SVN_DBG

by Edmund Wong-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Julian Foad wrote:

> Edmund Wong wrote:
>> ..\..\..\subversion\libsvn_subr\dso.c(110): error C4103: \
>>     'SVN_DBG' undefined; assuming extern returning int
> [...]
>> Of course, this SVN_DBG is only available when SVN_DEBUG
>> is defined.  Clearly adding --debug in the gen-make.py
>> should set the SVN_DEBUG in the projects; and they are.
>> I grep'd SVN_DEBUG and came up with lots of hits in the
>> *.vcproj files.
>
> Just a thought: are you using "pre-compiled headers"? If so, maybe the
> dependency info isn't smart enough to detect that it needs to re-build
> them. When I used to use Visual Studio I normally turned them off.

Not that I know of.   Unfortunately, my Windows system's down
atm so I can't tell.

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416471

RE: SVN_DBG

by Bert Huijben-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> -----Original Message-----
> From: Edmund Wong [mailto:ed@...]
> Sent: woensdag 11 november 2009 11:26
> To: dev@...
> Subject: Re: SVN_DBG
>
> Julian Foad wrote:
> > Edmund Wong wrote:
> >> ..\..\..\subversion\libsvn_subr\dso.c(110): error C4103: \
> >>     'SVN_DBG' undefined; assuming extern returning int
> > [...]
> >> Of course, this SVN_DBG is only available when SVN_DEBUG
> >> is defined.  Clearly adding --debug in the gen-make.py
> >> should set the SVN_DEBUG in the projects; and they are.
> >> I grep'd SVN_DEBUG and came up with lots of hits in the
> >> *.vcproj files.
> >
> > Just a thought: are you using "pre-compiled headers"? If so, maybe
> the
> > dependency info isn't smart enough to detect that it needs to re-
> build
> > them. When I used to use Visual Studio I normally turned them off.
>
> Not that I know of.   Unfortunately, my Windows system's down
> atm so I can't tell.

The Windows build doesn't enable pre-compiled headers.

Pre-compiled headers are most usefull if you have a large batch of headers
you include in every file before all other headers and we don't use that in
Subversion.

(And SVN_DBG works fine for me when compiling subversion_vcnet.sln in DEBUG
mode)

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416488