Compare commits

..
5 Commits
Author SHA1 Message Date
Miguel de Icaza 6dc86808d6 Backport
svn path=/branches/wii/mono/; revision=131084
2009-04-06 00:13:36 +00:00
Miguel de Icaza 056c053b97 Backport to the branch
svn path=/branches/wii/mono/; revision=131032
2009-04-03 23:27:31 +00:00
Miguel de Icaza f5d8d3ed54 Backport
svn path=/branches/wii/mono/; revision=130826
2009-04-02 04:15:15 +00:00
Miguel de Icaza 7808c43dad Make this build with Codewarrior
svn path=/branches/wii/mono/; revision=130825
2009-04-02 04:14:41 +00:00
Miguel de Icaza 31bcb8888a Make this build with Codewarrior
svn path=/branches/wii/mono/; revision=130824
2009-04-02 04:14:27 +00:00
6578 changed files with 311878 additions and 1129272 deletions

No files matched your search

-31
View File
@@ -1,31 +0,0 @@
/Makefile
/Makefile.in
/_tmpinst
/aclocal.m4
/autom4te.cache
/config.cache
/config.guess
/config.h
/config.h.in
/config.h.in
/config.log
/config.status
/config.sub
/configure
/libtool
/ltconfig
/ltmain.sh
/mono-*.tar.gz
/*.pc
/mono.spec
/semantic.cache
/stamp-h
/stamp-h.in
/stamp-h1
/tmpinst-dir.stamp
/missing
/compile
/depcomp
/install-sh
/doltlibtool
/doltcompile
-3041
View File
File diff suppressed because it is too large. Load diff
-319
View File
@@ -1,317 +1,3 @@
2009-12-11 Zoltan Varga <[email protected]>
* configure.in: Applied patch from Matt McClellan ([email protected]). Add a check
for 2 parameter sched_setaffinity in older glibc versions. Fixes
#564000.
2009-11-17 Marek Habersack <[email protected]>
* runtime/Makefile.am (TEST_SUPPORT_FILES): added bin/al2 - needed
for System.Web tests.
2009-11-17 Zoltan Varga <[email protected]>
* configure.in: Add a --enable-minimal=soft-debug option.
2009-11-12 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Handle 'i686-pc-cygwin' too.
2009-11-04 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Applied patch from Kornél Pál
<[email protected]>. Enable dolt on cygwin.
2009-11-03 Zoltan Varga <[email protected]>
* configure.in: Check for netinet/in.h.
2009-11-02 Gonzalo Paniagua Javier <[email protected]>
* configure.in: add a few missing header file checks.
2009-11-01 Zoltan Varga <[email protected]>
* configure.in: Make the LLVM warning a bit more up-to-date.
* configure.in: Pass -mno-cygwin to CXX too on windows. Enable AC_PROG_CXX
since it now works on windows too.
2009-10-12 Zoltan Varga <[email protected]>
* data/Makefile.am (gdb_DATA): Install mono-gdb.py alongside the mono executable.
* data/gdb-pre7.0: New directory, containing the mono support files for
gdb versions before 7.0.
2009-09-29 Ankit Jain <[email protected]>
* mono-core.spec.in: Add Microsoft.WebApplication.targets
2009-08-29 Jonathan Pryor <[email protected]>
* man/mdoc-export-html.1: Document --with-profile, --with-version.
2009-09-08 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Enable this for mips.
2009-08-29 Jonathan Pryor <[email protected]>
* man/mdoc.5: Document the new <format/> element.
2009-08-18 Zoltan Varga <[email protected]>
* scripts/Makefile.am: Applied patch from Hib Eris ([email protected]).
Add $(SCRIPT_SUFFIX) to the name of the 'mod' tool.
2009-08-04 Miguel de Icaza <[email protected]>
* Start the split between PLATFORM_WIN32 and TARGET_WIN32.
PLATFORM_WIN32 should be used to configure the runtime while
building it. TARGET_WIN32 is used for target execution.
This is used by Mono's AOT cross compiler when running on Windows,
but targetting a different operating system. So we have to tell
those two apart.
2009-07-24 Jb Evain <[email protected]>
* scripts/Makefile.am: generate a dmcs script for the 4.0 compiler
when building the net_4_0 profile.
2009-07-24 Jb Evain <[email protected]>
* configure.in
* runtime/Makefile.am
* data/Makefile.am: create a and populate a configuration folder
for the net_4_0 profile.
2009-07-21 Jb Evain <[email protected]>
* configure.in: add a --with-monotouch option.
* runtime/Makefile.am: use it to trigger the mcs monotouch build.
2009-07-14 Zoltan Varga <[email protected]>
* configure.in: Add more libraries needed by the llvm backend.
2009-07-02 Jb Evain <[email protected]>
* scripts/Makefile.am: monolinker is now a 2.0 assembly.
2009-07-02 jonas echterhoff <[email protected]>
* configure.in: Add linker flag on Mac OS X to allow access to other
processes, needed for debugging. Enable debugging on OS X.
2009-06-21 Zoltan Varga <[email protected]>
* configure.in (TARGET_BYTE_ORDER): New define containing the byte order of
the target.
2009-06-18 Marek Habersack <[email protected]>
* data/browscap.ini: applied Mono modifications to the upstream
version. Fixes three tests failing in System.Web. Fixes bug #513965
Added ecmascriptversion, msdomversion and w3cdomversion to the IE
8.0 entry. Fixes bug #513965
2009-06-16 Raja R Harinath <[email protected]>
* configure.in (--with-profile2): Simplify slightly.
(--with-profile4, --with-moonlight): Likewise.
2009-06-15 Miguel de Icaza <[email protected]>
* configure.in: Changed the default to not build the 4.0 profile
unless explicitly enabled.
2009-06-15 Zoltan Varga <[email protected]>
* CMakeLists.txt: Add mips support.
2009-06-14 Zoltan Varga <[email protected]>
* scripts/CMakeLists.txt: New file.
* samples/CMakeLists.txt: New file, currently empty.
2009-06-12 Andreia Gaita <[email protected]>
* data/config.in: add libcups dllmap entry
2009-06-11 Zoltan Varga <[email protected]>
* configure.in: Disable dtrace support if dtrace doesn't support the
-h option.
2009-06-10 Marek Safar <[email protected]>
* runtime/Makefile.am, configure.in: Make net_4_0 profile optional.
2009-06-07 Marek Safar <[email protected]>
* runtime/Makefile.am: Enabled net_4_0 for compilation.
2009-05-27 Zoltan Varga <[email protected]>
* configure.in: Disable USE_MUNMAP on ppc to work around #504411.
2009-05-26 Zoltan Varga <[email protected]>
* CMakeLists.txt: Implement AC_OUTPUT, creation of config.make, etc.
* CMakeLists.txt: implement arm fpu detection, add vfp detection as
well.
* CMakeLists.txt: Add arm support.
2009-05-24 Miguel de Icaza <[email protected]>
* Disable mono/docs build if we disabled the mcs build.
2009-05-24 Zoltan Varga <[email protected]>
* */CMakeLists.txt: Add beginnings of a cmake based build system.
2009-05-22 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Enable dolt on sparc linux.
2009-05-17 Zoltan Varga <[email protected]>
* configure.in: Add TARGET_POWERPC/POWERPC64 defines.
2009-05-09 Miguel de Icaza <[email protected]>
* configure.in: Instead of reporting the various disabled features
in a loop, where a keyword might fail, report the actual disabled
features in the sections that handle them
2009-05-08 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Add powerpc64.
2009-05-07 Rodrigo Kumpera <[email protected]>
* runtime/Makefile.am (mcs-compileall): Pass --security=validil
to the runtime so the assemblies are not required to be verifiable.
2009-05-06 Raja R Harinath <[email protected]>
* Makefile.am (compiler-tests): Rewrite to re-build the moon
assemblies after mcs/ is built.
* runtime/Makefile.am (build_profiles) [INSTALL_2_1]: Build only
the net_2_1_raw profile.
(test_profiles): New. Mention net_2_1 profile.
(moon-do-build): New.
2009-05-05 Miguel de Icaza <[email protected]>
* configure.in: Fix the bug reported on the mailing list by
Koushik K Dutta: do not build docs when --disable-mcs-builds is
passed.
2009-05-05 Miguel de Icaza <[email protected]>
* configure.in: Reduce configure-time dependencies by using
pkg-config the way it was originally intended to be used, and not
with the incredibly lame and painful inducing pkg.m4 file.
I am on a quest to remove this gratuitous dep on pkg.m4 that is
making people's lives miserable around the globe, just because
someone can not be bothered to learn the shell if construct.
2009-04-28 Zoltan Varga <[email protected]>
* configure.in: Add an option to disable the solaris tar check.
* configure.in: Define a TARGET_<ARCH> preprocessor symbol for some
architectures.
2009-04-23 Jb Evain <[email protected]>
* scripts/Makefile.am: add a pdb2mdb script.
2009-04-22 Jeffrey Stedfast <[email protected]>
* configure.in: Check for a stable version of glib-2.0 as opposed
to an unstable development version (we don't want people
unfamiliar with glib versioning to install an unstable development
version of glib).
2009-04-13 Zoltan Varga <[email protected]>
* configure.in: Quiet 'copying selected object files' messages from
newer libtool versions as well.
* configure.in: Disable AC_PROG_CXX for now to fix the windows build.
In mono/mini:
* Makefile.am: Comment out the cpp files as f@#%$ automake complains even
if they are inside a conditional.
2009-04-03 Zoltan Varga <[email protected]>
* scripts/patch-quiet.sh: Process LTCXXCOMPILE too.
2009-04-02 Zoltan Varga <[email protected]>
* configure.in: Move the call to AC_PROG_CXX earlier and enable it again.
* configure.in: Disable the call to AC_PROG_CXX for now.
2009-04-02 Marek Habersack <[email protected]>
* data/Makefile.am: added system.web.mvc.pc{.in}
* configure.in: added data/system.web.mvc.pc to AC_OUTPUT
* data/system.web.mvc.pc.in: added
2009-04-02 Zoltan Varga <[email protected]>
* configure.in: Add an ENABLE_LLVM autoconf define.
* configure.in: Add --enable-llvm argument to enable the experimental
LLVM back end.
2009-03-31 Jb Evain <[email protected]>
* scripts: Remove smcs, which is handled by moon now.
* data: ditto.
2009-03-20 Zoltan Varga <[email protected]>
* mono/os: Remove this now empty directory.
* mono/Makefile.am (SUBDIRS): Remove 'os'.
2009-03-16 Atsushi Enomoto <[email protected]>
* scripts/Makefile.am : mono-xmltool uses 2.0.
2009-03-12 Jonathan Pryor <[email protected]>
* scripts/Makefile.am: Add sqlmetal.
2009-03-10 Zoltan Varga <[email protected]>
* README: Remove the comment about --with-moonlight being pre-alpha.
2009-03-10 Atsushi Enomoto <[email protected]>
* scripts/Makefile.am : added svcutil.
2009-02-26 Marek Habersack <[email protected]>
* data/mono.web.pc.in: added. Fixes bug #479760
* data/Makefile.am: added mono.pc{.in} wherever necessary
2009-02-07 Gonzalo Paniagua Javier <[email protected]>
* configure.in: include stdio so that NULL is defined when checking
@@ -384,11 +70,6 @@
* scripts/Makefile.am: don't generate a script for the now
dead mono-api-diff.
2008-12-05 Jonathan Pryor <[email protected]>
* scripts/mdassembler, scripts/monodocer, scripts/monodocs2html:
Properly quote parameters as they may contain spaces.
2008-12-05 Jonathan Pryor <[email protected]>
* man/mdoc-update.1: Document -fno-assembly-versions.
+5 -38
View File
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web msvc docs
# Keep in sync with SUBDIRS
## 'tools' is not normally built
@@ -35,7 +35,9 @@ get-monolite-latest:
cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
cd $(mcslib) && mv -f monolite-* monolite
compiler-tests: build-test-mono-mcs-moon
compiler-tests: mcs-do-clean
$(MAKE) all
$(MAKE) mcs-do-compiler-tests
compiler-tests-net_2_0:
-rm -f $(mcs_topdir)/build/common/Consts.cs.save
@@ -44,7 +46,7 @@ compiler-tests-net_2_0:
cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0 clean
-mv -f $(mcs_topdir)/build/common/Consts.cs.save $(mcs_topdir)/build/common/Consts.cs
$(MAKE) all
$(MAKE) test_profiles=net_2_0 mcs-do-compiler-tests
$(MAKE) build_profiles=net_2_0 mcs-do-compiler-tests
bootstrap-world: compiler-tests
$(MAKE) install
@@ -53,18 +55,6 @@ bootstrap-world-net_2_0: compiler-tests-net_2_0
$(MAKE) install
# internal targets
.PHONY: build-test-mono-mcs-moon
build-test-mono-mcs-moon: do-build-moon-maybe
$(MAKE) mcs-do-compiler-tests
.PHONY: do-build-mono-mcs
do-build-mono-mcs: mcs-do-clean
$(MAKE) all
.PHONY: do-build-moon-maybe
do-build-moon-maybe: do-build-mono-mcs
cd runtime && $(MAKE) moon-do-build
mcs-do-clean:
cd runtime && $(MAKE) clean-local
cd mono/tests && $(MAKE) clean
@@ -96,26 +86,3 @@ bootstrap: all
patch-quiet:
find mono -name Makefile -exec scripts/patch-quiet.sh {} \;
find libgc -name Makefile -exec scripts/patch-quiet.sh {} \;
update-csproj:
-rm msvc/scripts/order
-mkdir msvc/scripts/inputs
(cd runtime; make V=1 extra_targets=csproj-local)
package-inputs:
echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
echo '<root>' >> msvc/scripts/order.xml
for i in `cat msvc/scripts/order`; do \
set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
cat msvc/scripts/inputs/$$2.input | \
(echo " <project dir=\"$$1\" library=\"$$2\">"; \
read boot; echo " <boot>$$boot</boot>"; \
read mcs; echo " <mcs>$$mcs</mcs>"; \
read flags; echo " <flags>$$flags</flags>"; \
read output; echo " <output>$$output</output>"; \
read built; echo " <built_sources>$$built</built_sources>"; \
read libou; echo " <library_output>$$libou</library_output>"; \
read resp; echo " <response>$$resp</response>"; \
echo " </project>") >> msvc/scripts/order.xml; \
done
echo "</root>" >> msvc/scripts/order.xml
+6 -28
View File
@@ -267,12 +267,10 @@ This is Mono.
This defaults to `yes'.
--with-profile2=yes,no
--with-preview=yes,no
Whether you want to build the 2.x libraries (support
for Generics and the 2.0/3.5 APIS).
It defaults to `yes'.
Whether you want to build libraries that are still not
completed (The 2.0 APIs). It defaults to `yes'.
--with-moonlight=yes,no
@@ -281,10 +279,12 @@ This is Mono.
(1.1 and 2.0 APIs).
This will produce the `smcs' compiler which will reference
the Silverlight modified assemblies (mscorlib.dll,
the Silvelright modified assemblies (mscorlib.dll,
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
on the LINQ extensions for the compiler.
This option defaults to `no' and it is considered pre-alpha.
--with-libgdiplus=installed,sibling,<path>
This is used to configure where should Mono look for
@@ -324,11 +324,6 @@ This is Mono.
Disables support for the Ahead of Time
compilation.
attach:
Support for the Mono.Management assembly and the
VMAttach API (allowing code to be injected into
a target VM)
com:
Disables COM support.
@@ -338,12 +333,6 @@ This is Mono.
decimal:
Disables support for System.Decimal.
full_messages:
By default Mono comes with a full table
of messages for error codes. This feature
turns off uncommon error messages and reduces
the runtime size.
generics:
Generics support. Disabling this will not
allow Mono to run any 2.0 libraries or
@@ -366,11 +355,6 @@ This is Mono.
disabling this will drop support for any
libraries using DllImport.
portability:
Removes support for MONO_IOMAP, the environment
variables for simplifying porting applications that
are case-insensitive and that mix the Unix and Windows path separators.
profiler:
Disables support for the default profiler.
@@ -382,11 +366,6 @@ This is Mono.
assemblies (AssemblyBuilderAccess.Save) in
System.Reflection.Emit.
shadow_copy:
Disables support for AppDomain's shadow copies
(you can disable this if you do not plan on
using appdomains).
simd:
Disables support for the Mono.SIMD intrinsics
library.
@@ -522,4 +501,3 @@ This is Mono.
independent checkout) from the Mono module, that
directory is automatically configured to share the
same prefix than this module gets.
+2 -5
View File
@@ -22,13 +22,10 @@ if test x$GCC != xyes; then
dolt_supported=no
fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
+64
View File
@@ -0,0 +1,64 @@
#!/bin/sh
ASPEN_ROOT=/Developer/Platforms/iPhoneOS.platform/Developer
ASPEN_SDK=$ASPEN_ROOT/SDKs/iPhoneOS2.0.sdk/
ORIG_PATH=$PATH
GLIB_FLAGS=`pkg-config --cflags --libs glib-2.0`
if [ -z "$GLIB_FLAGS" ]; then
echo "pkg-config could not locate glib-2.0 needed for the monoburg step"
exit;
fi
setenv () {
export PATH=$ASPEN_ROOT/usr/bin:$PATH
export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CC=arm-apple-darwin9-gcc-4.0.1
export CXX=arm-apple-darwin9-g++-4.0.1
export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export LD=$CC
export LDFLAGS="-liconv -Wl,-syslibroot,$ASPEN_SDK"
}
unsetenv () {
export PATH=$ORIG_PATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset CC
unset CXX
unset CPP
unset CXXPP
unset LD
unset LDFLAGS
}
export mono_cv_uscore=yes
export cv_mono_sizeof_sunpath=104
export ac_cv_func_posix_getpwuid_r=yes
export ac_cv_func_backtrace_symbols=no
setenv
pushd eglib
./autogen.sh --host=arm-apple-darwin9
popd
./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded $@
perl -pi -e 's/MONO_SIZEOF_SUNPATH 0/MONO_SIZEOF_SUNPATH 104/' config.h
perl -pi -e 's/#define HAVE_FINITE 1//' config.h
perl -pi -e 's/#define HAVE_MMAP 1//' config.h
make
unsetenv
pushd mono/monoburg
/usr/bin/gcc -o monoburg ./monoburg.c parser.c -I../.. -pthread -lm $GLIB_FLAGS
make
popd
setenv
make
+65 -286
View File
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,2.6)
AM_INIT_AUTOMAKE(mono,2.5)
AM_MAINTAINER_MODE
API_VER=1.0
@@ -40,8 +40,6 @@ fi
# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
CPPFLAGS_FOR_LIBGC=$CPPFLAGS
CFLAGS_FOR_LIBGC=$CFLAGS
CPPFLAGS_FOR_EGLIB=$CPPFLAGS
CFLAGS_FOR_EGLIB=$CFLAGS
#
# These are the flags that need to be stored in the mono.pc file for
@@ -67,32 +65,20 @@ AC_MSG_CHECKING([host platform characteristics])
libgc_threads=no
has_dtrace=no
parallel_mark=yes
case "$host" in
powerpc*-*-linux*)
# https://bugzilla.novell.com/show_bug.cgi?id=504411
disable_munmap=yes
;;
esac
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32,1,[Host Platform is Win32])
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
if test "x$cross_compiling" = "xno"; then
CC="gcc -mno-cygwin -g"
CXX="g++ -mno-cygwin -g"
# So libgc configure gets -mno-cygwin
export CC
export CXX
fi
HOST_CC="gcc"
# Windows 2000 is required that includes Internet Explorer 5.01
CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lmswsock"
libmono_cflags="-mno-cygwin -mms-bitfields -mwindows"
libmono_ldflags="-mno-cygwin -mms-bitfields -mwindows"
libdl=
@@ -159,10 +145,7 @@ case "$host" in
;;
*-*-linux*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
if test "x$disable_munmap" != "xyes"; then
CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
fi
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
libmono_cflags="-D_REENTRANT"
libmono_ldflags="-lpthread"
libdl="-ldl"
@@ -219,22 +202,6 @@ case "$host" in
if test "x$cross_compiling" = "xyes"; then
has_broken_apple_cpp=yes
fi
dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin10.0.0, but
dnl its gcc defaults to 64-bit mode. They have also deprecated the usage of ucontext
dnl we need to set some flags to build our 32-bit binaries on 10.6 properly
case "$host" in
i*86-*-darwin10*)
BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE -mmacosx-version-min=10.5"
CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_FLAGS"
CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
CXXFLAGS="$CXXFLAGS $BROKEN_DARWIN_FLAGS"
CCASFLAGS="$CCASFLAGS $BROKEN_DARWIN_FLAGS"
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
;;
esac
;;
*)
AC_MSG_WARN([*** Please add $host to configure.in checks!])
@@ -255,7 +222,6 @@ AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AC_PROG_CXX
AM_PROG_AS
AM_PROG_CC_STDC
AC_PROG_INSTALL
@@ -313,9 +279,8 @@ fi
AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h)
AC_CHECK_HEADERS(sys/user.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h)
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h)
AC_CHECK_HEADERS(sys/user.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h)
AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
if test x$have_zlib = xyes; then
@@ -407,19 +372,13 @@ fi
# A sanity check to catch cases where the package was unpacked
# with an ancient tar program (Solaris)
#
AC_ARG_ENABLE(solaris-tar-check,
[ --disable-solaris-tar-check disable solaris tar check],
do_solaris_tar_check=no, do_solaris_tar_check=yes)
if test x"$do_solaris_tar_check" = xyes; then
AC_MSG_CHECKING(integrity of package)
if test -f $srcdir/$mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
then
AC_MSG_RESULT(ok)
else
errorm="Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details"
AC_MSG_ERROR([$errorm])
fi
AC_MSG_CHECKING(integrity of package)
if test -f $srcdir/$mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
then
AC_MSG_RESULT(ok)
else
errorm="Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details"
AC_MSG_ERROR([$errorm])
fi
mcs_topdir='$(top_srcdir)/'$mcsdir
@@ -455,7 +414,7 @@ if test "x$USE_NLS" = "xyes"; then
fi
AC_ARG_WITH([libgdiplus],
[ --with-libgdiplus=installed|sibling|<path> Override the libgdiplus used for System.Drawing tests (defaults to installed)],
[ --with-libgdiplus=installed|sibling|<path> Override the libgdiplus used for System.Drawing tests (defaults to NO)],
[], [with_libgdiplus=installed])
case $with_libgdiplus in
@@ -472,7 +431,7 @@ if test "x$PKG_CONFIG" = "xno"; then
fi
pkg_config_path=
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir],
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
if test x$with_crosspkgdir = "x"; then
if test -s $PKG_CONFIG_PATH; then
pkg_config_path=$PKG_CONFIG_PATH
@@ -485,7 +444,7 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan
)
AC_ARG_WITH([glib],
[ --with-glib=embedded|system Choose glib API: system or embedded (default to system)],
[ --with-glib=embedded|system Choose glib API: system or embedded (default to system)],
[], [with_glib=system])
eglib_dir=
@@ -499,7 +458,6 @@ embedded)
GMODULE_CFLAGS="$GLIB_CFLAGS"
GMODULE_LIBS="$GLIB_LIBS"
eglib_dir=eglib
ac_configure_args="$ac_configure_args \"CPPFLAGS_FOR_EGLIB=$EGLIB_CPPFLAGS\" \"CFLAGS_FOR_EGLIB=$CFLAGS_FOR_EGLIB\""
AC_CONFIG_SUBDIRS(eglib)
;;
system)
@@ -515,19 +473,14 @@ system)
fi
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.4.0
dnl
dnl No, you will not replace this check with a pkg.m4 check
dnl
if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
else
AC_MSG_ERROR([You need at least glib-2.0 $GLIB_REQUIRED_VERSION])
fi
GLIB_REQUIRED_VERSION=1.3.11
PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
;;
*)
AC_MSG_ERROR([Invalid argument to --with-glib.])
@@ -563,17 +516,17 @@ if test x$cross_compiling$platform_win32 = xnoyes; then
AC_MSG_RESULT(ok)
fi
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Defaults to included],[gc=$with_gc],[gc=$gc_default])
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
# Some systems have broken support, so we allow to disable it.
AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation (defaults to __thread)],[],[with_tls=__thread])
AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation],[],[with_tls=__thread])
# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
# This does not work on some platforms (bug #55253)
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes])
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=yes])
AC_ARG_WITH(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster) (defaults to yes)],[],[with_static_mono=yes])
AC_ARG_WITH(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster)],[],[with_static_mono=yes])
if test "x$enable_static" = "xno"; then
with_static_mono=no
@@ -587,7 +540,7 @@ fi
AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
AC_ARG_ENABLE(mcs-build, [ --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour],[],[with_xen_opt=yes])
if test "x$with_xen_opt" = "xyes"; then
AC_DEFINE(MONO_XEN_OPT, 1, [Xen-specific behaviour])
ORIG_CFLAGS=$CFLAGS
@@ -605,16 +558,17 @@ if test "x$with_xen_opt" = "xyes"; then
])
fi
AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet runtime build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet runtime build], enable_quiet_build=$enableval, enable_quiet_build=yes)
DISABLED_FEATURES=none
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd,soft_debug.],
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
AC_MSG_NOTICE([Disabled support for feature: $feature])
done
DISABLED_FEATURES=$enable_minimal
disabled="Disabled: $enable_minimal"
@@ -623,107 +577,67 @@ AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsy
AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
if test "x$mono_feature_disable_aot" = "xyes"; then
AC_DEFINE(DISABLE_AOT_COMPILER, 1, [Disable AOT Compiler])
AC_MSG_NOTICE([Disabled AOT compiler])
AC_DEFINE(DISABLE_AOT, 1, [Disable AOT support])
fi
if test "x$mono_feature_disable_profiler" = "xyes"; then
AC_DEFINE(DISABLE_PROFILER, 1, [Disable default profiler support])
AC_MSG_NOTICE([Disabled support for the profiler])
fi
AM_CONDITIONAL(DISABLE_PROFILER, test x$mono_feature_disable_profiler = xyes)
if test "x$mono_feature_disable_decimal" = "xyes"; then
AC_DEFINE(DISABLE_DECIMAL, 1, [Disable System.Decimal support])
AC_MSG_NOTICE([Disabled support for decimal])
fi
if test "x$mono_feature_disable_pinvoke" = "xyes"; then
AC_DEFINE(DISABLE_PINVOKE, 1, [Disable P/Invoke support])
AC_MSG_NOTICE([Disabled support for P/Invoke])
fi
if test "x$mono_feature_disable_debug" = "xyes"; then
AC_DEFINE(DISABLE_DEBUG, 1, [Disable runtime debugging support])
AC_MSG_NOTICE([Disabled support for runtime debugging])
fi
if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
mono_feature_disable_reflection_emit_save=yes
AC_MSG_NOTICE([Disabled support for Reflection.Emit])
fi
if test "x$mono_feature_disable_reflection_emit_save" = "xyes"; then
AC_DEFINE(DISABLE_REFLECTION_EMIT_SAVE, 1, [Disable assembly saving support in reflection emit])
AC_MSG_NOTICE([Disabled support for Reflection.Emit.Save])
fi
if test "x$mono_feature_disable_large_code" = "xyes"; then
AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
AC_MSG_NOTICE([Disabled support for large assemblies])
fi
if test "x$mono_feature_disable_logging" = "xyes"; then
AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging])
AC_MSG_NOTICE([Disabled support for logging])
fi
if test "x$mono_feature_disable_com" = "xyes"; then
AC_DEFINE(DISABLE_COM, 1, [Disable COM support])
AC_MSG_NOTICE([Disabled COM support])
fi
if test "x$mono_feature_disable_ssa" = "xyes"; then
AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
AC_MSG_NOTICE([Disabled SSA JIT optimizations])
fi
if test "x$mono_feature_disable_generics" = "xyes"; then
AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support])
AC_MSG_NOTICE([Disabled Generics Support])
fi
if test "x$mono_feature_disable_shadowcopy" = "xyes"; then
AC_DEFINE(DISABLE_SHADOW_COPY, 1, [Disable Shadow Copy for AppDomains])
AC_MSG_NOTICE([Disabled Shadow copy for AppDomains])
fi
if test "x$mono_feature_disable_portability" = "xyes"; then
AC_DEFINE(DISABLE_PORTABILITY, 1, [Disables the IO portability layer])
AC_MSG_NOTICE([Disabled IO Portability layer])
fi
if test "x$mono_feature_disable_attach" = "xyes"; then
AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
AC_MSG_NOTICE([Disabled agent attach])
fi
if test "x$mono_feature_disable_full_messages" = "xyes"; then
AC_DEFINE(DISABLE_FULL_MESSAGES, 1, [Disables building in the full table of WAPI messages])
AC_MSG_NOTICE([Disabled full messages for Win32 errors, only core message strings shipped])
fi
if test "x$mono_feature_disable_verifier" = "xyes"; then
AC_DEFINE(DISABLE_VERIFIER, 1, [Disables the verifier])
AC_MSG_NOTICE([Disabled the metadata and IL verifiers])
fi
if test "x$mono_feature_disable_jit" = "xyes"; then
AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
AC_MSG_NOTICE([Disabled the JIT engine, only full AOT will be supported])
fi
AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
if test "x$mono_feature_disable_simd" = "xyes"; then
AC_DEFINE(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.])
AC_MSG_NOTICE([Disabled SIMD support])
fi
if test "x$mono_feature_disable_soft_debug" = "xyes"; then
AC_DEFINE(DISABLE_SOFT_DEBUG, 1, [Disable Soft Debugger Agent.])
AC_MSG_NOTICE([Disabled Soft Debugger.])
fi
AC_MSG_CHECKING(for visibility __attribute__)
@@ -824,7 +738,7 @@ case "x$gc" in
;;
esac
AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no])
AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB], [large_heap=$withval], [large_heap=no])
if test "x$large_heap" = "xyes"; then
echo "FOO"
CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
@@ -883,7 +797,7 @@ if test x$platform_win32 = xno; then
dnl ******************************************************************
dnl *** Checks for the IKVM JNI interface library ***
dnl ******************************************************************
AC_ARG_WITH(ikvm-native, [ --with-ikvm-native=yes,no build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=yes])
AC_ARG_WITH(ikvm-native, [ --with-ikvm-native=yes,no build the IKVM JNI interface library],[with_ikvm_native=$withval],[with_ikvm_native=yes])
ikvm_native_dir=
if test x$with_ikvm_native = xyes; then
@@ -912,31 +826,6 @@ if test x$platform_win32 = xno; then
AC_CHECK_FUNCS(sched_setaffinity)
dnl ****************************************************************
dnl *** Check for sched_setaffinity from glibc versions before ***
dnl *** 2.3.4. The older versions of the function only take 2 ***
dnl *** parameters, not 3. ***
dnl *** ***
dnl *** Because the interface change was not made in a minor ***
dnl *** version rev, the __GLIBC__ and __GLIBC_MINOR__ macros ***
dnl *** won't always indicate the interface sched_affinity has. ***
dnl ****************************************************************
AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4)
AC_TRY_COMPILE([#include <sched.h>], [
int main() {
int mask = 1;
sched_setaffinity(0, &mask);
}
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY, 1, [Have GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY])
], [
# We have the new, three-parameter version
AC_MSG_RESULT(no)
])
dnl ******************************************************************
dnl *** Check for large file support ***
dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
@@ -1246,15 +1135,9 @@ if test x$platform_win32 = xno; then
AC_DEFINE(USE_MONO_MUTEX, 1, [Use mono_mutex_t])
])
AC_CHECK_FUNCS(pthread_attr_setstacksize)
AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
AC_CHECK_FUNCS(pthread_attr_getstack)
AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
dnl ***********************************
dnl *** Checks for signals
dnl ***********************************
AC_CHECK_HEADERS(signal.h)
AC_CHECK_FUNCS(sigaction)
dnl ***********************************
dnl *** Checks for working __thread ***
dnl ***********************************
@@ -1735,9 +1618,8 @@ dnl ****************************
AC_MSG_CHECKING([if usage of random device is requested])
AC_ARG_ENABLE(dev-random,
[ --disable-dev-random disable the use of the random device (enabled by default)],
[ --disable-dev-random disable the use of the random device],
try_dev_random=$enableval, try_dev_random=yes)
AC_MSG_RESULT($try_dev_random)
case "{$target}" in
@@ -1810,11 +1692,11 @@ if test x$gc = xsgen; then
fi
fi
AC_ARG_ENABLE(nunit-tests, [ --enable-nunit-tests Run the nunit tests of the class library on 'make check'])
AC_ARG_ENABLE(nunit-tests, [ --enable-nunit-tests Run the nunit tests of the class library on 'make check'])
AM_CONDITIONAL(ENABLE_NUNIT_TESTS, [test x$enable_nunit_tests = xyes])
AC_MSG_CHECKING([if big-arrays are to be enabled])
AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
if test "x$enable_big_arrays" = "xyes" ; then
if test "x$ac_cv_sizeof_void_p" = "x8"; then
AC_DEFINE(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue])
@@ -1838,9 +1720,6 @@ if test "x$enable_dtrace" = "xyes"; then
if test "x$DTRACE" = "xno"; then
AC_MSG_RESULT([dtrace utility not found, dtrace support disabled.])
enable_dtrace=no
elif ! $DTRACE -h $srcdir/data/mono.d > /dev/null 2>&1; then
AC_MSG_RESULT([dtrace doesn't support -h option, dtrace support disabled.])
enable_dtrace=no
fi
fi
@@ -1884,31 +1763,6 @@ fi
AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes])
AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes])
dnl **************
dnl *** LLVM ***
dnl **************
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the experimental LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
if test "x$enable_llvm" = "xyes"; then
AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
if test "x$LLVM_CONFIG" = "xno"; then
AC_MSG_ERROR([llvm-config not found.])
fi
LLVM_CXXFLAGS=`$LLVM_CONFIG --cflags`
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit x86codegen`
LLVM_LIBS="$LLVM_LDFLAGS $LLVM_LIBS -lstdc++"
AC_SUBST(LLVM_CXXFLAGS)
AC_SUBST(LLVM_LIBS)
AC_SUBST(LLVM_LDFLAGS)
AC_DEFINE(ENABLE_LLVM, 1, [Enable the LLVM back end])
fi
AM_CONDITIONAL(ENABLE_LLVM, [test x$enable_llvm = xyes])
TARGET="unknown"
ACCESS_UNALIGNED="yes"
@@ -2104,26 +1958,6 @@ case "$host" in
;;
esac
# FIXME: Define the others as well
case "$TARGET" in
X86)
AC_DEFINE(TARGET_X86, 1, [...])
;;
AMD64)
AC_DEFINE(TARGET_AMD64, 1, [...])
;;
ARM)
AC_DEFINE(TARGET_ARM, 1, [...])
;;
POWERPC)
AC_DEFINE(TARGET_POWERPC, 1, [...])
;;
POWERPC64)
AC_DEFINE(TARGET_POWERPC, 1, [...])
AC_DEFINE(TARGET_POWERPC64, 1, [...])
;;
esac
if test "x$sizeof_register" = "x4"; then
AC_DEFINE(SIZEOF_REGISTER,4,[size of machine integer registers])
elif test "x$sizeof_register" = "x8"; then
@@ -2132,19 +1966,11 @@ else
AC_DEFINE(SIZEOF_REGISTER,SIZEOF_VOID_P,[size of machine integer registers])
fi
if test "x$target_byte_order" = "xG_BIG_ENDIAN"; then
AC_DEFINE(TARGET_BYTE_ORDER,G_BIG_ENDIAN,[byte order of target])
elif test "x$target_byte_order" = "xG_LITTLE_ENDIAN"; then
AC_DEFINE(TARGET_BYTE_ORDER,G_LITTLE_ENDIAN,[byte order of target])
else
AC_DEFINE(TARGET_BYTE_ORDER,G_BYTE_ORDER,[byte order of target])
fi
if test "x$have_visibility_hidden" = "xyes"; then
AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
fi
AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT (defaults to no)],[
AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT],[
if test x$withval = xyes; then
jit_wanted=true
else
@@ -2152,7 +1978,7 @@ AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts
fi
])
AC_ARG_WITH(interp, [ --with-interp=yes,no If you want to build scripts that default to the interpreter (defaults to no)],[
AC_ARG_WITH(interp, [ --with-interp=yes,no If you want to build scripts that default to the interpreter],[
if test x$withval = xyes; then
interp_wanted=true
else
@@ -2254,9 +2080,6 @@ if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86" -o "x$TARGET" = "xALPHA"; t
*-*-*linux*)
mono_debugger_supported=yes
;;
*86-apple-darwin*)
mono_debugger_supported=yes
;;
esac
fi
fi
@@ -2324,13 +2147,22 @@ case "x$gc" in
;;
esac
AC_ARG_WITH(profile2, [ --with-profile2=yes,no If you want to install the 2.0 FX (defaults to yes)], [], [with_profile2=yes])
AC_ARG_WITH(profile4, [ --with-profile4=yes,no If you want to install the 4.0 FX (defaults to no)], [], [with_profile4=no])
AC_ARG_WITH(moonlight, [ --with-moonlight=yes,no If you want to build the Moonlight 2.1 assemblies (defaults to yes)], [], [with_moonlight=yes])
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the raw MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
PREVIEW=yes
AC_ARG_WITH(preview, [ --with-preview=yes,no If you want to install the 2.0 FX preview],[
if test x$with_preview = xno; then
PREVIEW=no
fi
])
MOONLIGHT=yes
AC_ARG_WITH(moonlight,[ --with-moonlight=yes,no If you want to build the Moonlight 2.1 assemblies],[
if test x$with_moonlight = xno; then
MOONLIGHT=no
fi
])
OPROFILE=no
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to NO)],[
if test x$with_oprofile != xno; then
oprofile_include=$with_oprofile/include
if test ! -f $oprofile_include/opagent.h; then
@@ -2344,7 +2176,7 @@ AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprof
])
MALLOC_MEMPOOLS=no
AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)],[
AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to NO)],[
if test x$with_malloc_mempools = xyes; then
MALLOC_MEMPOOLS=yes
AC_DEFINE(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation])
@@ -2353,33 +2185,20 @@ AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for eac
DISABLE_MCS_DOCS=no
AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the documentation under mcs (defaults to yes)],[
AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the documentation under mcs (defaults to YES)],[
if test x$with_mcs_docs != xyes; then
DISABLE_MCS_DOCS=yes
fi
])
dnl
dnl Consistency settings
dnl
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
DISABLE_MCS_DOCS=yes
docs_dir=""
else
docs_dir=docs
fi
AC_SUBST(docs_dir)
AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
AC_SUBST(OPROFILE_CFLAGS)
AC_SUBST(OPROFILE_LIBS)
libmono_ldflags="$libmono_ldflags $LIBS"
AM_CONDITIONAL(INSTALL_2_0, [test "x$with_profile2" = xyes])
AM_CONDITIONAL(INSTALL_2_1, [test "x$with_moonlight" = xyes])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" = xyes])
AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
AM_CONDITIONAL(INSTALL_2_1, test x$MOONLIGHT = xyes)
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
@@ -2510,42 +2329,13 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f machine.config
$LN_S $reldir/data/net_4_0/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f web.config
$LN_S $reldir/data/net_4_0/web.config web.config
cd $depth
],[LN_S='$LN_S'])
if test x$enable_quiet_build = xyes; then
AC_CONFIG_COMMANDS([quiet], [for i in `find mono libgc support -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/scripts/patch-quiet.sh $i; fi; done], [shell=$SHELL])
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
fi
AC_OUTPUT([
Makefile
mono-core.spec
mono-uninstalled.pc
scripts/mono-find-provides
scripts/mono-find-requires
@@ -2555,6 +2345,7 @@ mono/metadata/Makefile
mono/dis/Makefile
mono/cil/Makefile
mono/arch/Makefile
mono/os/Makefile
mono/arch/x86/Makefile
mono/arch/amd64/Makefile
mono/arch/hppa/Makefile
@@ -2589,7 +2380,6 @@ docs/Makefile
data/Makefile
data/net_1_1/Makefile
data/net_2_0/Makefile
data/net_4_0/Makefile
data/net_2_0/Browsers/Makefile
data/mint.pc
data/mono.pc
@@ -2598,14 +2388,13 @@ data/mono-nunit.pc
data/mono-options.pc
data/mono-lineeditor.pc
data/monodoc.pc
data/mono.web.pc
data/dotnet.pc
data/dotnet35.pc
data/wcf.pc
data/cecil.pc
data/smcs.pc
data/system.web.extensions_1.0.pc
data/system.web.extensions.design_1.0.pc
data/system.web.mvc.pc
samples/Makefile
support/Makefile
data/config
@@ -2688,7 +2477,7 @@ fi
echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$olivedir/build/config.make
echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$olivedir/build/config.make
echo "MONO_VERSION = $myver" >> $srcdir/$olivedir/build/config.make
if test x$with_moonlight = xyes; then
if test x$with_moonlight = xyes; then
echo "WITH_MOONLIGHT = yes" >> $srcdir/$olivedir/build/config.make
fi
fi
@@ -2706,14 +2495,11 @@ echo "
olive source: $olive_topdir
GC: $gc
GLIB: $with_glib
TLS: $with_tls
SIGALTSTACK: $with_sigaltstack
Engine: $jit_status
2.0 Profile: $with_profile2
Moon Profile: $with_moonlight
4.0 Alpha: $with_profile4
MonoTouch: $with_monotouch
2.0 Beta: $PREVIEW
2.1 Alpha: $MOONLIGHT
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
zlib: $zlib_msg
@@ -2721,7 +2507,6 @@ echo "
BigArrays: $enable_big_arrays
DTrace: $enable_dtrace
Parallel Mark: $enable_parallel_mark
LLVM Back End: $enable_llvm
$disabled
"
@@ -2737,9 +2522,3 @@ if test x$gc = xsgen; then
echo IMPORTANT:
echo IMPORTANT: There are known problems with it, use at your own risk.
fi
if test x$enable_llvm = xyes; then
echo IMPORTANT:
echo IMPORTANT: The LLVM Back End is experimental and has known problems.
echo IMPORTANT:
fi
-5
View File
@@ -1,5 +0,0 @@
/Makefile.in
/Makefile
/config
/.cvsignore
/*.pc
+9 -17
View File
@@ -1,40 +1,32 @@
SUBDIRS = net_1_1 net_2_0
if INSTALL_4_0
SUBDIRS += net_4_0
endif
monodir = $(sysconfdir)/mono
EXTRA_DIST = \
config.in \
browscap.ini mono.supp mono.d README \
mono.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in \
mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in smcs.pc.in \
mono-lineeditor.pc.in system.web.extensions_1.0.pc.in system.web.extensions.design_1.0.pc.in\
dtrace-prelink.sh mono.web.pc.in system.web.mvc.pc.in \
gdb/mono-gdb.py
dtrace-prelink.sh
pkgconfigdir = $(libdir)/pkgconfig
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc
pkgconfig_DATA= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc
else
pkgconfig_DATA= mono.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc
pkgconfig_DATA= mono.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc
endif
else
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.pc monodoc.pc mono-lineeditor.pc
endif
DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc
DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc
mono_DATA = config \
browscap.ini
gdbdir = $(bindir)
gdb_DATA = gdb/mono-gdb.py
+6723 -5094
View File
File diff suppressed because it is too large. Load diff
-1
View File
@@ -17,7 +17,6 @@
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
<dllmap dll="libX11" target="@X11@" os="!windows" />
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
<dllmap dll="i:kernel32.dll">
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
<dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/>
-66
View File
@@ -1,66 +0,0 @@
2009-10-09 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoSupport.run_hook): Set MONO_XDEBUG to 'gdb' to activate
the GDB support mode in the runtime.
2009-04-14 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoClassPrinter.to_string): Add a MonoClass* pretty
printer.
2009-04-12 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoMethodPrinter.to_string): Add a MonoMethod* pretty
printer.
2009-04-10 Zoltan Varga <[email protected]>
* mono-gdb.py: Update to the latest archer api.
2009-04-07 Zoltan Varga <[email protected]>
* mono-gdb.py (ObjectPrinter.__init__): Update to latest archer api.
2009-04-06 Zoltan Varga <[email protected]>
* test-xdb.py: New file, tester script for xdb.
* mono-gdb.py (stringify_class_name): Handle classes without a namespace
correctly.
* mono-gdb.py: Update after the changes to dwarfwriter.c.
2009-04-05 Zoltan Varga <[email protected]>
* mono-gdb.py: Handle superclasses in the pretty printer.
2009-03-27 Zoltan Varga <[email protected]>
* mono-gdb.py (StringPrinter.to_string): Fix support for non-ascii characters.
2009-03-20 Zoltan Varga <[email protected]>
* mono-gdb.py: Update for the latest python API on the archer branch.
2009-02-03 Zoltan Varga <[email protected]>
* mono-gdb.py: Remove the --64 argument to as, it is not needed.
* mono-gdb.py (stringify_class_name): Helper function to print base types
using their short name. Also add a prototype implementation of registering
the hooks from python code instead of needing the mono-gdbinit file.
* gdb-python.diff: Changes against the gdb archer branch at
http://sourceware.org/gdb/wiki/PythonGdb to fix some problems/add functionality.
2009-02-03 Geoff Norton <[email protected]>
* mono-gdbinit: Hook into backtrace as hook-stop seems to crash gdb
* mono-gdb.py: Find the gdbinit name from the executable name instead of
hardcoding mono
2009-01-29 Zoltan Varga <[email protected]>
* mono-gdb.py mono-gdbinit: Support files to help debugging mono/mono apps
using a python enabled gdb.
-163
View File
@@ -1,163 +0,0 @@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 640998b..fb73e9d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-03 Zoltan Varga <[email protected]>
+
+ * cil-script.c python/python-cmd.c: Allow registration of pre/post hooks from
+ python.
+
+ * symfile.c (add_symbol_file_command): Comment out verbose messages.
+
2009-02-03 Thiago Jung Bauermann <[email protected]>
* gdb/c-lang.c (c_get_string): Remove superfluous parenthesis from
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 835d29c..3941aa5 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -299,6 +299,13 @@ execute_user_command (struct cmd_list_element *c, char *args)
static int user_call_depth = 0;
extern int max_user_call_depth;
+ /* Might be a user defined command implemented in Python */
+ if (!c->user_commands && c->func)
+ {
+ (*c->func) (c, args, FALSE);
+ return;
+ }
+
old_chain = setup_user_args (args);
cmdlines = c->user_commands;
diff --git a/gdb/python/python-cmd.c b/gdb/python/python-cmd.c
index 61d5e5d..a3fbc08 100644
--- a/gdb/python/python-cmd.c
+++ b/gdb/python/python-cmd.c
@@ -339,7 +339,8 @@ gdbpy_parse_command_name (char *text, struct cmd_list_element ***base_list,
/* Object initializer; sets up gdb-side structures for command.
- Use: __init__(NAME, CMDCLASS, [COMPLETERCLASS, [PREFIX]]).
+ Use: __init__(NAME, CMDCLASS, [completerclass=COMPLETERCLASS, prefix=PREFIX,
+ pre_hook_of=PREHOOK_OF, post_hook_of=POSTHOOK_OF]).
NAME is the name of the command. It may consist of multiple words,
in which case the final word is the name of the new command, and
@@ -354,6 +355,11 @@ gdbpy_parse_command_name (char *text, struct cmd_list_element ***base_list,
If PREFIX is True, then this command is a prefix command.
+ PREHOOK_OF is the name of a gdb command this command becomes a
+ pre-execution hook of, same as if this command was defined using
+ "define hook-<cmdname>"
+ POSTHOOK_OF is the same for post-execution hooks.
+
The documentation for the command is taken from the doc string for
the python class.
@@ -362,15 +368,18 @@ static int
cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
{
cmdpy_object *obj = (cmdpy_object *) self;
- char *name;
+ char *name, *pre_hook_of = NULL, *post_hook_of = NULL;
int cmdtype;
int completetype = -1;
char *docstring = NULL;
volatile struct gdb_exception except;
struct cmd_list_element **cmd_list;
+ struct cmd_list_element *pre_hookc = NULL, *post_hookc = NULL;
char *cmd_name, *pfx_name;
PyObject *is_prefix = NULL;
int cmp;
+ static char *kwlist[] = {"name", "cmdclass", "completerclass", "prefix",
+ "pre_hook_of", "post_hook_of", NULL};
if (obj->command)
{
@@ -381,8 +390,9 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
return -1;
}
- if (! PyArg_ParseTuple (args, "si|iO", &name, &cmdtype,
- &completetype, &is_prefix))
+ if (! PyArg_ParseTupleAndKeywords (args, kwds, "si|iOss", kwlist, &name, &cmdtype,
+ &completetype, &is_prefix, &pre_hook_of,
+ &post_hook_of))
return -1;
if (cmdtype != no_class && cmdtype != class_run
@@ -402,6 +412,30 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
return -1;
}
+ if (pre_hook_of)
+ {
+ char *text = pre_hook_of;
+
+ pre_hookc = lookup_cmd_1 (&text, cmdlist, NULL, 1);
+ if (! pre_hookc)
+ {
+ PyErr_Format (PyExc_RuntimeError, _("command name given by pre_hook argument not found"));
+ return -1;
+ }
+ }
+
+ if (post_hook_of)
+ {
+ char *text = post_hook_of;
+
+ post_hookc = lookup_cmd_1 (&text, cmdlist, NULL, 1);
+ if (! post_hookc)
+ {
+ PyErr_Format (PyExc_RuntimeError, _("command name given by post_hook argument not found"));
+ return -1;
+ }
+ }
+
cmd_name = gdbpy_parse_command_name (name, &cmd_list, &cmdlist);
if (! cmd_name)
return -1;
@@ -470,6 +504,18 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
cmd->func = cmdpy_function;
cmd->destroyer = cmdpy_destroyer;
+ if (pre_hookc)
+ {
+ pre_hookc->hook_pre = cmd;
+ cmd->hookee_pre = pre_hookc;
+ }
+
+ if (post_hookc)
+ {
+ post_hookc->hook_post = cmd;
+ cmd->hookee_post = post_hookc;
+ }
+
obj->command = cmd;
set_cmd_context (cmd, self);
set_cmd_completer (cmd, ((completetype == -1) ? cmdpy_completer
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 14cb7b8..6d0bb40 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2196,7 +2196,7 @@ add_symbol_file_command (char *args, int from_tty)
statements because hex_string returns a local static
string. */
- printf_unfiltered (_("add symbol table from file \"%s\" at\n"), filename);
+ /* printf_unfiltered (_("add symbol table from file \"%s\" at\n"), filename); */
section_addrs = alloc_section_addr_info (section_index);
make_cleanup (xfree, section_addrs);
for (i = 0; i < section_index; i++)
@@ -2211,7 +2211,7 @@ add_symbol_file_command (char *args, int from_tty)
entered on the command line. */
section_addrs->other[sec_num].name = sec;
section_addrs->other[sec_num].addr = addr;
- printf_unfiltered ("\t%s_addr = %s\n", sec, paddress (addr));
+ /* printf_unfiltered ("\t%s_addr = %s\n", sec, paddress (addr)); */
sec_num++;
/* The object's sections are initialized when a
-247
View File
@@ -1,247 +0,0 @@
#
# Author: Zoltan Varga ([email protected])
# License: MIT/X11
#
#
# This is a mono support mode for a python-enabled gdb:
# http://sourceware.org/gdb/wiki/PythonGdb
# Usage:
# - copy/symlink this file, plus mono-gdbinit to the directory where the mono
# executable lives.
# - run mono under gdb, or attach to a mono process using gdb
# - Type 'xdb' in gdb to load/reload the debugging info emitted by the runtime.
# - The debug info is emitted to a file called xdb.s in the current working directory.
# When attaching to a mono process, make sure you are in the same directory.
#
import os
class StringPrinter:
"Print a C# string"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "null"
obj = self.val.cast (gdb.lookup_type ("MonoString").pointer ()).dereference ()
len = obj ['length']
chars = obj ['chars']
i = 0
res = ['"']
while i < len:
val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
if val >= 256:
c = "\u%X" % val
else:
c = chr (val)
res.append (c)
i = i + 1
res.append ('"')
return ''.join (res)
def stringify_class_name(ns, name):
if ns == "System":
if name == "Byte":
return "byte"
if name == "String":
return "string"
if ns == "":
return name
else:
return "%s.%s" % (ns, name)
class ArrayPrinter:
"Print a C# array"
def __init__(self, val, class_ns, class_name):
self.val = val
self.class_ns = class_ns
self.class_name = class_name
def to_string(self):
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
length = obj ['max_length']
return "%s [%d]" % (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
class ObjectPrinter:
"Print a C# object"
def __init__(self, val):
if str(val.type)[-1] == "&":
self.val = val.address.cast (gdb.lookup_type ("MonoObject").pointer ())
else:
self.val = val.cast (gdb.lookup_type ("MonoObject").pointer ())
class _iterator:
def __init__(self,obj):
self.obj = obj
self.iter = self.obj.type.fields ().__iter__ ()
pass
def __iter__(self):
return self
def next(self):
field = self.iter.next ()
try:
if str(self.obj [field.name].type) == "object":
# Avoid recursion
return (field.name, self.obj [field.name].cast (gdb.lookup_type ("void").pointer ()))
else:
return (field.name, self.obj [field.name])
except:
# Superclass
return (field.name, self.obj.cast (gdb.lookup_type ("%s" % (field.name))))
def children(self):
# FIXME: It would be easier if gdb.Value would support iteration itself
# It would also be better if we could return None
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return {}.__iter__ ()
try:
obj = self.val.dereference ()
class_ns = obj ['vtable'].dereference ()['klass'].dereference ()['name_space'].string ()
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_name [-2:len(class_name)] == "[]":
return {}.__iter__ ()
gdb_type = gdb.lookup_type ("struct %s_%s" % (class_ns.replace (".", "_"), class_name))
return self._iterator(obj.cast (gdb_type))
except:
print sys.exc_info ()[0]
print sys.exc_info ()[1]
return {}.__iter__ ()
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "null"
try:
obj = self.val.dereference ()
class_ns = obj ['vtable'].dereference ()['klass'].dereference ()['name_space'].string ()
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_ns == "System" and class_name == "String":
return StringPrinter (self.val).to_string ()
if class_name [-2:len(class_name)] == "[]":
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
if class_ns != "":
try:
gdb_type = gdb.lookup_type ("struct %s.%s" % (class_ns, class_name))
except:
# Maybe there is no debug info for that type
return "%s.%s" % (class_ns, class_name)
#return obj.cast (gdb_type)
return "%s.%s" % (class_ns, class_name)
return class_name
except:
print sys.exc_info ()[0]
print sys.exc_info ()[1]
# FIXME: This can happen because we don't have liveness information
return self.val.cast (gdb.lookup_type ("guint64"))
class MonoMethodPrinter:
"Print a MonoMethod structure"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "0x0"
val = self.val.dereference ()
klass = val ["klass"].dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s:%s ()\"" % (class_name, val ["name"].string ())
# This returns more info but requires calling into the inferior
#return "\"%s\"" % (gdb.parse_and_eval ("mono_method_full_name (%s, 1)" % (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
class MonoClassPrinter:
"Print a MonoClass structure"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "0x0"
klass = self.val.dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s\"" % (class_name)
# This returns more info but requires calling into the inferior
#return "\"%s\"" % (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)" % (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
def lookup_pretty_printer(val):
t = str (val.type)
if t == "object":
return ObjectPrinter (val)
if t[0:5] == "class" and t[-1] == "&":
return ObjectPrinter (val)
if t == "string":
return StringPrinter (val)
if t == "MonoMethod *":
return MonoMethodPrinter (val)
if t == "MonoClass *":
return MonoClassPrinter (val)
return None
def register_csharp_printers(obj):
"Register C# pretty-printers with objfile Obj."
if obj == None:
obj = gdb
obj.pretty_printers.append (lookup_pretty_printer)
register_csharp_printers (gdb.current_objfile())
class MonoSupport(object):
def __init__(self):
self.s_size = 0
def run_hook(self):
if os.access ("xdb.s", os.F_OK):
os.remove ("xdb.s")
gdb.execute ("set environment MONO_XDEBUG gdb")
def stop_hook(self):
# Called when the program is stopped
# Need to recompile+reload the xdb.s file if needed
# FIXME: Need to detect half-written files created when the child is
# interrupted while executing the xdb.s writing code
# FIXME: Handle appdomain unload
if os.access ("xdb.s", os.F_OK):
new_size = os.stat ("xdb.s").st_size
if new_size > self.s_size:
sofile = "xdb.so"
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o %s xdb.o" % sofile)
# FIXME: This prints messages which couldn't be turned off
gdb.execute ("add-symbol-file %s 0" % sofile)
self.s_size = new_size
class RunHook (gdb.Command):
def __init__ (self):
super (RunHook, self).__init__ ("hook-run", gdb.COMMAND_NONE,
gdb.COMPLETE_COMMAND, pre_hook_of="run")
def invoke(self, arg, from_tty):
mono_support.run_hook ()
print "Mono support loaded."
mono_support = MonoSupport ()
# This depends on the changes in gdb-python.diff to work
#RunHook ()
# Register our hooks
# This currently cannot be done from python code
exec_file = gdb.current_objfile ().filename
# FIXME: Is there a way to detect symbolic links ?
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
exec_file = os.readlink (exec_file)
exec_dir = os.path.dirname (exec_file)
gdb.execute ("source %s/%s-gdbinit" % (exec_dir, os.path.basename (exec_file)))
-19
View File
@@ -1,19 +0,0 @@
# Tester script for the xdb functionality
# Run using gdb -P test-xdb.py <NORMAL GDB COMMAND LINE>
import sys
gdb.execute ("file %s" % sys.argv [0])
gdb.execute ("r --break *:* %s" % " ".join (sys.argv[1:len(sys.argv)]))
while True:
try:
if gdb.threads () == None:
break
gdb.execute("xdb")
gdb.execute("bt")
gdb.execute("info args")
gdb.execute("info locals")
gdb.execute("c")
except:
gdb.execute ("quit")
-54
View File
@@ -1,57 +1,3 @@
2009-10-13 Zoltan Varga <[email protected]>
* mono-gdb.py: Add an 'xdb' command to flush the debugging info.
2009-10-12 Zoltan Varga <[email protected]>
* mono-gdb.py: Update this to gdb 7.0.
* mono-gdbinit: Removed, no longer needed.
2009-10-09 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoSupport.run_hook): Set MONO_XDEBUG to 'gdb' to activate
the GDB support mode in the runtime.
2009-04-14 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoClassPrinter.to_string): Add a MonoClass* pretty
printer.
2009-04-12 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoMethodPrinter.to_string): Add a MonoMethod* pretty
printer.
2009-04-10 Zoltan Varga <[email protected]>
* mono-gdb.py: Update to the latest archer api.
2009-04-07 Zoltan Varga <[email protected]>
* mono-gdb.py (ObjectPrinter.__init__): Update to latest archer api.
2009-04-06 Zoltan Varga <[email protected]>
* test-xdb.py: New file, tester script for xdb.
* mono-gdb.py (stringify_class_name): Handle classes without a namespace
correctly.
* mono-gdb.py: Update after the changes to dwarfwriter.c.
2009-04-05 Zoltan Varga <[email protected]>
* mono-gdb.py: Handle superclasses in the pretty printer.
2009-03-27 Zoltan Varga <[email protected]>
* mono-gdb.py (StringPrinter.to_string): Fix support for non-ascii characters.
2009-03-20 Zoltan Varga <[email protected]>
* mono-gdb.py: Update for the latest python API on the archer branch.
2009-02-03 Zoltan Varga <[email protected]>
* mono-gdb.py: Remove the --64 argument to as, it is not needed.
+69 -97
View File
@@ -4,10 +4,15 @@
#
#
# This is a mono support mode for gdb 7.0 and later
# This is a mono support mode for a python-enabled gdb:
# http://sourceware.org/gdb/wiki/PythonGdb
# Usage:
# - copy/symlink this file to the directory where the mono executable lives.
# - run mono under gdb, or attach to a mono process started with --debug=gdb using gdb.
# - copy/symlink this file, plus mono-gdbinit to the directory where the mono
# executable lives.
# - run mono under gdb, or attach to a mono process using gdb
# - Type 'xdb' in gdb to load/reload the debugging info emitted by the runtime.
# - The debug info is emitted to a file called xdb.s in the current working directory.
# When attaching to a mono process, make sure you are in the same directory.
#
import os
@@ -19,20 +24,16 @@ class StringPrinter:
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
if int(self.val.cast (gdb.Type ("guint64"))) == 0:
return "null"
obj = self.val.cast (gdb.lookup_type ("MonoString").pointer ()).dereference ()
obj = self.val.cast (gdb.Type ("MonoString").pointer ()).dereference ()
len = obj ['length']
chars = obj ['chars']
i = 0
res = ['"']
while i < len:
val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
if val >= 256:
c = "\u%X" % val
else:
c = chr (val)
c = chr ((chars.cast(gdb.Type ("gint64")) + (i * 2)).cast(gdb.Type ("gunichar2").pointer ()).dereference ())
res.append (c)
i = i + 1
res.append ('"')
@@ -44,10 +45,7 @@ def stringify_class_name(ns, name):
return "byte"
if name == "String":
return "string"
if ns == "":
return name
else:
return "%s.%s" % (ns, name)
return "%s.%s" % (ns, name)
class ArrayPrinter:
"Print a C# array"
@@ -58,7 +56,7 @@ class ArrayPrinter:
self.class_name = class_name
def to_string(self):
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
obj = self.val.cast (gdb.Type ("MonoArray").pointer ()).dereference ()
length = obj ['max_length']
return "%s [%d]" % (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
@@ -66,15 +64,12 @@ class ObjectPrinter:
"Print a C# object"
def __init__(self, val):
if str(val.type)[-1] == "&":
self.val = val.address.cast (gdb.lookup_type ("MonoObject").pointer ())
else:
self.val = val.cast (gdb.lookup_type ("MonoObject").pointer ())
self.val = val
class _iterator:
def __init__(self,obj):
self.obj = obj
self.iter = self.obj.type.fields ().__iter__ ()
self.iter = self.obj.type ().fields ().__iter__ ()
pass
def __iter__(self):
@@ -82,39 +77,27 @@ class ObjectPrinter:
def next(self):
field = self.iter.next ()
try:
if str(self.obj [field.name].type) == "object":
# Avoid recursion
return (field.name, self.obj [field.name].cast (gdb.lookup_type ("void").pointer ()))
else:
return (field.name, self.obj [field.name])
except:
# Superclass
return (field.name, self.obj.cast (gdb.lookup_type ("%s" % (field.name))))
return (field.name, self.obj [field.name])
def children(self):
# FIXME: It would be easier if gdb.Value would support iteration itself
# It would also be better if we could return None
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
if int(self.val.cast (gdb.Type ("guint64"))) == 0:
return {}.__iter__ ()
try:
obj = self.val.dereference ()
obj = self.val.cast (gdb.Type ("MonoObject").pointer ()).dereference ()
class_ns = obj ['vtable'].dereference ()['klass'].dereference ()['name_space'].string ()
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_name [-2:len(class_name)] == "[]":
return {}.__iter__ ()
gdb_type = gdb.lookup_type ("struct %s_%s" % (class_ns.replace (".", "_"), class_name))
gdb_type = gdb.Type ("struct %s.%s" % (class_ns, class_name))
return self._iterator(obj.cast (gdb_type))
except:
print sys.exc_info ()[0]
print sys.exc_info ()[1]
return {}.__iter__ ()
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
if int(self.val.cast (gdb.Type ("guint64"))) == 0:
return "null"
try:
obj = self.val.dereference ()
obj = self.val.cast (gdb.Type ("MonoObject").pointer ()).dereference ()
class_ns = obj ['vtable'].dereference ()['klass'].dereference ()['name_space'].string ()
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_ns == "System" and class_name == "String":
@@ -123,7 +106,7 @@ class ObjectPrinter:
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
if class_ns != "":
try:
gdb_type = gdb.lookup_type ("struct %s.%s" % (class_ns, class_name))
gdb_type = gdb.Type ("struct %s.%s" % (class_ns, class_name))
except:
# Maybe there is no debug info for that type
return "%s.%s" % (class_ns, class_name)
@@ -134,52 +117,7 @@ class ObjectPrinter:
print sys.exc_info ()[0]
print sys.exc_info ()[1]
# FIXME: This can happen because we don't have liveness information
return self.val.cast (gdb.lookup_type ("guint64"))
class MonoMethodPrinter:
"Print a MonoMethod structure"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "0x0"
val = self.val.dereference ()
klass = val ["klass"].dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s:%s ()\"" % (class_name, val ["name"].string ())
# This returns more info but requires calling into the inferior
#return "\"%s\"" % (gdb.parse_and_eval ("mono_method_full_name (%s, 1)" % (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
class MonoClassPrinter:
"Print a MonoClass structure"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "0x0"
klass = self.val.dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s\"" % (class_name)
# This returns more info but requires calling into the inferior
#return "\"%s\"" % (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)" % (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
def lookup_pretty_printer(val):
t = str (val.type)
if t == "object":
return ObjectPrinter (val)
if t[0:5] == "class" and t[-1] == "&":
return ObjectPrinter (val)
if t == "string":
return StringPrinter (val)
if t == "MonoMethod *":
return MonoMethodPrinter (val)
if t == "MonoClass *":
return MonoClassPrinter (val)
return None
return self.val.cast (gdb.Type ("guint64"))
def register_csharp_printers(obj):
"Register C# pretty-printers with objfile Obj."
@@ -187,23 +125,57 @@ def register_csharp_printers(obj):
if obj == None:
obj = gdb
obj.pretty_printers.append (lookup_pretty_printer)
# This command will flush the debugging info collected by the runtime
class XdbCommand (gdb.Command):
def __init__ (self):
super (XdbCommand, self).__init__ ("xdb", gdb.COMMAND_NONE,
gdb.COMPLETE_COMMAND)
def invoke(self, arg, from_tty):
gdb.execute ("call mono_xdebug_flush ()")
obj.pretty_printers['object'] = ObjectPrinter
obj.pretty_printers['string'] = StringPrinter
register_csharp_printers (gdb.current_objfile())
XdbCommand ()
class MonoSupport(object):
gdb.execute ("set environment MONO_XDEBUG gdb")
def __init__(self):
self.s_size = 0
def run_hook(self):
if os.access ("xdb.s", os.F_OK):
os.remove ("xdb.s")
gdb.execute ("set environment MONO_XDEBUG 1")
def stop_hook(self):
# Called when the program is stopped
# Need to recompile+reload the xdb.s file if needed
# FIXME: Need to detect half-written files created when the child is
# interrupted while executing the xdb.s writing code
# FIXME: Handle appdomain unload
if os.access ("xdb.s", os.F_OK):
new_size = os.stat ("xdb.s").st_size
if new_size > self.s_size:
sofile = "xdb.so"
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o %s xdb.o" % sofile)
# FIXME: This prints messages which couldn't be turned off
gdb.execute ("add-symbol-file %s 0" % sofile)
self.s_size = new_size
class RunHook (gdb.Command):
def __init__ (self):
super (RunHook, self).__init__ ("hook-run", gdb.COMMAND_NONE,
gdb.COMPLETE_COMMAND, pre_hook_of="run")
def invoke(self, arg, from_tty):
mono_support.run_hook ()
print "Mono support loaded."
mono_support = MonoSupport ()
# This depends on the changes in gdb-python.diff to work
#RunHook ()
# Register our hooks
# This currently cannot be done from python code
exec_file = gdb.current_objfile ().filename
# FIXME: Is there a way to detect symbolic links ?
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
exec_file = os.readlink (exec_file)
exec_dir = os.path.dirname (exec_file)
gdb.execute ("source %s/%s-gdbinit" % (exec_dir, os.path.basename (exec_file)))
File renamed without changes.
-19
View File
@@ -1,19 +0,0 @@
# Tester script for the xdb functionality
# Run using gdb -P test-xdb.py <NORMAL GDB COMMAND LINE>
import sys
gdb.execute ("file %s" % sys.argv [0])
gdb.execute ("r --break *:* %s" % " ".join (sys.argv[1:len(sys.argv)]))
while True:
try:
if gdb.threads () == None:
break
gdb.execute("xdb")
gdb.execute("bt")
gdb.execute("info args")
gdb.execute("info locals")
gdb.execute("c")
except:
gdb.execute ("quit")
-6
View File
@@ -1,6 +0,0 @@
2009-02-19 Rodrigo Kumpera <[email protected]>
* LockTracerDecoder.cs: Initial version of the lock tracers decoder.
-519
View File
@@ -1,519 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Globalization;
using System.Runtime.InteropServices;
public enum Record {
MustNotHoldAny,
MustNotHoldOne,
MustHoldOne,
LockAcquired,
LockReleased
}
public struct LockRecord {
public SimLock lk;
public string frame;
public LockRecord (SimLock lk, string frame) {
this.lk = lk;
this.frame = frame;
}
}
public class SimThread
{
int thread;
List <LockRecord> locks = new List <LockRecord> ();
public SimThread (int t)
{
this.thread = t;
}
public bool HoldsLock (SimLock lk) {
foreach (var l in locks) {
if (l.lk == lk)
return true;
}
return false;
}
public int HoldCount (SimLock lk) {
int res = 0;
foreach (var l in locks)
if (l.lk == lk)
++res;
return res;
}
public void Lock (SimLock lk, string frame) {
foreach (LockRecord lr in locks) {
if (lk.WarnAbout (this, lr.lk))
Console.WriteLine ("WARNING: tried to acquire lock {0} at {1} while holding {2} at {3}: {4}", lk, frame, lr.lk, lr.frame, lk.GetWarningMessage (this, lr.lk));
else if (!lk.IsValid (this, lr.lk))
Console.WriteLine ("ERROR: tried to acquire lock {0} at {1} while holding {2} at {3}: {4}", lk, frame, lr.lk, lr.frame, lk.GetErrorMessage (this, lr.lk));
}
locks.Add (new LockRecord (lk, frame));
}
public void Release (SimLock lk, string frame) {
if (locks.Count == 0) {
Console.WriteLine ("ERROR: released lock {0} at {1} while holding no locks!", lk, frame);
return;
}
LockRecord top = locks [locks.Count - 1];
if (top.lk != lk && !(lk.IsGlobalLock && HoldCount (lk) > 1)) {
Console.WriteLine ("WARNING: released lock {0} at {1} out of order with {2} at {3}!", lk, frame, top.lk, top.frame);
}
for (int i = locks.Count -1; i >= 0; --i) {
if (locks [i].lk == lk) {
locks.RemoveAt (i);
break;
}
}
}
}
/*
LOCK RULES
Simple locks:
Can be acquired at any point regardless of which locks are taken or not.
No other locks can be acquired or released while holding a simple lock.
Reentrancy is not recomended. (warning)
Simple locks are leaf locks on the lock lattice.
Complex locks:
Must respect locking order, which form a lattice.
IOW, to take a given lock, only it's parents might have been taken.
Reentrancy is ok.
Locks around resources count as separate instances of the hierarchy.
Global locks:
Must respect locking order.
Must be the at the botton of the locking lattice.
Can be taken out-of-order by other locks given that it was previously acquired.
Adding global locks is not to be taken lightly.
The current lock hierarchy:
loader lock
domain lock
domain jit lock
simple locks
Examples:
You can take the loader lock without holding a domain lock.
You cannot take a domain lock if the loader lock is held.
You cannot take a domain lock while holding the lock to another domain.
*/
public enum Lock {
Invalid,
LoaderLock,
ImageDataLock,
DomainLock,
DomainAssembliesLock,
DomainJitCodeHashLock,
}
public class SimLock
{
Lock kind;
int id;
public SimLock (Lock kind, int id) {
this.kind = kind;
this.id = id;
}
static int GetLockOrder (Lock kind) {
switch (kind) {
case Lock.LoaderLock:
return 0;
case Lock.DomainLock:
return 1;
case Lock.DomainJitCodeHashLock:
return 2;
default:
return 3;
}
}
bool IsParent (SimLock other) {
return GetLockOrder (kind) > GetLockOrder (other.kind);
}
public bool IsSimpleLock {
get { return GetLockOrder (kind) == 3; }
}
public bool IsGlobalLock {
get { return kind == Lock.LoaderLock; }
}
/*locked is already owned by the thread, 'this' is the new one*/
bool Compare (SimThread thread, SimLock locked, out bool isWarning, out string msg)
{
isWarning = false;
msg = null;
if (locked != this) {
if (!IsParent (locked)) {
if (IsGlobalLock) { /*acquiring a global lock*/
if (!thread.HoldsLock (this)) { /*does the thread alread hold it?*/
msg = "Acquired a global lock after a regular lock without having it before.";
return false;
}
} else {
msg = "Hierarchy violation.";
return false;
}
}
} else if (IsSimpleLock) {
msg = "Avoid taking simple locks recursively";
isWarning = true;
return false;
}
return true;
}
public bool IsValid (SimThread thread, SimLock locked) {
bool warn;
string msg;
return Compare (thread, locked, out warn, out msg);
}
public bool WarnAbout (SimThread thread, SimLock locked) {
bool warn;
string msg;
Compare (thread, locked, out warn, out msg);
return warn;
}
public string GetWarningMessage (SimThread thread, SimLock locked) {
bool warn;
string msg;
Compare (thread, locked, out warn, out msg);
return warn ? msg : null;
}
public string GetErrorMessage (SimThread thread, SimLock locked) {
bool warn;
string msg;
bool res = Compare (thread, locked, out warn, out msg);
return !res && !warn ? msg : null;
}
public override string ToString () {
return String.Format ("{0}", kind);
}
}
public class LockSimulator
{
static Dictionary <int, SimThread> threads = new Dictionary <int, SimThread> ();
static Dictionary <int, SimLock> locks = new Dictionary <int, SimLock> ();
SymbolTable syms;
public LockSimulator (SymbolTable s) { this.syms = s; }
SimLock GetLock (Trace t) {
if (locks.ContainsKey (t.lockPtr))
return locks [t.lockPtr];
else {
return locks [t.lockPtr] = new SimLock (t.lockKind, t.lockPtr);
}
}
SimThread GetThread (Trace t) {
if (threads.ContainsKey (t.thread))
return threads [t.thread];
else
return threads [t.thread] = new SimThread (t.thread);
}
public void PlayBack (IEnumerable<Trace> traces) {
foreach (var t in traces) {
SimThread thread = GetThread (t);
SimLock lk = GetLock (t);
string frame = t.GetUsefullTopTrace (this.syms);
switch (t.record) {
case Record.MustNotHoldAny:
case Record.MustNotHoldOne:
case Record.MustHoldOne:
throw new Exception ("not supported");
case Record.LockAcquired:
thread.Lock (lk, frame);
break;
case Record.LockReleased:
thread.Release (lk, frame);
break;
default:
throw new Exception ("Invalid trace record: "+t.record);
}
}
}
}
public class Trace {
public int thread;
public Record record;
public Lock lockKind;
public int lockPtr;
int[] frames;
static readonly string[] BAD_FRAME_METHODS = new string[] {
"mono_loader_lock",
"mono_loader_unlock",
"mono_image_lock",
"mono_image_unlock",
};
public Trace (string[] fields) {
thread = fields [0].ParseHex ();
record = (Record)fields [1].ParseDec ();
lockKind = (Lock)fields [2].ParseDec ();
lockPtr = fields [3].ParseHex ();
frames = new int [fields.Length - 4];
for (int i = 0; i < frames.Length; ++i)
frames [i] = fields [i + 4].ParseHex ();
}
public void Dump (SymbolTable table) {
Console.WriteLine ("{0:x} {1} {2} {3:x}", thread, record, lockKind, lockPtr);
for (int i = 0; i < frames.Length; ++i)
Console.WriteLine ("\t{0}", table.Translate (frames [i]));
}
public string GetUsefullTopTrace (SymbolTable syms) {
for (int i = 0; i < frames.Length; ++i) {
string str = syms.Translate (frames [i]);
bool ok = true;
for (int j = 0; j < BAD_FRAME_METHODS.Length; ++j) {
if (str.IndexOf (BAD_FRAME_METHODS [j]) >= 0) {
ok = false;
break;
}
}
if (ok)
return str;
}
return "[unknown]";
}
}
public class Symbol : IComparable<Symbol>
{
public int offset;
public int size;
public string name;
public Symbol (int o, int size, string n) {
this.offset = o;
this.size = size;
this.name = n;
}
public int CompareTo(Symbol other) {
return offset - other.offset;
}
}
public interface SymbolTable {
string Translate (int offset);
}
public class OsxSymbolTable : SymbolTable
{
Symbol[] table;
const int MAX_FUNC_SIZE = 0x20000;
public OsxSymbolTable (string binary) {
Load (binary);
}
void Load (string binary) {
ProcessStartInfo psi = new ProcessStartInfo ("gobjdump", "-t "+binary);
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
var proc = Process.Start (psi);
var list = new List<Symbol> ();
string line;
while ((line = proc.StandardOutput.ReadLine ()) != null) {
string[] fields = line.Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
if (fields.Length < 4)
continue;
if (!(fields [1].Equals ("g") || fields [1].Equals ("d")))
continue;
if (!fields [2].Equals ("*UND*"))
continue;
int offset = fields [0].ParseHex ();
string name = fields [3];
if (offset != 0)
list.Add (new Symbol (offset, 0, name));
}
table = new Symbol [list.Count];
list.CopyTo (table, 0);
Array.Sort (table);
}
public string Translate (int offset) {
Symbol sym = null;
int res = Array.BinarySearch (table, new Symbol (offset, 0, null));
if (res >= 0)
return table [res].name;
res = ~res;
if (res >= table.Length)
sym = table [table.Length - 1];
else if (res != 0)
sym = table [res - 1];
if (sym != null) {
int size = Math.Max (sym.size, 10);
if (offset - sym.offset < size)
return sym.name;
}
return String.Format ("[{0:x}]", offset);
}
}
public class LinuxSymbolTable : SymbolTable
{
Symbol[] table;
const int MAX_FUNC_SIZE = 0x20000;
public LinuxSymbolTable (string binary) {
Load (binary);
}
void Load (string binary) {
ProcessStartInfo psi = new ProcessStartInfo ("objdump", "-t "+binary);
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
var proc = Process.Start (psi);
var list = new List<Symbol> ();
string line;
while ((line = proc.StandardOutput.ReadLine ()) != null) {
string[] fields = line.Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
if (fields.Length < 6)
continue;
if (fields [3] != ".text" || fields [2] != "F")
continue;
int offset = fields [0].ParseHex ();
int size = fields [4].ParseHex ();
string name = fields [fields.Length - 1];
if (offset != 0)
list.Add (new Symbol (offset, size, name));
}
table = new Symbol [list.Count];
list.CopyTo (table, 0);
Array.Sort (table);
}
public string Translate (int offset) {
Symbol sym = null;
int res = Array.BinarySearch (table, new Symbol (offset, 0, null));
if (res >= 0)
return table [res].name;
res = ~res;
if (res >= table.Length)
sym = table [table.Length - 1];
else if (res != 0)
sym = table [res - 1];
if (sym != null && offset - sym.offset < MAX_FUNC_SIZE)
return sym.name;
return String.Format ("[{0:x}]", offset);
}
}
public class TraceDecoder
{
string file;
public TraceDecoder (string file) {
this.file = file;
}
public IEnumerable<Trace> GetTraces () {
using (StreamReader reader = new StreamReader (file)) {
string line;
while ((line = reader.ReadLine ()) != null) {
string[] fields = line.Split(new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
if (fields.Length >= 7) {
yield return new Trace (fields);
}
}
}
}
}
public class Driver
{
[DllImport ("libc")]
static extern int uname (IntPtr buf);
static bool IsOSX ()
{
bool isOsx = false;
IntPtr buf = Marshal.AllocHGlobal (8192);
if (uname (buf) == 0) {
string os = Marshal.PtrToStringAnsi (buf);
isOsx = os == "Darwin";
}
Marshal.FreeHGlobal (buf);
return isOsx;
}
static void Main (string[] args) {
SymbolTable syms;
if (args.Length != 2) {
Console.WriteLine ("usage: LockTracerDecoder.exe /path/to/mono /path/to/locks.pid");
return;
}
if (IsOSX ())
syms = new OsxSymbolTable (args [0]);
else
syms = new LinuxSymbolTable (args [0]);
var decoder = new TraceDecoder (args [1]);
var sim = new LockSimulator (syms);
sim.PlayBack (decoder.GetTraces ());
}
}
public static class Utils
{
public static int ParseHex (this string number) {
while (number.Length > 1 && (number [0] == '0' || number [0] == 'x' || number [0] == 'X'))
number = number.Substring (1);
return int.Parse (number, NumberStyles.HexNumber);
}
public static int ParseDec (this string number) {
while (number.Length > 1 && number [0] == '0')
number = number.Substring (1);
return int.Parse (number);
}
}
-4
View File
@@ -1,4 +0,0 @@
Name: Mono.Web
Description: Mono ASP.NET extension classes
Version: 2.0.0.0
Libs: -r:@prefix@/lib/mono/gac/Mono.Web/2.0.0.0__0738eb9f132ed756/Mono.Web.dll
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-27
View File
@@ -1,30 +1,3 @@
2009-08-11 Gonzalo Paniagua Javier <[email protected]>
* DefaultWsdlHelpGenerator.aspx: the 'Message Layout' can now handle
self-referencing types. Fixes bug #529353.
2009-08-05 Atsushi Enomoto <[email protected]>
* web.config: add WCF assemblies as references at compilation.
* machine.config: add some missing WCF sections (new in 3.5).
2009-05-28 Atsushi Enomoto <[email protected]>
* machine.config: fix WCF diagnostics section name.
2009-03-31 Marek Habersack <[email protected]>
* DefaultWsdlHelpGenerator.aspx: the link element in <head> must
be created using Response.Write, as the code expression in the
href attribute is otherwise treated verbatim. This is the same as
with .NET. Fixes bug #490497
2009-03-27 Gonzalo Paniagua Javier <[email protected]>
* DefaultWsdlHelpGenerator.aspx: disable the test form
when only Soap is supported.
Bug #342073 fixed.
2009-01-23 Atsushi Enomoto <[email protected]>
* web.config : added .svc handler.
+9 -27
View File
@@ -10,7 +10,6 @@
--%>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml.Serialization" %>
<%@ Import Namespace="System.Xml" %>
@@ -123,20 +122,15 @@ void BuildOperationInfo ()
// Protocols supported by the operation
CurrentOperationProtocols = "";
WebServiceProtocols testProtocols = 0;
ArrayList prots = FindServiceProtocols (CurrentOperationName);
for (int n=0; n<prots.Count; n++) {
string prot = (string) prots [n];
if (n != 0) CurrentOperationProtocols += ", ";
CurrentOperationProtocols += prot;
if (prot == "HttpGet")
testProtocols |= WebServiceProtocols.HttpGet;
else if (prot == "HttpPost") {
testProtocols |= WebServiceProtocols.HttpPost;
if (Context.Request.IsLocal)
testProtocols |= WebServiceProtocols.HttpPostLocalhost;
}
CurrentOperationProtocols += (string) prots[n];
}
WebServiceProtocols testProtocols = WebServiceProtocols.HttpGet | WebServiceProtocols.HttpPost;
if (Context.Request.IsLocal)
testProtocols |= WebServiceProtocols.HttpPostLocalhost;
CurrentOperationSupportsTest = (WebServicesSection.Current.EnabledProtocols & testProtocols) != 0;
// Operation format
@@ -1036,7 +1030,7 @@ public class HtmlSampleGenerator: SampleGenerator
if (elem == null) throw new InvalidOperationException ("Element not found: " + qname);
WriteElementSample (xtw, qname.Namespace, elem);
}
void WriteElementSample (XmlTextWriter xtw, string ns, XmlSchemaElement elem)
{
bool sharedAnnType = false;
@@ -1130,18 +1124,9 @@ public class HtmlSampleGenerator: SampleGenerator
{
WriteAttributes (xtw, stype.Attributes, stype.AnyAttribute);
}
Dictionary<XmlSchemaComplexType,int> recursed_types = new Dictionary<XmlSchemaComplexType,int> ();
void WriteComplexTypeElements (XmlTextWriter xtw, string ns, XmlSchemaComplexType stype)
{
int prev = 0;
if (recursed_types.ContainsKey (stype))
prev = recursed_types [stype];
if (prev > 1)
return;
recursed_types [stype] = ++prev;
if (stype.Particle != null)
WriteParticleComplexContent (xtw, ns, stype.Particle);
else
@@ -1151,8 +1136,6 @@ public class HtmlSampleGenerator: SampleGenerator
else if (stype.ContentModel is XmlSchemaComplexContent)
WriteComplexContent (xtw, ns, (XmlSchemaComplexContent)stype.ContentModel);
}
prev = recursed_types [stype];
recursed_types [stype] = --prev;
}
void WriteAttributes (XmlTextWriter xtw, XmlSchemaObjectCollection atts, XmlSchemaAnyAttribute anyat)
@@ -1533,9 +1516,8 @@ public class HtmlSampleGenerator: SampleGenerator
</script>
<head runat="server">
<%
Response.Write ("<link rel=\"alternate\" type=\"text/xml\" href=\"" + Request.FilePath + "?disco\"/>");
%>
<link rel="alternate" type="text/xml" href="<%=Request.FilePath%>?disco"/>
<title><%=WebServiceName%> Web Service</title>
<style type="text/css">
BODY { font-family: Arial; margin-left: 20px; margin-top: 20px; font-size: x-small}
+1 -17
View File
@@ -79,13 +79,12 @@
<section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="diagnostic" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<connectionStrings>
@@ -253,21 +252,6 @@
</providers>
</profile>
</system.web>
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="enableWebScript" type="System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttp" type="System.ServiceModel.Configuration.WebHttpElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</behaviorExtensions>
<bindingElementExtensions>
<add name="webMessageEncoding" type="System.ServiceModel.Configuration.WebMessageEncodingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingElementExtensions>
<bindingExtensions>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
</extensions>
</system.serviceModel>
</configuration>
-4
View File
@@ -95,10 +95,6 @@
<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
-9
View File
@@ -1,9 +0,0 @@
2009-08-06 Atsushi Enomoto <[email protected]>
* web.config: add WCF assemblies as references at compilation.
* machine.config: add some missing WCF sections (new in 3.5).
2009-07-24 Jb Evain <[email protected]>
* Initial import of the net_4_0 specific files.
-12
View File
@@ -1,12 +0,0 @@
SUBDIRS =
monodir = $(sysconfdir)/mono/4.0
EXTRA_DIST = machine.config \
web.config \
settings.map
mono_DATA = machine.config \
web.config \
settings.map
-274
View File
@@ -1,274 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
<section name="assemblyBinding" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="satelliteassemblies" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<section name="system.windows.forms" type="System.Windows.Forms.WindowsFormsSection, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="deployment" type="System.Web.Configuration.DeploymentSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" />
<section name="globalization" type="System.Web.Configuration.GlobalizationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="healthMonitoring" type="System.Web.Configuration.HealthMonitoringSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="hostingEnvironment" type="System.Web.Configuration.HostingEnvironmentSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
<section name="httpCookies" type="System.Web.Configuration.HttpCookiesSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="identity" type="System.Web.Configuration.IdentitySection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="membership" type="System.Web.Configuration.MembershipSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="mobileControls" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="deviceFilters" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="pages" type="System.Web.Configuration.PagesSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="processModel" type="System.Web.Configuration.ProcessModelSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" allowLocation="false" />
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="securityPolicy" type="System.Web.Configuration.SecurityPolicySection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
<section name="sessionPageState" type="System.Web.Configuration.SessionPageStateSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="trust" type="System.Web.Configuration.TrustSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
<section name="urlMappings" type="System.Web.Configuration.UrlMappingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webParts" type="System.Web.Configuration.WebPartsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="xhtmlConformance" type="System.Web.Configuration.XhtmlConformanceSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
</sectionGroup>
<section name="monoSettings" type="System.Web.Configuration.MonoSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
<sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="authenticationModules" type="System.Net.Configuration.AuthenticationModulesSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="defaultProxy" type="System.Net.Configuration.DefaultProxySection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<sectionGroup name="mailSettings" type="System.Net.Configuration.MailSettingsSectionGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="smtp" type="System.Net.Configuration.SmtpSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="requestCaching" type="System.Net.Configuration.RequestCachingSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="settings" type="System.Net.Configuration.SettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="webRequestModules" type="System.Net.Configuration.WebRequestModulesSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
<add name="LocalSqliteServer" connectionString="Data Source=|DataDirectory|/aspnetdb.sqlite;version=3" providerName="Mono.Data.Sqlite"/>
</connectionStrings>
<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
<providers>
<add name="RsaProtectedConfigurationProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" keyContainerName="MonoFrameworkConfigurationKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
<add name="DataProtectionConfigurationProvider" type="System.Configuration.DpapiProtectedConfigurationProvider, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" useMachineProtection="true" keyEntropy="" />
</providers>
</configProtectedData>
<system.net>
<authenticationModules>
<add type="System.Net.BasicClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.DigestClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.NtlmClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</authenticationModules>
<webRequestModules>
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
<settings>
<ipv6 enabled="false"/>
</settings>
</system.net>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http client" displayName="http client (delay loaded)" delayLoadAsClientChannel="true" />
<channel ref="tcp client" displayName="tcp client (delay loaded)" delayLoadAsClientChannel="true" />
<channel ref="ipc client" displayName="ipc client (delay loaded)" delayLoadAsClientChannel="true" />
</channels>
</application>
<channels>
<channel id="http" type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http client" type="System.Runtime.Remoting.Channels.Http.HttpClientChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http server" type="System.Runtime.Remoting.Channels.Http.HttpServerChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp" type="System.Runtime.Remoting.Channels.Tcp.TcpChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp client" type="System.Runtime.Remoting.Channels.Tcp.TcpClientChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp server" type="System.Runtime.Remoting.Channels.Tcp.TcpServerChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc" type="System.Runtime.Remoting.Channels.Ipc.IpcChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc client" type="System.Runtime.Remoting.Channels.Ipc.IpcClientChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc server" type="System.Runtime.Remoting.Channels.Ipc.IpcServerChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</channels>
<channelSinkProviders>
<clientProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</clientProviders>
<serverProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<provider id="wsdl" type="System.Runtime.Remoting.MetadataServices.SdlChannelSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</serverProviders>
</channelSinkProviders>
</system.runtime.remoting>
<appSettings>
<!--<add key="yourkey" value="your value" /> -->
<!--<remove key="a key defined higher in the hierarchy" /> -->
<!--<clear/> Removes all defined settings -->
</appSettings>
<system.diagnostics>
<trace autoflush="false" indentsize="4" />
</system.diagnostics>
<system.drawing>
</system.drawing>
<system.data>
<DbProviderFactories>
<add name="Mono Sqlite Data Provider" invariant="Mono.Data.SqliteClient"
description="Mono Framework Data Provider for SQLite (old version)"
type="Mono.Data.SqliteClient.SqliteFactory, Mono.Data.SqliteClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"/>
<add name="Mono Sqlite Provider" invariant="Mono.Data.Sqlite"
description="Mono Framework Data Provider for SQLite (new version)"
type="Mono.Data.Sqlite.SqliteFactory, Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"/>
<add name="Odbc Data Provider" invariant="System.Data.Odbc"
description=".Net Framework Data Provider for Odbc"
type="System.Data.Odbc.OdbcFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OleDb Data Provider" invariant="System.Data.OleDb"
description=".Net Framework Data Provider for OleDb"
type="System.Data.OleDb.OleDbFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient"
description=".Net Framework Data Provider for Oracle"
type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="SqlClient Data Provider" invariant="System.Data.SqlClient"
description=".Net Framework Data Provider for SqlServer"
type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="Sybase Data Provider" invariant="Mono.Data.SybaseClient"
description=".Net Framework Data Provider for Sybase"
type="Mono.Data.SybaseClient.SybaseClientFactory, Mono.Data.SybaseClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"/>
</DbProviderFactories>
</system.data>
<mscorlib>
<cryptographySettings>
<cryptoNameMapping>
<cryptoClasses>
<cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
</cryptoClasses>
<nameEntry name="MD2" class="monoMD2" />
</cryptoNameMapping>
<oidMap>
<oidEntry OID="1.2.840.113549.2.2" name="MD2" />
<oidEntry OID="1.2.840.113549.2.2" name="Mono.Security.Cryptography.MD2Managed" />
</oidMap>
</cryptographySettings>
</mscorlib>
<strongNames>
<pubTokenMapping>
<!-- ECMA key -->
<map Token="b77a5c561934e089" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (final) key -->
<map Token="b03f5f7f11d50a3a" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (Web Service Enhancement) key -->
<map Token="31bf3856ad364e35" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- IBM (DB2 Data Provider) key -->
<map Token="7c307b91aa13d208" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Silverlight 2.0 key -->
<map Token="7cec85d7bea7798e" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
</pubTokenMapping>
</strongNames>
<system.web>
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpSoap12"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
<conformanceWarnings>
<add name="BasicProfile1_1"/>
</conformanceWarnings>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<membership>
<providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
<!-- <add name="AspNetSqlMembershipProvider" type="Mainsoft.Web.Security.GenericMembershipProvider, Mainsoft.Web.Security" applicationName="/" connectionStringName="LocalSqlServer" /> -->
</providers>
</membership>
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" connectionStringName="LocalSqlServer" />
<!-- <add name="AspNetSqlRoleProvider" type="Mainsoft.Web.Security.GenericRoleProvider, Mainsoft.Web.Security" applicationName="/" connectionStringName="LocalSqlServer" /> -->
</providers>
</roleManager>
<profile>
<providers>
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>
</system.web>
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="enableWebScript" type="System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttp" type="System.ServiceModel.Configuration.WebHttpElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</behaviorExtensions>
<bindingElementExtensions>
<add name="webMessageEncoding" type="System.ServiceModel.Configuration.WebMessageEncodingElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingElementExtensions>
<bindingExtensions>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
</extensions>
</system.serviceModel>
</configuration>
-48
View File
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<settingsMap>
<map sectionType="System.Web.Configuration.MembershipSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
mapperType="Mono.Web.Util.MembershipSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
platform="Unix">
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
any expression understood by the mapper to designate the section region to modify.
-->
<what value="providers">
<!-- 'what' can contain any number of occurrences of any three elements:
replace - replace the designated region
add - add a new entry to the region
clear - clear the region
remove - remove the designatedregion
The attributes to any of the above are freeform and are not processed by the mapper manager. They are stored verbatim for the
mapper to peruse.
-->
<replace name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqliteMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqliteServer" />
</what>
</map>
<map sectionType="System.Web.Configuration.RoleManagerSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
mapperType="Mono.Web.Util.RoleManagerSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
platform="Unix">
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
any expression understood by the mapper to designate the section region to modify.
-->
<what value="providers">
<!-- 'what' can contain any number of occurrences of any three elements:
replace - replace the designated region
add - add a new entry to the region
clear - clear the region
remove - remove the designatedregion
The attributes to any of the above are freeform and are not processed by the mapper manager. They are stored verbatim for the
mapper to peruse.
-->
<replace name="AspNetSqlRoleProvider"
type="System.Web.Security.SqliteRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqliteServer" />
</what>
</map>
</settingsMap>
-154
View File
@@ -1,154 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<monoSettings>
<compilersCompatibility>
<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/nowarn:0169"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilersCompatibility>
</monoSettings>
<authorization>
<allow users="*" />
</authorization>
<httpHandlers>
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.master" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resources" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.skin" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.browser" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.sitemap" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.webinfo" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resx" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vb" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.csproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.svc" type="System.ServiceModel.Channels.SvcHttpHandlerFactory, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="RoleManager" type="System.Web.Security.RoleManagerModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
<globalization requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8"/>
<!--
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
<pages>
<namespaces>
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<!-- <add namespace="System.Web.UI.WebControls.WebParts" /> -->
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</pages>
<webControls clientScriptsLocation="/web_scripts" />
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
<assemblies>
<!--<add assembly="mscorlib" /> -->
<add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
<expressionBuilders>
<add expressionPrefix="Resources"
type="System.Web.Compilation.ResourceExpressionBuilder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="ConnectionStrings"
type="System.Web.Compilation.ConnectionStringsExpressionBuilder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="AppSettings"
type="System.Web.Compilation.AppSettingsExpressionBuilder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</expressionBuilders>
<buildProviders>
<add extension=".aspx" type="System.Web.Compilation.PageBuildProvider" />
<add extension=".ascx" type="System.Web.Compilation.UserControlBuildProvider" />
<add extension=".master" type="System.Web.Compilation.MasterPageBuildProvider" />
<add extension=".asmx" type="System.Web.Compilation.WebServiceBuildProvider" />
<add extension=".ashx" type="System.Web.Compilation.WebHandlerBuildProvider" />
<add extension=".soap" type="System.Web.Compilation.WebServiceBuildProvider" />
<add extension=".resx" type="System.Web.Compilation.ResXBuildProvider" />
<add extension=".resources" type="System.Web.Compilation.ResourcesBuildProvider" />
<add extension=".wsdl" type="System.Web.Compilation.WsdlBuildProvider" />
<add extension=".xsd" type="System.Web.Compilation.XsdBuildProvider" />
<add extension=".js" type="System.Web.Compilation.ForceCopyBuildProvider" />
<add extension=".lic" type="System.Web.Compilation.IgnoreFileBuildProvider" />
<add extension=".licx" type="System.Web.Compilation.IgnoreFileBuildProvider" />
<add extension=".exclude" type="System.Web.Compilation.IgnoreFileBuildProvider" />
<add extension=".refresh" type="System.Web.Compilation.IgnoreFileBuildProvider" />
</buildProviders>
</compilation>
<httpRuntime executionTimeout="110"
maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="5000" />
<clientTarget>
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="downlevel" userAgent="Unknown" />
</clientTarget>
<siteMap>
<providers>
<add name="AspNetXmlSiteMapProvider"
description="Default site map provider that reads in .sitemap xml files."
type="System.Web.XmlSiteMapProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="Web.sitemap" />
</providers>
</siteMap>
</system.web>
</configuration>
+7
View File
@@ -0,0 +1,7 @@
assemblies_dir=@prefix@/lib/mono
Libraries=${assemblies_dir}/2.1/smcs.exe
Name: Mono Internal -- Do not use.
Description: Mono Internal Libraries -- Do not use
Version: @VERSION@
Libs: -r:smcs.exe
-4
View File
@@ -1,4 +0,0 @@
Name: System.Web.Mvc
Description: System.Web.Mvc - ASP.NET MVC
Version: 1.0.0.0
Libs: -r:@prefix@/lib/mono/gac/System.Web.Mvc/1.0.0.0__31bf3856ad364e35/System.Web.Mvc.dll
-10
View File
@@ -1,10 +0,0 @@
/convert.exe*
/html
/Makefile
/Makefile.in
/monoapi.tree
/monoapi.zip
/mono-file-formats.tree
/mono-file-formats.zip
/mono-tools.tree
/mono-tools.zip
+2 -1
View File
@@ -39,6 +39,7 @@ EXTRA_DIST = \
local-regalloc.txt \
magic.diff \
mini-doc.txt \
mini-porting.txt \
mono-api-metadata.html \
mono-file-formats.config\
mono-file-formats.source\
@@ -101,5 +102,5 @@ $(srcdir)/deploy/.stamp: convert.exe Makefile.am
extract: $(srcdir)/deploy/.stamp
convert.exe: convert.cs AgilityPack.dll
cd $(srcdir) && $(MAKE) PROFILE=net_1_1 -f docs.make topdir=$(mcs_topdir_from_srcdir) convert.exe
cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) convert.exe
-3
View File
@@ -1,3 +0,0 @@
/.stamp
/*.html
/api-style.css
+223
View File
@@ -0,0 +1,223 @@
-*- outline -*-
Generic code sharing
====================
* Porting
** Generic class init trampoline
The generic class init trampoline is very similar to the class init
trampoline, with the exception that the VTable of the class to be
inited is passed in a register, MONO_ARCH_VTABLE_REG. That register
can be the same as the IMT register.
The call to the generic class init trampoline is never patched because
the VTable is not constant - it depends on the type arguments of the
class/method doing the call to the trampoline. For that reason, the
trampoline needs a fast path for the case that the class is already
inited, i.e. the trampoline needs to check the initialized bit of the
MonoVTable and immediately return if it is set. See tramp-x86.c for
how to portably figure out the number of the bit in the bit-field that
needs to be checked.
Since the MONO_ARCH_VTABLE_REG is needed by the generic class init
trampoline function (in mini-trampolines.c) it needs to be saved by
the generic trampoline code in the register save block which is passed
to the trampoline. This also applies to the RGCTX fetch trampoline
(see below).
Like the normal class init trampoline, the result of the generic class
init trampoline function is not a pointer to code that needs to be
jumped to. Instead, just like for the class init trampoline, the
generic trampoline code must return to the caller instead of jumping
to the returned value. The same applies for the RGCTX fetch
trampoline (see below).
** RGCTX register
Generic shared code needs access to type information. This
information is contained in a RGCTX for non-generic methods and in an
MRGCTX for generic methods. It is passed in one of several ways,
depending on the type of the called method:
1. Non-generic non-static methods of reference types have access to
the RGCTX via the "this" argument (this->vtable->rgctx).
2. Non-generic static methods of reference types and non-generic
methods of value types need to be passed a pointer to the
caller's class's VTable in the MONO_ARCH_RGCTX_REG register.
3. Generic methods need to be passed a pointer to the MRGCTX in the
MONO_ARCH_RGCTX_REG register.
The MONO_ARCH_RGCTX_REG must not be clobbered by trampolines.
MONO_ARCH_RGCTX_REG can be the same as the IMT register for now, but
this might change in the future when we implement virtual generic
method calls (more) efficiently.
This register lifetime starts at the call site that loads it and
ends in the callee prologue when it is either discarded or stored
into a local variable.
It's better to avoid registers used for argument passing for the RGCTX
as it would make the code dealing with calling conventions code a lot
harder.
** Method prologue
Generic shared code that have a RGCTX receive it in RGCTX_REG. There
must be a check in mono_arch_emit_prolog for MonoCompile::rgctx_var
and if set store it. See mini-x86.c for reference.
** Dealing with types
Types passed to arch functions might be type parameters
(MONO_TYPE_(M)VAR) if the MonoGenericSharingContext* argument is
non-NULL. For example, an argument or return type in a method passed
to mono_arch_find_this_argument() could be a MONO_TYPE_VAR. To guard
for that case use mini_get_basic_type_from_generic() on the type. See
get_call_info() in mini-x86.c, for example.
** (M)RGCTX lazy fetch trampoline
The purpose of the lazy fetch trampoline is to fetch a slot from an
(M)RGCTX which might not be inited, yet. In the latter case, it needs
to go make a transition to unmanaged code to fill the slot. This is
the layout of a RGCTX:
+---------------------------------+
| next | slot 0 | slot 1 | slot 2 |
+--|------------------------------+
|
+-----+
| +---------------------------------
+->| next | slot 3 | slot 4 | slot 5 ....
+--|------------------------------
|
+-----+
| +------------------------------------
+->| next | slot 10 | slot 11 | slot 12 ....
+--|---------------------------------
.
.
.
For fetching a slot from a RGCTX the trampoline is passed a pointer
(as a normal integer argument) to the VTable. From there it has to
fetch the pointer to the RGCTX, which might be null. Then it has to
traverse the correct number of "next" links, each of which might be
NULL. Arriving at the right array it needs to fetch the slot, which
might also be NULL. If any of the NULL cases, the trampoline must
transition to unmanaged code to potentially setup the RGCTX and fill
the slot. Here is pseudo-code for fetching slot 11:
; vtable ptr in r1
; fetch RGCTX array 0
r2 = *(r1 + offsetof(MonoVTable, runtime_generic_context))
if r2 == NULL goto unmanaged
; fetch RGCTX array 1
r2 = *r2
if r2 == NULL goto unmanaged
; fetch RGCTX array 2
r2 = *r2
if r2 == NULL goto unmanaged
; fetch slot 11
r2 = *(r2 + 2 * sizeof (gpointer))
if r2 == NULL goto unmanaged
return r2
unmanaged:
jump unmanaged_fetch_code
The number of slots in the arrays must be obtained from the function
mono_class_rgctx_get_array_size().
The MRGCTX case is different in two aspects. First, the trampoline is
not passed a pointer to a VTable, but a pointer directly to the
MRGCTX, which is guaranteed not to be NULL (any of the next pointers
and any of the slots can be NULL, though). Second, the layout of the
first array is slightly different, in that the first two slots are
occupied by a pointers to the class's VTable and to the method's
method_inst. The next pointer is in the third slot and the first
actual slot, "slot 0", in the fourth:
+--------------------------------------------------------+
| vtable | method_inst | next | slot 0 | slot 1 | slot 2 |
+-------------------------|------------------------------+
.
.
All other arrays have the same layout as the RGCTX ones, except
possibly for their length.
The function to create the trampoline,
mono_arch_create_rgctx_lazy_fetch_trampoline(), gets passed an encoded
slot number. Use the macro MONO_RGCTX_SLOT_IS_MRGCTX to query whether
a trampoline for an MRGCTX is needed, as opposed to one for a RGCTX.
Use MONO_RGCTX_SLOT_INDEX to get the index of the slot (like 2 for
"slot 2" as above).
The unmanaged fetch code is yet another trampoline created via
mono_arch_create_specific_trampoline(), of type
MONO_TRAMPOLINE_RGCTX_LAZY_FETCH. It's given the slot number as the
trampoline argument. In addition, the pointer to the VTable/MRGCTX is
passed in MONO_ARCH_VTABLE_REG (like the VTable to the generic class
init trampoline - see above).
Like the class init and generic class init trampolines, the RGCTX
fetch trampoline code doesn't return code that must be jumped to, so,
like for those trampolines (see above), the generic trampoline code
must do a normal return instead.
* Getting generics information about a stack frame
If a method is compiled with generic sharing, its MonoJitInfo has
has_generic_jit_info set. In that case, the MonoJitInfo is followed
(after the MonoJitExceptionInfo array) by a MonoGenericJitInfo.
The MonoGenericJitInfo contains information about the location of the
this/vtable/MRGCTX variable, if the has_this flag is set. If that is
the case, there are two possibilities:
1. this_in_reg is set. this_reg is the number of the register where
the variable is stored.
2. this_in_reg is not set. The variable is stored at offset
this_offset from the address in the register with number
this_reg.
The variable can either point to the "this" object, to a vtable or to
an MRGCTX:
1. If the method is a non-generic non-static method of a reference
type, the variable points to the "this" object.
2. If the method is a non-generic static method or a non-generic
method of a value type, the variable points to the vtable of the
class.
3. If the method is a generic method, the variable points to the
MRGCTX of the method.
* Layout of the MRGCTX
The MRGCTX is a structure that starts with
MonoMethodRuntimeGenericContext, which contains a pointer to the
vtable of the class and a pointer to the MonoGenericInst with the type
arguments for the method.
* Blog posts about generic code sharing
http://schani.wordpress.com/2007/09/22/generics-sharing-in-mono/
http://schani.wordpress.com/2007/10/12/the-trouble-with-shared-generics/
http://schani.wordpress.com/2007/10/15/a-quick-generics-sharing-update/
http://schani.wordpress.com/2008/01/29/other-types/
http://schani.wordpress.com/2008/02/25/generic-types-are-lazy/
http://schani.wordpress.com/2008/03/10/sharing-static-methods/
http://schani.wordpress.com/2008/04/22/sharing-everything-and-saving-memory/
http://schani.wordpress.com/2008/06/02/sharing-generic-methods/
http://schani.wordpress.com/2008/06/27/another-generic-sharing-update/
+531
View File
@@ -0,0 +1,531 @@
Mono JIT porting guide.
Paolo Molaro ([email protected])
* Introduction
This documents describes the process of porting the mono JIT
to a new CPU architecture. The new mono JIT has been designed
to make porting easier though at the same time enable the port
to take full advantage from the new architecture features and
instructions. Knowledge of the mini architecture (described in
the mini-doc.txt file) is a requirement for understanding this
guide, as well as an earlier document about porting the mono
interpreter (available on the web site).
There are six main areas that a port needs to implement to
have a fully-functional JIT for a given architecture:
1) instruction selection
2) native code emission
3) call conventions and register allocation
4) method trampolines
5) exception handling
6) minor helper methods
To take advantage of some not-so-common processor features
(for example conditional execution of instructions as may be
found on ARM or ia64), it may be needed to develop an
high-level optimization, but doing so is not a requirement for
getting the JIT to work.
We'll see in more details each of the steps required, note,
though, that a new port may just as well start from a
cut&paste of an existing port to a similar architecture (for
example from x86 to amd64, or from powerpc to sparc).
The architecture specific code is split from the rest of the
JIT, for example the x86 specific code and data is all
included in the following files in the distribution:
mini-x86.h mini-x86.c
inssel-x86.brg
cpu-pentium.md
tramp-x86.c
exceptions-x86.c
I suggest a similar split for other architectures as well.
Note that this document is still incomplete: some sections are
only sketched and some are missing, but the important info to
get a port going is already described.
* Architecture-specific instructions and instruction selection.
The JIT already provides a set of instructions that can be
easily mapped to a great variety of different processor
instructions. Sometimes it may be necessary or advisable to
add a new instruction that represent more closely an
instruction in the architecture. Note that a mini instruction
can be used to represent also a short sequence of CPU
low-level instructions, but note that each instruction
represents the minimum amount of code the instruction
scheduler will handle (i.e., the scheduler won't schedule the
instructions that compose the low-level sequence as individual
instructions, but just the whole sequence, as an indivisible
block).
New instructions are created by adding a line in the
mini-ops.h file, assigning an opcode and a name. To specify
the input and output for the instruction, there are two
different places, depending on the context in which the
instruction gets used.
If the instruction is used in the tree representation, the
input and output types are defined by the BURG rules in the
*.brg files (the usual non-terminals are 'reg' to represent a
normal register, 'lreg' to represent a register or two that
hold a 64 bit value, freg for a floating point register).
If an instruction is used as a low-level CPU instruction, the
info is specified in a machine description file. The
description file is processed by the genmdesc program to
provide a data structure that can be easily used from C code
to query the needed info about the instruction.
As an example, let's consider the add instruction for both x86
and ppc:
x86 version:
add: dest:i src1:i src2:i len:2 clob:1
ppc version:
add: dest:i src1:i src2:i len:4
Note that the instruction takes two input integer registers on
both CPU, but on x86 the first source register is clobbered
(clob:1) and the length in bytes of the instruction differs.
Note that integer adds and floating point adds use different
opcodes, unlike the IL language (64 bit add is done with two
instructions on 32 bit architectures, using a add that sets
the carry and an add with carry).
A specific CPU port may assign any meaning to the clob field
for an instruction since the value will be processed in an
arch-specific file anyway.
See the top of the existing cpu-pentium.md file for more info
on other fields: the info may or may not be applicable to a
different CPU, in this latter case the info can be ignored.
The code in mini.c together with the BURG rules in inssel.brg,
inssel-float.brg and inssel-long32.brg provides general
purpose mappings from the tree representation to a set of
instructions that should be easily implemented in any
architecture. To allow for additional arch-specific
functionality, an arch-specific BURG file can be used: in this
file arch-specific instructions can be selected that provide
better performance than the general instructions or that
provide functionality that is needed by the JIT but that
cannot be expressed in a general enough way.
As an example, x86 has the special instruction "push" to make
it easier to implement the default call convention (passing
arguments on the stack): almost all the other architectures
don't have such an instruction (and don't need it anyway), so
we added a special rule in the inssel-x86.brg file for it.
So, one of the first things needed in a port is to write a
cpu-$(arch).md machine description file and fill it with the
needed info. As a start, only a few instructions can be
specified, like the ones required to do simple integer
operations. The default rules of the instruction selector will
emit the common instructions and so we're ready to go for the
next step in porting the JIT.
*) Native code emission
Since the first step in porting mono to a new CPU is to port
the interpreter, there should be already a file that allows
the emission of binary native code in a buffer for the
architecture. This file should be placed in the
mono/arch/$(arch)/
directory.
The bulk of the code emission happens in the mini-$(arch).c
file, in a function called mono_arch_output_basic_block
(). This function takes a basic block, walks the list of
instructions in the block and emits the binary code for each.
Optionally a peephole optimization pass is done on the basic
block, but this can be left for later, when the port actually
works.
This function is very simple, there is just a big switch on
the instruction opcode and in the corresponding case the
functions or macros to emit the binary native code are
used. Note that in this function the lengths of the
instructions are used to determine if the buffer for the code
needs enlarging.
To complete the code emission for a method, a few other
functions need implementing as well:
mono_arch_emit_prolog ()
mono_arch_emit_epilog ()
mono_arch_patch_code ()
mono_arch_emit_prolog () will emit the code to setup the stack
frame for a method, optionally call the callbacks used in
profiling and tracing, and move the arguments to their home
location (in a caller-save register if the variable was
allocated to one, or in a stack location if the argument was
passed in a volatile register and wasn't allocated a
non-volatile one). caller-save registers used by the function
are saved in the prolog as well.
mono_arch_emit_epilog () will emit the code needed to return
from the function, optionally calling the profiling or tracing
callbacks. At this point the basic blocks or the code that was
moved out of the normal flow for the function can be emitted
as well (this is usually done to provide better info for the
static branch predictor). In the epilog, caller-save
registers are restored if they were used.
Note that, to help exception handling and stack unwinding,
when there is a transition from managed to unmanaged code,
some special processing needs to be done (basically, saving
all the registers and setting up the links in the Last Managed
Frame structure).
When the epilog has been emitted, the upper level code
arranges for the buffer of memory that contains the native
code to be copied in an area of executable memory and at this
point, instructions that use relative addressing need to be
patched to have the right offsets: this work is done by
mono_arch_patch_code ().
* Call conventions and register allocation
To account for the differences in the call conventions, a few functions need to
be implemented.
mono_arch_allocate_vars () assigns to both arguments and local
variables the offset relative to the frame register where they
are stored, dead variables are simply discarded. The total
amount of stack needed is calculated.
mono_arch_call_opcode () is the function that more closely
deals with the call convention on a given system. For each
argument to a function call, an instruction is created that
actually puts the argument where needed, be it the stack or a
specific register. This function can also re-arrange th order
of evaluation when multiple arguments are involved if needed
(like, on x86 arguments are pushed on the stack in reverse
order). The function needs to carefully take into accounts
platform specific issues, like how structures are returned as
well as the differences in size and/or alignment of managed
and corresponding unmanaged structures.
The other chunk of code that needs to deal with the call
convention and other specifics of a CPU, is the local register
allocator, implemented in a function named
mono_arch_local_regalloc (). The local allocator deals with a
basic block at a time and basically just allocates registers
for temporary values during expression evaluation, spilling
and unspilling as necessary.
The local allocator needs to take into account clobbering
information, both during simple instructions and during
function calls and it needs to deal with other
architecture-specific weirdnesses, like instructions that take
inputs only in specific registers or output only is some.
Some effort will be put later in moving most of the local
register allocator to a common file so that the code can be
shared more for similar, risc-like CPUs. The register
allocator does a first pass on the instructions in a block,
collecting liveness information and in a backward pass on the
same list performs the actual register allocation, inserting
the instructions needed to spill values, if necessary.
The cross-platform local register allocator is now implemented
and it is documented in the jit-regalloc file.
When this part of code is implemented, some testing can be
done with the generated code for the new architecture. Most
helpful is the use of the --regression command line switch to
run the regression tests (basic.cs, for example).
Note that the JIT will try to initialize the runtime, but it
may not be able yet to compile and execute complex code:
commenting most of the code in the mini_init() function in
mini.c is needed to let the JIT just compile the regression
tests. Also, using multiple -v switches on the command line
makes the JIT dump an increasing amount of information during
compilation.
Values loaded into registers need to be extened as needed by
the ECMA specs:
*) integers smaller than 4 bytes are extended to int32 values
*) 32 bit floats are extended to double precision (in particular
this means that currently all the floating point operations operate
on doubles)
* Method trampolines
To get better startup performance, the JIT actually compiles a
method only when needed. To achieve this, when a call to a
method is compiled, we actually emit a call to a magic
trampoline. The magic trampoline is a function written in
assembly that invokes the compiler to compile the given method
and jumps to the newly compiled code, ensuring the arguments
it received are passed correctly to the actual method.
Before jumping to the new code, though, the magic trampoline
takes care of patching the call site so that next time the
call will go directly to the method instead of the
trampoline. How does this all work?
mono_arch_create_jit_trampoline () creates a small function
that just preserves the arguments passed to it and adds an
additional argument (the method to compile) before calling the
generic trampoline. This small function is called the specific
trampoline, because it is method-specific (the method to
compile is hard-code in the instruction stream).
The generic trampoline saves all the arguments that could get
clobbered and calls a C function that will do two things:
*) actually call the JIT to compile the method
*) identify the calling code so that it can be patched to call directly
the actual method
If the 'this' argument to a method is a boxed valuetype that
is passed to a method that expects just a pointer to the data,
an additional unboxing trampoline will need to be inserted as
well.
* Exception handling
Exception handling is likely the most difficult part of the
port, as it needs to deal with unwinding (both managed and
unmanaged code) and calling catch and filter blocks. It also
needs to deal with signals, because mono takes advantage of
the MMU in the CPU and of the operation system to handle
dereferences of the NULL pointer. Some of the function needed
to implement the mechanisms are:
mono_arch_get_throw_exception () returns a function that takes
an exception object and invokes an arch-specific function that
will enter the exception processing. To do so, all the
relevant registers need to be saved and passed on.
mono_arch_handle_exception () this function takes the
exception thrown and a context that describes the state of the
CPU at the time the exception was thrown. The function needs
to implement the exception handling mechanism, so it makes a
search for an handler for the exception and if none is found,
it follows the unhandled exception path (that can print a
trace and exit or just abort the current thread). The
difficulty here is to unwind the stack correctly, by restoring
the register state at each call site in the call chain,
calling finally, filters and handler blocks while doing so.
As part of exception handling a couple of internal calls need
to be implemented as well.
ves_icall_get_frame_info () returns info about a specific
frame.
mono_jit_walk_stack () walks the stack and calls a callback with info for
each frame found.
ves_icall_get_trace () return an array of StackFrame objects.
** Code generation for filter/finally handlers
Filter and finally handlers are called from 2 different locations:
1.) from within the method containing the exception clauses
2.) from the stack unwinding code
To make this possible we implement them like subroutines,
ending with a "return" statement. The subroutine does not save
the base pointer, because we need access to the local
variables of the enclosing method. Its is possible that
instructions inside those handlers modify the stack pointer,
thus we save the stack pointer at the start of the handler,
and restore it at the end. We have to use a "call" instruction
to execute such finally handlers.
The MIR code for filter and finally handlers looks like:
OP_START_HANDLER
...
OP_END_FINALLY | OP_ENDFILTER(reg)
OP_START_HANDLER: should save the stack pointer somewhere
OP_END_FINALLY: restores the stack pointers and returns.
OP_ENDFILTER (reg): restores the stack pointers and returns the value in "reg".
** Calling finally/filter handlers
There is a special opcode to call those handler, its called
OP_CALL_HANDLER. It simple emits a call instruction.
Its a bit more complex to call handler from outside (in the
stack unwinding code), because we have to restore the whole
context of the method first. After that we simply emit a call
instruction to invoke the handler. Its usually possible to use
the same code to call filter and finally handlers (see
arch_get_call_filter).
** Calling catch handlers
Catch handlers are always called from the stack unwinding
code. Unlike finally clauses or filters, catch handler never
return. Instead we simply restore the whole context, and
restart execution at the catch handler.
** Passing Exception objects to catch handlers and filters.
We use a local variable to store exception objects. The stack
unwinding code must store the exception object into this
variable before calling catch handler or filter.
* Minor helper methods
A few minor helper methods are referenced from the arch-independent code.
Some of them are:
*) mono_arch_cpu_optimizations ()
This function returns a mask of optimizations that
should be enabled for the current CPU and a mask of
optimizations that should be excluded, instead.
*) mono_arch_regname ()
Returns the name for a numeric register.
*) mono_arch_get_allocatable_int_vars ()
Returns a list of variables that can be allocated to
the integer registers in the current architecture.
*) mono_arch_get_global_int_regs ()
Returns a list of caller-save registers that can be
used to allocate variables in the current method.
*) mono_arch_instrument_mem_needs ()
*) mono_arch_instrument_prolog ()
*) mono_arch_instrument_epilog ()
Functions needed to implement the profiling interface.
* Testing the port
The JIT has a set of regression tests in *.cs files inside the
mini directory.
The usual method of testing a port is by compiling these tests on
another machine with a working runtime by typing 'make rcheck',
then copying TestDriver.dll and *.exe to the mini directory. The
tests can be run by typing:
./mono --regression <exe file name>
The suggested order for working through these tests is the
following:
- basic.exe
- basic-long.exe
- basic-float.exe
- basic-calls.exe
- objects.exe
- arrays.exe
- exceptions.exe
- iltests.exe
- generics.exe
* Writing regression tests
Regression tests for the JIT should be written for any bug
found in the JIT in one of the *.cs files in the mini
directory. Eventually all the operations of the JIT should be
tested (including the ones that get selected only when some
specific optimization is enabled).
* Platform specific optimizations
An example of a platform-specific optimization is the peephole
optimization: we look at a small window of code at a time and
we replace one or more instructions with others that perform
better for the given architecture or CPU.
* 64 bit support tips, by Zoltan Varga ([email protected])
For a 64-bit port of the Mono runtime, you will typically do
the following:
* need to use inssel-long.brg instead of
inssel-long32.brg.
* need to implement lots of new opcodes:
OP_I<OP> is 32 bit op
OP_L<OP> and CEE_<OP> are 64 bit ops
The 64 bit version of an existing port might share the code
with the 32 bit port (for example SPARC/SPARV9), or it might
be separate (x86/AMD64).
That will depend on the similarities of the two instructions
sets/ABIs etc.
The runtime and most parts of the JIT are 64 bit clean
at this point, so the only parts which require changing are
the arch dependent files.
* Function descriptors
Some ABIs, like those for IA64 and PPC64, don't use direct
function pointers, but so called function descriptors. A
function descriptor is a short data structure which contains
at least a pointer to the code of the function and a pointer
to a GOT/TOC, which needs to be loaded into a specific
register prior to jumping to the function. Global variables
and large constants are accessed through that register.
Mono does not need function descriptors for the JITted code,
but we need to handle them when calling unmanaged code and we
need to create them when passing managed code to unmanaged
code.
mono_create_ftnptr() creates a function descriptor for a piece
of generated code within a specific domain.
mono_get_addr_from_ftnptr() returns the pointer to the native
code in a function descriptor. Never use this function to
generate a jump to a function without loading the GOT/TOC
register unless the function descriptor was created by
mono_create_ftnptr().
See the sources for IA64 and PPC64 on when to create and when
to dereference function descriptors. On PPC64 function
descriptors for various generated helper functions (in
exceptions-ppc.c and tramp-ppc.c) are generated in front of
the code they refer to (see ppc_create_pre_code_ftnptr()). On
IA64 they are created separately.
* Emulated opcodes
Mini has code for emulating quite a few opcodes, most notably
operations on longs, int/float conversions and atomic
operations. If an architecture wishes such an opcode to be
emulated, mini produces icalls instead of those opcodes. This
should only be considered when the operation cannot be
implemented efficiently and thus the overhead occured by the
icall is not relatively large. Emulation of operations is
controlled by #defines in the arch header, but the naming is
not consistent. They usually start with MONO_ARCH_EMULATE_,
MONO_ARCH_NO_EMULATE_ and MONO_ARCH_HAVE_.
* Generic code sharing
Generic code sharing is optional. See the file
"generic-sharing" for information on how to support it on an
architecture.
-21
View File
@@ -1,21 +0,0 @@
/
/depcomp
/config.guess
/config.sub
/ltmain.sh
/eglib-*.tar.gz
/missing
/install-sh
/compile
/Makefile
/Makefile.in
/stamp-h1
/config.h.in
/libtool
/autom4te.cache
/aclocal.m4
/config.log
/configure
/config.h
/config.status
/INSTALL
-8
View File
@@ -1,8 +0,0 @@
set(SUBDIRS src test)
autoheader("config.h" null)
foreach(subdir ${SUBDIRS})
add_subdirectory(${subdir})
endforeach()
-68
View File
@@ -1,71 +1,3 @@
2009-12-03 Zoltan Varga <[email protected]>
* src/gmisc-unix.c (g_get_user_name): Avoid returning NULL if the env
var is not set.
2009-10-15 Andreia Gaita <[email protected]>
* src/gptrarray.c: implement g_ptr_array_remove_index_fast
* src/glib.h: fix g_ptr_array_remove_index_fast declaration
* test/ptrarray.c: new tests
2009-09-26 Gonzalo Paniagua Javier <[email protected]>
* test/queue.c: new tests.
* src/gqueue.c: fixed pop_head.
2009-09-26 Gonzalo Paniagua Javier <[email protected]>
* src/gqueue.c: add g_queue_push_tail.
2009-06-20 Zoltan Varga <[email protected]>
* src/glib.h: Add GUINT32_FROM/TO_BE macros.
2009-06-09 Jonathan Chambers <[email protected]>
* CMakeLists.txt: Add start of CMake build.
* src/CMakeLists.txt: Add start of CMake build.
Contribution is licensed as MIT/X11.
2009-06-02 Bill Holmes <[email protected]>
* src/gpath.c (g_find_program_in_path): While searching on Windows
also try additional suffixes .exe, .cmd, .bat, and.com.
Contributed under MIT/X11 license.
2009-05-27 Geoff Norton <[email protected]>
* src/gfile-posix.c: Fix g_get_current_dir on amd64
2009-04-22 Jeffrey Stedfast <[email protected]>
* src/gtimer-win32.c (g_timer_elapsed): Avoid re-querying freq by
just saving it in a static variable. Also modified microseconds
calculation to avoid overflow.
2009-04-05 Miguel de Icaza <[email protected]>
* src/gpath.c: Avoid situations where we add the separator if one
of the elements is the separator.
2009-04-02 Miguel de Icaza <[email protected]>
* src/gpath.c: If the first element is NULL, return an empty
string.
2009-02-19 Gonzalo Paniagua Javier <[email protected]>
* src/gstr.c: use memset in g_strnfill.
2009-01-19 Bill Holmes <[email protected]>
* src/gstr.c (g_strnfill): Fixing a warning for MSVC.
Contributed under MIT/X11 license.
2009-02-05 Miguel de Icaza <[email protected]>
* src/gstr.c: Add g_strnfill
+9 -45
View File
@@ -7,7 +7,8 @@ AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LIBTOOL
CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE"
CFLAGS='-g -O0 -D_GNU_SOURCE'
AC_SUBST(CFLAGS)
GNUC_PRETTY=
GNUC_UNUSED=
BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END"
@@ -24,17 +25,9 @@ AC_SUBST(GNUC_UNUSED)
AC_SUBST(GNUC_NORETURN)
AC_SUBST(BREAKPOINT)
# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono
# configure, because of autoconf brokeness
if test "x$CPPFLAGS_FOR_EGLIB" != "x"; then
CPPFLAGS=$CPPFLAGS_FOR_EGLIB
fi
if test "x$CFLAGS_FOR_EGLIB" != "x"; then
CFLAGS=$CFLAGS_FOR_EGLIB
fi
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
AC_SUBST(ORDER)
case $host in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
@@ -51,15 +44,10 @@ esac
case $target in
arm*-darwin*)
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
;;
i*86-*-darwin*)
ORDER=G_LITTLE_ENDIAN
CFLAGS="$CLAFGS -U_FORTIFY_SOURCE"
;;
esac
AC_SUBST(ORDER)
AC_SUBST(CFLAGS)
AC_SUBST(PATHSEP)
AC_SUBST(SEARCHSEP)
AC_SUBST(OS)
@@ -67,7 +55,7 @@ AM_CONDITIONAL(PLATFORM_WIN32, test x$OS = xWIN32)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_FUNCS(strndup strlcpy getpwent_r strtok_r rewinddir)
AC_CHECK_FUNCS(strndup strlcpy getpwent_r strtok_r)
AC_CHECK_LIB(iconv, libiconv_open, LIBS="$LIBS -liconv")
old_ldflags="${LDFLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
@@ -96,34 +84,10 @@ else
G_GUINT64_FORMAT='"llu"'
fi
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
pkg_config_path=
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir],
if test x$with_crosspkgdir = "x"; then
if test -s $PKG_CONFIG_PATH; then
pkg_config_path=$PKG_CONFIG_PATH
fi
else
pkg_config_path=$with_crosspkgdir
PKG_CONFIG_PATH=$pkg_config_path
export PKG_CONFIG_PATH
fi
)
dnl
dnl No, you can not replace the call below with a pkg.m4 macro
dnl
if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
have_glib=true;
else
have_glib=false;
fi
AM_CONDITIONAL(HAVE_GLIB, $have_glib)
PKG_CHECK_MODULES(GLIB, glib-2.0,
[AM_CONDITIONAL(HAVE_GLIB, test x = x)],
[AM_CONDITIONAL(HAVE_GLIB, test x = y)]
)
AC_SUBST(GPOINTER_TO_INT)
AC_SUBST(GPOINTER_TO_UINT)
AC_SUBST(GINT_TO_POINTER)
-6
View File
@@ -1,6 +0,0 @@
/
/Makefile
/Makefile.in
/.libs
/.deps
/eglib-config.h
-49
View File
@@ -1,49 +0,0 @@
set(win_files
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c
gmodule-win32.c gtimer-win32.c)
set(unix_files
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c
gmodule-unix.c gtimer-unix.c)
if (MSVC)
set(os_files ${win_files})
else(MSVC)
set(os_files ${unix_files})
endif(MSVC)
set(libeglib_la_SOURCES
${os_files}
eglib-config.h
sort.frag.h
glib.h
garray.c
gerror.c
ghashtable.c
gmem.c
gmodule.h
goutput.c
gstr.c
gslist.c
gstring.c
gptrarray.c
glist.c
gqueue.c
gpath.c
gshell.c
gspawn.c
gfile.c
gfile-posix.c
gpattern.c
gmarkup.c
gutf8.c
gunicode.c
unicode-data.h)
set(EXTRA_DIST eglib-config.h.in eglib-config.hw ${win_files} ${unix_files})
INCLUDE_DIRECTORIES(../ ${CMAKE_CURRENT_SOURCE_DIR})
ADD_DEFINITIONS(${CFLAGS} -D_FORTIFY_SOURCE=2)
ADD_LIBRARY(eglib-static STATIC ${libeglib_la_SOURCES})
ADD_LIBRARY(eglib SHARED ${libeglib_la_SOURCES})
-14
View File
@@ -36,9 +36,6 @@
struct _GDir {
DIR *dir;
#ifndef HAVE_REWINDDIR
char *path;
#endif
};
GDir *
@@ -60,9 +57,6 @@ g_dir_open (const gchar *path, guint flags, GError **error)
g_free (dir);
return NULL;
}
#ifndef HAVE_REWINDDIR
dir->path = g_strdup (path);
#endif
return dir;
}
@@ -85,12 +79,7 @@ void
g_dir_rewind (GDir *dir)
{
g_return_if_fail (dir != NULL && dir->dir != NULL);
#ifndef HAVE_REWINDDIR
closedir (dir->dir);
dir->dir = opendir (dir->path);
#else
rewinddir (dir->dir);
#endif
}
void
@@ -98,9 +87,6 @@ g_dir_close (GDir *dir)
{
g_return_if_fail (dir != NULL && dir->dir != 0);
closedir (dir->dir);
#ifndef HAVE_REWINDDIR
g_free (dir->path);
#endif
dir->dir = NULL;
g_free (dir);
}
+1 -5
View File
@@ -162,10 +162,6 @@ g_get_current_dir (void)
}
} while (fail);
/* On amd64 sometimes the bottom 32-bits of r == the bottom 32-bits of buffer
* but the top 32-bits of r have overflown to 0xffffffff (seriously wtf getcwd
* so we return the buffer here since it has a pointer to the valid string
*/
return buffer;
return r;
}
+2 -8
View File
@@ -109,7 +109,7 @@ typedef uint16_t gunichar2;
/*
* Allocation
*/
void g_free (void *ptr);
#define g_free free
static inline gpointer g_realloc (gpointer obj, gsize size) { if (!size) {g_free (obj); return 0;} return realloc (obj, size);}
static inline gpointer g_malloc (gsize x) {if (x) return malloc (x); else return 0;}
static inline gpointer g_malloc0 (gsize x) {if (x) return calloc(1,x); else return 0;}
@@ -449,7 +449,7 @@ void g_ptr_array_add (GPtrArray *array, gpointer data);
gboolean g_ptr_array_remove (GPtrArray *array, gpointer data);
gpointer g_ptr_array_remove_index (GPtrArray *array, guint index);
gboolean g_ptr_array_remove_fast (GPtrArray *array, gpointer data);
gpointer g_ptr_array_remove_index_fast (GPtrArray *array, guint index);
gpointer g_ptr_array_remove_index_fast (GPtrArray *array, gpointer data);
void g_ptr_array_sort (GPtrArray *array, GCompareFunc compare_func);
void g_ptr_array_sort_with_data (GPtrArray *array, GCompareDataFunc compare_func, gpointer user_data);
void g_ptr_array_set_size (GPtrArray *array, gint length);
@@ -469,8 +469,6 @@ typedef struct {
gpointer g_queue_pop_head (GQueue *queue);
void g_queue_push_head (GQueue *queue,
gpointer data);
void g_queue_push_tail (GQueue *queue,
gpointer data);
gboolean g_queue_is_empty (GQueue *queue);
GQueue *g_queue_new (void);
void g_queue_free (GQueue *queue);
@@ -862,15 +860,11 @@ glong g_utf8_strlen (const gchar *str, gssize max);
# define GUINT64_TO_LE(x) (x)
# define GUINT16_TO_LE(x) (x)
# define GUINT_TO_LE(x) (x)
# define GUINT32_TO_BE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
#else
# define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x)
# define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x)
# define GUINT_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT32_TO_BE(x) (x)
# define GUINT32_FROM_BE(x) (x)
#endif
#define GUINT32_FROM_LE(x) (GUINT32_TO_LE (x))
-7
View File
@@ -29,13 +29,6 @@
#include <string.h>
#include <glib.h>
void
g_free (void *ptr)
{
if (ptr != NULL)
free (ptr);
}
gpointer
g_memdup (gconstpointer mem, guint byte_size)
{
-2
View File
@@ -110,8 +110,6 @@ const char *
g_get_user_name (void)
{
const char *retName = g_getenv ("USER");
if (!retName)
retName = "somebody";
return retName;
}
-35
View File
@@ -195,12 +195,6 @@ g_find_program_in_path (const gchar *program)
char *x = p, *l;
gchar *curdir = NULL;
char *save;
#ifdef G_OS_WIN32
char *program_exe;
char *suffix_list[5] = {".exe",".cmd",".bat",".com",NULL};
int listx;
gboolean hasSuffix;
#endif
g_return_val_if_fail (program != NULL, NULL);
@@ -209,15 +203,6 @@ g_find_program_in_path (const gchar *program)
x = curdir;
}
#ifdef G_OS_WIN32
/* see if program already has a suffix */
listx = 0;
hasSuffix = FALSE;
while (!hasSuffix && suffix_list[listx]) {
hasSuffix = g_str_has_suffix(program,suffix_list[listx++]);
}
#endif
while ((l = strtok_r (x, G_SEARCHPATH_SEPARATOR_S, &save)) != NULL){
char *probe_path;
@@ -229,26 +214,6 @@ g_find_program_in_path (const gchar *program)
return probe_path;
}
g_free (probe_path);
#ifdef G_OS_WIN32
/* check for program with a suffix attached */
if (!hasSuffix) {
listx = 0;
while (suffix_list[listx]) {
program_exe = g_strjoin(NULL,program,suffix_list[listx],NULL);
probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program_exe, NULL);
if (access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */
g_free (curdir);
g_free (p);
g_free (program_exe);
return probe_path;
}
listx++;
g_free (probe_path);
g_free (program_exe);
}
}
#endif
}
g_free (curdir);
g_free (p);
-21
View File
@@ -139,27 +139,6 @@ g_ptr_array_remove_index(GPtrArray *array, guint index)
return removed_node;
}
gpointer
g_ptr_array_remove_index_fast(GPtrArray *array, guint index)
{
gpointer removed_node;
g_return_val_if_fail(array != NULL, NULL);
g_return_val_if_fail(index >= 0 || index < array->len, NULL);
removed_node = array->pdata[index];
if(index != array->len - 1) {
g_memmove(array->pdata + index, array->pdata + array->len - 1,
sizeof(gpointer));
}
array->len--;
array->pdata[array->len] = NULL;
return removed_node;
}
gboolean
g_ptr_array_remove(GPtrArray *array, gpointer data)
{
+15 -31
View File
@@ -3,7 +3,6 @@
*
* Author:
* Duncan Mak ([email protected])
* Gonzalo Paniagua Javier ([email protected])
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -24,7 +23,7 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Copyright (c) 2006-2009 Novell, Inc.
* (C) 2006 Novell, Inc.
*
*/
@@ -34,23 +33,19 @@
gpointer
g_queue_pop_head (GQueue *queue)
{
gpointer result;
GList *old_head;
gpointer head = NULL;
if (!queue || queue->length == 0)
return NULL;
if (queue->length != 0){
GList *old_head;
result = queue->head->data;
old_head = queue->head;
queue->head = old_head->next;
g_list_free_1 (old_head);
old_head = queue->head;
head = old_head->data;
queue->head = old_head->next;
queue->length--;
g_list_free_1 (old_head);
}
if (--queue->length)
queue->head->prev = NULL;
else
queue->tail = NULL;
return result;
return head;
}
gboolean
@@ -76,24 +71,13 @@ g_queue_push_head (GQueue *queue, gpointer head)
queue->length ++;
}
void
g_queue_push_tail (GQueue *queue, gpointer data)
{
if (!queue)
return;
queue->tail = g_list_append (queue->tail, data);
if (queue->head == NULL)
queue->head = queue->tail;
else
queue->tail = queue->tail->next;
queue->length++;
}
GQueue *
g_queue_new (void)
{
return g_new0 (GQueue, 1);
GQueue *queue = g_new0 (GQueue, 1);
queue->length = 0;
return queue;
}
void
+4 -1
View File
@@ -830,8 +830,11 @@ gchar *
g_strnfill (gsize length, gchar fill_char)
{
gchar *ret = g_new (gchar, length + 1);
int i;
memset (ret, fill_char, length);
for (i = 0; i < length; i++)
ret [i] = fill_char;
ret [length] = 0;
return ret;
}
+9 -13
View File
@@ -68,14 +68,9 @@ g_timer_stop (GTimer *timer)
gdouble
g_timer_elapsed (GTimer *timer, gulong *microseconds)
{
static guint64 freq = 0;
guint64 delta, stop;
if (freq == 0) {
if (!QueryPerformanceFrequency ((LARGE_INTEGER *)&freq))
freq = 1;
}
guint64 stop;
guint64 freq;
gdouble seconds;
if (timer->stop == 0) {
QueryPerformanceCounter ((LARGE_INTEGER*)&stop);
}
@@ -83,12 +78,13 @@ g_timer_elapsed (GTimer *timer, gulong *microseconds)
stop = timer->stop;
}
delta = stop - timer->start;
QueryPerformanceFrequency ((LARGE_INTEGER*)&freq);
seconds = 1.0 * (stop - timer->start) / freq;
if (microseconds)
*microseconds = (gulong) (delta * (1000000.0 / freq));
return (gdouble) delta / (gdouble) freq;
if (microseconds) {
*microseconds = (gulong)(1000000.0 * (stop - timer->start) / freq);
}
return seconds;
}
-17
View File
@@ -1,17 +0,0 @@
/
/Makefile.in
/configure
/libtool
/aclocal.m4
/Makefile
/config.h
/config.h.in
/config.status
/stamp-h1
/autom4te.cache
/.libs
/.deps
/test-glib
/test-eglib
/test-glib.exe
/test-eglib.exe
-25
View File
@@ -170,30 +170,6 @@ RESULT ptrarray_remove_index()
return OK;
}
RESULT ptrarray_remove_index_fast()
{
GPtrArray *array;
guint i;
array = ptrarray_alloc_and_fill(&i);
g_ptr_array_remove_index_fast(array, 0);
if(array->pdata[0] != items[array->len]) {
return FAILED("First item is not %s, it is %s", items[array->len],
array->pdata[0]);
}
g_ptr_array_remove_index_fast(array, array->len - 1);
if(array->pdata[array->len - 1] != items[array->len - 1]) {
return FAILED("Last item is not %s, it is %s",
items[array->len - 1], array->pdata[array->len - 1]);
}
g_ptr_array_free(array, TRUE);
return OK;
}
RESULT ptrarray_remove()
{
GPtrArray *array;
@@ -259,7 +235,6 @@ static Test ptrarray_tests [] = {
{"foreach_iterate", ptrarray_foreach_iterate},
{"set_size", ptrarray_set_size},
{"remove_index", ptrarray_remove_index},
{"remove_index_fast", ptrarray_remove_index_fast},
{"remove", ptrarray_remove},
{"sort", ptrarray_sort},
{NULL, NULL}
-85
View File
@@ -15,66 +15,6 @@ test_queue_push ()
if (queue->length != 3)
return FAILED ("push failed");
if (NULL != queue->head->prev)
return FAILED ("HEAD: prev is wrong");
if (strcmp ("baz", queue->head->data))
return FAILED ("HEAD: First element is wrong");
if (strcmp ("bar", queue->head->next->data))
return FAILED ("HEAD: Second element is wrong");
if (strcmp ("foo", queue->head->next->next->data))
return FAILED ("HEAD: Third element is wrong");
if (NULL != queue->head->next->next->next)
return FAILED ("HEAD: End is wrong");
if (NULL != queue->tail->next)
return FAILED ("TAIL: next is wrong");
if (strcmp ("foo", queue->tail->data))
return FAILED ("TAIL: Third element is wrong");
if (strcmp ("bar", queue->tail->prev->data))
return FAILED ("TAIL: Second element is wrong");
if (strcmp ("baz", queue->tail->prev->prev->data))
return FAILED ("TAIL: First element is wrong");
if (NULL != queue->tail->prev->prev->prev)
return FAILED ("TAIL: End is wrong");
g_queue_free (queue);
return OK;
}
RESULT
test_queue_push_tail ()
{
GQueue *queue = g_queue_new ();
g_queue_push_tail (queue, "baz");
g_queue_push_tail (queue, "bar");
g_queue_push_tail (queue, "foo");
if (queue->length != 3)
return FAILED ("push failed");
if (NULL != queue->head->prev)
return FAILED ("HEAD: prev is wrong");
if (strcmp ("baz", queue->head->data))
return FAILED ("HEAD: First element is wrong");
if (strcmp ("bar", queue->head->next->data))
return FAILED ("HEAD: Second element is wrong");
if (strcmp ("foo", queue->head->next->next->data))
return FAILED ("HEAD: Third element is wrong");
if (NULL != queue->head->next->next->next)
return FAILED ("HEAD: End is wrong");
if (NULL != queue->tail->next)
return FAILED ("TAIL: next is wrong");
if (strcmp ("foo", queue->tail->data))
return FAILED ("TAIL: Third element is wrong");
if (strcmp ("bar", queue->tail->prev->data))
return FAILED ("TAIL: Second element is wrong");
if (strcmp ("baz", queue->tail->prev->prev->data))
return FAILED ("TAIL: First element is wrong");
if (NULL != queue->tail->prev->prev->prev)
return FAILED ("TAIL: End is wrong");
g_queue_free (queue);
return OK;
}
@@ -107,30 +47,6 @@ test_queue_pop ()
if (queue->length != 0)
return FAILED ("expect 0 length .");
g_queue_push_head (queue, "foo");
g_queue_push_head (queue, "bar");
g_queue_push_head (queue, "baz");
g_queue_pop_head (queue);
if (NULL != queue->head->prev)
return FAILED ("HEAD: prev is wrong");
if (strcmp ("bar", queue->head->data))
return FAILED ("HEAD: Second element is wrong");
if (strcmp ("foo", queue->head->next->data))
return FAILED ("HEAD: Third element is wrong");
if (NULL != queue->head->next->next)
return FAILED ("HEAD: End is wrong");
if (NULL != queue->tail->next)
return FAILED ("TAIL: next is wrong");
if (strcmp ("foo", queue->tail->data))
return FAILED ("TAIL: Second element is wrong");
if (strcmp ("bar", queue->tail->prev->data))
return FAILED ("TAIL: First element is wrong");
if (NULL != queue->tail->prev->prev)
return FAILED ("TAIL: End is wrong");
g_queue_free (queue);
return OK;
}
@@ -173,7 +89,6 @@ test_queue_is_empty ()
static Test queue_tests [] = {
{ "push", test_queue_push},
{"push_tail", test_queue_push_tail},
{ "pop", test_queue_pop},
{ "new", test_queue_new},
{"is_empty", test_queue_is_empty},
+8 -3
View File
@@ -184,9 +184,14 @@ gdouble
get_timestamp()
{
/* FIXME: We should use g_get_current_time here */
GTimeVal res;
g_get_current_time (&res);
return res.tv_sec + (1.e-6) * res.tv_usec;
#ifdef G_OS_WIN32
long int l = GetTickCount();
return (gdouble)(l / 1000) + (1.e-6) * ((l % 1000) * 1000);
#else
struct timeval tp;
gettimeofday(&tp, NULL);
return (gdouble)tp.tv_sec + (1.e-6) * tp.tv_usec;
#endif
}
/*
-7
View File
@@ -1,7 +0,0 @@
/Makefile.in
/.libs
/.deps
/Makefile
/*.o
/*.lo
/*.la
-4
View File
@@ -1,4 +0,0 @@
ADD_DEFINITIONS(${GMODULE_CFLAGS})
ADD_LIBRARY(ikvm_native SHARED jni.c os.c jni.h)
TARGET_LINK_LIBRARIES(ikvm_native ${GMODULE_LIBS})
-24
View File
@@ -1,24 +0,0 @@
/aclocal.m4
/config.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/configure
/libtool
/ltmain.sh
/ltconfig
/Makefile
/Makefile.in
/stamp-h
/stamp-h.in
/*.lo
/.deps
/.libs
/*.la
/*.o
/autom4te.cache
/libgc-mono.pc
/libgc-mono-*.tar.gz
-196
View File
@@ -1,196 +0,0 @@
# based on configure.in/Makefile.am, which is:
# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
#
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
#
# Permission is hereby granted to use or copy this program
# for any purpose, provided the above notices are retained on all copies.
# Permission to modify the code and to distribute modified code is granted,
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
# Original author: Tom Tromey
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
# This is in sync with the configure.in/Makefile.am at r135583
#
# This is a cmake build file for libgc
# Only the functionality needed by mono is supported
#
# FIXME:
add_definitions("-g -O2")
set(THREADS ${libgc_threads})
set(THREADDLLIBS "")
if (THREADS STREQUAL "no" OR THREADS STREQUAL "none" OR THREADS STREQUAL "single")
set(THREADS none)
endif()
if (THREADS STREQUAL "posix" OR THREADS STREQUAL "pthreads")
set(THREADS posix)
set(THREADDLLIBS "-lpthread")
if (${host} MATCHES "x86-.*-linux.*|ia64-.*-linux.*|i386-.*-linux.*|i486-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha.*-.*-linux.*|s390.*-.*-linux.*|sparc.*-.*-linux.*|powerpc-.*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
set(parallel_mark_supported yes)
add_definitions(-DTHREAD_LOCAL_ALLOC)
elseif(${host} MATCHES ".*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-aix.*")
add_definitions(-DGC_AIX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-hpux.*")
message("Only HP/UX 11 threads are supported.")
add_definitions(-DGC_HPUX_THREADS -D_REENTRANT -D_POSIX_C_SOURCE=199506L)
add_definitions(-DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
set(THREADDLLIBS "-lpthread -lrt")
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_FREEBSD_THREADS)
message(FATAL_ERROR "todo")
### if test "x$PTHREAD_CFLAGS" != "x"; then
### INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
### fi
### if test "x$PTHREAD_LIBS" = "x"; then
### THREADDLLIBS=-pthread
### else
### THREADDLLIBS="$PTHREAD_LIBS"
### fi
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS)
elseif(${host} ".*-.*-irix.*")
add_definitions(-DGC_IRIX_THREADS)
elseif(${host} ".*-.*-cygwin.*")
add_definitons(-DGC_WIN32_THREADS)
elseif(${host} ".*-.*-darwin.*")
add_definitons(-DGC_DARWIN_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-netbsd.*")
add_definitions(-DGC_NETBSD_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-osf.*")
add_definitions(GC_OSF1_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
add_definitions(-pthread)
set(THREADDLLIBS "-lpthread -lrt")
else()
message(FATAL_ERROR "Pthreads not supported by the GC on this platform.")
endif()
endif()
if(THREADS STREQUAL "win32")
add_definitions(GC_WIN32_THREADS)
# Wine getenv may not return NULL for missing entry
add_definitions(NO_GETENV)
if (enable_win32_dllmain)
add_definitions(gc_inside_dll)
endif()
endif()
if(${host} MATCHES "powerpc-.*-darwin.*")
set(powerpc_darwin yes)
endif()
if(parallel_mark_supported AND enable_parallel_mark)
add_definitions("-DPARALLEL_MARK")
endif()
# Configuration of machine-dependent code
ac_msg_checking("which machine-dependent code should be used")
###AC_MSG_CHECKING(
###machdep=
###case "$host" in
### alpha-*-openbsd*)
### machdep="alpha_mach_dep.lo"
### if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
### AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
### fi
### ;;
### alpha*-*-linux*)
### machdep="alpha_mach_dep.lo"
### ;;
### i?86-*-solaris2.[[89]]|i?86-*-solaris2.1?)
### AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
### ;;
### mipstx39-*-elf*)
### machdep="mips_ultrix_mach_dep.lo"
### AC_DEFINE(STACKBASE, __stackbase)
### AC_DEFINE(DATASTART_IS_ETEXT)
### ;;
### mips-dec-ultrix*)
### machdep="mips_ultrix_mach-dep.lo"
### ;;
### mips-nec-sysv*|mips-unknown-sysv*)
### ;;
### mips*-*-linux*)
### ;;
### mips-*-*)
### machdep="mips_sgi_mach_dep.lo"
### AC_DEFINE(NO_EXECUTE_PERMISSION)
### ;;
### sparc-*-netbsd*)
### machdep="sparc_netbsd_mach_dep.lo"
### ;;
### sparc-sun-solaris2.3)
### machdep="sparc_mach_dep.lo"
### AC_DEFINE(SUNOS53_SHARED_LIB)
### ;;
### sparc*-sun-solaris2.*)
### machdep="sparc_mach_dep.lo"
### ;;
### ia64-*-*)
### machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
### ;;
###esac
if(NOT machdep)
set(machdep "mach_dep.c")
endif()
ac_msg_result("${machdep}")
ac_msg_checking("for threads package to use")
ac_msg_result("${THREADS}")
# Include defines that have become de facto standard.
# ALL_INTERIOR_POINTERS can be overridden in startup code.
add_definitions(-DSILENT -DNO_SIGNALS -DNO_EXECUTE_PERMISSION)
# AC_DEFINE(ALL_INTERIOR_POINTERS)
# By default, make the library as general as possible.
add_definitions(-DJAVA_FINALIZATION -DGC_GCJ_SUPPORT -DATOMIC_UNCOLLECTABLE)
add_definitions(-D_IN_LIBGC)
set(SUBDIRS include doc)
foreach(dir ${SUBDIRS})
add_subdirectory(${dir})
endforeach()
set(top_srcdir ../)
# .. is needed for mono/utils/mono-compiler.h
INCLUDE_DIRECTORIES(. .. include)
add_definitions(${CPPFLAGS})
if(powerpc_darwin)
set(asm_libgc_sources powerpc_darwin_mach_dep.s)
endif()
set(libmonogc_la_SOURCES
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c
backgraph.c win32_threads.c
pthread_support.c pthread_stop_world.c darwin_stop_world.c
${asm_libgc_sources} ${machdep})
add_library(monogc-static STATIC ${libmonogc_la_SOURCES})
target_link_libraries (${THREADDLLIBS} ${UNWINDLIBS})
-61
View File
@@ -1,64 +1,3 @@
2009-10-25 Zoltan Varga <[email protected]>
* misc.c (GC_get_suspend_signal): New API function to return the suspend signal
used by libgc.
2009-07-20 Geoff Norton <[email protected]>
* darwin_stop_world.c: Fix the x86 version guards to use Apple's
properly defined macros.
2009-07-02 jonas echterhoff <[email protected]>
* darwin_stop_world.c: make debugger code compile on
OS X.
* pthread_support.c: give mach ports to the debugger instead of pthreads,
as those can be iterated over from another executable.
2009-06-22 Neale Ferguson <[email protected]>
* include/private/gc_locks.h: Fix typo in 390 version of GC_compare_and_exchange
and define a null memory barrier.
2009-06-16 Geoff Norton <[email protected]>
* include/private/gcconfig.h: Disable static scanning on this platform
* misc.c: Enable platform-specific disabling of static scanning
2009-06-06 Zoltan Varga <[email protected]>
* CMakeLists.txt: Fix handling of powerpc and the selection of
threads. Delete commented out stuff.
* CMakeLists.txt: CMake build file for libgc.
2009-05-18 Miguel de Icaza <[email protected]>
* include/private/gcconfig.h: Add support for Linux on the PS3
2009-04-28 Zoltan Varga <[email protected]>
* misc.c (GC_init): Avoid casting an lvalue. Fixes part of #498692.
2009-04-24 Kostyantyn Gushtin, Yevgen Kiruha, Serhiy Naumenko, Serhiy
Stetskovych and Ian Dichkovsky <[email protected]>
* include/private/gcconfig.h: Changes to support 64-bit ABI on MIPS.
Add an additional condition for a proper defining of ALIGNMENT
and CPP_WORDSZ.
2009-04-10 Zoltan Varga <[email protected]>
* include/private/gc_locks.h (GC_test_and_set): Merge a change from libgc
7.1's libatomic-ops to fix the ppc build with gcc 4.4.
2009-02-23 Zoltan Varga <[email protected]>
* os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit ()
if GC_no_dls is TRUE, as it is not needed and it complicates debugging since
it causes a SIGSEGV.
2009-01-18 Zoltan Varga <[email protected]>
* include/private/gcconfig.h: Applied patch from Koushik Dutta
+2 -23
View File
@@ -2,13 +2,6 @@
# if defined(GC_DARWIN_THREADS)
#include <AvailabilityMacros.h>
#include "mono/utils/mono-compiler.h"
#ifdef MONO_DEBUGGER_SUPPORTED
#include "include/libgc-mono-debugger.h"
#endif
/* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple
Page 49:
"The space beneath the stack pointer, where a new stack frame would normally
@@ -112,8 +105,7 @@ void GC_push_all_stacks() {
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
#if defined(I386)
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#if defined(_STRUCT_X86_EXCEPTION_STATE32)
lo = state.__esp;
GC_push_one(state.__eax);
@@ -358,7 +350,7 @@ void GC_push_all_stacks() {
(natural_t *)&info, &outCount);
if(r != KERN_SUCCESS) continue;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#if defined(_STRUCT_X86_EXCEPTION_STATE32)
lo = (void*)info.__esp;
hi = (ptr_t)FindTopOfStack(info.__esp);
@@ -690,17 +682,4 @@ void GC_darwin_register_mach_handler_thread(mach_port_t thread) {
GC_use_mach_handler_thread = 1;
}
#ifdef MONO_DEBUGGER_SUPPORTED
GCThreadFunctions *gc_thread_vtable = NULL;
void *
GC_mono_debugger_get_stack_ptr (void)
{
GC_thread me;
me = GC_lookup_thread (pthread_self ());
return &me->stop_info.stack_ptr;
}
#endif
#endif
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-4
View File
@@ -424,10 +424,6 @@ GC_API size_t GC_get_bytes_since_gc GC_PROTO((void));
/* Never decreases, except due to wrapping. */
GC_API size_t GC_get_total_bytes GC_PROTO((void));
/* Return the signal used by the gc to suspend threads on posix platforms. */
/* Return -1 otherwise. */
int GC_get_suspend_signal GC_PROTO((void));
/* Disable garbage collection. Even GC_gcollect calls will be */
/* ineffective. */
GC_API void GC_disable GC_PROTO((void));
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
@@ -10,12 +10,6 @@
struct thread_stop_info {
mach_port_t mach_thread;
int signal;
word last_stop_count; /* GC_last_stop_count value when thread */
/* last successfully handled a suspend */
/* signal. */
ptr_t stack_ptr; /* Valid only when stopped. */
};
struct GC_mach_thread {
+4 -5
View File
@@ -160,15 +160,15 @@
int temp = 1; /* locked value */
__asm__ __volatile__(
"1:\tlwarx %0,0,%1\n" /* load and reserve */
"1:\tlwarx %0,0,%3\n" /* load and reserve */
"\tcmpwi %0, 0\n" /* if load is */
"\tbne 2f\n" /* non-zero, return already set */
"\tstwcx. %2,0,%1\n" /* else store conditional */
"\tbne- 1b\n" /* retry if lost reservation */
"\tsync\n" /* import barrier */
"2:\t\n" /* oldval is zero if we set */
: "=&r"(oldval)
: "r"(addr), "r"(temp)
: "=&r"(oldval), "=p"(addr)
: "r"(temp), "1"(addr)
: "cr0","memory");
return oldval;
}
@@ -565,7 +565,7 @@
# endif /* ALPHA */
# if defined(S390)
# if !defined(GENERIC_COMPARE_AND_SWAP)
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
inline static GC_bool GC_compare_and_exchange(volatile C_word *addr,
GC_word old, GC_word new_val)
{
int retval;
@@ -583,7 +583,6 @@
return retval == 0;
}
# endif
# define GC_memory_barrier()
# endif
# if !defined(GENERIC_COMPARE_AND_SWAP)
/* Returns the original value of *addr. */
+1 -27
View File
@@ -334,7 +334,6 @@
# define ARM
# define mach_type_known
# define DARWIN_DONT_PARSE_STACK
# define GC_DONT_REGISTER_MAIN_STATIC_DATA
# endif
# endif
# if defined(NeXT) && defined(mc68000)
@@ -805,7 +804,6 @@
# define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
# define DATAEND /* not needed */
# endif
# ifdef LINUX
# if defined(__powerpc64__)
# define ALIGNMENT 8
@@ -884,20 +882,6 @@
# define DATASTART GC_data_start
# define DYNAMIC_LOADING
# endif
# ifdef SN_TARGET_PS3
# define NO_GETENV
# define CPP_WORDSZ 32
# define ALIGNMENT 4
extern int _end [];
// extern int _dso_handle[];
extern int __bss_start;
# define DATAEND (_end)
# define DATASTART (__bss_start)
# define STACKBOTTOM ((ptr_t) ps3_get_stack_bottom ())
# define USE_GENERIC_PUSHREGS
# endif
# ifdef NOSYS
# define ALIGNMENT 4
# define OS_TYPE "NOSYS"
@@ -1392,12 +1376,7 @@
# define DATAEND (_end)
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
# if defined(_MIPS_SZPTR) && (_MIPS_SZPTR == 64)
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else
# define ALIGNMENT 4
# endif
# define ALIGNMENT 4
# define USE_GENERIC_PUSH_REGS
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2
# define LINUX_STACKBOTTOM
@@ -2384,13 +2363,8 @@
GC_amiga_get_mem((size_t)bytes + GC_page_size) \
+ GC_page_size-1)
# else
# if defined(SN_TARGET_PS3)
extern void *ps3_get_mem (size_t size);
# define GET_MEM(bytes) (struct hblk*) ps3_get_mem (bytes)
# else
extern ptr_t GC_unix_get_mem();
# define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
#endif
# endif
# endif
# endif
+1 -12
View File
@@ -81,8 +81,6 @@
/* dyn_load.c isn't linked in. */
#ifdef DYNAMIC_LOADING
# define GC_REGISTER_MAIN_STATIC_DATA() GC_register_main_static_data()
#elif defined(GC_DONT_REGISTER_MAIN_STATIC_DATA)
# define GC_REGISTER_MAIN_STATIC_DATA() FALSE
#else
# define GC_REGISTER_MAIN_STATIC_DATA() TRUE
#endif
@@ -468,15 +466,6 @@ size_t GC_get_total_bytes GC_PROTO(())
return ((size_t) WORDS_TO_BYTES(GC_words_allocd+GC_words_allocd_before_gc));
}
int GC_get_suspend_signal GC_PROTO(())
{
#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS)
return SIG_SUSPEND;
#else
return -1;
#endif
}
GC_bool GC_is_initialized = FALSE;
void GC_init()
@@ -490,7 +479,7 @@ void GC_init()
BOOL (WINAPI *pfn) (LPCRITICAL_SECTION, DWORD) = NULL;
HMODULE hK32 = GetModuleHandle(_T("kernel32.dll"));
if (hK32)
pfn = GetProcAddress(hK32,
(FARPROC) pfn = GetProcAddress(hK32,
"InitializeCriticalSectionAndSpinCount");
if (pfn)
pfn(&GC_allocate_ml, 4000);
+3 -12
View File
@@ -54,7 +54,7 @@
# endif
# include <stdio.h>
# if defined(MSWINCE) || defined (SN_TARGET_PS3)
# if defined(MSWINCE)
# define SIGSEGV 0 /* value is irrelevant */
# else
# include <signal.h>
@@ -336,13 +336,6 @@ char *GC_parse_map_entry(char *buf_ptr, word *start, word *end,
{
extern ptr_t GC_find_limit();
if (GC_no_dls)
/*
* Not needed, avoids the SIGSEGV caused by GC_find_limit which
* complicates debugging.
*/
return;
# ifdef LINUX
/* Try the easy approaches first: */
if ((ptr_t)__data_start != 0) {
@@ -511,7 +504,7 @@ void GC_enable_signals(void)
# if !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) \
&& !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
&& !defined(NOSYS) && !defined(ECOS) && !defined(SN_TARGET_PS3)
&& !defined(NOSYS) && !defined(ECOS)
# if defined(sigmask) && !defined(UTS4) && !defined(HURD)
/* Use the traditional BSD interface */
@@ -1456,10 +1449,8 @@ void GC_register_data_segments()
/* hanging from it. We're on thin ice here ... */
extern caddr_t sbrk();
GC_ASSERT(DATASTART);
GC_add_roots_inner(DATASTART, (char *)sbrk(0), FALSE);
# else
GC_ASSERT(DATASTART);
GC_add_roots_inner(DATASTART, (char *)(DATAEND), FALSE);
# if defined(DATASTART2)
GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), FALSE);
@@ -1514,7 +1505,7 @@ void GC_register_data_segments()
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \
&& !defined(MSWIN32) && !defined(MSWINCE) \
&& !defined(MACOS) && !defined(DOS4GW) && !defined(SN_TARGET_PS3)
&& !defined(MACOS) && !defined(DOS4GW)
# ifdef SUNOS4
extern caddr_t sbrk();
+2 -10
View File
@@ -1010,11 +1010,7 @@ void GC_thr_init()
t -> flags = DETACHED | MAIN_THREAD;
#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->thread_created)
# ifdef GC_DARWIN_THREADS
gc_thread_vtable->thread_created (mach_thread_self (), &t->stop_info.stack_ptr);
# else
gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr);
# endif
gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr);
#endif
GC_stop_init();
@@ -1328,11 +1324,7 @@ void * GC_start_routine_head(void * arg, void *base_addr,
# endif /* IA64 */
#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->thread_created)
# ifdef GC_DARWIN_THREADS
gc_thread_vtable->thread_created (mach_thread_self(), &me->stop_info.stack_ptr);
# else
gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
# endif
gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
#endif
UNLOCK();
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-66
View File
@@ -1,65 +1,3 @@
2009-10-11 Ankit Jain <[email protected]>
* xbuild.1: Add info about env var XBUILD_COLORS.
2009-10-09 Zoltan Varga <[email protected]>
* mono.1: Document --debug=gdb option.
2009-09-24 Ankit Jain <[email protected]>
* xbuild.1: Add info about env var XBUILD_EMIT_SOLUTION.
2009-09-14 Massimiliano Mantione <[email protected]>
* mono.1: Updated the profiler documentation, removing the obsolete
signal related options and adding the description of the new socket
based command interface.
2009-08-21 Ankit Jain <[email protected]>
* Makefile.am (man_MANS): Add xbuild.1
* xbuild.1: New.
2009-06-12 Jb Evain <[email protected]>
* mcs.1: update the /platform information.
2009-05-12 Tor Lillqvist <[email protected]>
* mkbundle.1: Document MONO_BUNDLED_OPTIONS.
2009-04-09 Jonathan Pryor <[email protected]>
* mdoc-update.1: Document -L, -r options.
2009-04-06 Jonathan Pryor <[email protected]>
* mdoc.5: Document //code/@src attribute.
2009-04-03 Andrés G. Aragoneses <[email protected]>
* monolinker.1: Document -m modifier.
2009-03-31 Jonathan Pryor <[email protected]>
* mdoc-update.1: Fix --out=DIRECTORY formatting. (It was causing the
remaining text to be bolded within monodoc).
2009-03-30 Jonathan Pryor <[email protected]>
* mdoc-update.1: Add new --exceptions=added functionality.
2009-03-23 Massimiliano Mantione <[email protected]>
* mono.1: Updated the profiler documentation, removing the "gc-signal"
option (it does not exist anymore) and clarifying the role of signals
in heap profiling.
2009-03-20 Jonathan Pryor <[email protected]>
* mdoc-export-html.1: Document --force-update parameter.
2008-12-31 Massimiliano Mantione <[email protected]>
* mono.1: Updated the profiler documentation, removing the "ts"
@@ -313,7 +251,3 @@ Mon Jan 22 11:15:26 CET 2007 Paolo Molaro <[email protected]>
* mono-shlib-cop.1: Document another BUG/design issue that it doesn't check
for; formatting/style changes.
2009-05-22 Michael Barker <[email protected]>
* man.1: Added documentation for MONO_MESSAGING_PROVIDER environment
variable.
-3
View File
@@ -11,7 +11,6 @@ man_MANS = \
genxs.1 \
httpcfg.1 \
ilasm.1 \
lc.1 \
macpack.1 \
makecert.1 \
mconfig.1 \
@@ -39,7 +38,6 @@ man_MANS = \
mono-xmltool.1 \
mozroots.1 \
oldmono.1 \
pdb2mdb.1 \
permview.1 \
prj2make.1 \
resgen.1 \
@@ -51,7 +49,6 @@ man_MANS = \
soapsuds.1 \
sqlsharp.1 \
wsdl.1 \
xbuild.1 \
xsd.1
EXTRA_DIST = $(man_MANS)
+3 -3
View File
@@ -6,7 +6,7 @@
.SH NAME
csharp, gsharp \- Interactive C# Shell
.SH SYNOPSIS
.B csharp [--attach PID] [file1 [file2]]
.B csharp [--attach PID]
[options]
.P
.B gsharp [file1 [file2]]
@@ -27,8 +27,8 @@ into the main loop of a Gtk# application, avoiding any problems
arising from the multi-threaded nature of injecting itself into a
target process.
.PP
Files specified in the command line will be loaded and executed as
scripts.
This version allows a number of scripts to be specified in the command
line.
.SH OPTIONS
.TP
.I "\-\-attach"
-87
View File
@@ -1,87 +0,0 @@
.\"
.\" lc manual page.
.\" (C) 2009 Carlo Kok
.\"
.\" Author:
.\" Carlo Kok ([email protected])
.\"
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.TH lc "Mono 2.6"
.SH NAME
lc \- Mono License Compiler
.SH SYNOPSIS
.PP
.B lc -c filename -t targetassembly [-i reference...] [-v] [-o outputpath] [-nologo]
.SH DESCRIPTION
\fIlc\fP tool is a license compiler for Mono. It's used to convert a
licenses.licx file to a resource that can be embedded into an executable.
.PP
When using commercial components for .NET they often require a license
resource at runtime to make sure the developer was licensed to use this
control. The most common way of making sure the component was properly
licensed is by using license resources. At compile time the developer
uses the \fIlc\fP tool to convert a licenses.licx file to a
programname.exe.resources file and embed that as a managed resource
during compilation.
.SH RUNTIME OPTIONS
The following options are available:
.TP
\fB--complist=filename\fR, \fB-c filename\fR
This option is used to specify the input file, the licenses.licx file
to create a license reesource for. This option is required. The license
compiler will read each line in this file and try to load the types
specified on that line.
.TP
\fB--target=assemblyname\fR, \fB-t targetassembly\fR
full assembly name with file extension for the target assembly. The
license compiler uses this as a key when compiling the licenses. It
has to match the assembly the resource will be embedded in. This option
is required.
.TP
\fB--load=reference\fR, \fB-i reference\fR
Assembly reference to load before trying to compile a license. This
option is needed for assemblies where the references are not in the
gac. Compilers should pass all references to the license compiler.
.TP
\fB--verbose,\fR, \fB-v\fR
Gives more verbose output about the license compiling process.
.TP
\fB--help\fR, \fB-h\fR
Displays usage instructions.
.TP
\fB--output=path\fR, \fB-o path\fR
Target path file the licenses resource. By default the license
compiler emits the resource in the current directory. The filename
will always match the target assembly passed to --target with .licenses
added.
.TP
\fB--nologo\fR
Do not emit the "Mono License Compiler" logo on stdout while compilng.
.SH LICENSE FILES
The format for the license files (licenses.licx) is the following:
.nf
# comment
namespace.type, assemblyname
namespace.type, full-assemblyname
.fi
.Sp
All lines starting with a # are ignored. the first form requires
that the assembly was loaded through the --load,-i option but
does not require the full assembly name, only the first part.
The second form requires the full assembly name including locale,
version and publickeytoken.
.SH MAILING LISTS
Mailing lists are listed at the
http://www.mono-project.com/Mailing_Lists
.SH WEB SITE
http://www.mono-project.com
.SH SEE ALSO
.PP
mono(1), mcs(1)
+3 -35
View File
@@ -136,18 +136,10 @@ precedence over the attributes.
Extracts the C#/XML documentation from the source code and stores in in
the given FILE.
.TP
.I \-errorreport
This flag is ignored by Mono's C# compiler and is present only to
allow MCS to be used as a CSC replacement for msbuild/xbuild.
.TP
.I \-\-fatal
This is used for debugging the compiler. This makes the error emission
generate an exception that can be caught by a debugger.
.TP
.I \-filealign
This flag is ignored by Mono's C# compiler and is present only to
allow MCS to be used as a CSC replacement for msbuild/xbuild.
.TP
.I \-keyfile:KEYFILE
Strongname (sign) the output assembly using the key pair present in
the specified strong name key file (snk). A full key pair is required
@@ -184,14 +176,6 @@ methods will lead to error.
Restrict compiler to use only the second ISO standardized features.
This allows the use of generics, static classes, iterators and
anonymous methods for example.
.TP
.I "3"
Restrict the compiler to use only the features available in C# 3.0
(a superset of ISO-1 and ISO-2).
.TP
.I "future"
Enables features from upcoming versions of the language. As of
May 2009 this includes support for C# 4 as released in Visual Studio 2010 beta 1.
.PP
Notice that this flag only controls the language features available to
the programmer, it does not control the kind of assemblies produced.
@@ -285,11 +269,6 @@ For more details see the PACKAGE section in this document
.ne
.RE
.TP
.I \-platform:ARCH
Used to specify the target platform. The possible values are: anycpu,
x86, x64 or itanium. As of June 2009, the Mono runtime only have support
to emit anycpu and x86 assemblies.
.TP
.I -resource:RESOURCE[,ID]
Embeds to the given resource file. The optional ID can be used to
give a different name to the resource. If not specified, the resource
@@ -380,15 +359,11 @@ Debugging. Turns on verbose yacc parsing.
Shows the compiler version.
.TP
.I \-warnaserror, \-warnaserror+
All compilers warnings will be reported as errors.
Treat warnings as errors.
.TP
.I \-warnaserror:W1,[Wn], -warnaserror+:W1,[Wn]
.I \-warnaserror:W1,[Wn]
Treats one or more compiler warnings as errors.
.TP
.I \-warnaserror-:W1,[Wn]
Sets one or more compiler warnings to be always threated as warnings.
Becomes useful when used together with -warnaserror.
.TP
.I \-warn:LEVEL
Sets the warning level. 0 is the lowest warning level, and 4 is the
highest. The default is 4.
@@ -405,14 +380,7 @@ assembly.
Use this to stop option parsing, and allow option-looking parameters
to be passed on the command line.
.PP
.SH PACKAGES AND LIBRARIES
When referencing an assembly, if the name of the assembly is a path,
the compiler will try to load the assembly specified in the path. If
it does not, then the compiler will try loading the assembly from the
current directory, the compiler base directory and if the assembly is
not found in any of those places in the directories specified as
arguments to the -lib: command argument.
.PP
.SH PACKAGES
Depending on the invocation for the C# compiler (mcs, gmcs, or smcs)
you will get a default set of libraries and versions of those
libraries that are referenced.
+4 -33
View File
@@ -18,21 +18,13 @@ mdoc export-html \- Convert \fBmdoc\fR(5) XML to HTML.
documentation XML files within \fIDIRECTORIES\fR.
.SH OPTIONS
.TP
.B \-\-default\-template
Writes the default XSLT used to \fIstdout\fR.
.TP
\fB\-\-ext\fR=\fIEXTENSION\fR
The file extension to use for created files.
.Sp
This defaults to \fIhtml\fR.
.TP
\fB\-\-force-update\fR
Always generate new files. If not specified,
will only generate a new output file if the source
documentation file is newer than the target output file.
.TP
\fB\-o\fR, \fB\-\-out\fR=\fIDIRECTORY\fR
Write the created files within directory \fIDIRECTORY\fR.
.B \-\-default\-template
Writes the default XSLT used to \fIstdout\fR.
.TP
\fB\-\-template\fR=\fIFILE\fR
An XSLT file to use to generate the created files.
@@ -41,29 +33,8 @@ If not specified, uses the template produced by \fI\-\-dump\-template\fR.
.Sp
See the \fITEMPLATE FORMAT\fR section below for more information.
.TP
\fB\-\-with\-profile\fR=\fIPROFILE\fR
Only process types and members within the .NET profile \fIPROFILE\fR.
May be specified multiple times. If not specified, all types and members,
regardless of version, are processed.
.Sp
Valid profiles are:
.nf
monotouch
net_1_0
net_1_1
net_2_0
net_3_0
net_3_5
net_4_0
silverlight
.fi
.TP
\fB\-\-with\-version\fR=\fIVERSION\fR
Only process types and members within the assembly version \fIVERSION\fR.
May be specified multiple times. If not specified, all types and members,
regardless of version, are processed.
.Sp
\fIVERSION\fR is an assembly version, e.g. 2.0.5.0.
\fB\-o\fR, \fB\-\-out\fR=\fIDIRECTORY\fR
Write the created files within directory \fIDIRECTORY\fR.
.TP
\fB\-h\fR, \fB\-?\fR, \fB\-\-help\fR
Display a help message and exit.
+5 -20
View File
@@ -29,9 +29,11 @@ as added types and members, while preserving existing documentation.
.Sp
In some limited circumstances, renames will be tracked, minimizing the
documentation burden when e.g. a parameter is renamed.
circumstances,
creates stubs and updates documentation in the \fBmdoc\fR(5)
documentation format from \fIASSEMBLIES\fR.
.PP
\fBmdoc update\fR does not rely on documentation found within source code,
though it can import XML Documentation Comments via the \fB\-i\fR option.
\fBmdoc update\fR does not rely on documentation found within source code.
.PP
See \fBmdoc\fR(1) and \fBmdoc\fR(5) for more information.
.SH OPTIONS
@@ -60,12 +62,6 @@ member.
that should be searched for exceptions:
.Sp
.nf
added Only generate <exception/> elements for members
added during the current program execution.
This keeps mdoc-update from re-generating
<exception/> elements for all members (and thus
prevents re-insertion for members that had the
<exception/> elements removed).
all Find exceptions created in the member itself,
references to members in the same assembly,
and references to members in dependent
@@ -175,22 +171,11 @@ Import documentation found within \fIFILE\fR.
.Sp
\fIFILE\fR may contain either \fIcsc /doc\fR XML or \fIECMA-335\fR XML.
.TP
\fB\-L\fR, \fB\-\-lib\fR=\fIDIRECTORY\fR
Add \fIDIRECTORY\fR to the assembly search path, so that dependencies of
\fIASSEMBLIES\fR can be found without documenting those assemblies.
.TP
\fB\-o\fR, \fB\-\-out\fR=\fIDIRECTORY\fR
\fB\-o\fR, \fB\-\-out\fB=\fIDIRECTORY\fR
Place the generated stubs into \fIDIRECTORY\fR.
.Sp
When updating documentation, \fIDIRECTORY\fR is also the source directory.
.TP
\fB\-r\fR=\fIASSEMBLY\fR
\fIASSEMBLY\fR is a dependency for one of \fIASSEMBLIES\fR which should
\fInot\fR be documented but is required to process one of \fIASSEMBLIES\fR.
Add the directory containing \fIASSEMBLY\fR to the assembly search path.
.Sp
This option is equivalent to specifying \fB\-L\fR `\fIdirname\fR ASSEMBLY`.
.TP
\fB\-\-since\fR=\fIVERSION\fR
When \fIupdating\fR documentation for an assembly, if a type or member is
encountered which didn't exist in the previous version of the assembly a
+1 -39
View File
@@ -328,26 +328,13 @@ The \fIc\fR element can contain the following elements:
\fIsee\fR, and
\fItypeparamref\fR.
.TP
.I <code lang="LANGUAGE" src="SOURCE">TEXT</code>
.I <code lang="LANGUAGE">TEXT</code>
Display multiple lines of text in a code-like font (similar to the HTML <pre/>
element).
.Sp
.I LANGUAGE
is the language this code block is for. For example, if \fILANGUAGE\fR is
\fBC#\fR, then \fITEXT\fR will get syntax highlighting for the C# language
within the Mono Documentation Browser.
.Sp
.I SOURCE
is only interpreted by \fBmdoc-update\fR(1). If the \fIsrc\fR attribute is
present when \fBmdoc-update\fR(1) is run, then \fISOURCE\fR is a file
(relative to \fBmdoc-update\fR(1)'s \fB--out\fR directory) that
should be inserted as the value for \fITEXT\fR.
The contents of \fITEXT\fR will be ignored by \fBmdoc-update\fR(1)
and replaced on every invocation. \fISOURCE\fR can also contain an "anchor",
e.g. \fIsrc="path/to/file.cs#RegionMarker"\fR. If an anchor is present,
\fIand\fR \fILANGUAGE\fR is \fIC#\fR, then \fI#region RegionMarker\fR will be
searched for, and the contents between the \fI#region\fR and the following
\fI#endregion\fR will be inserted as the value for \fITEXT\fR element.
.TP
.I <example>XML_TEXT</example>
Indicates an example that should be displayed specially. For example:
@@ -401,31 +388,6 @@ The \fIexception\fR element can contain the following elements:
\fIsee\fR, and
\fItypeparamref\fR.
.TP
.I <format type="TYPE">XML_TEXT</format>
The \fI<format/>\fR element is an "escape hatch," for including (possibly XML)
content that is not valid \fBmdoc\fR(5) content. It's the moral equivalent of
\fBperlpod\fR(1) \fI=begin format\fR blocks.
\fITYPE\fR is the mime type of \fIXML_TEXT\fR. \fBmdoc\fR(5) processors may
skip \fIformat/>\fR blocks of they use a type that isn't supported.
For example:
.nf
<format type="text/html">
<table width="100%">
<tr><td style="color:red">Hello, world!</td></tr>
</table>
</format>
.fi
would cause the embedded HTML \fI<table/>\fR element to be inserted inline
into the resulting HTML document when \fBmdoc-export-html\fR(1) processes the
file. (Likewise, it may be skipped if processed by another program.)
\fIformat/>\fR is intended to simplify importing documentation from existing
documentation sources. It should not be relied upon, if at all possible.
.TP
.I <list>XML</list>
Create a list or table of items.
.I <list/>
-4
View File
@@ -126,10 +126,6 @@ Assembler command. The default is "as".
.I "CC"
C compiler command. The default is "cc" under Linux and "gcc -mno-cygwin"
under Windows.
.TP
.I "MONO_BUNDLED_OPTIONS"
Options to be passed to the bundled
Mono runtime, separated by spaces. See the mono(1) manual page or run mono --help.
.SH FILES
This program will load referenced assemblies from the Mono assembly
cache.
+81 -163
View File
@@ -1,11 +1,11 @@
.\"
.\" mono manual page.
.\" Copyright 2003 Ximian, Inc.
.\" Copyright 2004-2009 Novell, Inc.
.\" (C) 2003 Ximian, Inc.
.\" (C) 2004-2005 Novell, Inc.
.\" Author:
.\" Miguel de Icaza ([email protected])
.\"
.TH Mono "Mono 2.5"
.TH Mono "Mono 2.2"
.SH NAME
mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
.SH SYNOPSIS
@@ -299,10 +299,6 @@ execution time.
Disable some JIT optimizations which are usually only disabled when
running inside the debugger. This can be helpful if you want to attach
to the running process with mdb.
.TP
.I gdb
Generate and register debugging information with gdb. This is only supported on some
platforms, and only when using gdb 7.0 or later.
.ne
.RE
.TP
@@ -507,45 +503,14 @@ addr2line utility that comes from the binutils package).
.PP
The
.I logging profiler
is a general purpose profiler that can track many different kinds of
events and logs those into a file as the program executes. This is
different than previous profilers in Mono that kept the information in
memory and rendered a summary of the results when the program shut
down.
.PP
Using the logging profiler means that useful information can be
gathered for long-running applications, applications that terminate
abormally (crashes, segfaults, complicated tear down processes) or
when no data about the shutdown is required.
.PP
The data collected by the running threads is kept independent of each
other to minimize the runtime overhead and the information dumped into
the log at regular intervals.
.PP
A sample use is very simple:
.nf
$ mono --profile=logging program.exe
$ mprof-decoder program.mprof
.fi
.PP
In the above example the logging profiler is used in its default mode
that merely records GC statistics for the execution of program.exe.
The profiling data collected is stored in the file program.mprof. The
mprof-decoder tool is then used to analyze the data.
.PP
You can instruct the logging profiler to record different one or more
sets of events. These are the modes supported:
will eventually replace the default profiler as it is more complete
and encompasses the functionality of all the other profilers for Mono.
It supports the following execution modes:
.IP
.I Statistical Profiling (stat)
the program instruction pointer is periodically sampled to determine
where the program is spending most of its time. Statistical
profiling has a very low impact on a running application and it is
very useful to get a general picture of where time is being spent on a
program.
.IP
If call chains are requested, for each sample the profiler gets a
partial stack trace (limited by the specified depth) so that
.I Statistical:
the program instruction pointer is periodically sampled (it works also with
unmanaged functions). If call chains are requested, for each sample the
profiler gets a partial stack trace (up to a desired depth) so that
caller-callee information is available.
.IP
.I Instrumenting:
@@ -571,6 +536,16 @@ Moreover, other events can be logged and analyzed, like jit time for each
method, load and unload for assemblies, modules and and individual classes,
and appdomain and thread creation and destruction.
.PP
Instead of reporting the collected
information at the end of the execution of the program, this profiler logs
all the events periodically into a file during program execution.
To minimize the performance impact with multi-threaded applications,
the logging uses per-thread buffers that are routinely saved to disk.
.PP
The output file contains compressed events, to process the data you should
use tools like the "Mono.Profiler" tool provided on the Mono SVN
repository.
.PP
This profiler is activated passing the \fB--profile=logging\fR option to
the mono runtime, and is controlled attaching further options, like
\fB--profile=logging:statistical\fR for doing statistical profiling (multiple
@@ -578,16 +553,17 @@ options are separated by commas).
.PP
As a quick primer, here are a few examples of the most common usage modes:
.PP
To perform statistical profiling:
To write the resulting data to "mydata.mprof" (defaults to statistical
profiling):
.nf
mono --profile=logging:stat program.exe
mono --profile=logging:output=mydata.mprof program.exe
.fi
.PP
To perform statistical profiling, inspecting call chains up to depth 8:
.nf
mono --profile=logging:stat=8 program.exe
mono --profile=logging:statistical=8 program.exe
.fi
.PP
To profile allocations (by default the call stack will be analized for
@@ -608,34 +584,41 @@ To perform heap profiling taking heap snapshots:
.nf
mono --profile=logging:heap=all program.exe
mono --profile=logging:heap=<signal> program.exe
.fi
.PP
To write the resulting data to a different file:
.nf
mono --profile=logging:output=mydata.mprof program.exe
.fi
If "all" is specified, a heap snapshot is taken at each collection.
If, instead, a signal name or number is given (one of SIGUSR1, SIGUSR2 and
SIGPROF, remembering that SIGPROF is not compatible with the statistical
profiler), a garbage collection is forced and a snapshot is taken every
time the signal is received.
Heap profiling also enables full allocation profiling (with call stacks),
and each allocation can be related to its corresponding object in the
snapshots, enabling investigations like "find all objects of a given class
allocated by a given method and still live at a given collection, and then
find all objects referencing them".
.PP
Then you would need to invoke the decoder \fImprof-decoder(1)\fR
on the output file to see the profiling results, or to examine heap
snapshots and allocations in detail \fImprof-heap-viewer(1)\fR.
.PP
The operating modes described above are the default ones, and are sufficient
to use the profiler.
.PP
To further customize the profiler behavior there are more options, described
below.
.PP
These options can be individually enabled and disabled prefixing them
with an (optional) '+' character or a '-' character. For instance,
the "allocations" option by default records also the full call stack
at each allocation. If only the caller is wanted, one should use
"allocations,-save-allocation-stack", or to disable call tracking
completely (making the profiler less intrusive)
"allocations,-save-allocation-caller,-save-allocation-stack". In
practice the "allocation" option by default behaves like
"allocations,save-allocation-caller,save-allocation-stack", but the
user can tune this to his needs.
These options can be individually enabled and disabled prefixing them with
an (optional) '+' character or a '-' character.
For instance, the "allocations" option by default records also the full call
stack at each allocation.
If only the caller is wanted, one should use "allocations,-save-allocation-stack",
or to disable call tracking completely (making the profiler less intrusive)
"allocations,-save-allocation-caller,-save-allocation-stack".
In practice the "allocation" option by default behaves like
"allocations,save-allocation-caller,save-allocation-stack", but the user can
tune this to his needs.
.PP
These are all the available options, organized by category:
.PP
@@ -704,52 +687,32 @@ the summarized data broken down by class).
\fIgc\fR or \fIg\fR
Measure the time spent in each collection, and also trace heap resizes.
.TP
\fIheap-shot[=ARG]\fR, \fIheap[=ARG]\fR or \fIh[=ARH]\fR
\fIheap-shot\fR, \fIheap\fR or \fIh\fR
Performs full heap profiling. In this case on each
collection a full heap snapshot is recorded to disk.
Inside the snapshots, each object reference is still represented so
that it's possible to investigate who is responsible for keeping objects
alive.
.PP
If the value of ARG is
.B all,
a heap snapshot is taken at each collection.
.PP
If the value is an integer
.B n,
a snapshot will be taken at the first
.B n
collections (like setting
.B gcd=n
);
.PP
If no additional argument is given to the heap option, the only way to take
heap snapshots is to requeste them using the runtime socket based command
interface described below (see "Profiler activity control").
.PP
Heap profiling also enables full allocation profiling (with call
stacks), and each allocation can be related to its corresponding
object in the snapshots, enabling investigations like "find all
objects of a given class allocated by a given method and still live at
a given collection, and then find all objects referencing them".
.PP
This kind of heap snapshot analysis is performed using the mprof-heap-viewer(1)
application.
.PP
The number of heap snapshots taken (and the moment in which they are taken)
can be further customized with the following options:
The actual production of heap snapshots could produce large log files,
so it can be controlled in three ways:
.TP
\fIgc-dumps=N\fR, \fIgc-d=N\fR, \fIgcd=N\fR
states the number of snapshots that must be dumped (since the application
starts). Zero means no dumps at all, -1 means dump at all collections.
starts). Zero means no dumps at all, -1 means dump at all collections.
.TP
These options exist because it can happen that the user wants to investigate
what happens during collections but without forcing a collection using the
command interface, because forcing a collection alters the program behavior.
Of course it is possible to simply take a snapshot at every collection, but
in some workloads this is could not be feasible (too much data).
So we have this "garbage collection dumps" counter to control how many
snapshots to take.
\fIgc-signal=<signal>\fR, \fIgc-s\fR or \fIgcs\fR
(where <signal> is one of "SIGUSR1", "SIGUSR2", or "SIGPROF")
specifies a signal that will immediately trigger a collection and a dump.
.TP
\fIgc-commands=FILE\fR, \fIgc-c=FILE\fR or \fIgcc=FILE\fR
specify a "command file". The file must contain an integer value in ASCII
form, and the profiler will stat it at every collection.
If it has been modified it will interpret its contents as a \fIgcd=N\fR
option value, and dump the required number of snapshots from that moment
onwards.
If the file is present at application startup it takes precedence over an
eventual \fIgcd=N\fR option.
.ne
.RE
.PP
@@ -769,33 +732,17 @@ the output file name equals to "<program-name>-SUFFIX.mprof".
.TP
\fIstart-disabled\fR or \fIsd\fR: start with the profiler inactive.
.TP
\fItoggle-signal=<SIGNAL>\fR or \fIts=<SIGNAL>\fR (where <SIGNAL>
is one of SIGUSR1, SIGUSR2 or SIGPROF): Choose a signal that will be used to
toggle the profiler activity on and off. This way you can decide to profile
only portions of the applicatopn lifetime (for instance, you can decide to
avoid profiling an initial setup phase using \fIsd\fR, and enable the
profiler later delivering the signal to the application).
.TP
\fIforce-accurate-timer\fR (or \fIfac\fR): the profiler by default uses
rtdsc to acquire timestamps for frequent events, but this can be imprecise;
using this option you force the use of "gettimeofday" at every event, which
is more accurate but much slower.
.TP
\fIcommand-port=port\fR or \fIcp=port\fR (where port is an integer between
1024 nd 65535):
Choose a TCP port where the profiler will listen for user commands.
The protocol is ASCII based and line oriented (one line per command), and the
profiler answers with one line containing either "OK" or "ERROR" to each
received command.
.PP
The user can telnet to this port and give commands manually, or a GUI can
use this facility to control the profiler at runtime.
.PP
The available commands are:
.TP
\fIenable\fR: Enables the profiler.
.TP
\fIdisable\fR: Disables the profiler.
.TP
\fIheap-snapshot\fR: Takes a heap snapshot now (forces a full garbage collection).
.TP
\fIheap-snapshot-counter=arg\fR: Set the counter of the next heap snapshots
that must be taken, where arg can be "all" (take a snapshot at every
collection), "none" (do not take snapshots), or an integer "n" (take a heap
snapshot for the next "n" collections).
.ne
.RE
.PP
@@ -826,9 +773,10 @@ This defaults to wbs=1024.
.ne
.RE
.PP
In its current state, this profiler can also perform heap analysis
like the HeapShot profiler, but there is no UI to process this
information.
In its current state, this profiler can also perform heap analysis (like
heap-shot), and the decoder is already able to read the data, however
the user interface for this feature is experimental (the
\fImprof-heap-viewer\fR tool in the mono-tools module).
.PP
Another known issue is that if the timer is not strictly monotonic (like
rtdsc), differences between times can underflow (they are handled as
@@ -838,10 +786,6 @@ Finally, it can happen that when exceptions are thrown the profiler temporarily
loses track of the execution stack and misattributes the caller for a few
allocations (and method execution time).
.PP
The output file contains compressed events, to process the data you should
use tools like the "Mono.Profiler" tool provided on the Mono SVN
repository.
.PP
More explanations are provided here: "http://www.mono-project.com/LoggingProfiler".
.SH EXTERNAL PROFILERS
There are a number of external profilers that have been developed for
@@ -1007,7 +951,7 @@ integrity of the runtime after sending this signal is not guaranteed
and the application might crash or terminate at any given point
afterwards.
.PP
The \fB--debug=casts\fR option can be used to get more detailed
The \fB--debug=casts\FR option can be used to get more detailed
information for Invalid Cast operations, it will provide information
about the types involved.
.PP
@@ -1073,14 +1017,6 @@ by setting the option
Turns off the garbage collection in Mono. This should be only used
for debugging purposes
.TP
\fBLVM_COUNT\fR
When Mono is compiled with LLVM support, this instructs the runtime to
stop using LLVM after the specified number of methods are JITed.
This is a tool used in diagnostics to help isolate problems in the
code generation backend. For example \fBLLVM_COUNT=10\fR would only
compile 10 methods with LLVM and then switch to the Mono JIT engine.
\fBLLVM_COUNT=0\fR would disable the LLVM engine altogether.
.TP
\fBMONO_AOT_CACHE\fR
If set, this variable will instruct Mono to ahead-of-time compile new
assemblies on demand and store the result into a cache in
@@ -1148,12 +1084,6 @@ to track down the source of the problems.
\fBno-gdb-backtrace\fR
This option will disable the GDB backtrace emitted by the runtime
after a SIGSEGV or SIGABRT in unmanaged code.
.TP
\fBsuspend-on-sigsegv\fR
This option will suspend the program when a native SIGSEGV is received.
This is useful for debugging crashes which do not happen under gdb,
since a live process contains more information than a core file.
.ne
.RE
.TP
@@ -1254,14 +1184,13 @@ For example, this would work from the shell:
.fi
If you are using mod_mono to host your web applications, you can use
the
.B MonoIOMAP
directive instead, like this:
.B MonoSetEnv
directive, like this:
.nf
MonoIOMAP <appalias> all
MonoSetEnv MONO_IOMAP=all
.fi
See mod_mono(8) for more details.
.TP
\fBMONO_MANAGED_WATCHER\fR
If set to "disabled", System.IO.FileSystemWatcher will use a file watcher
@@ -1289,8 +1218,8 @@ the Global Assembly Cache (see gacutil(1)) or having the dependent
libraries side-by-side with the main executable.
.Sp
For a complete description of recommended practices for application
deployment, see
http://www.mono-project.com/Guidelines:Application_Deployment
deployment, see the
http://www.mono-project.com/Guidelines:Application_Deployment page.
.TP
\fBMONO_RTC\fR
Experimental RTC support in the statistical profiler: if the user has
@@ -1385,16 +1314,6 @@ Both files are read by System.Web on application startup, if they are found at t
above locations. If you don't want the mapping to be performed you can set this
variable in your environment before starting the application and no action will
be taken.
.TP
\fBMONO_MESSAGING_PROVIDER\fR
Mono supports a plugin model for its implementation of System.Messaging making
it possible to support a variety of messaging implementations (e.g. AMQP, ActiveMQ).
To specify which messaging implementation is to be used the evironement variable
needs to be set to the full class name for the provider. E.g. to use the RabbitMQ based
AMQP implementation the variable should be set to:
.nf
Mono.Messaging.RabbitMQ.RabbitMQMessagingProvider,Mono.Messaging.RabbitMQ
.SH ENVIRONMENT VARIABLES FOR DEBUGGING
.TP
\fBMONO_ASPNET_NODELETE\fR
@@ -1581,8 +1500,7 @@ http://www.mono-project.com/Mailing_Lists
http://www.mono-project.com
.SH SEE ALSO
.PP
certmgr(1), csharp(1), mcs(1), mdb(1), monocov(1), monodis(1),
mono-config(5), mozroots(1), pdb2mdb(1), xsp(1), mod_mono(8).
certmgr(1), csharp(1), mcs(1), mdb(1), monocov(1), monodis(1), mono-config(5), mozroots(1), xsp(1).
.PP
For more information on AOT:
http://www.mono-project.com/AOT
-3
View File
@@ -195,9 +195,6 @@ This command will add the FooStep before the MarkStep:
.fi
.Sp
This command will add the FooStep before the MarkStep
.TP
.I "-m CustomParam ParamValue"
Specify a parameter for a custom step.
.SH COPYRIGHT
Copyright (C) 2007 Novell, Inc (http://www.novell.com)
.SH BUGS
-41
View File
@@ -1,41 +0,0 @@
.\" Copyright 2003 Ximian, Inc.
.\" Copyright 2004-2009 Novell, Inc.
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.TH pdb2mdb 1 "23 April 2009"
.SH NAME
pdb2mdb \- Program Database to Mono Debugging Symbol converter.
.SH SYNOPSIS
.B pdb2mdb
pdb_file
.SH DESCRIPTION
This tool is used to convert debugging symbols generated by
Microsoft's compilers into debugging symbols that can be consumed by
Mono's runtime.
.PP
Program Database files are files that end with the extension .pdb and
are associated with a library or executable (a .dll or .exe file).
This format was until recently not documented so Mono used its own
file format for storing debugging information, the Mono debugging
format.
.PP
Just like PDB files Mono Debugging information is stored in files that
reside side-by-side with a program executable or a library.
.PP
You can use the pdb2mdb tool to transform these PDB files into MDB
files that Mono can then consume to debug programs or provide
line-number information for stack traces or exceptions.
.SH LICENSE
The
.I pdb2mdb
tool is released under the terms of the Microsoft Public License
(MS-PL).
.AUTHORS
JB Evain wrote the tool. The PDB reading support came from Microsoft
Common Compiler Infrastructure.
.SH SEE ALSO
mono(1), mdb(1)
.SH WEB SITE
http://www.mono-project.com
-88
View File
@@ -1,88 +0,0 @@
.TH "xbuild" 1
.SH NAME
xbuild \- Mono's tool to build MSBuild project files
.SH SYNOPSIS
.B xbuild
[option] [project-file]
.SH DESCRIPTION
xbuild can be used to build MSBuild project files. Integrated Development
Environments like MonoDevelop and "Microsoft Visual Studio .NET" use msbuild
project file format.
xbuild takes the path of the project or solution file to build, as the main argument.
If no file is specified then it tries to build any solution file or project file in
the current directory, that has a *proj extension.
.SH OPTIONS
.TP
.B \//target:T1[,TN]
List of targets to build
.TP
.B \//property:Name=Value
Set or override project properties
.TP
.B \//logger:<logger>
Custom logger to log build events
.TP
.B \//verbosity:<level>
Logger verbosity level : quiet, minimal, normal, detailed, diagnostic
.TP
.B \//validate
Validate the project file against the schema
.TP
.B \//validate:<schema>
Validate the project file against the specified schema
.TP
.B \//consoleloggerparameters:<params>
Parameters for the console logger
.TP
.B \//nologo
Don't show the initial xbuild banner
.TP
.B \//help
Show xbuild usage
.TP
.B \//version
Display xbuild version
.SH ENVIRONMENT VARIABLES
.TP
.I "XBUILD_EMIT_SOLUTION"
If this variable is set, then the project file generated from a solution
file is emitted.
.TP
.I "XBUILD_COLORS"
If this variable is set, it contains a string of the form
"type=foreground,type=.." that specifies which color to use to display
errors/warnings etc on some terminals. Type here can be:
.nf
errors, warnings, messages or events
events: These are project/target/task start and end event
messages.
.fi
.Sp
The possible colors for foreground are:
.B black, red, brightred, green, brightgreen, yellow, brightyellow,
blue, brightblue, magenta, brightmagenta, cyan, brightcyan, grey,
white and brightwhite.
.Sp
For example, you could set this variable from your shell:
.nf
export XBUILD_COLORS
XBUILD_COLORS=errors=brightred,warnings=blue
.fi
.Sp
You can disable the built-in color scheme by setting this variable to
"disable".
.SH SEE ALSO
.BR mono(1), mcs(1)
.SH COPYRIGHT
Copyright (C) 2009 Novell, Inc (http://www.novell.com)
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
.SH WEB SITE
Visit: http://www.mono-project.com for details
-3
View File
@@ -1,3 +0,0 @@
*.mdb
*.exe
*.o
-30
View File
@@ -1,33 +1,3 @@
2009-09-07 Atsushi Enomoto <[email protected]>
* Makefile: add some WCF assemblies to centum_tests.
2009-07-21 Jb Evain <[email protected]>
* Makefile: specify bootstrap and SUBDIRS for the monotouch profile.
2009-07-16 Raja R Harinath <[email protected]>
Improve coarse-grain parallelism in the build
* Makefile (_boot_:net_2_0_bootstrap): Depend on
'net_1_1_bootstrap' profile, rather than 'net_1_1'.
2009-07-10 Atsushi Enomoto <[email protected]>
* nunit20 : removed old framework.
2009-06-07 Marek Safar <[email protected]>
* Makefile: Add net_4_0* profiles.
2009-02-24 Jonathan Pryor <[email protected]>
* docs/Makefile: Remove and don't install nunit-docs.source. As
Atsushi Enomoto said on 2008-11-26, Mono's NUnit is for internal use
only, and installing nunit-docs.source causes an warning message
during monodoc startup.
* docs/nunit-docs.source: Remove.
2009-02-03 Rodrigo Kumpera <[email protected]>
* docs/Makefile: Fix install-local and uninstall-local if
+2 -13
View File
@@ -9,11 +9,7 @@ net_2_0_SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
net_2_1_bootstrap_SUBDIRS := build mcs class
net_2_1_raw_SUBDIRS := build mcs class tools
net_2_1_SUBDIRS := tools tests errors
monotouch_SUBDIRS := build mcs class
monotouch_bootstrap_SUBDIRS := build mcs class
net_3_5_SUBDIRS := build class
net_4_0_bootstrap_SUBDIRS := build mcs class tools
net_4_0_SUBDIRS := build mcs class nunit24 ilasm tools tests errors
# List of test subdirs that should pass 100%
centum_tests := \
@@ -51,9 +47,6 @@ net_2_0_centum_tests := \
class/Microsoft.Build.Framework \
class/Microsoft.Build.Utilities \
class/Microsoft.Build.Engine \
class/System.Runtime.Serialization \
class/System.IdentityModel \
class/System.ServiceModel.Web \
class/Mono.C5
# class/System.Web.Extensions
@@ -84,7 +77,7 @@ dir-check:
# fun specialty targets
PROFILES = net_1_1 net_2_0 net_3_5 net_4_0
PROFILES = net_1_1 net_2_0 net_3_5
.PHONY: all-profiles $(STD_TARGETS:=-profiles)
all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
@@ -103,16 +96,12 @@ profiles-do--run-test:
# Orchestrate the bootstrap here.
_boot_ = all clean install
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--net_4_0_bootstrap--%
$(_boot_:%=profile-do--net_4_0_bootstrap--%): profile-do--net_4_0_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--net_3_5--%): profile-do--net_3_5--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--net_2_1--%): profile-do--net_2_1--%: profile-do--net_2_1_raw--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--monotouch_bootstrap--%
$(_boot_:%=profile-do--monotouch_bootstrap--%): profile-do--monotouch_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--net_2_1_raw--%): profile-do--net_2_1_raw--%: profile-do--net_2_1_bootstrap--%
$(_boot_:%=profile-do--net_2_1_bootstrap--%): profile-do--net_2_1_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
$(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--net_1_1_bootstrap--%
$(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--net_1_1--%
$(_boot_:%=profile-do--net_1_1--%): profile-do--net_1_1--%: profile-do--net_1_1_bootstrap--%
$(_boot_:%=profile-do--net_1_1_bootstrap--%): profile-do--net_1_1_bootstrap--%: profile-do--basic--%
-2
View File
@@ -1,2 +0,0 @@
/deps
/config.make
-71
View File
@@ -1,74 +1,3 @@
2009-11-17 Marek Habersack <[email protected]>
* tests.make (TEST_RUNTIME_WRAPPERS_PATH): added - used to set up
correct PATH for tests
2008-09-11 Marek Safar <[email protected]>
* library.make: Add NO_BUILD to ignore assembly during build.
2009-07-30 Raja R Harinath <[email protected]>
* library.make (SNFLAGS): Remove '-R', since it's specific to the
action required.
($(build_lib)): Use -R flag with $(SN).
($(the_lib)): Add a sanity check to verify that the assembly is signed.
2009-07-26 Raja R Harinath <[email protected]>
Make AOT compilation explicit
* platforms/darwin.make (PLATFORM_AOT_SUFFIX): New.
* platforms/linux.make (PLATFORM_AOT_SUFFIX): New.
* library.make ($(build_lib)): Don't try to AOT compile the
library in its possibly temporary location.
(DO_AOT): Remove. Move to ...
($(the_lib)$(PLATFORM_AOT_SUFFIX)): ... here, new rule to
explicitly run the AOT compilation.
(all-local) [ENABLE_AOT]: Build the AOT compiled library as appropriate.
2009-07-26 Raja R Harinath <[email protected]>
Fix parallel-build issues with LIBRARY_USE_INTERMEDIATE_FILE
* library.make (build_lib): Define to a profile dependent
temporary location for LIBRARY_USE_INTERMEDIATE_FILE.
(DO_AOT): New. Extracted from ...
($(build_lib)): ... here. Simplify. Extract code handling
LIBRARY_USE_INTERMEDIATE_FILE into ...
($(the_lib)) [LIBRARY_USE_INTERMEDIATE_FILE]: ... here, a new rule
that takes care of copying the library from its temporary location
to the final location.
2009-07-20 Jb Evain <[email protected]>
* profiles/monotouch.make: add monotouch profile.
2009-07-16 Raja R Harinath <[email protected]>
* profiles/net_2_0_bootstrap.make (BOOTSTRAP_PROFILE): Set to
net_1_1_bootstrap instead of net_1_1.
2009-06-03 Zoltan Varga <[email protected]>
* profiles/net_4_0.make: Add preliminary net 4.0 profile.
2009-04-09 Jonathan Pryor <[email protected]>
* executable.make, library.make: Move the include for tests.make so
that DISTFILES can be properly set (and thus properly distribute the
*_test.dll.sources file). This allows unit tests to actually build
and run when building from the tarball.
2009-04-05 Jonathan Pryor <[email protected]>
* executable.make: Support HAS_NUNIT_TEST variable; if set, will build
an NUnit test assembly during 'make test' and will run the tests
within the NUnit test assembly during 'make run-test'.
* library.make: Split out NUnit test rules/logic into tests.make.
* Makefile: Distribute tests.make.
* README.makefiles: Document HAS_NUNIT_TEST for executable.make,
documenting how to have NUnit tests for executables.
* tests.make: Added; NUnit test logic rules.
2009-01-08 Geoff Norton <[email protected]>
* Makefile: Add darwin.make to the make dist target as well
+1 -4
View File
@@ -25,9 +25,7 @@ PROFILES = \
net_2_1_raw \
net_2_1 \
net_1_0 \
net_3_5 \
net_4_0_bootstrap \
net_4_0
net_3_5
COMMON_SRCS = \
Consts.cs.in \
@@ -45,7 +43,6 @@ DISTFILES = \
library.make \
nunit-summary.xsl \
rules.make \
tests.make \
$(COMMON_SRCS:%=common/%) \
$(PLATFORMS:%=platforms/%.make) $(PROFILES:%=profiles/%.make)
-17
View File
@@ -266,23 +266,6 @@ mytester.exe: mytester.cs
$(CSCOMPILE) /target:exe /out:$@ mytester.cs
========================================
If your program has NUnit tests, set the variable HAS_NUNIT_TEST:
========================================
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
HAS_NUNIT_TEST = yes
include ../build/executable.make
========================================
HAS_NUNIT_TEST tests follow library.make NUnit test conventions:
the files should be in a subdirectory called Test/, and if
your program is called myprogram.exe, they should be listed in
myprogram_test.dll.sources. The names in that files should *not* have
the Test/ prefix. 'make test' will build myprogram_test_$(PROFILE).dll
in the current directory, automatically supplying the flags to
reference the original program and NUnit.Framework.dll.
If your program has 'built sources', that is, source files generated
from other files (say, generated by jay), define a variable called
BUILT_SOURCES and do *not* list the sources in $(PROGRAM).sources:
-1
View File
@@ -1 +0,0 @@
/Consts.cs
Loaded 100 of 6578 files, more files were not shown because too many files have changed in this diff. Show more