This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: enable profiling of main() for mingw32.


Hello

Currently, on mingw32, call graph info generated with -pg switch and gprof is
virtually useless on mingw because there is no info for main().

For some reason (I can't find the commit in the Changelog) the Cygwin
version of SUBTARGET_PROLOGUE was disabled for mingw32.

Whatever the bug that was present, it appears to be gone now and using
the Cygwin definition works just fine.

Hence:

ChangeLog

2002-12-04  Danny Smith  <dannysmith@users.sourceforge.net>

	* config/i386.mingw32.h (SUBTARGET_PROLUGUE): Don't disable
	the Cygwin definition.


Index: mingw32.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/mingw32.h,v
retrieving revision 1.27
diff -c -3 -p -r1.27 mingw32.h
*** mingw32.h	29 Jun 2002 09:10:04 -0000	1.27
--- mingw32.h	4 Dec 2002 21:08:39 -0000
*************** do {						         \
*** 127,136 ****
    putc ('\"', asm_file);			         \
  } while (0)
  
- /* Override Cygwin's definition. This is necessary now due to the way
-    Cygwin profiling code is written. Once "fixed", we can remove this.  */
- #undef SUBTARGET_PROLOGUE
- 
  /* Define as short unsigned for compatability with MS runtime.  */
  #undef WINT_TYPE
  #define WINT_TYPE "short unsigned int"
--- 127,132 ----

http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]