Liu Yubao wrote:

>      I found VIM(https://vim.svn.sourceforge.net/svnroot/vim/[EMAIL 
> PROTECTED])
> exits when I enable profiling flags in src/Makefile:
> 
>      --- Makefile    (revision 929)
>      +++ Makefile    (working copy)
>      @@ -545,8 +545,8 @@
>       # For unknown reasons adding "-lc" fixes a linking problem with 
> GCC.  That's
>       # probably a bug in the "-pg" implementation.
>       # Need to recompile everything after changing this: "make clean" 
> "make".
>      -#PROFILE_CFLAGS = -pg -g
>      -#PROFILE_LIBS = -pg
>      +PROFILE_CFLAGS = -pg -g
>      +PROFILE_LIBS = -pg
>       #PROFILE_LIBS = -pg -lc
> 
> 
>      $ ./vim -u NONE -U NONE -c ":q" ../bigfile
>      vim: Caught deadly signal PROF
>      vim: Finished.
>      Profiling timer expired.
> 
> After comment out line 274 in os_unix.c I can run that command normally,
> so I think os_unix.c requires a patch like this:
> 
>      Index: os_unix.c
>      ===================================================================
>      --- os_unix.c   (revision 929)
>      +++ os_unix.c   (working copy)
>      @@ -269,7 +269,7 @@
>       #ifdef SIGVTALRM
>           {SIGVTALRM,            "VTALRM",   TRUE},
>       #endif
>      -#if defined(SIGPROF) && !defined(FEAT_MZSCHEME)
>      +#if defined(SIGPROF) && !defined(FEAT_MZSCHEME) && ! DO_GPROF
>           /* MzScheme uses SIGPROF for its own needs */
>           {SIGPROF,      "PROF",     TRUE},
>       #endif
> 
> This is not a real patch because I don't know how to define DO_GPROF,
> maybe there is already a macro can tell we are compiling with gprof
> support.

The obvious thing to do is use

      PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING

and

      #if defined(SIGPROF) && !defined(FEAT_MZSCHEME) && 
!defined(WE_ARE_PROFILING)

> I compile and test the code on Debian Etch.

I'm running on FreeBSD, it works just fine without disabling that
SIGPROF line.  Is there something about Debian that works differently
with signals?

-- 
Warning label on a superhero Halloween costume:
"Caution: Cape does not enable user to fly."

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui