Compare commits

...
420 Commits
Author SHA1 Message Date
Zoltan Varga 7dcae3becc 2009-11-10 Zoltan Varga <[email protected]>
* exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
	LDMIA->LDM macro name change.

svn path=/branches/mono-2-6/mono/; revision=145789
2009-11-10 01:00:41 +00:00
Zoltan Varga eb92a1217d 2009-11-10 Zoltan Varga <[email protected]>
* arm/arm-codegen.h: Fix the names of the LDMIA/STMIA macros, they don't actually
	update the base register.

svn path=/branches/mono-2-6/mono/; revision=145788
2009-11-10 01:00:32 +00:00
Geoff Norton 9f97213017 Support building on 10.6
svn path=/branches/mono-2-6/mono/; revision=145785
2009-11-09 23:45:33 +00:00
Chris Toshok e0eee654e3 2009-11-09 Chris Toshok <[email protected]>
* Console.cs (OpenStandardError,OpenStandardOut,OpenStandardInput):
        for NET_2_1 && !MONOTOUCH, disable these streams unless a debugger
        is attached, or unless the MOONLIGHT_ENABLE_CONSOLE environment
        variable is defined.

        reviewed: alan
        


svn path=/branches/mono-2-6/mcs/; revision=145773
2009-11-09 21:17:17 +00:00
Marek Safar dc46c4ab7e Fixed dlr dist
svn path=/branches/mono-2-6/mcs/; revision=145768
2009-11-09 20:48:30 +00:00
Stephen Shaw 6ab9b9616d Added lc to spec file
svn path=/branches/mono-2-6/mono/; revision=145757
2009-11-09 18:16:16 +00:00
Stephen Shaw dcf3a9eceb add gcc-c++ dep (ajorg)
svn path=/branches/mono-2-6/mono/; revision=145753
2009-11-09 17:37:42 +00:00
Jonathan Pryor 63cd0a2589 * src/DbLinq.MySql/MysqlDataContext.cs: Delete.
* System.Data.Linq.dll.sources: Use src/DbLinq.MySql/MySqlDataContext.cs; 
	  fixes the build for case-insensitive filesystems.

svn path=/branches/mono-2-6/mcs/; revision=145749
2009-11-09 17:10:37 +00:00
Marek Habersack 2c23326622 Backport of r145740
svn path=/branches/mono-2-6/mcs/; revision=145741
2009-11-09 14:21:28 +00:00
Marek Habersack 52bff1dfe0 Backport of r145735
svn path=/branches/mono-2-6/mcs/; revision=145736
2009-11-09 13:36:48 +00:00
Marek Habersack a53f1b85a1 Backport of r145727
svn path=/branches/mono-2-6/mcs/; revision=145728
2009-11-09 12:31:23 +00:00
Marek Habersack 6c93b0c613 Backport r145721
svn path=/branches/mono-2-6/mcs/; revision=145722
2009-11-09 11:46:58 +00:00
Jb Evain 551c3e365a bring XslCompiledTransform to MonoTouch
svn path=/branches/mono-2-6/mcs/; revision=145712
2009-11-09 10:33:21 +00:00
Zoltan Varga 61715e57c9 2009-11-09 Zoltan Varga <[email protected]>
* mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
	&align to mini_type_stack_size_full ().

svn path=/branches/mono-2-6/mono/; revision=145700
2009-11-09 02:04:12 +00:00
Zoltan Varga ea48e253e3 2009-11-08 Zoltan Varga <[email protected]>
* mini-arm.c: Compute the stack space used by arguments using
	mini_type_stack_size_full ().

svn path=/branches/mono-2-6/mono/; revision=145686
2009-11-08 22:37:29 +00:00
Zoltan Varga 46692f3796 2009-11-07 Zoltan Varga <[email protected]>
* driver.c (mono_jit_parse_options): New public API function to parse options
	as done by the runtime executable.

svn path=/branches/mono-2-6/mono/; revision=145654
2009-11-07 22:10:24 +00:00
Zoltan Varga 8ad7a5d34a 2009-11-07 Zoltan Varga <[email protected]>
* debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
	when handling named arguments.

svn path=/branches/mono-2-6/mono/; revision=145652
2009-11-07 21:41:37 +00:00
Marek Safar e267e170ed 2009-11-07 Marek Safar <[email protected]>
A fix for bug #553465

	* expression.cs: Fixed mixed version of expression tree anonymous
	type.


svn path=/branches/mono-2-6/mcs/; revision=145646
2009-11-07 10:08:44 +00:00
Zoltan Varga 42f310d152 Add missing files.
svn path=/branches/mono-2-6/mcs/; revision=145642
2009-11-07 08:51:47 +00:00
Zoltan Varga 3dd4322874 2009-11-07 Zoltan Varga <[email protected]>
* Makefile (net_2_0_dirs): Add System.Data.Services.

svn path=/branches/mono-2-6/mcs/; revision=145634
2009-11-07 02:47:46 +00:00
Zoltan Varga 1136d59fc0 2009-11-07 Zoltan Varga <[email protected]>
*: Move .cs files to the System.Data.Services subdir to match their namespace,
	move tests to 'Test' from 'Tests', add Makefile.

svn path=/branches/mono-2-6/mcs/; revision=145633
2009-11-07 02:47:39 +00:00
Zoltan Varga b6d22a08d7 Added System.Data.Services sources
svn path=/branches/mono-2-6/mcs/; revision=145632
2009-11-07 02:47:23 +00:00
Jonathan Pryor f3194d60b5 * Makefile: re-enable the tests. They were disabled in r137153
because they weren't compiling, which was because System.Data.Linq
	  wasn't listing sqlmetal_net_2_0 as a friend assembly.  (Why this
	  built before I couldn't tell you...)  Fixed in latest S.D.L.

svn path=/branches/mono-2-6/mcs/; revision=145617
2009-11-06 21:51:49 +00:00
Jonathan Pryor 6d2aa53461 * src/**/*: Sync with DbLinq r1265. This fixes sqlmetal (it shouldn't
generate constructors referring to IVendor), enhances query support
	  so that extension methods can be used within 'select' blocks,
	  various FirebirdSQL fixes, etc.

svn path=/branches/mono-2-6/mcs/; revision=145616
2009-11-06 21:51:21 +00:00
Geoff Norton 3b38f04754 backport missing file for monotouch build
svn path=/branches/mono-2-6/mcs/; revision=145602
2009-11-06 16:59:31 +00:00
Marek Safar 1ad7c28cc7 2009-11-06 Marek Safar <[email protected]>
A fix for bug #553031

	* linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
	expression tree version of anonymous type with members declaration.


svn path=/branches/mono-2-6/mcs/; revision=145585
2009-11-06 13:21:30 +00:00
Marek Safar e7c6847d8c Updated.
svn path=/branches/mono-2-6/mcs/; revision=145583
2009-11-06 13:15:43 +00:00
Zoltan Varga e06b86c2e7 2009-11-06 Zoltan Varga <[email protected]>
* mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
	([email protected]).

svn path=/branches/mono-2-6/mono/; revision=145575
2009-11-06 09:15:20 +00:00
Zoltan Varga 442a5c1927 2009-11-06 Zoltan Varga <[email protected]>
* mini-arm.c (handle_thunk): Add a domain argument to control the domain
	where the thunk memory should be allocated from. Fixes appdomain unloading
	on arm.

svn path=/branches/mono-2-6/mono/; revision=145570
2009-11-06 08:18:18 +00:00
Zoltan Varga af8b26cfce 2009-11-06 Zoltan Varga <[email protected]>
* mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
	registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.

svn path=/branches/mono-2-6/mono/; revision=145564
2009-11-06 06:03:03 +00:00
Geoff Norton aedff42490 2009-11-05 Geoff Norton <[email protected]>
* HttpsTransportBindingElement.cs: Implement basic https transport
	binding support for Moonlight and MonoTouch

svn path=/branches/mono-2-6/mcs/; revision=145558
2009-11-06 04:18:49 +00:00
Geoff Norton ac13a98236 2009-11-05 Geoff Norton <[email protected]>
* ClientRuntimeChannel.cs: Support OperationContext in async calls
        as well

svn path=/branches/mono-2-6/mcs/; revision=145557
2009-11-06 04:18:29 +00:00
Zoltan Varga 94a0a08a5a 2009-11-05 Rodrigo Kumpera <[email protected]>
* debugger-agent.c: Fix windows build.

svn path=/branches/mono-2-6/mono/; revision=145553
2009-11-05 22:19:03 +00:00
Zoltan Varga 8e89b3a0ca 2009-11-05 Zoltan Varga <[email protected]>
* mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
	AOT, as it is not implemented yet.

	* mini-x86.c (mono_arch_output_basic_block): Ditto.

svn path=/branches/mono-2-6/mono/; revision=145552
2009-11-05 22:07:03 +00:00
Zoltan Varga 8c45bb18fe 2009-11-05 Zoltan Varga <[email protected]>
* debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
	after the client connects/disconnects.

svn path=/branches/mono-2-6/mono/; revision=145551
2009-11-05 22:06:56 +00:00
Zoltan Varga a9a8ebac53 2009-11-05 Zoltan Varga <[email protected]>
* debugger-agent.c: Add an 'onthrow' option to start the debugger agent
	when an exception of a given type is thrown.

svn path=/branches/mono-2-6/mono/; revision=145550
2009-11-05 22:06:49 +00:00
Zoltan Varga b1769245b8 2009-11-05 Zoltan Varga <[email protected]>
* debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
	only on an uncaught exception.

	* mini-exceptions.c: Notify the debugger agent on an uncaught exception.

svn path=/branches/mono-2-6/mono/; revision=145549
2009-11-05 22:06:42 +00:00
Zoltan Varga 404fd5363d 2009-11-05 Zoltan Varga <[email protected]>
* debugger-agent.c: Add a 'launch' option.

svn path=/branches/mono-2-6/mono/; revision=145548
2009-11-05 22:06:35 +00:00
Zoltan Varga b97e620cd1 2009-11-05 Zoltan Varga <[email protected]>
* debugger-agent.c: Add a 'timeout' option.

svn path=/branches/mono-2-6/mono/; revision=145547
2009-11-05 22:06:28 +00:00
Zoltan Varga d8b6135f69 2009-11-05 Zoltan Varga <[email protected]>
* debugger-agent.c: Implement the 'server' and 'suspend' options supported by
	the JDWP agent.

svn path=/branches/mono-2-6/mono/; revision=145546
2009-11-05 22:06:21 +00:00
Zoltan Varga f8dc6c2e12 2009-11-04 Zoltan Varga <[email protected]>
* mini-arm.c: Fix the arm build.

svn path=/branches/mono-2-6/mono/; revision=145545
2009-11-05 22:06:05 +00:00
Zoltan Varga 7053970b84 2009-11-04 Gonzalo Paniagua Javier <[email protected]>
* debugger-agent.c: defer including mono-mutex.h until we know the
	agent is supported.

svn path=/branches/mono-2-6/mono/; revision=145544
2009-11-05 22:05:48 +00:00
Zoltan Varga 082692d778 2009-11-04 Jonathan Chambers <[email protected]>
* debugger-agent.c: Changes to build on windows. Use mono-mutex instead
	of pthreads directly.

	* mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
	exception handlers. Pass info argument.

	* mini.h: Adjust signatures of soft debugger functions to pass void*
	instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.

	* mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
	instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
	(mono_arch_is_breakpoint_event): Adjust signature to pass void*
	instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.

	* mini-amd64.h: Adjust MonoW32ExceptionHandler signature.

	* mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
	instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
	(mono_arch_is_breakpoint_event): Adjust signature to pass void*
	instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.

	* mini-x86.h: Adjust MonoW32ExceptionHandler signature.

	* exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.

	* exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.

	* mono-semaphore.h: Skeleton implementation for Windows.

	Code contributed under MIT/X11 license.

svn path=/branches/mono-2-6/mono/; revision=145543
2009-11-05 22:05:28 +00:00
Sebastien Pouliot af1d4ea013 2009-11-05 Sebastien Pouliot <[email protected]>
* class.c: When CoreCLR is enabled don't call mono_init_com_types
	if MONO_CLASS_IS_IMPORT return true unless the type reside in 
	platform (trusted) code. Instead we return a TypeLoadException to
	be thrown later. This is the exception thrown by Silverlight 2 if
	a type, inside application (user) code is marked with [ComImport]
	[Backport r145534]


svn path=/branches/mono-2-6/mono/; revision=145535
2009-11-05 21:19:25 +00:00
Zoltan Varga f65ba83e60 2009-11-05 Zoltan Varga <[email protected]>
* icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
	mono_is_debugger_attached () too.

	* mono-debug.c (mono_is_debugger_attached): New helper function.
	(mono_set_is_debugger_attached): Ditto.

svn path=/branches/mono-2-6/mono/; revision=145523
2009-11-05 18:11:19 +00:00
Rodrigo Kumpera ea4b86c45a In metadata:
* class.c: Add missing check for load errors after every
	call to mono_class_setup_fields

	Fixes #552282.

	Backport of r145501.

2009-11-05  Rodrigo Kumpera  <[email protected]>


svn path=/branches/mono-2-6/mono/; revision=145516
2009-11-05 17:53:36 +00:00
Rolf Bjarne Kvinge 0eb5a45672 2009-11-05 Rolf Bjarne Kvinge <[email protected]>
* net_2_1_raw_System.Net.dll.sources: Add Consts.cs, Locale.cs and
	MonoTODOAttribute.cs to the build to fix ambiguous references to
	those types in corlib and System.dll. This way we'll use our own
	types.

svn path=/branches/mono-2-6/mcs/; revision=145487
2009-11-05 15:58:23 +00:00
Rodrigo Kumpera 7d6bcfe942 In .:
2009-11-05  Rodrigo Kumpera  <[email protected]>

	* metadata.c: Change event table schema to use TDOR for event type
	as this is what it's meant to be.

	* metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
	to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
	entry.

	* metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
	longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
	rows in MONO_TABLE_GENERICPARAM.

	Fixes #552289.

	Backport of r145478.


svn path=/branches/mono-2-6/mono/; revision=145480
2009-11-05 13:57:06 +00:00
Rolf Bjarne Kvinge 4397219217 In mono/metadata:
2009-11-05  Rolf Bjarne Kvinge  <[email protected]>

	* culture-info-tables.h: regenerated.

In tools/locale-builder:
2009-11-05  Rolf Bjarne Kvinge  <[email protected]>

	* Driver.cs: Generate locale data for neutral cultures too. Moonlight
	requires it.

svn path=/branches/mono-2-6/mono/; revision=145468
2009-11-05 10:06:32 +00:00
Rolf Bjarne Kvinge e4c4eaa42c 2009-11-04 Rolf Bjarne Kvinge <[email protected]>
* CultureInfo.cs: Allow neutral cultures, and fix zh-Hans/zh-Hant
	- they're stored internally as zh-chs/zh-cht, and only visible as
	zh-Hans/zh-Hant. zh-CHS/zh-CHS are invalid cultures in SL.

svn path=/branches/mono-2-6/mcs/; revision=145465
2009-11-05 09:34:11 +00:00
Zoltan Varga 59fb647a1f 2009-11-05 Zoltan Varga <[email protected]>
* VirtualMachineManager.cs (Listen): Resurrect the old listen method.

svn path=/branches/mono-2-6/mcs/; revision=145460
2009-11-05 05:59:20 +00:00
Geoff Norton e87c31e9a9 fix the moonlight/mt builds
svn path=/branches/mono-2-6/mcs/; revision=145457
2009-11-05 04:59:55 +00:00
Zoltan Varga a2a81a55b3 2009-11-05 Zoltan Varga <[email protected]>
* VirtualMachineManager.cs (Connect): New method to connect to a runtime
	listening at the provided address.

svn path=/branches/mono-2-6/mcs/; revision=145454
2009-11-05 04:07:26 +00:00
Zoltan Varga f165c2b439 * 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-10-15 Andreia Gaita <[email protected]>

svn path=/branches/mono-2-6/mono/; revision=145452
2009-11-05 03:13:07 +00:00
Gonzalo Paniagua Javier ecff58cc2c 2009-11-04 Gonzalo Paniagua Javier <[email protected]>
* debug-helpers.c: avoid g_strdup() in mono_type_full_name().


svn path=/branches/mono-2-6/mono/; revision=145450
2009-11-05 00:53:54 +00:00
Gonzalo Paniagua Javier 87d2f0b3ff 2009-11-04 Gonzalo Paniagua Javier <[email protected]>
* aot-compiler.c: don't leak the value returned from
	mono_type_full_name().


svn path=/branches/mono-2-6/mono/; revision=145448
2009-11-05 00:36:48 +00:00
Zoltan Varga 832835b220 2009-11-05 Zoltan Varga <[email protected]>
* debugger-agent.c (set_breakpoint): Emit a log message.

svn path=/branches/mono-2-6/mono/; revision=145444
2009-11-05 00:21:19 +00:00
Rodrigo Kumpera be4a4d84ad In .:
* verify.c: Replace calls to mono_class_inflate_generic_type with
	mono_class_inflate_generic_type_checked. Fixes #480005.

	Backport of r144759 and r145284.

2009-11-04  Rodrigo Kumpera  <[email protected]>

svn path=/branches/mono-2-6/mono/; revision=145425
2009-11-04 20:25:15 +00:00
Rodrigo Kumpera b50b26823e In .:
2009-11-04  Rodrigo Kumpera  <[email protected]>
 
     * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
     a MonoError parameter.
 
     * class-internals.h: Add new mono_class_inflate_generic_type_checked version that can does proper error handling.
 
     * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
 
     * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
 
     * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.

	Backport of r144688 and r144755.


svn path=/branches/mono-2-6/mono/; revision=145424
2009-11-04 20:24:08 +00:00
Sebastien Pouliot 607df4fed0 2009-11-04 Sebastien Pouliot <[email protected]>
* string-icalls.c|h: Remove string internal calls that are not 
	used anymore by the class libraries.
	* icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
	which is not used in the class librairies.
	* icall-def.h: Update tables.
	[Backport r145416]


svn path=/branches/mono-2-6/mono/; revision=145417
2009-11-04 19:34:06 +00:00
Rodrigo Kumpera ec0d78aa47 In .:
2009-11-04  Rodrigo Kumpera  <[email protected]>

	* reflection.c (fieldref_encode_signature): If field_image is NULL then
	the token is already properly encoded. Fixs 4.0 build.

	Backport of r145396.


svn path=/branches/mono-2-6/mono/; revision=145412
2009-11-04 19:11:47 +00:00
Rodrigo Kumpera f50e76c580 In .:
2009-11-04  Rodrigo Kumpera  <[email protected]>

	- Add kumpera's mono-error stuff to hopefully fix the build.

	Backport of r144696 by Jonathan Pobst  <[email protected]>


svn path=/branches/mono-2-6/mono/; revision=145411
2009-11-04 18:23:58 +00:00
Rodrigo Kumpera 740935759d In .:
2009-11-04 Rodrigo Kumpera  <[email protected]>

    * mono-error.c, mono-error.h, mono-error-internal.h: New error handling
    structures and functions.

    * Makefile.am: Add new files.


svn path=/branches/mono-2-6/mono/; revision=145410
2009-11-04 18:18:19 +00:00
Zoltan Varga ab2b9ae132 2009-11-04 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Applied patch from Kornél Pál
	<[email protected]>. Enable dolt on cygwin.

svn path=/branches/mono-2-6/mono/; revision=145400
2009-11-04 14:39:13 +00:00
Rolf Bjarne Kvinge c1f54f2585 2009-11-04 Rolf Bjarne Kvinge <[email protected]>
* locales.c (construct_number_format): Check if the number index is
	valid before trying to use it, if not, just return.

svn path=/branches/mono-2-6/mono/; revision=145388
2009-11-04 11:40:16 +00:00
Marek Habersack e23eb863d9 Backport of r145381
svn path=/branches/mono-2-6/mcs/; revision=145382
2009-11-04 09:50:30 +00:00
Miguel de Icaza 7f4ab42e17 Backport
svn path=/branches/mono-2-6/mcs/; revision=145372
2009-11-04 05:03:02 +00:00
Gonzalo Paniagua Javier 2af0c5e9dd 2009-11-03 Gonzalo Paniagua Javier <[email protected]>
* Socket_2_1.cs: stop any blocking thread before closing the socket.


svn path=/branches/mono-2-6/mcs/; revision=145370
2009-11-04 03:32:28 +00:00
Zoltan Varga c31c2edae7 2009-11-04 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
	debug info to 100 because 10 still slows down gdb too much.

svn path=/branches/mono-2-6/mono/; revision=145368
2009-11-04 02:59:41 +00:00
Rodrigo Kumpera c8b10edc24 2009-11-03 Rodrigo Kumpera <[email protected]>
* reflection.c (fieldref_encode_signature): Add new field_image parameter
	to indicate which assembly to use when resolving a custom-mod.

	Fixes handling of volatile fields used across assemblies as reported in #551513.

	Backport of r145337.


svn path=/branches/mono-2-6/mono/; revision=145362
2009-11-04 02:01:44 +00:00
Geoff Norton 895284ddbd ensure we add punctuation as characters, patch from john moshakis
svn path=/branches/mono-2-6/mcs/; revision=145360
2009-11-04 01:39:41 +00:00
Geoff Norton e1a5fc5aa4 remove confusing debug spew
svn path=/branches/mono-2-6/mcs/; revision=145357
2009-11-04 01:34:05 +00:00
Rodrigo Kumpera eecd4147be In metadata:
2009-11-03  Rodrigo Kumpera  <[email protected]>

	* class.c (mono_class_setup_methods): Only give a slot for virtual methods
	of interfaces. Fixes IKVM.

	* class.c (mono_class_setup_vtable_general): Improve debug spew.

	Backport of r145307.


svn path=/branches/mono-2-6/mono/; revision=145354
2009-11-04 01:25:33 +00:00
Gonzalo Paniagua Javier 496c69e0b2 add new library for windows
svn path=/branches/mono-2-6/mono/; revision=145350
2009-11-04 00:44:52 +00:00
Lluis Sanchez d5bf2c0713 2009-11-04 Lluis Sanchez <[email protected]>
* VirtualMachineManager.cs: Properly redirect standard output.


svn path=/branches/mono-2-6/mcs/; revision=145346
2009-11-03 23:56:20 +00:00
Geoff Norton 27c370a851 oops, backport using too
svn path=/branches/mono-2-6/mcs/; revision=145342
2009-11-03 23:19:23 +00:00
Geoff Norton d942242990 update to the latest listening api
svn path=/branches/mono-2-6/mcs/; revision=145340
2009-11-03 23:12:57 +00:00
Rodrigo Kumpera 9b03c346fd In .:
2009-11-03  Rodrigo Kumpera  <[email protected]>

	* simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
	the value was loaded from memory.

	* simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
	the value was loader from there.

	* simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
	without constant swizzle.

	Backport of r145283.


svn path=/branches/mono-2-6/mono/; revision=145338
2009-11-03 22:48:19 +00:00
Sebastien Pouliot 67139125d4 2009-11-03 Sebastien Pouliot <[email protected]>
* SocketAsyncEventArgs.cs: Set error back to SocketError.Success
	once CheckEndPoint succeed.
	[Fix bug #549586]
	[Backport r145329]


svn path=/branches/mono-2-6/mcs/; revision=145330
2009-11-03 21:58:33 +00:00
Sebastien Pouliot 59d7404e1b backport r145313
svn path=/branches/mono-2-6/mcs/; revision=145314
2009-11-03 19:18:23 +00:00
Jb Evain b714fcf819 2009-11-03 Jb Evain <[email protected]>
* Mono.Tuner/CheckVisibility.cs: detect a throw_on_visibility_error
	linker parameter to decide whether or not throw when an error
	have been encountered.


svn path=/branches/mono-2-6/mcs/; revision=145303
2009-11-03 17:05:42 +00:00
Jb Evain ccb5ea5924 remove some cwl left over
svn path=/branches/mono-2-6/mcs/; revision=145302
2009-11-03 16:58:40 +00:00
Zoltan Varga 3e2ed5d493 2009-11-03 Zoltan Varga <[email protected]>
* aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
	function mono_aot_get_array_helper_from_wrapper ().

	* aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
	array helper methods.

svn path=/branches/mono-2-6/mono/; revision=145299
2009-11-03 16:37:21 +00:00
Sebastien Pouliot de2e6c2658 2009-11-03 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: Open up the internals to System.Net.dll (which
	needs Uri.IsDefaultPort) for NET_2_1 and remove it for 
	System.ComponentModel.DataAnnotations (again for NET_2_1)
	[Backport r145294]


svn path=/branches/mono-2-6/mcs/; revision=145295
2009-11-03 16:24:14 +00:00
Zoltan Varga ab3dc22a2c 2009-11-03 Zoltan Varga <[email protected]>
* Makefile: Don't define LIBRARY_PACKAGE so it gets installed normally.

svn path=/branches/mono-2-6/mcs/; revision=145293
2009-11-03 16:18:26 +00:00
Marek Habersack 5a8c7954b9 Backport of r145280
svn path=/branches/mono-2-6/mcs/; revision=145281
2009-11-03 12:13:44 +00:00
Zoltan Varga 45e7a987de 2009-11-03 Zoltan Varga <[email protected]>
* debugger-agent.c: Include netinet/in.h to fix the bsd build.

svn path=/branches/mono-2-6/mono/; revision=145270
2009-11-03 05:31:33 +00:00
Zoltan Varga 285052b5c6 2009-11-03 Zoltan Varga <[email protected]>
* configure.in: Check for netinet/in.h.

svn path=/branches/mono-2-6/mono/; revision=145268
2009-11-03 05:27:28 +00:00
Zoltan Varga be45adc365 2009-11-03 Zoltan Varga <[email protected]>
* debugger-agent.c: Add support for filtering events by assemblies.

svn path=/branches/mono-2-6/mono/; revision=145259
2009-11-03 02:22:45 +00:00
Zoltan Varga 674da8fdc4 2009-11-03 Zoltan Varga <[email protected]>
* debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
	the agent is not enabled.

svn path=/branches/mono-2-6/mono/; revision=145258
2009-11-03 02:22:38 +00:00
Zoltan Varga 88e041c46e LAST one!
svn path=/branches/mono-2-6/mono/; revision=145256
2009-11-03 02:22:32 +00:00
Zoltan Varga ebb0681764 one more
svn path=/branches/mono-2-6/mono/; revision=145255
2009-11-03 02:22:27 +00:00
Zoltan Varga dcac4ba42c 2009-11-02 Gonzalo Paniagua Javier <[email protected]>
* exceptions-x86.c: hopefully last change to fix the windows build.
	This one courtesy of Jonathan Chambers.

svn path=/branches/mono-2-6/mono/; revision=145254
2009-11-03 02:22:20 +00:00
Zoltan Varga cb0b45a4e3 2009-11-02 Gonzalo Paniagua Javier <[email protected]>
* debugger-agent.c: remove unused function.

svn path=/branches/mono-2-6/mono/; revision=145253
2009-11-03 02:22:14 +00:00
Zoltan Varga e5e32696e1 2009-11-02 Gonzalo Paniagua Javier <[email protected]>
* debugger-agent.c: add #ifdefs for a few header files.
	* mini-x86.h: disable the soft debugger in windows.
	Step 1 of 2 to make this compile on windows with gcc.

svn path=/branches/mono-2-6/mono/; revision=145252
2009-11-03 02:22:07 +00:00
Zoltan Varga 3fe9da1a6b 2009-11-02 Gonzalo Paniagua Javier <[email protected]>
* configure.in: add a few missing header file checks.

svn path=/branches/mono-2-6/mono/; revision=145251
2009-11-03 02:22:01 +00:00
Zoltan Varga b6a7fc1f8a 2009-07-01 Zoltan Varga <[email protected]>
Merge the soft debugger branch.

	* debugger-agent.h debugger-agent.c: New files containing the soft
	mode debugger module.

	* method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
	at the appropriate locations.

	* mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
	opcode.

	* mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
	enable/disable single stepping.

	* exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
	which returns all information in a StackFrameInfo structure, and can handle the
	LMF frames added by the debugger.

	* mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
	about an LMF frame.

	* mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
	walker function which works on a specific thread and passes a StackFrameInfo
	structure to its callback.

	* mini.c (mini_init): Initialize the debugger agent.

	* aot-compiler.c aot-runtime.c: Add soft-debug support.

	* mini-ops.h: Add OP_SEQ_POINT opcode.

	* driver.c (mono_main): Add new '--debugger-agent' option for passing
	arguments to the debugger agent.

svn path=/branches/mono-2-6/mono/; revision=145249
2009-11-03 02:18:50 +00:00
Zoltan Varga d730a668b1 2009-11-03 Zoltan Varga <[email protected]>
* EventRequest.cs (AssemblyFilter): New property to filter
	events based on a list of assemblies.

	* Connection.cs: Add assembly filters to the protocol implementation.

svn path=/branches/mono-2-6/mcs/; revision=145245
2009-11-03 01:55:39 +00:00
Zoltan Varga 9f98591560 2009-11-03 Zoltan Varga <[email protected]>
* Makefile: Move Mono.Debugger.Soft to net_2_0_dirs for 2.6.

svn path=/branches/mono-2-6/mcs/; revision=145238
2009-11-03 01:11:04 +00:00
Zoltan Varga 2335431b38 2009-11-02 Zoltan Varga <[email protected]>
* Makefile: Add Mono.Debugger.Soft.

In Mono.Debugger.Soft:

2009-11-02  Zoltan Varga  <[email protected]>

	* New directory containing the managed interface to the soft-mode debugger.

svn path=/branches/mono-2-6/mcs/; revision=145237
2009-11-03 01:10:25 +00:00
Zoltan Varga 0abadb40a1 2009-11-02 Zoltan Varga <[email protected]>
* debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.

	* threads.c (mono_thread_attach): Call the profiler thread start callback.

	* object-internals.h (_MonoThreadInternal): Add a 'flags' field.

	* threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
	flag set.

	* profiler.c: Add new profiler callbacks for runtime invoke.

	* object.c (mono_runtime_invoke): Call the runtime invoke callbacks.

svn path=/branches/mono-2-6/mono/; revision=145233
2009-11-03 00:35:00 +00:00
Sebastien Pouliot 2f3a1b3dbf 2009-11-02 Sebastien Pouliot <[email protected]>
* Thread.cs (set_CurrentUICulture): Delay setting in_currentculture
	to true until after the null check and the return statement.


svn path=/branches/mono-2-6/mcs/; revision=145215
2009-11-02 20:06:05 +00:00
Jb Evain 26cae340b4 2009-11-02 Jb Evain <[email protected]>
* Mono.Tuner/MoonlightAssemblyStep.cs: adapt to the MT linker merge.


svn path=/branches/mono-2-6/mcs/; revision=145210
2009-11-02 16:19:48 +00:00
Jb Evain f21d6449fa 2009-11-02 Jb Evain <[email protected]>
Merge the MonoTouch Linker branch.

	* monolinker.exe.sources: update

	* Mono.Linker/Annotations.cs:
		- add an preserved methods annotation on a type.
		- add an annotation to get the base methods of a method.
		- add an annotation to get the overriden method of a method.

	* Mono.Linker/AssemblyAction.cs:
		add a Delete action to remove an assembly from the output set.

	* Mono.Linker.Steps/TypeMapStep.cs:
		new step that create a map of virtual methods implementation.

	* Mono.Linker.Steps/MarkStep.cs:
		- removal of virtual methods.
		- fix for custom attributes assigning properties and field
			defined in a base type.
		- mark scopes.
		- mark default constructors of types used as a generic instance
			of a generic parameter constrained with new().
		- apply preserved methods.

	* Mono.Linker.Steps/SweepStep.cs: remove unused assemblies.

	* Mono.Linker.Steps/LoadI18nAssemblies.cs:
		fix linking of i18n assemblies.

	* Mono.Linker.Steps/OutputStep.cs:
		fix the copied assemblies when the output directory
		is the same as the origin of the assemblies.

	* Mono.Linker.Steps/ResolveFromXmlStep.cs
	* Mono.Linker.Steps/ResolveFromAssemblyStep.cs
	* Mono.Linker.Steps/BaseStep.cs
	* Mono.Linker/Driver.cs
	* Mono.Linker/Pipeline.cs:
		Cosmetics.


svn path=/branches/mono-2-6/mcs/; revision=145209
2009-11-02 16:19:15 +00:00
Zoltan Varga 3e7cea1232 2009-11-02 Zoltan Varga <[email protected]>
* mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
	speed things up.

	* mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.

svn path=/branches/mono-2-6/mono/; revision=145197
2009-11-02 12:45:00 +00:00
Zoltan Varga a988a10992 2009-11-02 Zoltan Varga <[email protected]>
* mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.

	* mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
	if needed.
	(mono_create_llvm_imt_trampoline): New function to create a trampoline which
	sets the IMT argument and makes a virtual call.

	* mini-llvm.c: Enable interface calls using the llvm imt trampoline.

svn path=/branches/mono-2-6/mono/; revision=145192
2009-11-02 12:00:45 +00:00
Zoltan Varga 7e07d13efe Fix the 2.6 build.
svn path=/branches/mono-2-6/mono/; revision=145177
2009-11-01 19:28:01 +00:00
Zoltan Varga b33f8408a7 2009-11-01 Zoltan Varga <[email protected]>
* configure.in: Make the LLVM warning a bit more up-to-date.

svn path=/branches/mono-2-6/mono/; revision=145176
2009-11-01 19:25:06 +00:00
Zoltan Varga ff6805c6d2 2009-11-01 Zoltan Varga <[email protected]>
* Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
	the windows build.

svn path=/branches/mono-2-6/mono/; revision=145174
2009-11-01 19:16:47 +00:00
Zoltan Varga b25ad6aaff 2009-11-01 Zoltan Varga <[email protected]>
* configure.in: Pass -mno-cygwin to CXX too on windows. Enable AC_PROG_CXX
	since it now works on windows too.

svn path=/branches/mono-2-6/mono/; revision=145173
2009-11-01 19:16:40 +00:00
Sebastien Pouliot f80650fa1e 2009-11-01 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: Add new CheckSearchPattern 
	validation method. Fix GetDirectoryNames to behave like 
	GetFileNames wrt searchPattern
	[Backport r145167]


svn path=/branches/mono-2-6/mcs/; revision=145168
2009-11-01 16:47:10 +00:00
Sebastien Pouliot 7f7c90c70e 2009-11-01 Sebastien Pouliot <[email protected]>
* ResourceManager.cs (GetResourceFilePath): Don't use 
	'resourceDir' which should always be null for Moonlight
	[Backport r145165]


svn path=/branches/mono-2-6/mcs/; revision=145166
2009-11-01 16:46:04 +00:00
Miguel de Icaza 31dd3aca62 Backport: 2009-10-31 Miguel de Icaza <[email protected]>
* threads.c: refactor the code that initializes the
	thread_start_args into a reusable function and use this in the two
	methods that start up threads.

svn path=/branches/mono-2-6/mono/; revision=145155
2009-10-31 22:36:20 +00:00
Zoltan Varga 84465817b5 2009-10-25 Zoltan Varga <[email protected]>
* threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.

svn path=/branches/mono-2-6/mono/; revision=145151
2009-10-31 22:04:24 +00:00
Sebastien Pouliot cd862e8258 2009-10-31 Sebastien Pouliot <[email protected]>
* BinaryCommon.cs: Disable MONO_REFLECTION_SERIALIZER override 
	for Moonlight plugin.
	[Backport r145147]


svn path=/branches/mono-2-6/mcs/; revision=145148
2009-10-31 16:20:57 +00:00
Zoltan Varga 038367c545 2009-10-31 Zoltan Varga <[email protected]>
* appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
	Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.

svn path=/branches/mono-2-6/mono/; revision=145144
2009-10-31 14:13:11 +00:00
Gonzalo Paniagua Javier ed232ae225 2009-10-31 Gonzalo Paniagua Javier <[email protected]>
* mono-perfcounters.c: add the "_Total" instance for CPU counters.
	Until now, we only had the per-cpu(core) counters.

2009-10-30 Gonzalo Paniagua Javier <[email protected]>

	* mono-proclib.c: hz is only multiplied by the number of cpus when
	requesting "_Total".

	Fixes bug #523520.

svn path=/branches/mono-2-6/mono/; revision=145135
2009-10-31 04:06:56 +00:00
Veerapuram Varadhan c6c53d568b backport of r145122
svn path=/branches/mono-2-6/mcs/; revision=145123
2009-10-30 20:58:47 +00:00
Sebastien Pouliot e64e6483ce 2009-10-30 Sebastien Pouliot <[email protected]>
* MethodBuilderTest.cs: Add (copy from TypeBuilderTest) test 
	cases for two DefineGenericParameters
	[Backport r145118]


svn path=/branches/mono-2-6/mcs/; revision=145120
2009-10-30 20:13:40 +00:00
Sebastien Pouliot 17626ad634 2009-10-30 Sebastien Pouliot <[email protected]>
* MethodBuilder.cs: Add missing 'names' validations in 
	DefineGenericParameters
	[Backport r145118]


svn path=/branches/mono-2-6/mcs/; revision=145119
2009-10-30 20:12:48 +00:00
Marek Habersack 62509d7f33 Backport of r145109
svn path=/branches/mono-2-6/mcs/; revision=145111
2009-10-30 15:59:01 +00:00
Zoltan Varga e980095ec9 2009-10-30 Zoltan Varga <[email protected]>
* mini.c (mini_cleanup): Call profiler shutdown before shutting down the
	runtime. Fixes #551228.

svn path=/branches/mono-2-6/mono/; revision=145104
2009-10-30 15:19:30 +00:00
Sebastien Pouliot f0a8a458d1 2009-10-30 Sebastien Pouliot <[email protected]>
* MonoMethod.cs: Remove CAS check in MonoCMethod.Invoke (just 
	like it was done for MonoMethod.Invoke sister method)
	[Backport r145101]


svn path=/branches/mono-2-6/mcs/; revision=145102
2009-10-30 15:05:39 +00:00
Sebastien Pouliot c05d8961d5 MonoType.cs: Don't pass null value to icalls GetCorrespondingInflated[Constructor|Method]
svn path=/branches/mono-2-6/mcs/; revision=145100
2009-10-30 15:03:58 +00:00
Chris Toshok 90d3f7a97e 2009-10-29 Chris Toshok <[email protected]>
* TypeMap.cs (Deserialize): use
        FormatterServices.GetUninitializedObject instead of
        Activator.CreateInstance, since we shouldn't be invoking the
        default ctor.


svn path=/branches/mono-2-6/mcs/; revision=145077
2009-10-30 05:04:17 +00:00
Andreia Gaita e18c231fc8 * DataContractJsonSerializer.cs: SL accepts keys without "", so tweak
the data to fix the quotes before passing it to the deserializer
[backported from r145075]

svn path=/branches/mono-2-6/mcs/; revision=145076
2009-10-30 02:26:30 +00:00
Veerapuram Varadhan 385d93e3bc backport of r145072
svn path=/branches/mono-2-6/mcs/; revision=145073
2009-10-30 01:09:16 +00:00
Marek Habersack b066dcaa56 Backport of r145069
svn path=/branches/mono-2-6/mcs/; revision=145070
2009-10-30 00:53:35 +00:00
Veerapuram Varadhan 13dd868c42 backport of r145064
svn path=/branches/mono-2-6/mcs/; revision=145065
2009-10-29 20:54:40 +00:00
Veerapuram Varadhan 4471cba319 backport of r145054
svn path=/branches/mono-2-6/mcs/; revision=145055
2009-10-29 18:39:28 +00:00
Sebastien Pouliot 20f61ae832 2009-10-29 Sebastien Pouliot <[email protected]>
* CompareInfoTest.cs: Add test cases to validate parameters
	[Backport r145023]


svn path=/branches/mono-2-6/mcs/; revision=145026
2009-10-29 14:14:43 +00:00
Sebastien Pouliot 2825f28523 2009-10-29 Sebastien Pouliot <[email protected]>
* CompareInfo.cs: Add/fix CompareOptions validations. Reduce code
	duplication in Compare methods (wrt CompareOptions). Fix 
	calculation bug	in Compare(string,int.string,int,CompareOptions).
	[Backport r145023]


svn path=/branches/mono-2-6/mcs/; revision=145025
2009-10-29 14:13:52 +00:00
Zoltan Varga 3871e25478 2009-10-29 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.

	* basic.cs: Add a test.

svn path=/branches/mono-2-6/mono/; revision=145018
2009-10-29 13:08:46 +00:00
Sebastien Pouliot 9d1b407625 2009-10-29 Sebastien Pouliot <[email protected]>
* ModuleBuilderTest.cs: Add test cases for GetType overloads
	* TypeBuilderTest.cs: Remove NotWorking from two 
	DefineGenericParameters test case.
	[Backport r145013]


svn path=/branches/mono-2-6/mcs/; revision=145015
2009-10-29 12:53:47 +00:00
Sebastien Pouliot d24244af13 2009-10-29 Sebastien Pouliot <[email protected]>
* ModuleBuilder.cs: Add missing 'className' validations in GetType
	* TypeBuilder.cs: Add missing 'names' validations in 
	DefineGenericParameters
	[Backport r145013]


svn path=/branches/mono-2-6/mcs/; revision=145014
2009-10-29 12:52:54 +00:00
Veerapuram Varadhan cbbc5a16a6 backport r145011
svn path=/branches/mono-2-6/mcs/; revision=145012
2009-10-29 12:49:27 +00:00
Sebastien Pouliot c27526153b 2009-10-29 Sebastien Pouliot <[email protected]>
* FileStream.cs: Reduce code duplication by merging FillBuffer 
	with FillBufferToStream
	[Backport r145008]


svn path=/branches/mono-2-6/mcs/; revision=145010
2009-10-29 12:15:23 +00:00
Zoltan Varga d7b68fa40b 2009-10-29 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
	load vtypes instead if OP_LOADV_MEMBASE in the implementation of
	CONSTRAINED. Fixes #550964.

	* generics.cs: Add a test.

svn path=/branches/mono-2-6/mono/; revision=145007
2009-10-29 12:09:16 +00:00
Jb Evain 0ea412d547 2009-10-29 Jb Evain <[email protected]>
* ActivationServices.cs: avoid a static constructor.


svn path=/branches/mono-2-6/mcs/; revision=145003
2009-10-29 10:49:36 +00:00
Marek Safar 73ebfb6251 2009-10-29 Marek Safar <[email protected]>
A fix for bug #550580	
	* convert.cs: Don't eliminate explicit precission casts.


svn path=/branches/mono-2-6/mcs/; revision=144997
2009-10-29 10:01:04 +00:00
Marek Safar b81781bbe4 Updated.
svn path=/branches/mono-2-6/mcs/; revision=144996
2009-10-29 10:00:46 +00:00
Veerapuram Varadhan 7c712848f1 backport of r144980
svn path=/branches/mono-2-6/mcs/; revision=144981
2009-10-29 02:13:28 +00:00
Lluis Sanchez f46f770b16 2009-10-28 Lluis Sanchez Gual <[email protected]>
* MarshalByRefObject.cs: In InitializeLifetimeService, if a lease
	exists for the object return it, instead of always creating
	a new one. Fixes bug #544357.


svn path=/branches/mono-2-6/mcs/; revision=144963
2009-10-28 18:40:05 +00:00
Marek Habersack b7ef95a35d Backport of r144947
svn path=/branches/mono-2-6/mcs/; revision=144948
2009-10-28 14:01:48 +00:00
Sebastien Pouliot 1cf1d66a3e 2009-10-28 Sebastien Pouliot <[email protected]>
* FileStream.cs: Move code to deal with 'anonymous' filenames
	into two methods (returning the path, fullpath or only the 
	filename). Default Moonlight to anonymous (not only for isolated
	storage) unless the coreclr is disable (e.g. smcs)
	[Backport r144945]


svn path=/branches/mono-2-6/mcs/; revision=144946
2009-10-28 13:42:56 +00:00
Marek Habersack 3afb337dec Fix 1.1 build
svn path=/branches/mono-2-6/mcs/; revision=144939
2009-10-28 12:05:39 +00:00
Marek Habersack b213aa0bf2 Backport of r144935
svn path=/branches/mono-2-6/mcs/; revision=144936
2009-10-28 10:37:37 +00:00
Marek Habersack 423ea8af8e Backport of r144932
svn path=/branches/mono-2-6/mcs/; revision=144933
2009-10-28 10:19:34 +00:00
Sebastien Pouliot a5727b1062 2-6 still supports 1.1 profile...
svn path=/branches/mono-2-6/mcs/; revision=144929
2009-10-28 01:03:05 +00:00
Sebastien Pouliot c3d41f08f9 2009-10-27 Sebastien Pouliot <[email protected]>
* StringTest.cs: Add test case for methods that can return
	empty strings.
	[Backport r144921]


svn path=/branches/mono-2-6/mcs/; revision=144925
2009-10-27 23:46:18 +00:00
Sebastien Pouliot 9de4121212 2009-10-27 Sebastien Pouliot <[email protected]>
* UnicodeEncodingTest.cs: Add test cases with an odd number of 
	bytes being used in GetString (it does not crash but it does not
	work like MS FX either).
	[Backport r144921]


svn path=/branches/mono-2-6/mcs/; revision=144924
2009-10-27 23:45:41 +00:00
Sebastien Pouliot a29c9418a8 2009-10-27 Sebastien Pouliot <[email protected]>
* String.cs: Remove unused (and unneeded) internal call defs.
	Reduce duplication (and fix test) for Concat (object,object).
	Avoid allocating zero-length strings in the cases where the
	FX does not do so.
	[Backport r144921]


svn path=/branches/mono-2-6/mcs/; revision=144923
2009-10-27 23:45:00 +00:00
Sebastien Pouliot 38087128b7 2009-10-27 Sebastien Pouliot <[email protected]>
* TextInfo.cs: Avoid allocating zero-length strings in ToLower 
	and ToUpper methods
	[Backport r144921]


svn path=/branches/mono-2-6/mcs/; revision=144922
2009-10-27 23:43:47 +00:00
Veerapuram Varadhan e3783491dc 2009-10-28 Veerapuram Varadhan <[email protected]>
** Fixes #385028/#385029
	* DbCommandBuilder.cs (CreateInsertCommand): Workaround for inserting
	DEFAULT values to non-null-columns.
	(GetInsertCommand): New overload added to handle above workaround.
	(set_DataAdapter): Register for the RowUpdatingEventHandler.

svn path=/branches/mono-2-6/mcs/; revision=144917
2009-10-27 21:21:27 +00:00
Marek Habersack 5c80561e2e Backport of r144898
svn path=/branches/mono-2-6/mcs/; revision=144899
2009-10-27 13:10:55 +00:00
Marek Habersack 45aeaa1253 Backport of r144894
svn path=/branches/mono-2-6/mcs/; revision=144895
2009-10-27 09:56:10 +00:00
Zoltan Varga f1a66b8ed5 Really fix the osx build.
svn path=/branches/mono-2-6/mono/; revision=144874
2009-10-26 20:08:00 +00:00
Zoltan Varga b2cc33d3db Fix osx build.
svn path=/branches/mono-2-6/mono/; revision=144872
2009-10-26 20:00:59 +00:00
Zoltan Varga cd6613509c In libgc:
2009-10-25  Zoltan Varga  <[email protected]>

	* misc.c (GC_get_suspend_signal): New API function to return the suspend signal
	used by libgc.

In mono/mini:

2009-10-25  Zoltan Varga  <[email protected]>

	* mini-posix.c (add_signal_handler): Delay the GC suspend signal while
	executing a SIGSEGV handler on an altstack, since libgc can't handle that.

In mono/tests:

2009-10-25  Zoltan Varga  <[email protected]>

	* misc.c (GC_get_suspend_signal): New API function to return the suspend signal
	used by libgc.

svn path=/branches/mono-2-6/mono/; revision=144871
2009-10-26 20:00:51 +00:00
Zoltan Varga d8da3eab41 2009-10-25 Zoltan Varga <[email protected]>
* threads.c (start_wrapper): Call mono_profiler_thread_start () later after
	signalling start_notify.

svn path=/branches/mono-2-6/mono/; revision=144870
2009-10-26 20:00:40 +00:00
Sebastien Pouliot ae40d18e07 2009-10-26 Sebastien Pouliot <[email protected]>
* Assembly.cs: Share code between GetSatelliteAssembly and 
	GetSatelliteAssemblyNoThrow. For Moonlight ensure both 
	GetManifestResourceStream and GetSatelliteAssembly don't load
	anything "below" the assembly path.
	[Backport r144845]


svn path=/branches/mono-2-6/mcs/; revision=144846
2009-10-26 12:11:50 +00:00
Sebastien Pouliot a89a5936ac 2009-10-26 Sebastien Pouliot <[email protected]>
* Consts.cs.in: Update SL2 FX version to the second (and last)
	released version.
	[Backport r144843]


svn path=/branches/mono-2-6/mcs/; revision=144844
2009-10-26 12:03:41 +00:00
Sebastien Pouliot 5880e4bf3c 2009-10-26 Sebastien Pouliot <[email protected]>
* InterlockedTest.cs: Add test case for generic methods
	CompareExchange and Exchange
	[Backport r144840]


svn path=/branches/mono-2-6/mcs/; revision=144842
2009-10-26 11:57:12 +00:00
Sebastien Pouliot dc7d62f122 TypeTest.cs: New. Add test cases for IsInstanceOfType
svn path=/branches/mono-2-6/mcs/; revision=144841
2009-10-26 11:56:37 +00:00
Sebastien Pouliot 796a9ea860 2009-10-25 Sebastien Pouliot <[email protected]>
* ThreadTest.cs: Add test cases for Current[UI]Culture (not 
	working), Name, Join, Sleep and SpinWait
	[Backport r144824]


svn path=/branches/mono-2-6/mcs/; revision=144826
2009-10-25 16:43:07 +00:00
Sebastien Pouliot 2548566d31 2009-10-25 Sebastien Pouliot <[email protected]>
* Thread.cs: Fix validations for Join and Sleep overloads
	[Backport r144824]


svn path=/branches/mono-2-6/mcs/; revision=144825
2009-10-25 16:42:04 +00:00
Geoff Norton fe8c4d8126 make uri no braindead on mt
svn path=/branches/mono-2-6/mcs/; revision=144815
2009-10-24 21:25:05 +00:00
Gonzalo Paniagua Javier dff48874e3 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
marshal.c: BeginInvoke cannot be called on multicast delegates with
	multiple targets. Fixes bug #574426.
	Backported from trunk.


svn path=/branches/mono-2-6/mono/; revision=144812
2009-10-24 20:52:26 +00:00
Gonzalo Paniagua Javier 8c2cc0f8b1 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: do not test the st_mode field for shadow-copies.
	Fixes bug #545276.


svn path=/branches/mono-2-6/mono/; revision=144809
2009-10-24 20:04:31 +00:00
Gonzalo Paniagua Javier 94beec4383 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* DeflateStreamTest.cs: test from bug #549492.


svn path=/branches/mono-2-6/mcs/; revision=144803
2009-10-24 17:26:56 +00:00
Gonzalo Paniagua Javier 7ec5d41688 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* zlib-helper.c: stop trying to decompress when we get Z_STREAM_END.
	Patch by Ives Bastide. Fixes bug #549942.


svn path=/branches/mono-2-6/mono/; revision=144800
2009-10-24 17:22:13 +00:00
Sebastien Pouliot c49415d54c 2009-10-24 Sebastien Pouliot <[email protected]>
* StackFrame.cs: Relax GetSecureFileName when the coreclr is not 
	active (i.e. show full path when compiling with smcs)
	[Backport r144797]


svn path=/branches/mono-2-6/mcs/; revision=144798
2009-10-24 16:11:58 +00:00
Sebastien Pouliot e11b6645cd 2009-10-24 Sebastien Pouliot <[email protected]>
* TypeBuilderTest.cs: Validation test cases for GetConstructor
	[Backport r144791]


svn path=/branches/mono-2-6/mcs/; revision=144793
2009-10-24 15:50:51 +00:00
Sebastien Pouliot 76e901f710 2009-10-24 Sebastien Pouliot <[email protected]>
* AssemblyBuilder.cs: For Silverlight only AssemblyBuilderAccess.Run
	is supported (browser-side) but we still allow other values when
	compiling (e.g. smcs) outside the browser (wo coreclr)
	* TypeBuilder.cs (GetConstructor): Fix validations
	[Backport r144791]


svn path=/branches/mono-2-6/mcs/; revision=144792
2009-10-24 15:46:51 +00:00
Zoltan Varga 6fe974d80d Fix the build.
svn path=/branches/mono-2-6/mono/; revision=144790
2009-10-24 13:28:06 +00:00
Zoltan Varga 9ede4e5632 2009-10-24 Zoltan Varga <[email protected]>
* mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
    	which will contain the domain where the method was found.

    	* exceptions-<ARCH>.c mini-exceptions.c: Update callers of
    	mini_jit_info_table_find ().

svn path=/branches/mono-2-6/mono/; revision=144789
2009-10-24 13:27:59 +00:00
Gonzalo Paniagua Javier e67e2fae94 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* threadpool.[ch]: added hooks for thread start/finish and item
	processing begin/end. For monotouch use only.


svn path=/branches/mono-2-6/mono/; revision=144783
2009-10-24 04:35:13 +00:00
Zoltan Varga 75e9de6dd3 Fix the build.
svn path=/branches/mono-2-6/mono/; revision=144781
2009-10-24 02:32:23 +00:00
Zoltan Varga 74f0572274 2009-10-24 Zoltan Varga <[email protected]>
* threads.c (mono_thread_get_name): New helper function.

svn path=/branches/mono-2-6/mono/; revision=144780
2009-10-24 02:27:40 +00:00
Zoltan Varga 389692ae85 2009-10-24 Zoltan Varga <[email protected]>
* reflection.c (resolve_object): Set handle_class for strings too.
	(mono_reflection_create_custom_attr_data_args): New helper function to decode
	a cattr blob into a set of arrays and structures without creating the custom
	attributes themselves.
	(create_custom_attr_data): Simplify using create_custom_attr_data_args.

	* mono-debug.c (mono_debug_il_offset_from_address): New helper function.

	* debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
	function.

svn path=/branches/mono-2-6/mono/; revision=144778
2009-10-24 02:19:39 +00:00
Zoltan Varga 7b436d9afc 2009-10-24 Zoltan Varga <[email protected]>
* aot-compiler.c (xdebug_end_emit): Remove so stray debug code.

svn path=/branches/mono-2-6/mono/; revision=144772
2009-10-24 00:56:59 +00:00
Zoltan Varga 245474ed6f 2009-10-24 Zoltan Varga <[email protected]>
* branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.

svn path=/branches/mono-2-6/mono/; revision=144764
2009-10-23 23:28:10 +00:00
Alexandre Gomes 370db981b3 Fixed GetWebRequest overriding problems, bug: https://bugzilla.novell.com/show_bug.cgi?id=549580
svn path=/branches/mono-2-6/mcs/; revision=144754
2009-10-23 18:37:47 +00:00
Sebastien Pouliot dbb67cab7a security-manager.c: Report if core-clr is active from ves_icall_System_Security_SecurityManager_get_SecurityEnabled to allow Moonlight BCL to behave appropriately (both in browser and outside, e.g. smcs)
svn path=/branches/mono-2-6/mono/; revision=144738
2009-10-23 14:34:04 +00:00
Sebastien Pouliot 042f77071a 2009-10-23 Sebastien Pouliot <[email protected]>
* SecurityManager_2_1.cs: Return to duty for SecurityEnabled, it
	will allow us to distinguish between running in the browser
	(coreclr active) and on the console (e.g. smcs) from managed code
	[Backport r144732]


svn path=/branches/mono-2-6/mcs/; revision=144733
2009-10-23 12:55:25 +00:00
Gonzalo Paniagua Javier 971d062268 2009-10-23 Gonzalo Paniagua Javier <[email protected]>
* mono-config.c: ignore UTF-8 BOM and report parser errors.
	Fixes bug #549108.


svn path=/branches/mono-2-6/mono/; revision=144729
2009-10-23 12:05:21 +00:00
Gonzalo Paniagua Javier b1a3d29a9e 2009-10-23 Gonzalo Paniagua Javier <[email protected]>
* Configuration.cs: make this work again with bundled configuration
	files. Fixes bug #495957. Patch from Tor Lillqvist.


svn path=/branches/mono-2-6/mcs/; revision=144723
2009-10-23 09:53:44 +00:00
Andreia Gaita 313b593071 * XmlConvert.cs: make ToUri static, fixes #548918 (moon)
[backport r144712]

2009-10-23  Andreia Gaita  <[email protected]>

svn path=/branches/mono-2-6/mcs/; revision=144713
2009-10-23 04:14:05 +00:00
Atsushi Eno cde520de2d merge r144706.
svn path=/branches/mono-2-6/mcs/; revision=144711
2009-10-23 03:46:01 +00:00
Atsushi Eno 428416e37d merge r144707.
svn path=/branches/mono-2-6/mcs/; revision=144710
2009-10-23 03:45:26 +00:00
Atsushi Eno 3184c790c7 merge everything from trunk.
svn path=/branches/mono-2-6/mcs/; revision=144704
2009-10-23 03:04:22 +00:00
Gonzalo Paniagua Javier 3e814f1d9b 2009-10-22 Gonzalo Paniagua Javier <[email protected]>
* class.c: fix typo.


svn path=/branches/mono-2-6/mono/; revision=144692
2009-10-22 22:49:45 +00:00
Sebastien Pouliot cf715cb40a corlib_test.dll.sources: Add System/WeakReferenceTest and System.Threading/EventWaitHandleTest.cs
svn path=/branches/mono-2-6/mcs/; revision=144685
2009-10-22 20:54:49 +00:00
Sebastien Pouliot a1f76a2fcf 2009-10-22 Sebastien Pouliot <[email protected]>
* EventWaitHandleTest.cs: New. Test case for EventResetMode 
	validation
	[Backport r144681]


svn path=/branches/mono-2-6/mcs/; revision=144684
2009-10-22 20:53:40 +00:00
Sebastien Pouliot 2645469dac 2009-10-22 Sebastien Pouliot <[email protected]>
* WeakReferenceTest.cs: New. Basic test cases
	[Backport r144681]


svn path=/branches/mono-2-6/mcs/; revision=144683
2009-10-22 20:49:58 +00:00
Sebastien Pouliot 426cc16e68 2009-10-22 Sebastien Pouliot <[email protected]>
* EventWaitHandleTest.cs: New. Test case for EventResetMode 
	validation
	[Backport r144681]


svn path=/branches/mono-2-6/mcs/; revision=144682
2009-10-22 20:47:55 +00:00
Marek Habersack d6a32cd6ce Backport of r144675
svn path=/branches/mono-2-6/mcs/; revision=144677
2009-10-22 20:01:50 +00:00
Zoltan Varga 8f82fce186 2009-10-22 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
	set, its not supported yet.

svn path=/branches/mono-2-6/mono/; revision=144676
2009-10-22 20:01:43 +00:00
Zoltan Varga bbf387a8f2 2009-10-22 Zoltan Varga <[email protected]>
* aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
	iface wrapper is not found.
	(mono_aot_get_method): Ditto for GetGenericValueImpl.

svn path=/branches/mono-2-6/mono/; revision=144673
2009-10-22 19:53:31 +00:00
Zoltan Varga 34c65cd606 2009-10-22 Zoltan Varga <[email protected]>
* aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
	iface wrapper is not found.

svn path=/branches/mono-2-6/mono/; revision=144666
2009-10-22 18:54:18 +00:00
Marek Habersack 8c5d96e873 Backport of r144662
svn path=/branches/mono-2-6/mcs/; revision=144663
2009-10-22 18:32:58 +00:00
Jonathan Pryor 920fc7c140 * AssemblyInfo.cs: Use Consts.FxVersion when building for MONOTOUCH.
svn path=/branches/mono-2-6/mcs/; revision=144660
2009-10-22 18:20:03 +00:00
Atsushi Eno 3e977b2172 merge every changes to this assembly upto r144652.
svn path=/branches/mono-2-6/mcs/; revision=144658
2009-10-22 18:15:20 +00:00
Zoltan Varga 8d6429e08c 2009-10-22 Zoltan Varga <[email protected]>
* marshal.c (mono_string_builder_to_utf16): Applied patch from
	Hib Eris  <[email protected]>. Return empty string for empty string builders.
	Fixes #549173.

svn path=/branches/mono-2-6/mono/; revision=144654
2009-10-22 17:49:47 +00:00
Lluis Sanchez 9bed95350d 2009-10-22 Lluis Sanchez Gual <[email protected]>
* CodeNamespaceImportCollection.cs: Properly update the internal
	keys hashtable when there are changes in the items.


svn path=/branches/mono-2-6/mcs/; revision=144651
2009-10-22 16:29:41 +00:00
Atsushi Eno cc737a9ba2 backport r144647.
svn path=/branches/mono-2-6/mcs/; revision=144648
2009-10-22 16:12:06 +00:00
Sebastien Pouliot dd953f50c5 2009-10-22 Sebastien Pouliot <[email protected]>
* MonitorTest.cs: Mark existing tests as "NotWorking" since they
	fail in MS FX2 (maybe they worked in 1.x?). Add more test cases
	to validate the TryEnter and Wait overloaded methods.
	[Backport r144627]


svn path=/branches/mono-2-6/mcs/; revision=144629
2009-10-22 11:53:53 +00:00
Sebastien Pouliot 085200c215 2009-10-22 Sebastien Pouliot <[email protected]>
* Monitor.cs: Fix validations for TryEnter and Wait. Reduce 
	duplicated code between overloads.
	[Backport r144627]


svn path=/branches/mono-2-6/mcs/; revision=144628
2009-10-22 11:53:28 +00:00
Gonzalo Paniagua Javier 14599e07ed 2009-10-22 Carlo Kok <[email protected]>
* Fixed AssemblyInfo.cs to reflect proper copyright.


svn path=/branches/mono-2-6/mcs/; revision=144614
2009-10-22 09:03:41 +00:00
Gonzalo Paniagua Javier 9f906977c4 2009-10-21 Carlo Kok <[email protected]>
* RuntimeLicenseContext.cs: Support for the resourceAssembly parameter.


svn path=/branches/mono-2-6/mcs/; revision=144612
2009-10-22 09:02:37 +00:00
Gonzalo Paniagua Javier be8dbdf6df Add man page for lc
svn path=/branches/mono-2-6/mono/; revision=144590
2009-10-22 02:14:11 +00:00
Gonzalo Paniagua Javier f4c3f2d686 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* sockets.[ch]: fix function definition.


svn path=/branches/mono-2-6/mono/; revision=144577
2009-10-21 21:40:06 +00:00
Gonzalo Paniagua Javier 12a0a0ad85 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* socket-io.[ch]: fix VS build.


svn path=/branches/mono-2-6/mono/; revision=144574
2009-10-21 21:38:28 +00:00
Zoltan Varga 1d2fd92a88 2009-10-21 Zoltan Varga <[email protected]>
* aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
	which have a different name.

svn path=/branches/mono-2-6/mono/; revision=144570
2009-10-21 21:04:00 +00:00
Zoltan Varga 8add79cafb 2009-10-21 Zoltan Varga <[email protected]>
* aot-runtime.c (mono_aot_get_method): Special case the array generic iface
	wrappers and Array.GetGenericValueImpl ().

	* aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
	because of the change above.

	* generics.cs: Add a test for full aot + generic array ifaces.

svn path=/branches/mono-2-6/mono/; revision=144566
2009-10-21 19:35:13 +00:00
Jb Evain fa842425c7 2009-10-21 Jb Evain <[email protected]>
* SerializationMap.cs, KnownTypeCollection.cs: avoid using LINQ
	on arrays as MonoTouch has issues with them.


svn path=/branches/mono-2-6/mcs/; revision=144550
2009-10-21 16:47:54 +00:00
Rodrigo Kumpera e1c04a3fcf In metadata:
2009-10-21  Rodrigo Kumpera  <[email protected]>

	* verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
	methods. Fixes #543021.

	Backport of r144534.

>>>>>>> .r144538

svn path=/branches/mono-2-6/mono/; revision=144544
2009-10-21 13:36:43 +00:00
Sebastien Pouliot 7a51fff22c corlib_test.dll.sources: Add System.Threading/WaitHandleTest.cs
svn path=/branches/mono-2-6/mcs/; revision=144532
2009-10-21 12:21:38 +00:00
Sebastien Pouliot b7a7012115 2009-10-21 Sebastien Pouliot <[email protected]>
* WaitHandleTest.cs: New. Add test cases for Wait[One|All|Any]
	methods overloads (at least the one present in Silverlight 2)
	[Backport r144529]


svn path=/branches/mono-2-6/mcs/; revision=144531
2009-10-21 12:20:35 +00:00
Sebastien Pouliot 066dd83f5d 2009-10-21 Sebastien Pouliot <[email protected]>
* WaitHandle.cs: Add missing validations for 'millisecondsTimeout'
	in Wait[One|Any|All]. Also call the overloaded (bool) methods for
	WaitAll to reduce code duplication.
	[Backport r144529]


svn path=/branches/mono-2-6/mcs/; revision=144530
2009-10-21 12:19:45 +00:00
Gonzalo Paniagua Javier ed2f872e65 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: implement *SendFile().


svn path=/branches/mono-2-6/mcs/; revision=144511
2009-10-21 06:43:44 +00:00
Gonzalo Paniagua Javier 1759857a1f 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* icall-def.h:
	* socket-io.[ch]: implemented SendFile.


svn path=/branches/mono-2-6/mono/; revision=144508
2009-10-21 06:34:48 +00:00
Gonzalo Paniagua Javier 3ed983bcab 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* sockets.[ch]: added TransmitFile implementation.


svn path=/branches/mono-2-6/mono/; revision=144505
2009-10-21 06:31:11 +00:00
Marek Habersack 3ae87c406b Backport of r144487
svn path=/branches/mono-2-6/mcs/; revision=144488
2009-10-20 19:22:13 +00:00
Zoltan Varga 5fbbcc177f 2009-10-20 Zoltan Varga <[email protected]>
* class.c (mono_class_create_from_typedef): Initialize class->element_class
	before the interfaces to avoid crashes later if class initialization fails.
	Fixes #548417.

svn path=/branches/mono-2-6/mono/; revision=144484
2009-10-20 19:03:53 +00:00
Gonzalo Paniagua Javier dd726bd89f 2009-10-20 Gonzalo Paniagua Javier <[email protected]>
* ApplicationHost.cs: set the shadow copy options calling the methods
	in AppDomain, instead of setting them in a copy of the setup
	information.


svn path=/branches/mono-2-6/mcs/; revision=144479
2009-10-20 18:31:55 +00:00
Zoltan Varga 51bca79c22 2009-10-16 Zoltan Varga <[email protected]>
* Makefile: Avoid else ifeq which is not recognized by some make versions.

svn path=/branches/mono-2-6/mcs/; revision=144471
2009-10-20 17:01:53 +00:00
Sebastien Pouliot b26939284a 2009-10-20 Sebastien Pouliot <[email protected]>
* TimerTest.cs: Add more validation tests
	[Backport r144466]


svn path=/branches/mono-2-6/mcs/; revision=144468
2009-10-20 15:54:08 +00:00
Sebastien Pouliot 9f622ff4ee 2009-10-20 Sebastien Pouliot <[email protected]>
* Timer.cs: Always call Init from every constructors to avoid 
	duplicate checks. Fix validations on different dueTime and period
	(ctor and Change methods). Seal private TimerComparer class and
	avoid multiple (identical) casts in its Compare method. Seal 
	private Scheduler class.
	[Backport r144466]


svn path=/branches/mono-2-6/mcs/; revision=144467
2009-10-20 15:53:31 +00:00
Gonzalo Paniagua Javier 06e892b980 2009-10-20 Gonzalo Paniagua Javier <[email protected]>
* Timer.cs: make sure we don't insert 2 timers with the same key.


svn path=/branches/mono-2-6/mcs/; revision=144463
2009-10-20 15:29:50 +00:00
Gonzalo Paniagua Javier 143af05a93 2009-10-20 Gonzalo Paniagua Javier <[email protected]>
* ServerContext.cs:
	* SslServerStream.cs: add new parameter that forces sending the
	CertificateRequest record. Make sure we raise the client certificate
	validation event when it is requested or required.


svn path=/branches/mono-2-6/mcs/; revision=144460
2009-10-20 15:25:48 +00:00
Sebastien Pouliot ef4767f919 2009-10-20 Sebastien Pouliot <[email protected]>
* MonoProperty.cs: Reduce code duplication and the number of direct
	calls to icalls (affecting the number of SecuritySafeCritical in
	Moonlight)
	[Backport 144448]


svn path=/branches/mono-2-6/mcs/; revision=144449
2009-10-20 12:05:20 +00:00
Jb Evain 47333cf53e 2009-10-20 Jb Evain <[email protected]>
* Thread.cs: change type of the current_appcontext field to object
	to avoid triggering static constructors unless explicitely required.


svn path=/branches/mono-2-6/mcs/; revision=144430
2009-10-20 09:02:57 +00:00
Sebastien Pouliot 38e2758eb0 2009-10-19 Sebastien Pouliot <[email protected]>
* assembly.c (mono_assembly_load_reference): Fix leak when 'status'
	code is known. (parse_public_key) Remove duplicate (unneeded) NULL
	check since 'pubkey' can't be NULL at this stage
	* icall.c (ves_icall_System_Array_FastCopy): Add comment about
	the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
	initialization of 'iter'
	[Backport r144403]


svn path=/branches/mono-2-6/mono/; revision=144405
2009-10-19 19:39:10 +00:00
Sebastien Pouliot b3bef3cb6a 2009-10-19 Sebastien Pouliot <[email protected]>
* aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
	that hides the previous one.
	[Backport r144402]


svn path=/branches/mono-2-6/mono/; revision=144404
2009-10-19 19:37:39 +00:00
Sebastien Pouliot 64f837613d 2009-10-19 Sebastien Pouliot <[email protected]>
* MonoEvent.cs: Reduce code duplication and the number of direct
	calls to icalls (affecting the number of SecuritySafeCritical in
	Moonlight)
	[Backport r144363]


svn path=/branches/mono-2-6/mcs/; revision=144364
2009-10-19 11:49:05 +00:00
Sebastien Pouliot 20e81a7bd0 2009-10-18 Sebastien Pouliot <[email protected]>
* MethodBaseTest.cs: Add new, working, test for non-generic
	GetMethodFromHandle. Add test case to show generic overload
	behave exactly the same when no second RuntimeMethodHandle is
	provided. Remove [Category("NotWorking")] on existing test case.
	[Backport r144335]


svn path=/branches/mono-2-6/mcs/; revision=144337
2009-10-18 23:53:42 +00:00
Sebastien Pouliot 6088064eb7 * MethodBase.cs: Reduce code duplication and the number of direct
calls to icalls (affecting the number of SecuritySafeCritical in
	Moonlight)
	[Backport r144335]

2009-10-18  Sebastien Pouliot  <[email protected]>


svn path=/branches/mono-2-6/mcs/; revision=144336
2009-10-18 23:53:00 +00:00
Zoltan Varga 7a90062ebe 2009-10-18 Zoltan Varga <[email protected]>
* aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
	marshalled. Fixes #541623.

svn path=/branches/mono-2-6/mono/; revision=144332
2009-10-18 18:17:35 +00:00
Geoff Norton e0e853111c make these public on monotouch
svn path=/branches/mono-2-6/mcs/; revision=144327
2009-10-18 17:11:06 +00:00
Sebastien Pouliot dbece2a334 In .:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* corlib.dll.sources: Remove System.IO.IntPtrStream since it can
	be replaced by (public in 2.0+) UnmanagedMemoryStream
	* net_2_1_raw_corlib.dll.sources: Remove System.IO.IntPtrStream 
	since it can be replaced by UnmanagedMemoryStream
	[Backport r144322]

In System.Resources:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* ResourceReader.cs, ResourceSet.cs, RuntimeResourceSet.cs: Use 
	UnmanagedMemoryStream (instead of IntPtrStream)
	[Backport r144322]

In System.IO:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* UnmanagedMemoryStream.cs: Allow the use under NET_1_1 so we can
	remove the internal IntPtrStream from every profile.

In System.Reflection:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* Assembly.cs: Use UnmanagedMemoryStream (instead of IntPtrStream)
	in every profile


svn path=/branches/mono-2-6/mcs/; revision=144323
2009-10-18 15:08:03 +00:00
Gonzalo Paniagua Javier 7148b88fc6 2009-10-17 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: add 3 missing DoCallback() calls in
	EndRead/EndWrite.


svn path=/branches/mono-2-6/mcs/; revision=144316
2009-10-18 02:09:23 +00:00
Sebastien Pouliot ce43336bb8 2009-10-17 Sebastien Pouliot <[email protected]>
* EqualityComparer.cs: Seal internal classes
	[Backport r144308]


svn path=/branches/mono-2-6/mcs/; revision=144309
2009-10-17 15:54:37 +00:00
Sebastien Pouliot 59a7e4c2de 2009-10-17 Sebastien Pouliot <[email protected]>
* MonoMethod.cs: Reduce code duplication and the number of direct
	calls to icalls (affecting the number of SecuritySafeCritical in
	Moonlight)
	[Backport r144306]


svn path=/branches/mono-2-6/mcs/; revision=144307
2009-10-17 14:56:38 +00:00
Zoltan Varga f6a4795925 2009-10-16 Zoltan Varga <[email protected]>
* aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.

svn path=/branches/mono-2-6/mono/; revision=144277
2009-10-16 15:43:51 +00:00
Marek Safar 71f60a3d4a 2009-10-16 Marek Safar <[email protected]>
A fix for bug #493523, #507067
	* convert.cs, nullable.cs, expression.cs: Do implicit and explicit
	standard nullable conversion using underlying standard conversion
	and not full conversion.


svn path=/branches/mono-2-6/mcs/; revision=144266
2009-10-16 13:47:18 +00:00
Atsushi Eno c81b863ef0 backport r144249.
svn path=/branches/mono-2-6/mcs/; revision=144250
2009-10-16 03:53:04 +00:00
Gonzalo Paniagua Javier 5002ce6535 add lc
svn path=/branches/mono-2-6/mono/; revision=144246
2009-10-16 03:18:12 +00:00
Gonzalo Paniagua Javier a665fdb2e9 add lc
svn path=/branches/mono-2-6/mcs/; revision=144245
2009-10-16 03:17:46 +00:00
Gonzalo Paniagua Javier 38079f5fa0 2009-10-12 Carlo Kok <[email protected]>
* DesigntimeLicenseContextSerializer.cs: Properly serialize licenses.
	* RuntimeLicenseContext.cs: Properly deserialize licenses.


svn path=/branches/mono-2-6/mcs/; revision=144240
2009-10-16 02:49:32 +00:00
Sebastien Pouliot 53665d2a9c 2009-10-15 Sebastien Pouliot <[email protected]>
* UnmanagedMemoryStreamTest.cs: Add more test cases to cover all
	validations
	[Backport r144226]


svn path=/branches/mono-2-6/mcs/; revision=144228
2009-10-15 20:20:17 +00:00
Sebastien Pouliot 286bcb9e60 2009-10-15 Sebastien Pouliot <[email protected]>
* UnmanagedMemoryStream.cs: Fix some and add missing validations
	[Backport r144226]


svn path=/branches/mono-2-6/mcs/; revision=144227
2009-10-15 20:19:37 +00:00
Sebastien Pouliot 9621c55b69 2009-10-15 Sebastien Pouliot <[email protected]>
* RuntimeHelpersTest.cs: Add more test cases for validations
	[Backport r144208]


svn path=/branches/mono-2-6/mcs/; revision=144210
2009-10-15 14:37:52 +00:00
Sebastien Pouliot dd815fb7fe 2009-10-15 Sebastien Pouliot <[email protected]>
* RuntimeHelpers.cs: Add missing validations
	[Backport r144208]


svn path=/branches/mono-2-6/mcs/; revision=144209
2009-10-15 14:37:06 +00:00
Sebastien Pouliot 839e971be3 2009-10-15 Sebastien Pouliot <[email protected]>
* GCHandleTest.cs: Add more test cases for validations
	[Backport r144204]


svn path=/branches/mono-2-6/mcs/; revision=144206
2009-10-15 14:22:19 +00:00
Sebastien Pouliot 17fa7867f8 2009-10-15 Sebastien Pouliot <[email protected]>
* GCHandle.cs: Add missing validations
	[Backport r144204]


svn path=/branches/mono-2-6/mcs/; revision=144205
2009-10-15 14:21:34 +00:00
Sebastien Pouliot aca521aca6 2009-10-15 Sebastien Pouliot <[email protected]>
* HttpRequestChannel.cs (WaitEnd): Neither Moonlight nor MonoTouch
	support contexts so we call the non-overloaded WaitOne method 
	(which defaults to false).
	[Backport r144200]


svn path=/branches/mono-2-6/mcs/; revision=144201
2009-10-15 12:54:23 +00:00
Sebastien Pouliot 10274adf0a 2009-10-15 Sebastien Pouliot <[email protected]>
* ClientRuntimeChannel.cs: Remove the WaitOne 'emitContext' 
	overloads from the Moonlight build. Directly call WaitHandle.
	WaitAll from WaitOne(int) (since the overloads are not always
	present)
	[Backport r144198]


svn path=/branches/mono-2-6/mcs/; revision=144199
2009-10-15 12:52:42 +00:00
Jb Evain 062e9f5266 2009-10-15 Jb Evain <[email protected]>
* monotouch_System.dll.sources: add Semaphore to MonoTouch.


svn path=/branches/mono-2-6/mcs/; revision=144192
2009-10-15 10:45:25 +00:00
Zoltan Varga c8bad1334e 2009-10-15 Zoltan Varga <[email protected]>
* mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.

svn path=/branches/mono-2-6/mono/; revision=144168
2009-10-15 00:12:37 +00:00
Jonathan Pryor a5d121ff11 Fix MonoTouch on the mono-2-6 branch.
svn path=/branches/mono-2-6/mcs/; revision=144154
2009-10-14 21:42:18 +00:00
Gonzalo Paniagua Javier 396faa531e fix the build
svn path=/branches/mono-2-6/mcs/; revision=144152
2009-10-14 20:58:11 +00:00
Jonathan Pryor 451dd25eb9 * Makefile: Add Mono.Data.Tds, System.Transactions, System.Data, and
Mono.Data.Sqlite to the MonoTouch build.
	* System/System.ComponentModel/TypeConverter_2_1.cs: Skip this type in
		the MonoTouch profile; MonoTouch will be using the 2.0 version of 
		TypeConverter.
	* System/System.ComponentModel/ComponentCollection.cs, 
		System/System.ComponentModel/PropertyDescriptor.cs: MonoTouch uses the
		.NET 2.0 versions of these types.
	* System/monotouch_System.dll.sources: Add lots of additional .NET 2.0
		functionality to the MonoTouch profile.
	* System.Transactions/Makefile (VALID_PROFILE): Add monotouch.
	* System.Data/System.Data.Common/DbConnection.cs: Throw 
		NotImplementedException for DbConnection.DbProviderFactory, as 
		DbProviderFactories isn't included in the MonoTouch profile.
	* System.Data/System.Data.SqlClient/SqlConnection.cs: Remove 
		EnterpriseServices dependency from the MonoTouch profile.
	* System.Data/monotouch_System.Data.dll.sources: Added.
	* System.Data/System.Data/XmlSchemaDataImporter.cs: Remove 
		DbProviderFactories dependency in the MonoTouch profile.

svn path=/branches/mono-2-6/mcs/; revision=144142
2009-10-14 20:28:31 +00:00
Gonzalo Paniagua Javier 7252b6595e 2009-10-14 Gonzalo Paniagua Javier <[email protected]>
* ApplicationHost.cs: use shadowCopyBinAssemblies from
	<hostingEnvironment>.


svn path=/branches/mono-2-6/mcs/; revision=144138
2009-10-14 19:30:28 +00:00
Marek Habersack 1f16f07de0 Backport of r144016
svn path=/branches/mono-2-6/mcs/; revision=144129
2009-10-14 18:18:35 +00:00
Sebastien Pouliot 3bf0adf06b 2009-10-14 Sebastien Pouliot <[email protected]>
* CultureInfo.cs: Refactor to reduce unsafe methods/scope.
	[Backport r144106]


svn path=/branches/mono-2-6/mcs/; revision=144107
2009-10-14 15:14:25 +00:00
Sebastien Pouliot bfea298166 2009-10-14 Sebastien Pouliot <[email protected]>
* Exception.cs: Use StackFrame.GetSecureFileName to display (or 
	not) the file names (and paths). Don't serialize Source for
	Moonlight.
	* ValueType.cs: Change InternalEquals (icall) visibility to 
	private since it is not used elsewhere outside the type.
	[Backport r144104]


svn path=/branches/mono-2-6/mcs/; revision=144105
2009-10-14 15:09:48 +00:00
Martin Baulig 480d488ef3 Backport of 144049; add a new 'MONO_DEBUGGER_EVENT_TRAMPOLINE' notification for the debugger which also includes the address of the callsite.
2009-10-13  Martin Baulig  <[email protected]>

	* debug-mini.c (mono_debugger_trampoline_compiled): Add
	`const guint8 *trampoline' argument; send both the old and the new
	notification.

2009-10-13  Martin Baulig  <[email protected]>

	* mono-debug-debugger.h (MonoDebuggerEvent): Renamed
	`MONO_DEBUGGER_EVENT_TRAMPOLINE' into
	`MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
	`MONO_DEBUGGER_EVENT_TRAMPOLINE'.

	* mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.

svn path=/branches/mono-2-6/mono/; revision=144065
2009-10-13 23:03:19 +00:00
Zoltan Varga 06e50b881f 2009-10-13 Zoltan Varga <[email protected]>
* mono-gdb.py: Add an 'xdb' command to flush the debugging info.

svn path=/branches/mono-2-6/mono/; revision=144036
2009-10-13 18:26:08 +00:00
Zoltan Varga ff049da6c1 2009-10-13 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
	avoid registering 1 symbol file per method with gdb.

svn path=/branches/mono-2-6/mono/; revision=144034
2009-10-13 18:20:30 +00:00
Zoltan Varga 43e1fd9f0e 2009-10-11 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
	can be used to set breakpoints in gdb.

	* image-writer.c (bin_writer_emit_writeout): Add support for setting the text
	segment to an absolute address.

svn path=/branches/mono-2-6/mono/; revision=144033
2009-10-13 18:20:22 +00:00
Zoltan Varga b680cf6b99 2009-10-13 Bill Holmes <[email protected]>
* aot-compiler.c : Fix the MSVC builds

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-6/mono/; revision=144029
2009-10-13 17:52:18 +00:00
Zoltan Varga b5a02e9870 Fix the eglib build.
svn path=/branches/mono-2-6/mono/; revision=144015
2009-10-13 15:08:27 +00:00
Veerapuram Varadhan ee48d73acd backport of r143993, r143995
svn path=/branches/mono-2-6/mcs/; revision=143996
2009-10-13 01:19:28 +00:00
Marek Habersack 1950420281 Backport of r143990
svn path=/branches/mono-2-6/mcs/; revision=143991
2009-10-12 22:52:16 +00:00
Zoltan Varga feaafeeb4e Fix the build.
svn path=/branches/mono-2-6/mcs/; revision=143989
2009-10-12 22:47:14 +00:00
Zoltan Varga dae32f25ea 2009-10-12 Zoltan Varga <[email protected]>
* Process.cs (Dispose): Close the async output/error readers. Fixes #545429.

svn path=/branches/mono-2-6/mcs/; revision=143986
2009-10-12 21:31:08 +00:00
Marek Habersack 5c4860a930 Backport of r143979
svn path=/branches/mono-2-6/mcs/; revision=143980
2009-10-12 21:11:43 +00:00
Marek Habersack 30a5dda745 Backport of r143972
svn path=/branches/mono-2-6/mcs/; revision=143973
2009-10-12 14:43:19 +00:00
Marek Habersack 2289967204 Backport of r143967
svn path=/branches/mono-2-6/mcs/; revision=143968
2009-10-12 12:52:05 +00:00
Dick Porter e91a24c3f4 2009-10-12 Dick Porter <[email protected]>
* Splitter.cs: Adjust offsets when more than one splitter is
	present in a control.  Fixes bug 509472.


svn path=/branches/mono-2-6/mcs/; revision=143965
2009-10-12 12:30:26 +00:00
Ankit Jain 75d91d9c99 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-12  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: For referenced projects,
	when trying to get the deploy items, ensure that the split
	lists of project references are available.
	(SplitProjectReferencesByExistent): New.
	Set DependsOnTargets appropriately.

2009-10-12  Ankit Jain  <[email protected]>

	* SolutionParser.cs: Handle non-existing project files, and
	project file load errors. Raise warnings instead of failing.
	* xbuild/Microsoft.Common.targets: Handle non-existant
	Project references, skip instead of failing.

In class/Microsoft.Build.Tasks:
2009-10-12  Ankit Jain  <[email protected]>

	* Makefile: Add reference to Microsoft.Build.Engine .

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-10-12  Ankit Jain  <[email protected]>

	* ResolveAssemblyReference.cs: Remove unnecessary tab in the warning
	messages.

2009-10-12  Ankit Jain  <[email protected]>

	* MSBuild.cs (Execute): Handle build errors.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-12  Ankit Jain  <[email protected]>

	* Target.cs (TargetFile): New. Gives the name of the file
	containing the target definition.
	* BuildEngine.cs (.ctor): Add a 'taskfile' parameters, and
	return this for ProjectFileOfTaskNode.
	* BuildTask.cs (LogTaskStarted):
	(LogTaskFinished): Use parentTarget.ProjectFileOfTaskNode for
	the event.
	(InitializeTask): Set BuildEngine's task file to parent target's
	TargetFile.
	* Engine.cs (LogProjectStarted): Incase of default targets, set
	TargetNames to String.Empty .
	* TargetBatchingImpl.cs (LogTargetStarted):
	(LogTargetFinished): Use target.TargetFile for the event.

	* ConsoleLogger.cs: Keep a stack of project/target/task being
	executed. And corresponding list of errors and warnings.
	(EventsToString): Stringifies the current "stack", to be used
	as key to the table of errors/warnings and for show messages
	at the end of the build.

2009-10-12  Ankit Jain  <[email protected]>

	* Project.cs (Load): Add argument checks.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-10-12  Ankit Jain  <[email protected]>

	* TaskLoggingHelper.cs: Use the buildEngine.ProjectFileOfTaskNode
	in the event args.

2009-10-12  Ankit Jain  <[email protected]>

	* ToolTask.cs (ExecuteTool): Don't set toolOutput to null.
	(HandleTaskExecutionErrors): toolOutput can be null.
	Set toolOutput to null here.


svn path=/branches/mono-2-6/mcs/; revision=143964
2009-10-12 12:23:53 +00:00
Gonzalo Paniagua Javier 2fefe83b93 fix build
svn path=/branches/mono-2-6/mono/; revision=143963
2009-10-12 12:23:00 +00:00
Zoltan Varga d3442a8864 2009-10-12 Zoltan Varga <[email protected]>
* data/Makefile.am (gdb_DATA): Install mono-gdb.py alongside the mono executable.

svn path=/branches/mono-2-6/mono/; revision=143961
2009-10-12 12:04:21 +00:00
Zoltan Varga 054aa8742c 2009-10-12 Zoltan Varga <[email protected]>
* mono-gdb.py: Update this to gdb 7.0.

	* mono-gdbinit: Removed, no longer needed.

svn path=/branches/mono-2-6/mono/; revision=143960
2009-10-12 12:04:15 +00:00
Zoltan Varga 218d0e4fd6 2009-10-12 Zoltan Varga <[email protected]>
* data/gdb-pre7.0: New directory, containing the mono support files for
	gdb versions before 7.0.

svn path=/branches/mono-2-6/mono/; revision=143959
2009-10-12 12:04:08 +00:00
Marek Habersack 02d778b53f Backport of r143950
svn path=/branches/mono-2-6/mcs/; revision=143951
2009-10-12 10:50:12 +00:00
Marek Habersack d3db87f166 Backport of r143945
svn path=/branches/mono-2-6/mcs/; revision=143946
2009-10-12 09:52:38 +00:00
Gonzalo Paniagua Javier bd265b0b4c Patch by Joel Reed that implements a few network interface counters
svn path=/branches/mono-2-6/mono/; revision=143935
2009-10-12 05:56:18 +00:00
Ankit Jain cdde6d1025 * xbuild.1: Add info about env var XBUILD_COLORS.
Backported from trunk.

svn path=/branches/mono-2-6/mono/; revision=143907
2009-10-11 01:40:39 +00:00
Ankit Jain 85453c1f27 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-11  Ankit Jain  <[email protected]>

	* Main.cs: Add support for emitting messages in color.
	Taking relevant code from mcs/report.cs . Using ANSI
	color codes here instead of Console.ForegroundColor
	because of a bug in Console.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-11  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs (no_colors): Rename to ..
	(use_colors): .. this. Fix the case when XBUILD_COLORS
	is not set.

2009-10-11  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs: Use ColorSetter and ColorResetter .
	Support 'XBUILD_COLORS' to set colors for errors, warnings,
	events and messages.

2009-10-10  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs (ProjectFinishedHandler): Once projectFailed
	becomes true, don't reset it. We are looking for "atleast one
	project failed".


svn path=/branches/mono-2-6/mcs/; revision=143904
2009-10-11 01:33:37 +00:00
Zoltan Varga 8523e6fd4c 2009-10-10 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
	gdb mode.

svn path=/branches/mono-2-6/mono/; revision=143895
2009-10-10 18:57:32 +00:00
Zoltan Varga 0d44e4bd88 2009-10-09 Zoltan Varga <[email protected]>
* mono.1: Document --debug=gdb option.

svn path=/branches/mono-2-6/mono/; revision=143891
2009-10-09 19:01:39 +00:00
Zoltan Varga 5fe74de573 2009-10-09 Zoltan Varga <[email protected]>
* driver.c (parse_debug_options): Add a 'gdb' option.

	* mini.c (mini_parse_debug_options): Add a 'gdb' option.

svn path=/branches/mono-2-6/mono/; revision=143890
2009-10-09 19:01:32 +00:00
Zoltan Varga 610c46ca01 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.

svn path=/branches/mono-2-6/mono/; revision=143889
2009-10-09 19:01:25 +00:00
Zoltan Varga 05ec37ee5d 2009-10-09 Zoltan Varga <[email protected]>
* image-writer.c: Add support for emitting the image into a memory buffer.

	* dwarfwriter.c: Add support for sharing one IL file between multiple images.

	* aot-compiler.c: Add support for registering debug info with GDB using the
	new JIT debugging interface in GDB 7.0. It can be turned on by setting
	MONO_XDEBUG to 'gdb'.

svn path=/branches/mono-2-6/mono/; revision=143888
2009-10-09 19:01:18 +00:00
Ankit Jain c39fd613b6 Update xbuild and Microsoft.Build.* from trunk.
2009-10-09  Ankit Jain  <[email protected]>

	* Exec.cs (AddCommandLineCommands): Add '/q' for cmd.exe, to
	turn 'echo off'. And make sure the script file on windows, has
	a '.bat' extension, otherwise cmd.exe opens it in a text editor.

2009-10-09  Ankit Jain  <[email protected]>

	Fix bug #545703.
	* Exec.cs (Command): On unix, change CRLF to CR.


svn path=/branches/mono-2-6/mcs/; revision=143881
2009-10-09 15:52:17 +00:00
Zoltan Varga ae4b04c837 2009-10-09 Zoltan Varga <[email protected]>
* image-writer.c (bin_writer_emit_writeout): Fix a copy paste error causing
	the LOC section to overwrite the LINE section.

svn path=/branches/mono-2-6/mono/; revision=143875
2009-10-09 14:49:13 +00:00
Marek Safar fcdff7ed33 Fixed bootstrap with trunk
svn path=/branches/mono-2-6/mcs/; revision=143870
2009-10-09 14:13:21 +00:00
Atsushi Eno e84d2dde76 backport r143819.
svn path=/branches/mono-2-6/mcs/; revision=143820
2009-10-09 03:28:45 +00:00
Veerapuram Varadhan ab56f08cdf 2009-09-30 Veerapuram Varadhan <[email protected]>
** Fixes #543207
	* OracleParameter.cs (Bind): Do not remove the trailing-null-byte.

svn path=/branches/mono-2-6/mcs/; revision=143805
2009-10-08 19:38:29 +00:00
Sebastien Pouliot e7ca8f20c4 2009-10-08 Sebastien Pouliot <[email protected]>
* StackFrame.cs: Introduce a new GetSecureFileName method that
	will deal with CAS (regular framework) and will remove the path
	(for Moonlight) on a stack frame.
	* StackTrace.cs: Use the new StackFrame.GetSecureFileName to
	simplify logic
	[Backport r143802]


svn path=/branches/mono-2-6/mcs/; revision=143804
2009-10-08 19:31:10 +00:00
Sebastien Pouliot 15b13478af 2009-10-08 Sebastien Pouliot <[email protected]>
* AppDomain.cs: Remove NET_2_1 specific DefineDynamicAssembly(
	AssemblyName,AssemblyBuilderAccess,bool) since it is not part
	of SL. Provide a ToString implementation similar to Silverlight
	for Moonlight (and without directly using an icall)
	[Backport r143799]


svn path=/branches/mono-2-6/mcs/; revision=143800
2009-10-08 19:06:02 +00:00
Jb Evain d0cc112de9 2009-10-08 Jb Evain <[email protected]>
* Makefile: build the i18n assemblies on MonoTouch.


svn path=/branches/mono-2-6/mcs/; revision=143774
2009-10-08 13:57:23 +00:00
Jb Evain 1bbc0280f6 use the expression interpreter on MonoTouch
svn path=/branches/mono-2-6/mcs/; revision=143770
2009-10-08 13:53:02 +00:00
Ankit Jain 2f8194612d Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
	* xbuild/Microsoft.Common.targets: Don't get list of files
	to deploy, for 'Private' project references.
	Fix target named for *CopyDeploy*.

2009-10-08  Ankit Jain  <[email protected]>

In tools/xbuild/tests:
2009-10-08  Ankit Jain  <[email protected]>

	* standalone/Project1: Add a new Lib5 project, and add
	private references to various projects.
	Update final-outputs.txt .
	* standalone/Project01/Lib5/*: New.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
	* ResolveAssemblyReference.cs: Don't resolve any dependencies for
	assemblies resolved from {PkgConfig}. Honor parent's CopyLocal for
	dependencies.

2009-10-08  Ankit Jain  <[email protected]>


svn path=/branches/mono-2-6/mcs/; revision=143741
2009-10-08 02:19:49 +00:00
Ankit Jain be9de0e1ac Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-08  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.tasks: Add RemoveDuplicates task.

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
2009-10-08  Ankit Jain  <[email protected]>

	* TestMessageLogger.cs (CheckLoggedAny): New.

2009-10-08  Ankit Jain  <[email protected]>

	* RemoveDuplicatesTest.cs: New.

In class/Microsoft.Build.Tasks:
2009-10-08  Ankit Jain  <[email protected]>

	* Microsoft.Build.Tasks_test.dll.sources: Added
	RemoveDuplicatesTest.cs

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-10-08  Ankit Jain  <[email protected]>

	* MSBuild.cs (Execute): Don't share target output items,
	always create a copy.

2009-10-08  Ankit Jain  <[email protected]>

	* RemoveDuplicates.cs: Use item's ItemSpec as the key.

2009-10-07  Ankit Jain  <[email protected]>

	* ManagedCompiler.cs (HandleTaskExecutionErrors): Log error if
	required.

2009-10-06  Ankit Jain  <[email protected]>

	* Exec.cs (ExecuteTool): Use DeleteTempFile instead of File.Delete
	(HandleTaskExecutionErrors): Log error, if required.
	* MSBuild.cs: Don't log error.
	* Warning.cs: Don't log if @text is empty.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-10-08  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestBatchedMetadataRefInOutput): New.

In class/Microsoft.Build.Engine/Test/various:
2009-10-08  Ankit Jain  <[email protected]>

	* Items.cs (TestItemsWithWildcards): New.

2009-10-08  Ankit Jain  <[email protected]>

	* Items.cs (TestItems5): Fix to work correctly on windows
	and unix.
	(TestReservedMetadata): New.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-08  Ankit Jain  <[email protected]>

	* DirectoryScanner.cs: Use Path.GetPathRoot, instead of
	directly using DirectoryInfo ("z:"), that doesn't return
	a dir info for "z:".

2009-10-08  Ankit Jain  <[email protected]>

	* DirectoryScanner.cs: Handle absolute paths. Fix to work
	correctly on windows. Change order of adding paths to match
	msbuild, useful to have.

2009-10-08  Ankit Jain  <[email protected]>

	* TaskBatchingImpl.cs (ParseTaskAttributes): Parse attributes
	of the 'Output' element also.
	* TaskEngine.cs (PublishOutput): Honor condition on 'Output' also.

2009-10-07  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs: Mark build as failed, if any project failed.

2009-10-06  Ankit Jain  <[email protected]>

	* ConsoleLogger: Improve error reporting. Don't count failed task,
	target or project as another error. Show "errors" after "warnings",
	more useful to the user.
	* Project.cs (BuildTarget): Log error instead of using CWL.

In class/Microsoft.Build.Utilities/Mono.XBuild.Utilities:
2009-10-08  Ankit Jain  <[email protected]>

	* ReservedNameUtils.cs: Fix 'RootDir', 'Directory'.
	(WithTrailingSlash): New.
	Update to use the new WithTrailingSlash method.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-10-06  Ankit Jain  <[email protected]>

	* ToolTask.cs (Execute): HandleTaskExecutionErrors is called only
	if exitCode != 0.
	(ExecuteTool): Move logging of exitcode to HandleTaskExecutionErrors.
	Remove MonoTODOs.
	* TaskLoggingHelper.cs (LogMessageFromText): New.
	(LogMessage): Refactor to use above.


svn path=/branches/mono-2-6/mcs/; revision=143736
2009-10-08 00:58:55 +00:00
Atsushi Eno 5464542c55 backport r143704 from trunk.
svn path=/branches/mono-2-6/mcs/; revision=143706
2009-10-07 19:14:40 +00:00
Atsushi Eno 4ce9ff767f I have committed extraneous stuff (that I once did too in trunk).
svn path=/branches/mono-2-6/mcs/; revision=143705
2009-10-07 19:13:32 +00:00
Atsushi Eno db5459c586 merge all changes from trunk (r143247 - r143697)
svn path=/branches/mono-2-6/mcs/; revision=143702
2009-10-07 19:04:59 +00:00
Atsushi Eno 3268e37cd1 merge all commits from trunk (r142816 - r143609)
svn path=/branches/mono-2-6/mcs/; revision=143700
2009-10-07 18:54:05 +00:00
Sebastien Pouliot d4674914b9 2009-10-07 Sebastien Pouliot <[email protected]>
* String.cs: Remove unsafe code duplication in ToCharArray.
	Define out the unused InternalStrcpy icalls
	* StringComparer.cs: Seal internal/private inner classes.
	[Backport r143651]


svn path=/branches/mono-2-6/mcs/; revision=143653
2009-10-07 13:46:13 +00:00
Sebastien Pouliot e7702bf35d 2009-10-07 Sebastien Pouliot <[email protected]>
* CompareInfo.cs: Don't allow MONO_DISABLE_MANAGED_COLLATION
	override for Moonlight and move all icalls together so they
	can be #if-ed out.
	[Backport r143648]


svn path=/branches/mono-2-6/mcs/; revision=143649
2009-10-07 13:41:18 +00:00
Zoltan Varga c3f5ca896a 2009-10-07 Zoltan Varga <[email protected]>
* pinvoke2.cs libtest.c: Add a test for marshalling DateTime to unmanaged code.

svn path=/branches/mono-2-6/mono/; revision=143642
2009-10-07 13:21:53 +00:00
Zoltan Varga a41a82a694 2009-10-07 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
	Fixes #322934.

svn path=/branches/mono-2-6/mono/; revision=143641
2009-10-07 13:21:45 +00:00
Sebastien Pouliot bdb31e441e net_2_1_raw_corlib.dll.sources: Remove System/LocalDataStoreSlot.cs from Moonlight build
svn path=/branches/mono-2-6/mcs/; revision=143634
2009-10-07 12:44:25 +00:00
Sebastien Pouliot 0b8e8c6cb7 2009-10-07 Sebastien Pouliot <[email protected]>
* Context.cs: Remove LocalDataStoreSlot-related methods from
	Moonlight build
	[Backport r143631]


svn path=/branches/mono-2-6/mcs/; revision=143632
2009-10-07 12:42:07 +00:00
Sebastien Pouliot e4c96ec70a 2009-10-07 Sebastien Pouliot <[email protected]>
* Thread.cs: Remove LocalDataStoreSlot-related methods from
	Moonlight build
	[Backport r143629]


svn path=/branches/mono-2-6/mcs/; revision=143630
2009-10-07 12:35:56 +00:00
Sebastien Pouliot f91f74d6d7 In Test/System.ServiceModel:
2009-10-07  Sebastien Pouliot  <[email protected]>

	* OperationContextTest.cs: Add test case for OperationContext.Current
	[Backport r143620]

In System.ServiceModel:
2009-10-07  Sebastien Pouliot  <[email protected]>

	* OperationContext.cs: Use [ThreadStatic] instead of Thread.
	GetNamedDataSlot with Thread.[Get|Set]Data since it offers type
	safety and don't require keeping extra API inside Moonlight
	[Backport r143620]


svn path=/branches/mono-2-6/mcs/; revision=143621
2009-10-07 12:05:01 +00:00
Marek Habersack 0263ba084f Backport of r143611
svn path=/branches/mono-2-6/mcs/; revision=143612
2009-10-07 10:49:21 +00:00
Gonzalo Paniagua Javier 4b085e4b62 2009-10-07 Gonzalo Paniagua Javier <[email protected]>
* StaticFileHandler.cs: it's the last flush even when a VPP is used.


svn path=/branches/mono-2-6/mcs/; revision=143598
2009-10-07 04:03:06 +00:00
Atsushi Eno 651f863792 backport r143593.
svn path=/branches/mono-2-6/mcs/; revision=143594
2009-10-07 02:22:55 +00:00
Marek Habersack 2365397ca3 Backport of r143587
svn path=/branches/mono-2-6/mcs/; revision=143588
2009-10-07 00:10:27 +00:00
Sebastien Pouliot dfd3372251 2009-10-06 Sebastien Pouliot <[email protected]>
* Decimal.cs: Use Compare method instead of directly using the
	decimalCompare internal call.
	[Backport r143554]


svn path=/branches/mono-2-6/mcs/; revision=143555
2009-10-06 20:09:20 +00:00
Sebastien Pouliot 4c9ee53953 2009-10-06 Sebastien Pouliot <[email protected]>
* Enum.cs: Add an internal Value property as a single point to 
	call the internal call get_value.
	[Backport r143549]


svn path=/branches/mono-2-6/mcs/; revision=143550
2009-10-06 18:53:49 +00:00
Sebastien Pouliot 8921ca9e49 net_2_1_raw_corlib.dll.sources: Remove normalization files from Moonlight build
svn path=/branches/mono-2-6/mcs/; revision=143541
2009-10-06 17:18:41 +00:00
Sebastien Pouliot bf1d85db26 2009-10-06 Sebastien Pouliot <[email protected]>
* Encoding.cs: Remove normalization methods for Moonlight
	[Backport r143536]


svn path=/branches/mono-2-6/mcs/; revision=143537
2009-10-06 17:16:20 +00:00
Sebastien Pouliot 4f5f2e43e2 2009-10-06 Sebastien Pouliot <[email protected]>
* String.cs: Remove normalization methods for Moonlight
	[Backport r143533]


svn path=/branches/mono-2-6/mcs/; revision=143535
2009-10-06 17:13:17 +00:00
Zoltan Varga 0d8d9abd48 2009-10-06 Zoltan Varga <[email protected]>
* aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
	each instance of Comparer<T>.

	* generics.cs: Add a new test.

svn path=/branches/mono-2-6/mono/; revision=143532
2009-10-06 17:10:01 +00:00
Gonzalo Paniagua Javier 9f4abfb1d5 2009-10-06 Gonzalo Paniagua Javier <[email protected]>
* GatewayIPAddressInformationCollection.cs:
	* IPInterfaceProperties.cs: implement GatewayAddresses for linux.
	Original patch by Christoph von Wittich.
	Fixes bug #544640.


svn path=/branches/mono-2-6/mcs/; revision=143526
2009-10-06 16:25:59 +00:00
Jonathan Chambers 22c4e0ee3b 2009-10-06 Jonathan Chambers <[email protected]>
* String.cs (Contains): Use CompareOptions.Ordinal. Fixes bug
        #535425.


svn path=/branches/mono-2-6/mcs/; revision=143521
2009-10-06 15:14:43 +00:00
Mark Probst 4e92234406 2009-10-06 Mark Probst <[email protected]>
* object.c (mono_method_return_message_restore): Handle the case
        where the argument is an instance of a generic type.  Fixes
        #544446.

        Backport of r143506.

2009-10-06  Mark Probst  <[email protected]>

        * bug-544445.cs: New test.

        * Makefile.am: Test added.

        Backport of r143506.

svn path=/branches/mono-2-6/mono/; revision=143510
2009-10-06 13:15:18 +00:00
Marek Habersack 4ab670066a Fix the build
svn path=/branches/mono-2-6/mcs/; revision=143429
2009-10-05 17:58:35 +00:00
Marek Safar 29f9e5ff3d 2009-10-05 Marek Safar <[email protected]>
* expression.cs: Equality comparison of generic parameter with
	class constraint.


svn path=/branches/mono-2-6/mcs/; revision=143421
2009-10-05 16:50:49 +00:00
Marek Safar 292fa3413f 2009-10-05 Marek Safar <[email protected]>
A fix for bug #543570
	* generic.cs: Import predefined constraints correctly.


svn path=/branches/mono-2-6/mcs/; revision=143418
2009-10-05 16:05:18 +00:00
Marek Habersack 17ebd3efa0 Backport of r143388
svn path=/branches/mono-2-6/mcs/; revision=143389
2009-10-05 11:15:22 +00:00
Marek Habersack 7b6992976a Backport of r143384
svn path=/branches/mono-2-6/mcs/; revision=143385
2009-10-05 10:45:56 +00:00
Atsushi Eno 02bd2a8b2d backport r143368 and r143369.
svn path=/branches/mono-2-6/mcs/; revision=143371
2009-10-05 06:02:52 +00:00
Atsushi Eno 4415259ba1 backport r143367.
svn path=/branches/mono-2-6/mcs/; revision=143370
2009-10-05 06:01:30 +00:00
Zoltan Varga 8253721cb0 2009-10-04 Zoltan Varga <[email protected]>
* aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
	when using full-aot.

svn path=/branches/mono-2-6/mono/; revision=143350
2009-10-04 16:34:37 +00:00
Zoltan Varga 589b50de6f 2009-10-04 Zoltan Varga <[email protected]>
* processes.c: Implement get_process_name_from_proc () on solaris.

svn path=/branches/mono-2-6/mono/; revision=143341
2009-10-04 15:35:47 +00:00
Ankit Jain 85f197004d Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-03  Ankit Jain  <[email protected]>

	Fix bug#542461.
	* xbuild/Microsoft.Common.targets (KeyOriginatorFile): Set to
	$(AssemblyOriginatorKeyFile), if SignAssembly is true.
	Use it for satellite assemblies also.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-03  Ankit Jain  <[email protected]>

	* Project.cs (OS): New.
	(InitializeProperties): Set 'OS' as a pre-defined property, set to
	'Windows_NT', 'Unix' or 'OSX' depending on the platform.


svn path=/branches/mono-2-6/mcs/; revision=143317
2009-10-02 22:08:37 +00:00
Zoltan Varga 01c866af9c 2009-10-02 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
	(mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
	a variable to hold the stack slot used by the int<->float conversion opcodes.

svn path=/branches/mono-2-6/mono/; revision=143311
2009-10-02 18:53:26 +00:00
Zoltan Varga 4bf53054c2 2009-09-25 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
	variable volatile. Fixes #541577.

	* basic-calls.cs: Add a new test.

	* basic-long.cs: Remove tests which are now in basic-calls.cs.

svn path=/branches/mono-2-6/mono/; revision=143310
2009-10-02 18:53:18 +00:00
Zoltan Varga 04ca35cc6a 2009-10-02 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.

svn path=/branches/mono-2-6/mono/; revision=143270
2009-10-02 10:49:14 +00:00
Marek Safar 43806c6701 2009-10-02 Marek Safar <[email protected]>
* ecore.cs: Don't crash on overloads with optional paremeters where
	arguments count overflows.
	
	* parameter.cs: Import optional parameter constants using optional
	value type.


svn path=/branches/mono-2-6/mcs/; revision=143265
2009-10-02 10:43:14 +00:00
Ankit Jain 8dd2dbbe9e Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-02  Ankit Jain  <[email protected]>

	* Expression.cs (Parse): Don't change '/' to '\\', not required.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-10-02  Ankit Jain  <[email protected]>

	* AppDomainIsolatedTask.cs (BuildEngine): Init 'log'.


svn path=/branches/mono-2-6/mcs/; revision=143217
2009-10-01 20:40:44 +00:00
Geoff Norton 5c45430b3f Include async dns in monotouch
svn path=/branches/mono-2-6/mcs/; revision=143194
2009-10-01 18:33:11 +00:00
Miguel de Icaza d70052496a Backport
svn path=/branches/mono-2-6/mcs/; revision=143110
2009-10-01 02:42:30 +00:00
Gonzalo Paniagua Javier 3de2cd8abe 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* HtmlSelectBuilder.cs: <option> allows the value of the 'selected'
	attribute to be a boolean or the string "selected", which is treated
	as "true".


svn path=/branches/mono-2-6/mcs/; revision=143106
2009-10-01 02:24:44 +00:00
Gonzalo Paniagua Javier 91f3e24d60 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* CodeNamespace.cs:
	* CodeTypeReference.cs:
	* CodeMemberMethod.cs:
	* CodeCompileUnit.cs:
	* CodeNamespaceImportCollection.cs:
	* CodeTypeDeclaration.cs: renamed/added fields so that we're
	compatible with MS serialization.


svn path=/branches/mono-2-6/mcs/; revision=143103
2009-10-01 01:44:23 +00:00
Gonzalo Paniagua Javier 681488c662 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* Hashtable.cs: MS (at least latest and greatest) does not always
	serialized the HashCodeProvider. Ignoring the error when the field
	is not found.


svn path=/branches/mono-2-6/mcs/; revision=143100
2009-10-01 01:41:07 +00:00
Gonzalo Paniagua Javier 3b095deb1e undo. Proper fix was in BuildManager
svn path=/branches/mono-2-6/mcs/; revision=143097
2009-10-01 01:25:17 +00:00
Gonzalo Paniagua Javier 5cc7eaea6e 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* BuildManager.cs: load/set the global resources assembly for
	precompiled and merged sites correctly.


svn path=/branches/mono-2-6/mcs/; revision=143094
2009-10-01 01:22:15 +00:00
Ankit Jain 7803cd3ec4 Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-10-01  Ankit Jain  <[email protected]>

	* ImportTest.cs (TestAdd1): Add tests for multiple imports.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-01  Ankit Jain  <[email protected]>

	* Project.cs (AddImport): Show the correct source file name, when
	the import is in the main project file.

2009-10-01  Ankit Jain  <[email protected]>

	Fix bug #543299.
	* Import.cs (.ctor): Evaluate and set EvaluatedProjectPath to
	the full path of the imported project here itself, instead of ..
	(Evaluate): .. here.
	* ImportCollection.cs (Add): Use import.EvaluatedProjectPath .
	(Contains): New.
	* Project.cs (AddImport): Don't process if condition is false.
	Warn if a circular reference is detected, and ignore the import.


svn path=/branches/mono-2-6/mcs/; revision=143082
2009-09-30 23:21:18 +00:00
Geoff Norton 4ebde82145 Add AssemblyInfo so we can strong name the dll
svn path=/branches/mono-2-6/mcs/; revision=143064
2009-09-30 19:42:48 +00:00
Geoff Norton b9b681b89f fix S.W.S on monotouch
svn path=/branches/mono-2-6/mcs/; revision=143062
2009-09-30 19:39:07 +00:00
Geoff Norton a5aeef3952 2009-09-30 Miguel de Icaza <[email protected]>
* ExtensionManager.cs: Initialize the NET_2_0 pieces with
	MonoTouch, but do not register any of the System.Configuration
	depending extensions.

	BuildExtensionImporters, BuildExtensionReflectors: empty methods
	for MOnoTouch.

	* ServiceDescriptionImporter.cs, WebReference.cs: Remove
	codegeneration features for MonoTouch

2009-09-30  Miguel de Icaza  <[email protected]>

	* Methods.cs: Empty extensions for MonoTouch for now.

	* ServerType.cs: On MonoTouch, we do not support HttpGet or
	HttpPost variations yet.

	* SoapExtension.cs: Avoid System.Configuration features.

svn path=/branches/mono-2-6/mcs/; revision=143061
2009-09-30 19:38:50 +00:00
Jackson Harper 4de89dd439 Add a couple of classes to net_2_1 these are available in SL3
svn path=/branches/mono-2-6/mcs/; revision=143046
2009-09-30 16:30:55 +00:00
Geoff Norton 15c9b8f2ca Put WCF back in to monotouch
svn path=/branches/mono-2-6/mcs/; revision=143022
2009-09-30 15:09:17 +00:00
Jonathan Pobst 8baca4235f 2009-09-26 Jonathan Pobst <[email protected]>
[Backport]
	* TreeNode.cs: When we invalidate a node, make sure we start at
	0, instead of the node's Bounds.Left, which does not include
	the +/-, checkbox, or stateimages.
	[Fixes bug #542481]

svn path=/branches/mono-2-6/mcs/; revision=143020
2009-09-30 15:05:29 +00:00
Zoltan Varga a927d1db6a 2009-09-29 Zoltan Varga <[email protected]>
* mini-sparc.c: Fix the handling of enums with base type long.

svn path=/branches/mono-2-6/mono/; revision=143008
2009-09-30 13:50:38 +00:00
Zoltan Varga efed257d39 2009-09-29 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.

svn path=/branches/mono-2-6/mono/; revision=143007
2009-09-30 13:50:30 +00:00
Zoltan Varga 9ad9b08458 2009-09-29 Zoltan Varga <[email protected]>
* mono-compiler.h (MONO_INTERNAL): Disable this on solaris as it produces a
	millions of warnings during compilation.

svn path=/branches/mono-2-6/mono/; revision=143006
2009-09-30 13:50:23 +00:00
Zoltan Varga 9b2393d1c7 2009-09-29 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
	instead of using type->data.klass as the later doesn't work with generics.

svn path=/branches/mono-2-6/mono/; revision=143005
2009-09-30 13:50:16 +00:00
Zoltan Varga 463c186397 2009-09-29 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
	instead of using type->data.klass as the later doesn't work with generics.

svn path=/branches/mono-2-6/mono/; revision=143004
2009-09-30 13:50:09 +00:00
Zoltan Varga 45d870860c 2009-09-30 Zoltan Varga <[email protected]>
* pinvoke2.cs libtest.c: Add a test for #543133.

svn path=/branches/mono-2-6/mono/; revision=143000
2009-09-30 13:32:00 +00:00
Zoltan Varga 47df667e6e 2009-09-30 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
	Fixes #543133.

svn path=/branches/mono-2-6/mono/; revision=142999
2009-09-30 13:31:53 +00:00
Zoltan Varga 62e7e2c54d 2009-09-30 Zoltan Varga <[email protected]>
* aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
	mono_runtime_capture_context () without calling mono_runtime_invoke ().
	(can_marshal_struct): Skip structures with auto layout.

svn path=/branches/mono-2-6/mono/; revision=142993
2009-09-30 12:49:29 +00:00
Zoltan Varga 788c9757fd 2009-09-30 Zoltan Varga <[email protected]>
* tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.

svn path=/branches/mono-2-6/mono/; revision=142992
2009-09-30 12:49:21 +00:00
Marek Habersack daa2f108f3 Backport of r142984
svn path=/branches/mono-2-6/mcs/; revision=142985
2009-09-30 10:39:28 +00:00
Marek Safar 81bb1146d4 2009-09-30 Marek Safar <[email protected]>
A fix for bug #542959
	* delegate.cs: Emit correct delegate instance variable when there
	are static and non-static overloads.


svn path=/branches/mono-2-6/mcs/; revision=142978
2009-09-30 09:35:40 +00:00
Jb Evain 8da02c6d46 2009-09-30 Jb Evain <[email protected]>
* HttpRequestChannel.cs: When compiling for MonoTouch, avoid
	to use any of the remoting features.

svn path=/branches/mono-2-6/mcs/; revision=142972
2009-09-30 08:43:35 +00:00
Gonzalo Paniagua Javier fa1a176ef6 changelog
svn path=/branches/mono-2-6/mcs/; revision=142965
2009-09-30 06:06:31 +00:00
Gonzalo Paniagua Javier aebf222336 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* BinaryFormatter.cs: NoCheckDeserialize() was using PeekChar() on a
	reader when it should only read 1 byte. Also BinaryReader.PeekChar()
	tries to set the position of hte stream back to where it was before
	the read, which does not work well with broken Stream
	implementations like BZip2InputStream (reports CanSeek is true when
	it really can't seek). Now we do a Read() and then pass the value we
	read on to the next methods.

	* MessageFormatter.cs: 
	* ObjectReader.cs: added overloads that take a BinaryElement instead
	of reading it from the reader. Only for the methods used in
	NoCheckDeserialize.

	Fixes bug #503435.


svn path=/branches/mono-2-6/mcs/; revision=142964
2009-09-30 06:06:18 +00:00
Gonzalo Paniagua Javier 5afdc7affb 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: fixes bug #322330. Patch by Alexander Kojevnikov.
	This patch fixes the issues reported by the OP and in my previous
	comment. In particular:

	Hunks 1 and 4 remove the new_name_needed flag, it's not used
	anywhere and only adds confusion.

	Hunk 2 skips DeleteSelf event for sub-directories, they receive the
	Delete event anyway.

	Hunk 3 makes sure that we use a combination of Deleted+Created
	notifications instead of a single Renamed notification, if the watched item
	has been moved from one directory to another. This is because RenamedEventArgs
	supports only one directory name: FullPath is always directory+name,
	OldFullPath is always directory+old_name.

	Hunk 5 updates relevant InotifyData instances with the new directory
	name.  Without this, notifications always use the original folder names.

	The last hunk may be a bit slow as it needs to iterate on all the
	InotifyData instances. On the other hand, we are already doing it on the
	Delete event (lines 560:568) and by default inotify allows only 8192 watches
	per user.


svn path=/branches/mono-2-6/mcs/; revision=142959
2009-09-30 05:26:52 +00:00
Gonzalo Paniagua Javier 7d6aa1e322 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* TermInfoDriver.cs: attempt to fix bug #527487.


svn path=/branches/mono-2-6/mcs/; revision=142948
2009-09-30 03:14:42 +00:00
Marek Habersack db66ea05c0 Backport of r142943
svn path=/branches/mono-2-6/mcs/; revision=142944
2009-09-29 23:25:14 +00:00
Marek Habersack 43e34e9221 Backport of r142934
svn path=/branches/mono-2-6/mcs/; revision=142935
2009-09-29 21:52:05 +00:00
Andrew Jorgensen 69154db126 15:40 <kangaroo> its just apples assembler is horribly old and stupid
svn path=/branches/mono-2-6/mono/; revision=142933
2009-09-29 21:43:00 +00:00
Gonzalo Paniagua Javier 1f7a1c183c 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* AsyncResult.cs: do not create the handle if not needed.


svn path=/branches/mono-2-6/mcs/; revision=142930
2009-09-29 21:02:39 +00:00
Gonzalo Paniagua Javier beb7543392 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* EndPointListener.cs: fix matching a listener in presence of a query
	string or anchor.


svn path=/branches/mono-2-6/mcs/; revision=142901
2009-09-29 17:16:29 +00:00
Ankit Jain d0dbad9ad7 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-09-29  Ankit Jain  <[email protected]>

	* SolutionParser.cs (Insert): Show project name in case of a cyclic
	dependency.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-09-29  Ankit Jain  <[email protected]>

	* Exec.cs: Write the commands, which can be multiline,
	to a temporary file, and execute that with "cmd.exe /c"
	on windows and "sh" on non-windows.
	(LogToolCommand): Override, and emit the commands instead
	of the actual args passed to the shell.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-09-29  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestPropertiesFromImportedProjects): New.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-09-29  Ankit Jain  <[email protected]>

	* GroupingCollection.cs (Evaluate): Mark internal.
	* Project.cs (AddImport): Only evaluate the properties,
	till before the import.

2009-09-29  Ankit Jain  <[email protected]>

	* Project.cs (DoLoad): Don't use XmlReader.Create, for loading
	the project xml, as returned Xml*Reader normalizes the newlines.
	Instead directly use the TextReader with XmlDocument.Load ().

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-09-29  Ankit Jain  <[email protected]>

	* ToolTask.cs (ExecuteTool): Use LogToolCommand, instead of
	directly logging.
	(LogToolCommand): Implement.


svn path=/branches/mono-2-6/mcs/; revision=142871
2009-09-29 14:47:09 +00:00
Alan McGovern 4f8c33af39 2009-09-29 Alan McGovern <[email protected]>
* CategoryAttributeTest.cs: Added new test file.


svn path=/branches/mono-2-6/mcs/; revision=142867
2009-09-29 14:28:01 +00:00
Alan McGovern 90c46b9308 2009-09-29 Alan McGovern <[email protected]>
* DefaultValueAttribute.cs: Implement the cctor which takes
	a Type and a string for the SL2 case.
	* CategoryAttribute.cs: Fix a typo in the CategoryAttribute.Asynchronous
	ctor and fix some SL2 specific naming changes for the default properties.


svn path=/branches/mono-2-6/mcs/; revision=142866
2009-09-29 14:27:34 +00:00
Sebastien Pouliot 8082e15625 2009-09-29 Sebastien Pouliot <[email protected]>
* Timer_2_1.cs: Removed. No longer needed by Moonlight
	[Backport r142853]


svn path=/branches/mono-2-6/mcs/; revision=142855
2009-09-29 12:13:04 +00:00
Sebastien Pouliot 58864d7fca 2009-09-29 Sebastien Pouliot <[email protected]>
* net_2_1_raw_System.Net.dll.sources: Remove Timer_2_1.cs and 
	related classes from System.dll - they are not required anymore
	since Gonzalo's changes on Socket.Close(int)
	[Backport r142851]


svn path=/branches/mono-2-6/mcs/; revision=142852
2009-09-29 12:10:39 +00:00
Rolf Bjarne Kvinge c79c91c80c 2009-09-29 Rolf Bjarne Kvinge <[email protected]>
* Thread.cs: StartSafe: ignore ThreadAbortExceptions.

	Backport of r142847.

svn path=/branches/mono-2-6/mcs/; revision=142848
2009-09-29 11:01:18 +00:00
Rolf Bjarne Kvinge 8973515d9d 2009-09-29 Rolf Bjarne Kvinge <[email protected]>
* appdomain.c|h: Add a mono_domain_try_unload method which is
	equivalent to mono_domain_unload, except that it returns an exception
	instead of throwing it. Make mono_domain_unload use the
	mono_domain_try_unload method to avoid code-duplication.

	Backport of r142658.

svn path=/branches/mono-2-6/mono/; revision=142846
2009-09-29 10:55:42 +00:00
Gonzalo Paniagua Javier 9346c56300 Fix 1.1 profile
svn path=/branches/mono-2-6/mcs/; revision=142837
2009-09-29 09:25:25 +00:00
Gonzalo Paniagua Javier 5a4e4d261b 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* Ping.cs: fix the check for a time-out return value from 'ping'.


svn path=/branches/mono-2-6/mcs/; revision=142821
2009-09-29 05:57:31 +00:00
Gonzalo Paniagua Javier 259bc42379 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs: try to load App_GlobalResouces.dll if it has not
	been set but it exists in 'bin'.


svn path=/branches/mono-2-6/mcs/; revision=142818
2009-09-29 05:42:13 +00:00
Andrew Jorgensen 9b28a1de73 use wildcards for .mdbs
svn path=/branches/mono-2-6/mono/; revision=142814
2009-09-29 04:06:21 +00:00
Andrew Jorgensen 1eb27e1f63 don't build moonlight (not installed anyway)
grab entire xbuild directory (it's a deep structure and rpm doesn't like
un-owned directories)

svn path=/branches/mono-2-6/mono/; revision=142810
2009-09-29 03:34:16 +00:00
Marek Habersack 7edb572581 Backport of r142798
svn path=/branches/mono-2-6/mcs/; revision=142799
2009-09-28 21:42:17 +00:00
Ankit Jain 364a5d0b74 * mono-core.spec.in: Add Microsoft.WebApplication.targets
Backport r142787	

svn path=/branches/mono-2-6/mono/; revision=142788
2009-09-28 19:09:15 +00:00
Marek Habersack 3aa9628276 Backport of r142783
svn path=/branches/mono-2-6/mcs/; revision=142785
2009-09-28 18:54:18 +00:00
Marek Habersack bcc8b6fb2d Backport of r142780
svn path=/branches/mono-2-6/mcs/; revision=142781
2009-09-28 18:50:21 +00:00
Marek Habersack eefca1d2f0 Backport of r142773
svn path=/branches/mono-2-6/mcs/; revision=142776
2009-09-28 18:08:33 +00:00
Marek Habersack 075b2246c4 Backport of r142766
svn path=/branches/mono-2-6/mcs/; revision=142767
2009-09-28 16:44:14 +00:00
Atsushi Eno 70390d5989 merge from trunk (r142744, r142745, r142760).
svn path=/branches/mono-2-6/mcs/; revision=142761
2009-09-28 15:24:15 +00:00
Sebastien Pouliot 08a3283160 2009-09-28 Sebastien Pouliot <[email protected]>
* SocketAsyncEventArgs.cs: Default SocketError.AccessDenied on 
	Connect in case none of the DnsEndPoint provides an adequate 
	address (family).
	[Backport r142746]


svn path=/branches/mono-2-6/mcs/; revision=142747
2009-09-28 12:03:28 +00:00
Ankit Jain f65e2f5bde Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-09-28  Ankit Jain  <[email protected]>

	* WriteLinesToFiles.cs (Execute): Handle empty list of
	lines.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-09-28  Ankit Jain  <[email protected]>

	* ToolTask.cs (ProcessOuputTool): Move logging of tool
	output from here to ..
	(ExecuteTool): .. here. As, ProcessOuputTool can be
	overridden.


svn path=/branches/mono-2-6/mcs/; revision=142742
2009-09-28 10:51:40 +00:00
Atsushi Eno 89a11d5206 backport r142735.
svn path=/branches/mono-2-6/mcs/; revision=142736
2009-09-28 04:48:46 +00:00
Gonzalo Paniagua Javier cd1791a956 fix
svn path=/branches/mono-2-6/mcs/; revision=142732
2009-09-28 03:29:48 +00:00
Gonzalo Paniagua Javier 06bce6170a 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
* Socket_2_1.cs: Close(int timeout) blocks up to timeout ms if there's
	pending data to be written to the socket. If there's no pending data,
	it closes and returns right away. Instead of using Timer and then
	doing a 'hard' close(), we set the linger option for the socket.


svn path=/branches/mono-2-6/mcs/; revision=142730
2009-09-28 03:19:43 +00:00
Sebastien Pouliot 6eb53dd31a 2009-09-27 Sebastien Pouliot <[email protected]>
* SocketAsyncEventArgs.cs: Don't use Socket.Poll for NET_2_1.
	Throw NIE for use of BufferList in Receive.
	* Socket.cs: Move Close(int) to Socket_2_1.cs. Remove NET_2_1
	defines since the file is not used by Moonlight
	* Socket_2_1.cs: Add Close(int) from Socket. Define out Poll
	and Blocking.
	[Backport r142722]


svn path=/branches/mono-2-6/mcs/; revision=142723
2009-09-27 14:52:09 +00:00
Sebastien Pouliot 329316a6c6 2009-09-27 Sebastien Pouliot <[email protected]>
* net_2_1_raw_System.Net.dll.sources: Add Timer_2_1.cs and 
	related classes from System.dll
	[Backport of r142720]


svn path=/branches/mono-2-6/mcs/; revision=142721
2009-09-27 14:40:19 +00:00
Sebastien Pouliot cb768e733f 2009-09-27 Sebastien Pouliot <[email protected]>
* Timer_2_1.cs: New. A smaller, internal subset of Timer for 
	Moonlight - needed for Socket.Close(int)
	[Backport of r142718]


svn path=/branches/mono-2-6/mcs/; revision=142719
2009-09-27 14:38:23 +00:00
Gonzalo Paniagua Javier d1973e174d from trunk
svn path=/branches/mono-2-6/mono/; revision=142706
2009-09-27 06:19:31 +00:00
Gonzalo Paniagua Javier fd3fd2455f 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
* Timer.cs: account for the time spent sending jobs to the queue.


svn path=/branches/mono-2-6/mcs/; revision=142704
2009-09-27 05:48:26 +00:00
Gonzalo Paniagua Javier 7944cbd726 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
* TermInfoDriver.cs: avoid segv if the pointer is not properly
	initialized.


svn path=/branches/mono-2-6/mcs/; revision=142701
2009-09-27 05:40:34 +00:00
Gonzalo Paniagua Javier ef0ea82263 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
* marshal.c: don't create the handle when calling. It is created later
	if needed.


svn path=/branches/mono-2-6/mono/; revision=142700
2009-09-27 05:32:25 +00:00
Gonzalo Paniagua Javier 2de8607599 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
* AsyncResult.cs: don't create the handle if we know the result is
	completed.


svn path=/branches/mono-2-6/mcs/; revision=142698
2009-09-27 05:29:16 +00:00
Gonzalo Paniagua Javier ca5715e665 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
* RealProxy.cs: for a custom proxy, retrieve the OutArgs before
	allowing EndInvoke to proceed because after that, OutArgs will throw
	because there is no method. Fixes remoting2 and remoting3 tests.


svn path=/branches/mono-2-6/mcs/; revision=142696
2009-09-27 05:20:25 +00:00
Veerapuram Varadhan 774fd03e78 Test fix.
svn path=/branches/mono-2-6/mcs/; revision=142689
2009-09-26 21:01:35 +00:00
Veerapuram Varadhan 8b8d58705b backport of r142668
svn path=/branches/mono-2-6/mcs/; revision=142688
2009-09-26 21:01:10 +00:00
Ankit Jain c5cbb9cb4b Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-09-27  Ankit Jain  <[email protected]>

	* SolutionParser.cs: Implement support for WebSite projects. These
	projects lack a project file, so properties like references are read
	from the .sln file, and targets are generated for build/clean etc.

2009-09-26  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Remove _ValidateEssentialProperties
	from BuildDependsOn, which was a hack. It will get invoked from the
	InitialTargets now.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-09-26  Ankit Jain  <[email protected]>

	* TargetTest.cs (TestOverridingTargets): New.

2009-09-26  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestInitialTargetsWithImports):
	(TestDefaultTargets):
	(TestDefaultTargetsWithImports):
	(TestNoDefaultTargetsWithImports):
	(TestNoDefaultTargets): New tests.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-09-27  Ankit Jain  <[email protected]>

	* ConditionParser.cs: Show the condition being parsed in the
	exception message.

2009-09-26  Ankit Jain  <[email protected]>

	* Expression.cs: Allow '-' in item, property and metadata names.

2009-09-26  Ankit Jain  <[email protected]>

	* Project.cs (Evaluate): Split into this and ..
	(PrepareForEvaluate): .. this.
	(AddImport): Evaluate the current set of properties/items etc,
	before processing the imported project. Honor the Condition
	for the Import.
	(ProcessProjectAttributes): Update MSBuildProjectDefaultTargets
	property.
	* GroupingCollection.cs (Evaluate): Don't evaluate Imports here.
	* BuildItemGroup.cs (Evaluate): Evaluate only once.
	* BuildPropertyGroup.cs (Evaluate): Evaluate only once.

2009-09-26  Ankit Jain  <[email protected]>

	* Project.cs: Get InitialTargets from the imported projects also.
	The combined list of targets are executed, in the order they were
	found.
	DefaultTargets are also read in from imported projects, and the first
	non-empty DefaultTargets found is used.


svn path=/branches/mono-2-6/mcs/; revision=142686
2009-09-26 20:49:54 +00:00
Sebastien Pouliot 95ab6bc64d In Test/System.Net.Sockets:
2009-09-26  Sebastien Pouliot  <[email protected]>

	* SocketAsyncEventArgsTest.cs: New. Unit tests
	[Backport r142675]

In System.Net.Sockets:
2009-09-26  Sebastien Pouliot  <[email protected]>

	* SocketAsyncEventArgs.cs: Fix paramater validations and default 
	values
	[Backport r142675]

In .:
2009-09-26  Sebastien Pouliot  <[email protected]>

	* System_test.dll.sources: Add unit tests for SocketAsyncEventArgs
	[Backport r142675]


svn path=/branches/mono-2-6/mcs/; revision=142676
2009-09-26 15:29:25 +00:00
Andrew Jorgensen 2403930b66 version
svn path=/branches/mono-2-6/mono/; revision=142639
2009-09-25 14:53:05 +00:00
997 changed files with 57100 additions and 6188 deletions

No files matched your search

+32 -1
View File
@@ -1,3 +1,34 @@
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.
@@ -17,7 +48,7 @@
2009-08-04 Miguel de Icaza <[email protected]>
* Start the split between PLATFORM_WIN32 and TARGET_WIN32.
* 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.
+3
View File
@@ -26,6 +26,9 @@ i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
pic_options='-fPIC'
;;
?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
+26 -5
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.5)
AM_INIT_AUTOMAKE(mono,2.6)
AM_MAINTAINER_MODE
API_VER=1.0
@@ -40,6 +40,8 @@ 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
@@ -82,12 +84,15 @@ case "$host" in
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=
@@ -214,6 +219,22 @@ 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!])
@@ -234,8 +255,7 @@ AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
# Disabled for now to fix the windows build
#AC_PROG_CXX
AC_PROG_CXX
AM_PROG_AS
AM_PROG_CC_STDC
AC_PROG_INSTALL
@@ -294,7 +314,7 @@ 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)
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_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
@@ -479,6 +499,7 @@ 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)
@@ -2690,6 +2711,6 @@ fi
if test x$enable_llvm = xyes; then
echo IMPORTANT:
echo IMPORTANT: The LLVM Back End is experimental and does not work yet.
echo IMPORTANT: The LLVM Back End is experimental and has known problems.
echo IMPORTANT:
fi
+5 -1
View File
@@ -12,7 +12,8 @@ EXTRA_DIST = \
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-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
dtrace-prelink.sh mono.web.pc.in system.web.mvc.pc.in \
gdb/mono-gdb.py
pkgconfigdir = $(libdir)/pkgconfig
@@ -34,3 +35,6 @@ DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-
mono_DATA = config \
browscap.ini
gdbdir = $(bindir)
gdb_DATA = gdb/mono-gdb.py
+66
View File
@@ -0,0 +1,66 @@
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
@@ -0,0 +1,163 @@
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
@@ -0,0 +1,247 @@
#
# 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)))
File renamed without changes.
+19
View File
@@ -0,0 +1,19 @@
# 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")
+15
View File
@@ -1,3 +1,18 @@
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
+14 -52
View File
@@ -4,15 +4,10 @@
#
#
# This is a mono support mode for a python-enabled gdb:
# http://sourceware.org/gdb/wiki/PythonGdb
# This is a mono support mode for gdb 7.0 and later
# 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.
# - 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.
#
import os
@@ -194,54 +189,21 @@ def register_csharp_printers(obj):
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 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):
# This command will flush the debugging info collected by the runtime
class XdbCommand (gdb.Command):
def __init__ (self):
super (RunHook, self).__init__ ("hook-run", gdb.COMMAND_NONE,
gdb.COMPLETE_COMMAND, pre_hook_of="run")
super (XdbCommand, self).__init__ ("xdb", gdb.COMMAND_NONE,
gdb.COMPLETE_COMMAND)
def invoke(self, arg, from_tty):
mono_support.run_hook ()
gdb.execute ("call mono_xdebug_flush ()")
register_csharp_printers (gdb.current_objfile())
XdbCommand ()
gdb.execute ("set environment MONO_XDEBUG gdb")
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)))
+15
View File
@@ -1,3 +1,18 @@
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.
+13 -1
View File
@@ -24,9 +24,17 @@ 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*)
@@ -45,8 +53,12 @@ case $target in
arm*-darwin*)
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
;;
i*86-*-darwin*)
ORDER=G_LITTLE_ENDIAN
;;
esac
AC_SUBST(ORDER)
AC_SUBST(CFLAGS)
AC_SUBST(PATHSEP)
AC_SUBST(SEARCHSEP)
+3 -1
View File
@@ -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, gpointer data);
gpointer g_ptr_array_remove_index_fast (GPtrArray *array, guint index);
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,6 +469,8 @@ 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);
+21
View File
@@ -139,6 +139,27 @@ 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)
{
+31 -15
View File
@@ -3,6 +3,7 @@
*
* 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
@@ -23,7 +24,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.
*
* (C) 2006 Novell, Inc.
* Copyright (c) 2006-2009 Novell, Inc.
*
*/
@@ -33,19 +34,23 @@
gpointer
g_queue_pop_head (GQueue *queue)
{
gpointer head = NULL;
gpointer result;
GList *old_head;
if (queue->length != 0){
GList *old_head;
if (!queue || queue->length == 0)
return NULL;
old_head = queue->head;
head = old_head->data;
queue->head = old_head->next;
queue->length--;
g_list_free_1 (old_head);
}
result = queue->head->data;
old_head = queue->head;
queue->head = old_head->next;
g_list_free_1 (old_head);
return head;
if (--queue->length)
queue->head->prev = NULL;
else
queue->tail = NULL;
return result;
}
gboolean
@@ -71,13 +76,24 @@ 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)
{
GQueue *queue = g_new0 (GQueue, 1);
queue->length = 0;
return queue;
return g_new0 (GQueue, 1);
}
void
+25
View File
@@ -170,6 +170,30 @@ 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;
@@ -235,6 +259,7 @@ 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,6 +15,66 @@ 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;
}
@@ -47,6 +107,30 @@ 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;
}
@@ -89,6 +173,7 @@ 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},
+5
View File
@@ -1,3 +1,8 @@
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
+4
View File
@@ -424,6 +424,10 @@ 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));
+9
View File
@@ -468,6 +468,15 @@ 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()
+8
View File
@@ -1,3 +1,11 @@
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.
+1
View File
@@ -11,6 +11,7 @@ man_MANS = \
genxs.1 \
httpcfg.1 \
ilasm.1 \
lc.1 \
macpack.1 \
makecert.1 \
mconfig.1 \
+87
View File
@@ -0,0 +1,87 @@
.\"
.\" 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)
+4
View File
@@ -299,6 +299,10 @@ 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
+30
View File
@@ -48,6 +48,36 @@ Display xbuild version
.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
+3 -1
View File
@@ -10,6 +10,7 @@ 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
@@ -106,7 +107,8 @@ $(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%:
$(_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--net_2_1_bootstrap--%
$(_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--%
+6
View File
@@ -1,3 +1,9 @@
2009-10-26 Sebastien Pouliot <[email protected]>
* Consts.cs.in: Update SL2 FX version to the second (and last)
released version.
[Backport r144843]
2009-08-11 Jérémie Laval <[email protected]>
* Consts.cs.in: Add BOOTSTRAP_NET_4_0.
+1 -1
View File
@@ -72,7 +72,7 @@ internal
// Versions of .NET Framework for SilverLight
public const string FxVersion = "2.0.5.0";
public const string VsVersion = "9.0.0.0"; // TODO:
public const string FxFileVersion = "2.0.31005.0";
public const string FxFileVersion = "2.0.40115.0";
public const string VsFileVersion = "9.0.50727.42"; // TODO:
#elif NET_2_0 || BOOTSTRAP_NET_2_0
// Versions of .NET Framework 2.0 RTM
+1 -1
View File
@@ -81,7 +81,7 @@ do-profile-check-monolite: $(depsdir)/.stamp
endif
$(PROFILE_CS): $(topdir)/build/profiles/basic.make $(depsdir)/.stamp
echo 'class X { static int Main () { return 0; } }' > $@
echo 'class X { static int Main () { try { System.Activator.CreateInstance ("mscorlib", "System.Runtime.CompilerServices.CompilerGeneratedAttribute"); return 1; } catch { return 0; } } }' > $@
$(PROFILE_EXE): $(PROFILE_CS)
$(BOOTSTRAP_MCS) /out:$@ $<
+1 -1
View File
@@ -3,7 +3,7 @@
my_runtime = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack
INTERNAL_SMCS = $(my_runtime) $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_PROFILE = net_2_1_bootstrap
BOOTSTRAP_PROFILE = monotouch_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(my_runtime) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/smcs.exe
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
@@ -0,0 +1,17 @@
#! -*- makefile -*-
INTERNAL_SMCS = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_PROFILE = net_2_0
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MONOTOUCH
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
+21
View File
@@ -1,3 +1,24 @@
2009-11-07 Zoltan Varga <[email protected]>
* Makefile (net_2_0_dirs): Add System.Data.Services.
2009-11-02 Zoltan Varga <[email protected]>
* Makefile: Move Mono.Debugger.Soft to net_2_0_dirs for 2.6.
2009-11-02 Zoltan Varga <[email protected]>
* Makefile: Add Mono.Debugger.Soft.
2009-10-14 Jonathan Pryor <[email protected]>
* Makefile: Add Mono.Data.Tds, System.Transactions, System.Data, and
Mono.Data.Sqlite to the MonoTouch build.
2009-10-08 Jb Evain <[email protected]>
* Makefile: build the i18n assemblies on MonoTouch.
2009-09-24 Marek Safar <[email protected]>
* Makefile: Removed System.Json from net_4_0 profile.
+5
View File
@@ -1,3 +1,8 @@
2009-10-09 Atsushi Enomoto <[email protected]>
* ISO2022JP.cs : simply output wrong escape sequence bytes to the
output (like .NET does).
2009-04-15 Atsushi Enomoto <[email protected]>
* jis.table : regenerated. Fixed bug #491799.
+16 -8
View File
@@ -438,8 +438,10 @@ namespace I18N.CJK
wide = true;
else if (bytes [i] == 0x28)
wide = false;
else
throw new ArgumentException ("Unexpected ISO-2022-JP escape sequence.");
else {
ret += 2;
continue;
}
i++;
if (bytes [i] == 0x42)
m = wide ? ISO2022JPMode.JISX0208 : ISO2022JPMode.ASCII;
@@ -448,7 +450,7 @@ namespace I18N.CJK
else if (bytes [i] == 0x49)
m = ISO2022JPMode.JISX0201;
else
throw new ArgumentException (String.Format ("Unexpected ISO-2022-JP escape sequence. Ended with 0x{0:X04}", bytes [i]));
ret += 3;
}
}
return ret;
@@ -457,7 +459,7 @@ namespace I18N.CJK
private int ToChar (int value)
{
value <<= 1;
return value + 1 >= convert.jisx0208ToUnicode.Length ?
return value + 1 >= convert.jisx0208ToUnicode.Length || value < 0 ?
-1 :
((int) (convert.jisx0208ToUnicode [value])) |
(((int) (convert.jisx0208ToUnicode [value + 1])) << 8);
@@ -523,8 +525,11 @@ namespace I18N.CJK
wide = true;
else if (bytes [i] == 0x28)
wide = false;
else
throw new ArgumentException ("Unexpected ISO-2022-JP escape sequence.");
else {
chars [charIndex++] = '\x1B';
chars [charIndex++] = (char) bytes [i];
continue;
}
i++;
if (bytes [i] == 0x42)
m = wide ? ISO2022JPMode.JISX0208 : ISO2022JPMode.ASCII;
@@ -532,8 +537,11 @@ namespace I18N.CJK
m = ISO2022JPMode.ASCII;
else if (bytes [i] == 0x49)
m = ISO2022JPMode.JISX0201;
else
throw new ArgumentException (String.Format ("Unexpected ISO-2022-JP escape sequence. Ended with 0x{0:X04}", bytes [i]));
else {
chars [charIndex++] = '\x1B';
chars [charIndex++] = (char) bytes [i - 1];
chars [charIndex++] = (char) bytes [i];
}
}
}
+4
View File
@@ -1,3 +1,7 @@
2009-10-09 Atsushi Enomoto <[email protected]>
* I18N.CJK.Test.cs : added test for iso-2022-jp wrong esc sequences.
2009-04-15 Atsushi Enomoto <[email protected]>
* I18N.CJK.Test.cs : added test for bug #491799.
+20
View File
@@ -192,6 +192,26 @@ namespace MonoTests.I18N.CJK
AssertDecode ("Test/texts/japanese-utf8.txt", "Test/texts/japanese-50222.txt", 50222);
}
[Test]
public void CP50220BrokenESC ()
{
Assert.AreEqual ("\u001B$0", Encoding.GetEncoding (50220).GetString (new byte [] {0x1B, 0x24, 0x30}), "#1");
}
[Test]
public void CP50220BrokenESC2 ()
{
// it does not really invoke fallback ...
Assert.AreEqual ("\u001B$0", Encoding.GetEncoding (50220, new EncoderReplacementFallback (), new DecoderReplacementFallback ("")).GetString (new byte [] {0x1B, 0x24, 0x30}), "#1");
}
[Test]
public void CP50220BrokenESC3 ()
{
// neither ...
Assert.AreEqual ("\u001B$0", Encoding.GetEncoding (50220, new EncoderExceptionFallback (), new DecoderExceptionFallback ()).GetString (new byte [] {0x1B, 0x24, 0x30}), "#2");
}
[Test]
#if !NET_2_0
[Category ("NotDotNet")] // MS bug
+15 -5
View File
@@ -121,7 +121,9 @@ net_2_0_dirs := \
Mono.Options \
Mono.Simd \
Mono.Tasklets \
WindowsBase
WindowsBase \
Mono.Debugger.Soft \
System.Data.Services
net_2_0_only_dirs := \
System.Web.Extensions_1.0 \
@@ -146,9 +148,18 @@ monotouch_dirs := \
System.XML \
Mono.Security \
System \
I18N \
System.Core \
System.Json \
System.Xml.Linq
System.Xml.Linq \
System.Runtime.Serialization \
System.ServiceModel \
System.ServiceModel.Web \
System.Web.Services \
Mono.Data.Tds \
System.Transactions \
System.Data \
Mono.Data.Sqlite
net_3_5_dirs := \
Microsoft.Build.Framework \
@@ -167,6 +178,7 @@ net_2_0_bootstrap_SUBDIRS := $(bootstrap_dirs) PEAPI
net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs)
net_2_1_bootstrap_SUBDIRS := corlib System Mono.CompilerServices.SymbolWriter
net_2_1_raw_SUBDIRS := $(net_2_1_dirs)
monotouch_bootstrap_SUBDIRS := corlib System Mono.CompilerServices.SymbolWriter
monotouch_SUBDIRS := $(monotouch_dirs)
net_3_5_SUBDIRS := $(net_3_5_dirs)
net_4_0_bootstrap_SUBDIRS := $(bootstrap_dirs) PEAPI Mono.Posix System.Core
@@ -176,9 +188,7 @@ include ../build/rules.make
SUBDIRS = $(common_dirs) $(net_1_1_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(net_2_1_dirs) $(net_3_5_dirs) $(net_4_0_dirs)
# These libraries below are either unimplemented or don't compile, but
#BROKEN_SUBDIRS =
#DIST_ONLY_SUBDIRS = $(BROKEN_SUBDIRS)
DIST_ONLY_SUBDIRS = dlr
# No new makefiles for: System.Messaging, System.Web.Mobile,
# System.ServiceProcess
@@ -1,3 +1,15 @@
2009-10-12 Dick Porter <[email protected]>
* Splitter.cs: Adjust offsets when more than one splitter is
present in a control. Fixes bug 509472.
2009-09-26 Jonathan Pobst <[email protected]>
[Backport]
* TreeNode.cs: When we invalidate a node, make sure we start at
0, instead of the node's Bounds.Left, which does not include
the +/-, checkbox, or stateimages.
[Fixes bug #542481]
2009-09-24 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Compare the name and not displayname of properties
@@ -62,6 +62,7 @@ namespace System.Windows.Forms {
private int split_requested; // If the user requests a position before we have ever laid out the doc
private int splitter_prev_move;
private Rectangle splitter_rectangle_moving;
private int moving_offset;
#endregion // Local Variables
#region Constructors
@@ -266,25 +267,38 @@ namespace System.Windows.Forms {
int widths = 0;
int heights = 0;
int vert_offset = 0;
int horiz_offset = 0;
foreach (Control c in this.Parent.Controls) {
if (c != affected) {
switch (c.Dock) {
case DockStyle.Left:
case DockStyle.Right:
widths += c.Width;
if (c.Location.X < this.Location.X)
vert_offset += c.Width;
break;
case DockStyle.Top:
case DockStyle.Bottom:
heights += c.Height;
if (c.Location.Y < this.Location.Y)
horiz_offset += c.Height;
break;
}
}
}
if (horizontal)
if (horizontal) {
moving_offset = horiz_offset;
return Parent.ClientSize.Height - heights - MinExtra;
else
} else {
moving_offset = vert_offset;
return Parent.ClientSize.Width - widths - MinExtra;
}
}
}
@@ -448,8 +462,8 @@ namespace System.Windows.Forms {
int delta = currentMove - splitter_prev_move;
Rectangle prev_location = splitter_rectangle_moving;
bool moved = false;
int min = this.MinSize;
int max = max_size;
int min = this.MinSize + moving_offset;
int max = max_size + moving_offset;
if (horizontal) {
if (splitter_rectangle_moving.Y + delta > min && splitter_rectangle_moving.Y + delta < max) {
@@ -1072,11 +1072,8 @@ namespace System.Windows.Forms
TreeView tv = TreeView;
if (tv == null)
return;
// Use actual TreeView width to invalidate total prev/new area
Rectangle bounds = Bounds;
bounds.Width = tv.ClientSize.Width;
tv.Invalidate (bounds);
tv.UpdateNode (this);
}
internal void InvalidateWidth ()
@@ -39,8 +39,9 @@ namespace Microsoft.Build.BuildEngine {
bool continueOnError;
int lineNumberOfTaskNode;
Project project;
string taskfile;
public BuildEngine (Engine engine, Project project, int column, int line,
public BuildEngine (Engine engine, Project project, string taskfile, int column, int line,
bool continueOnError)
{
this.engine = engine;
@@ -48,6 +49,7 @@ namespace Microsoft.Build.BuildEngine {
this.columnNumberOfTaskNode = column;
this.continueOnError = continueOnError;
this.lineNumberOfTaskNode = line;
this.taskfile = taskfile;
}
// Initiates a build of a project file. If the build is
@@ -110,7 +112,7 @@ namespace Microsoft.Build.BuildEngine {
}
public string ProjectFileOfTaskNode {
get { return project.FullFileName; }
get { return taskfile; }
}
}
@@ -44,6 +44,7 @@ namespace Microsoft.Build.BuildEngine {
GroupingCollection parentCollection;
Project parentProject;
bool read_only;
bool evaluated;
public BuildItemGroup ()
: this (null, null, null, false)
@@ -237,6 +238,8 @@ namespace Microsoft.Build.BuildEngine {
internal void Evaluate ()
{
if (evaluated)
return;
foreach (BuildItem bi in buildItems) {
if (bi.Condition == String.Empty)
bi.Evaluate (parentProject, true);
@@ -245,6 +248,7 @@ namespace Microsoft.Build.BuildEngine {
bi.Evaluate (parentProject, ce.BoolEvaluate (parentProject));
}
}
evaluated = true;
}
internal void ReplaceWith (BuildItem item, List <BuildItem> list)
@@ -44,6 +44,7 @@ namespace Microsoft.Build.BuildEngine {
Project parentProject;
List <BuildProperty> properties;
Dictionary <string, BuildProperty> propertiesByName;
bool evaluated;
public BuildPropertyGroup ()
: this (null, null, null, false)
@@ -221,9 +222,14 @@ namespace Microsoft.Build.BuildEngine {
internal void Evaluate ()
{
if (evaluated)
return;
foreach (BuildProperty bp in properties)
if (ConditionParser.ParseAndEvaluate (bp.Condition, parentProject))
bp.Evaluate ();
evaluated = true;
}
public string Condition {
@@ -159,15 +159,17 @@ namespace Microsoft.Build.BuildEngine {
void LogTaskStarted ()
{
TaskStartedEventArgs tsea = new TaskStartedEventArgs ("Task started.", null, parentTarget.Project.FullFileName,
parentTarget.Project.FullFileName, taskElement.Name);
TaskStartedEventArgs tsea = new TaskStartedEventArgs ("Task started.", null,
parentTarget.Project.FullFileName,
parentTarget.TargetFile, taskElement.Name);
parentTarget.Project.ParentEngine.EventSource.FireTaskStarted (this, tsea);
}
void LogTaskFinished (bool succeeded)
{
TaskFinishedEventArgs tfea = new TaskFinishedEventArgs ("Task finished.", null, parentTarget.Project.FullFileName,
parentTarget.Project.FullFileName, taskElement.Name, succeeded);
TaskFinishedEventArgs tfea = new TaskFinishedEventArgs ("Task finished.", null,
parentTarget.Project.FullFileName,
parentTarget.TargetFile, taskElement.Name, succeeded);
parentTarget.Project.ParentEngine.EventSource.FireTaskFinished (this, tfea);
}
@@ -195,7 +197,8 @@ namespace Microsoft.Build.BuildEngine {
ITask task;
task = (ITask)Activator.CreateInstance (this.Type);
task.BuildEngine = new BuildEngine (parentTarget.Project.ParentEngine, parentTarget.Project, 0, 0, ContinueOnError);
task.BuildEngine = new BuildEngine (parentTarget.Project.ParentEngine, parentTarget.Project,
parentTarget.TargetFile, 0, 0, ContinueOnError);
task_logger = new TaskLoggingHelper (task);
return task;
@@ -1,3 +1,144 @@
2009-10-12 Ankit Jain <[email protected]>
* Target.cs (TargetFile): New. Gives the name of the file
containing the target definition.
* BuildEngine.cs (.ctor): Add a 'taskfile' parameters, and
return this for ProjectFileOfTaskNode.
* BuildTask.cs (LogTaskStarted):
(LogTaskFinished): Use parentTarget.ProjectFileOfTaskNode for
the event.
(InitializeTask): Set BuildEngine's task file to parent target's
TargetFile.
* Engine.cs (LogProjectStarted): Incase of default targets, set
TargetNames to String.Empty .
* TargetBatchingImpl.cs (LogTargetStarted):
(LogTargetFinished): Use target.TargetFile for the event.
* ConsoleLogger.cs: Keep a stack of project/target/task being
executed. And corresponding list of errors and warnings.
(EventsToString): Stringifies the current "stack", to be used
as key to the table of errors/warnings and for show messages
at the end of the build.
2009-10-12 Ankit Jain <[email protected]>
* Project.cs (Load): Add argument checks.
2009-10-11 Ankit Jain <[email protected]>
* ConsoleLogger.cs (no_colors): Rename to ..
(use_colors): .. this. Fix the case when XBUILD_COLORS
is not set.
2009-10-11 Ankit Jain <[email protected]>
* ConsoleLogger.cs: Use ColorSetter and ColorResetter .
Support 'XBUILD_COLORS' to set colors for errors, warnings,
events and messages.
2009-10-10 Ankit Jain <[email protected]>
* ConsoleLogger.cs (ProjectFinishedHandler): Once projectFailed
becomes true, don't reset it. We are looking for "atleast one
project failed".
2009-10-08 Ankit Jain <[email protected]>
* DirectoryScanner.cs: Use Path.GetPathRoot, instead of
directly using DirectoryInfo ("z:"), that doesn't return
a dir info for "z:".
2009-10-08 Ankit Jain <[email protected]>
* DirectoryScanner.cs: Handle absolute paths. Fix to work
correctly on windows. Change order of adding paths to match
msbuild, useful to have.
2009-10-08 Ankit Jain <[email protected]>
* TaskBatchingImpl.cs (ParseTaskAttributes): Parse attributes
of the 'Output' element also.
* TaskEngine.cs (PublishOutput): Honor condition on 'Output' also.
2009-10-07 Ankit Jain <[email protected]>
* ConsoleLogger.cs: Mark build as failed, if any project failed.
2009-10-06 Ankit Jain <[email protected]>
* ConsoleLogger: Improve error reporting. Don't count failed task,
target or project as another error. Show "errors" after "warnings",
more useful to the user.
* Project.cs (BuildTarget): Log error instead of using CWL.
2009-10-03 Ankit Jain <[email protected]>
* Project.cs (OS): New.
(InitializeProperties): Set 'OS' as a pre-defined property, set to
'Windows_NT', 'Unix' or 'OSX' depending on the platform.
2009-10-02 Ankit Jain <[email protected]>
* Expression.cs (Parse): Don't change '/' to '\\', not required.
2009-10-01 Ankit Jain <[email protected]>
* Project.cs (AddImport): Show the correct source file name, when
the import is in the main project file.
2009-10-01 Ankit Jain <[email protected]>
Fix bug #543299.
* Import.cs (.ctor): Evaluate and set EvaluatedProjectPath to
the full path of the imported project here itself, instead of ..
(Evaluate): .. here.
* ImportCollection.cs (Add): Use import.EvaluatedProjectPath .
(Contains): New.
* Project.cs (AddImport): Don't process if condition is false.
Warn if a circular reference is detected, and ignore the import.
2009-09-29 Ankit Jain <[email protected]>
* GroupingCollection.cs (Evaluate): Mark internal.
* Project.cs (AddImport): Only evaluate the properties,
till before the import.
2009-09-29 Ankit Jain <[email protected]>
* Project.cs (DoLoad): Don't use XmlReader.Create, for loading
the project xml, as returned Xml*Reader normalizes the newlines.
Instead directly use the TextReader with XmlDocument.Load ().
2009-09-27 Ankit Jain <[email protected]>
* ConditionParser.cs: Show the condition being parsed in the
exception message.
2009-09-26 Ankit Jain <[email protected]>
* Expression.cs: Allow '-' in item, property and metadata names.
2009-09-26 Ankit Jain <[email protected]>
* Project.cs (Evaluate): Split into this and ..
(PrepareForEvaluate): .. this.
(AddImport): Evaluate the current set of properties/items etc,
before processing the imported project. Honor the Condition
for the Import.
(ProcessProjectAttributes): Update MSBuildProjectDefaultTargets
property.
* GroupingCollection.cs (Evaluate): Don't evaluate Imports here.
* BuildItemGroup.cs (Evaluate): Evaluate only once.
* BuildPropertyGroup.cs (Evaluate): Evaluate only once.
2009-09-26 Ankit Jain <[email protected]>
* Project.cs: Get InitialTargets from the imported projects also.
The combined list of targets are executed, in the order they were
found.
DefaultTargets are also read in from imported projects, and the first
non-empty DefaultTargets found is used.
2009-09-25 Ankit Jain <[email protected]>
* Project.cs (BuildTarget): Handle skipped targets.
@@ -39,11 +39,13 @@ namespace Microsoft.Build.BuildEngine {
internal class ConditionParser {
ConditionTokenizer tokenizer;
string conditionStr;
ConditionParser (string condition)
{
tokenizer = new ConditionTokenizer ();
tokenizer.Tokenize (condition);
conditionStr = condition;
}
public static bool ParseAndEvaluate (string condition, Project context)
@@ -171,7 +173,7 @@ namespace Microsoft.Build.BuildEngine {
} else if (token.Type == TokenType.Not) {
e = ParseNotExpression ();
} else
throw new ExpressionParseException (String.Format ("Unexpected token type {0}.", token.Type));
throw new ExpressionParseException (String.Format ("Unexpected token type {0}, while parsing {1}", token.Type, conditionStr));
return e;
}
@@ -244,7 +246,7 @@ namespace Microsoft.Build.BuildEngine {
{
if (tokenizer.Token.Type != type)
throw new ExpressionParseException ("Expected token type of type: " + type + ", got " +
tokenizer.Token.Type + " (" + tokenizer.Token.Value + ") .");
tokenizer.Token.Type + " (" + tokenizer.Token.Value + "), while parsing " + conditionStr);
}
}
}
@@ -32,6 +32,7 @@ using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.IO;
using System.Security;
using System.Text;
using Microsoft.Build.Framework;
namespace Microsoft.Build.BuildEngine {
@@ -48,6 +49,16 @@ namespace Microsoft.Build.BuildEngine {
bool showSummary;
bool skipProjectStartedText;
List<string> errors, warnings;
bool projectFailed;
ConsoleColor errorColor, warningColor, eventColor, messageColor, highMessageColor;
ColorSetter colorSet;
ColorResetter colorReset;
bool no_message_color, use_colors;
List<BuildStatusEventArgs> events;
Dictionary<string, List<string>> errorsTable;
Dictionary<string, List<string>> warningsTable;
string current_events_string;
public ConsoleLogger ()
: this (LoggerVerbosity.Normal, null, null, null)
@@ -59,7 +70,6 @@ namespace Microsoft.Build.BuildEngine {
{
}
// FIXME: what about colorSet and colorReset?
public ConsoleLogger (LoggerVerbosity verbosity,
WriteHandler write,
ColorSetter colorSet,
@@ -78,6 +88,103 @@ namespace Microsoft.Build.BuildEngine {
this.skipProjectStartedText = false;
errors = new List<string> ();
warnings = new List<string> ();
this.colorSet = colorSet;
this.colorReset = colorReset;
events = new List<BuildStatusEventArgs> ();
errorsTable = new Dictionary<string, List<string>> ();
warningsTable = new Dictionary<string, List<string>> ();
//defaults
errorColor = ConsoleColor.DarkRed;
warningColor = ConsoleColor.DarkYellow;
eventColor = ConsoleColor.DarkCyan;
messageColor = ConsoleColor.DarkGray;
highMessageColor = ConsoleColor.White;
// if message color is not set via the env var,
// then don't use any color for it.
no_message_color = true;
use_colors = false;
if (colorSet == null || colorReset == null)
return;
// color support
string config = Environment.GetEnvironmentVariable ("XBUILD_COLORS");
if (config == null) {
use_colors = true;
return;
}
if (config == "disable")
return;
use_colors = true;
string [] pairs = config.Split (new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
foreach (string pair in pairs) {
string [] parts = pair.Split (new char[] {'='}, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length != 2)
continue;
if (parts [0] == "errors")
TryParseConsoleColor (parts [1], ref errorColor);
else if (parts [0] == "warnings")
TryParseConsoleColor (parts [1], ref warningColor);
else if (parts [0] == "events")
TryParseConsoleColor (parts [1], ref eventColor);
else if (parts [0] == "messages") {
if (TryParseConsoleColor (parts [1], ref messageColor)) {
highMessageColor = GetBrightColorFor (messageColor);
no_message_color = false;
}
}
}
}
bool TryParseConsoleColor (string color_str, ref ConsoleColor color)
{
switch (color_str.ToLower ()) {
case "black": color = ConsoleColor.Black; break;
case "blue": color = ConsoleColor.DarkBlue; break;
case "green": color = ConsoleColor.DarkGreen; break;
case "cyan": color = ConsoleColor.DarkCyan; break;
case "red": color = ConsoleColor.DarkRed; break;
case "magenta": color = ConsoleColor.DarkMagenta; break;
case "yellow": color = ConsoleColor.DarkYellow; break;
case "grey": color = ConsoleColor.DarkGray; break;
case "brightgrey": color = ConsoleColor.Gray; break;
case "brightblue": color = ConsoleColor.Blue; break;
case "brightgreen": color = ConsoleColor.Green; break;
case "brightcyan": color = ConsoleColor.Cyan; break;
case "brightred": color = ConsoleColor.Red; break;
case "brightmagenta": color = ConsoleColor.Magenta; break;
case "brightyellow": color = ConsoleColor.Yellow; break;
case "white":
case "brightwhite": color = ConsoleColor.White; break;
default: return false;
}
return true;
}
ConsoleColor GetBrightColorFor (ConsoleColor color)
{
switch (color) {
case ConsoleColor.DarkBlue: return ConsoleColor.Blue;
case ConsoleColor.DarkGreen: return ConsoleColor.Green;
case ConsoleColor.DarkCyan: return ConsoleColor.Cyan;
case ConsoleColor.DarkRed: return ConsoleColor.Red;
case ConsoleColor.DarkMagenta: return ConsoleColor.Magenta;
case ConsoleColor.DarkYellow: return ConsoleColor.Yellow;
case ConsoleColor.DarkGray: return ConsoleColor.Gray;
case ConsoleColor.Gray: return ConsoleColor.White;
default: return color;
}
}
public void ApplyParameter (string parameterName,
@@ -108,28 +215,55 @@ namespace Microsoft.Build.BuildEngine {
WriteLine (String.Format ("Build started {0}.", args.Timestamp));
WriteLine ("__________________________________________________");
buildStart = args.Timestamp;
PushEvent (args);
}
public void BuildFinishedHandler (object sender, BuildFinishedEventArgs args)
{
if (args.Succeeded == true) {
if (args.Succeeded == true && !projectFailed) {
WriteLine ("Build succeeded.");
} else {
WriteLine ("Build failed.");
WriteLine ("Build FAILED.");
}
if (performanceSummary == true) {
}
if (errors.Count > 0) {
WriteLine ("Errors:");
foreach (string error in errors)
WriteLine (error);
if (warnings.Count > 0) {
WriteLine (Environment.NewLine + "Warnings:");
SetColor (warningColor);
WriteLine (String.Empty);
foreach (KeyValuePair<string, List<string>> pair in warningsTable) {
if (!String.IsNullOrEmpty (pair.Key))
WriteLine (pair.Key);
string indent_str = String.IsNullOrEmpty (pair.Key) ? String.Empty : "\t";
foreach (string msg in pair.Value)
WriteLine (String.Format ("{0}{1}", indent_str, msg));
WriteLine (String.Empty);
}
ResetColor ();
}
if (warnings.Count > 0) {
WriteLine ("Warnings:");
foreach (string warning in warnings)
WriteLine (warning);
if (errors.Count > 0) {
WriteLine ("Errors:");
SetColor (errorColor);
WriteLine (String.Empty);
foreach (KeyValuePair<string, List<string>> pair in errorsTable) {
if (!String.IsNullOrEmpty (pair.Key))
WriteLine (pair.Key);
string indent_str = String.IsNullOrEmpty (pair.Key) ? String.Empty : "\t";
foreach (string msg in pair.Value)
WriteLine (String.Format ("{0}{1}", indent_str, msg));
WriteLine (String.Empty);
}
ResetColor ();
}
if (showSummary == true){
@@ -139,83 +273,131 @@ namespace Microsoft.Build.BuildEngine {
WriteLine (String.Empty);
WriteLine (String.Format ("Time Elapsed {0}", timeElapsed));
}
PopEvent ();
}
public void ProjectStartedHandler (object sender, ProjectStartedEventArgs args)
{
WriteLine (String.Format ("Project \"{0}\" ({1} target(s)):", args.ProjectFile, args.TargetNames));
SetColor (eventColor);
WriteLine (String.Format ("Project \"{0}\" ({1} target(s)):", args.ProjectFile,
String.IsNullOrEmpty (args.TargetNames) ? "default" : args.TargetNames));
ResetColor ();
WriteLine (String.Empty);
PushEvent (args);
}
public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs args)
{
if (IsVerbosityGreaterOrEqual (LoggerVerbosity.Normal)) {
if (indent == 1)
indent --;
SetColor (eventColor);
WriteLine (String.Format ("Done building project \"{0}\".{1}", args.ProjectFile,
args.Succeeded ? String.Empty : "-- FAILED"));
ResetColor ();
WriteLine (String.Empty);
}
if (!projectFailed)
// no project has failed yet, so update the flag
projectFailed = !args.Succeeded;
PopEvent ();
}
public void TargetStartedHandler (object sender, TargetStartedEventArgs args)
{
WriteLine (String.Format ("Target {0}:",args.TargetName));
indent++;
SetColor (eventColor);
WriteLine (String.Format ("Target {0}:",args.TargetName));
ResetColor ();
PushEvent (args);
}
public void TargetFinishedHandler (object sender, TargetFinishedEventArgs args)
{
indent--;
if (IsVerbosityGreaterOrEqual (LoggerVerbosity.Diagnostic))
if (IsVerbosityGreaterOrEqual (LoggerVerbosity.Detailed) || !args.Succeeded) {
SetColor (eventColor);
WriteLine (String.Format ("Done building target \"{0}\" in project \"{1}\".{2}",
args.TargetName, args.ProjectFile,
args.Succeeded ? String.Empty : "-- FAILED"));
if (!args.Succeeded)
errorCount++;
ResetColor ();
}
indent--;
WriteLine (String.Empty);
PopEvent ();
}
public void TaskStartedHandler (object sender, TaskStartedEventArgs args)
{
if (this.verbosity == LoggerVerbosity.Diagnostic)
if (this.verbosity == LoggerVerbosity.Detailed) {
SetColor (eventColor);
WriteLine (String.Format ("Task \"{0}\"",args.TaskName));
ResetColor ();
}
indent++;
PushEvent (args);
}
public void TaskFinishedHandler (object sender, TaskFinishedEventArgs args)
{
indent--;
if (this.verbosity == LoggerVerbosity.Diagnostic) {
if (this.verbosity == LoggerVerbosity.Detailed || !args.Succeeded) {
SetColor (eventColor);
if (args.Succeeded)
WriteLine (String.Format ("Done executing task \"{0}\"", args.TaskName));
else {
WriteLine (String.Format ("Task \"{0}\" execution failed", args.TaskName));
errorCount++;
}
else
WriteLine (String.Format ("Task \"{0}\" execution -- FAILED", args.TaskName));
ResetColor ();
}
PopEvent ();
}
public void MessageHandler (object sender, BuildMessageEventArgs args)
{
if (IsMessageOk (args)) {
WriteLine (args.Message);
if (no_message_color) {
WriteLine (args.Message);
} else {
SetColor (args.Importance == MessageImportance.High ? highMessageColor : messageColor);
WriteLine (args.Message);
ResetColor ();
}
}
}
public void WarningHandler (object sender, BuildWarningEventArgs args)
{
string msg = FormatWarningEvent (args);
if (IsVerbosityGreaterOrEqual (LoggerVerbosity.Normal))
if (IsVerbosityGreaterOrEqual (LoggerVerbosity.Normal)) {
SetColor (warningColor);
WriteLineWithoutIndent (msg);
ResetColor ();
}
warnings.Add (msg);
List<string> list = null;
if (!warningsTable.TryGetValue (EventsAsString, out list))
warningsTable [EventsAsString] = list = new List<string> ();
list.Add (msg);
warningCount++;
}
public void ErrorHandler (object sender, BuildErrorEventArgs args)
{
string msg = FormatErrorEvent (args);
if (IsVerbosityGreaterOrEqual (LoggerVerbosity.Minimal))
if (IsVerbosityGreaterOrEqual (LoggerVerbosity.Minimal)) {
SetColor (errorColor);
WriteLineWithoutIndent (msg);
ResetColor ();
}
errors.Add (msg);
List<string> list = null;
if (!errorsTable.TryGetValue (EventsAsString, out list))
errorsTable [EventsAsString] = list = new List<string> ();
list.Add (msg);
errorCount++;
}
@@ -226,9 +408,51 @@ namespace Microsoft.Build.BuildEngine {
private void WriteLine (string message)
{
for (int i = 0; i < indent; i++)
Console.Write ('\t');
writeHandler (message);
if (indent > 0) {
StringBuilder sb = new StringBuilder ();
for (int i = 0; i < indent; i++)
sb.Append ('\t');
sb.Append (message);
writeHandler (sb.ToString ());
} else {
writeHandler (message);
}
}
void PushEvent (BuildStatusEventArgs args)
{
events.Add (args);
current_events_string = null;
}
void PopEvent ()
{
events.RemoveAt (events.Count - 1);
current_events_string = null;
}
string EventsToString ()
{
StringBuilder sb = new StringBuilder ();
for (int i = 0; i < events.Count; i ++) {
BuildStatusEventArgs args = events [i];
ProjectStartedEventArgs pargs = args as ProjectStartedEventArgs;
if (pargs != null) {
sb.AppendFormat ("{0} ({1}) ->\n", pargs.ProjectFile,
String.IsNullOrEmpty (pargs.TargetNames) ?
"default targets" :
pargs.TargetNames);
continue;
}
TargetStartedEventArgs targs = args as TargetStartedEventArgs;
if (targs != null)
sb.AppendFormat ("({0} target) ->\n", targs.TargetName);
}
return sb.ToString ();
}
private void WriteLineWithoutIndent (string message)
@@ -240,6 +464,18 @@ namespace Microsoft.Build.BuildEngine {
{
Console.WriteLine (message);
}
void SetColor (ConsoleColor color)
{
if (use_colors)
colorSet (color);
}
void ResetColor ()
{
if (use_colors)
colorReset ();
}
private void ParseParameters ()
{
@@ -348,6 +584,14 @@ namespace Microsoft.Build.BuildEngine {
ParseParameters ();
}
}
string EventsAsString {
get {
if (current_events_string == null)
current_events_string = EventsToString ();
return current_events_string;
}
}
public bool ShowSummary {
get { return showSummary; }
@@ -41,7 +41,15 @@ namespace Microsoft.Build.BuildEngine {
ITaskItem[] includes;
string excludes;
ITaskItem[] matchedItems;
static bool _runningOnWindows;
static DirectoryScanner ()
{
PlatformID pid = Environment.OSVersion.Platform;
_runningOnWindows =((int) pid != 128 && (int) pid != 4 && (int) pid != 6);
}
public DirectoryScanner ()
{
}
@@ -88,13 +96,25 @@ namespace Microsoft.Build.BuildEngine {
includedItems.Add (include_item);
} else {
if (name.Split (Path.DirectorySeparatorChar).Length > name.Split (Path.AltDirectorySeparatorChar).Length) {
separatedPath = name.Split (Path.DirectorySeparatorChar);
separatedPath = name.Split (new char [] {Path.DirectorySeparatorChar},
StringSplitOptions.RemoveEmptyEntries);
} else {
separatedPath = name.Split (Path.AltDirectorySeparatorChar);
separatedPath = name.Split (new char [] {Path.AltDirectorySeparatorChar},
StringSplitOptions.RemoveEmptyEntries);
}
if (separatedPath.Length == 1 && separatedPath [0] == String.Empty)
return;
fileInfo = ParseIncludeExclude (separatedPath, 0, baseDirectory);
int offset = 0;
if (Path.IsPathRooted (name)) {
baseDirectory = new DirectoryInfo (Path.GetPathRoot (name));
if (IsRunningOnWindows)
// skip the "drive:"
offset = 1;
}
fileInfo = ParseIncludeExclude (separatedPath, offset, baseDirectory);
foreach (FileInfo fi in fileInfo) {
if (!excludedItems.ContainsKey (fi.FullName)) {
TaskItem item = new TaskItem (include_item);
@@ -115,13 +135,23 @@ namespace Microsoft.Build.BuildEngine {
excludedItems.Add (Path.GetFullPath (name), true);
} else {
if (name.Split (Path.DirectorySeparatorChar).Length > name.Split (Path.AltDirectorySeparatorChar).Length) {
separatedPath = name.Split (Path.DirectorySeparatorChar);
separatedPath = name.Split (new char [] {Path.DirectorySeparatorChar},
StringSplitOptions.RemoveEmptyEntries);
} else {
separatedPath = name.Split (Path.AltDirectorySeparatorChar);
separatedPath = name.Split (new char [] {Path.AltDirectorySeparatorChar},
StringSplitOptions.RemoveEmptyEntries);
}
if (separatedPath.Length == 1 && separatedPath [0] == String.Empty)
return;
fileInfo = ParseIncludeExclude (separatedPath, 0, baseDirectory);
int offset = 0;
if (Path.IsPathRooted (name)) {
baseDirectory = new DirectoryInfo (Path.GetPathRoot (name));
if (IsRunningOnWindows)
// skip the "drive:"
offset = 1;
}
fileInfo = ParseIncludeExclude (separatedPath, offset, baseDirectory);
foreach (FileInfo fi in fileInfo)
if (!excludedItems.ContainsKey (fi.FullName))
excludedItems.Add (fi.FullName, true);
@@ -156,7 +186,7 @@ namespace Microsoft.Build.BuildEngine {
while (currentDirectories.Count > 0)
{
DirectoryInfo current = currentDirectories.Pop();
allDirectories.Add (current);
allDirectories.Insert (0, current);
foreach (DirectoryInfo dir in current.GetDirectories())
{
currentDirectories.Push(dir);
@@ -165,8 +195,9 @@ namespace Microsoft.Build.BuildEngine {
// No further directories shall be read
di = allDirectories.ToArray();
} else
} else {
di = directory.GetDirectories (input [ptr]);
}
foreach (DirectoryInfo info in di) {
fi = ParseIncludeExclude (input, ptr + 1, info);
foreach (FileInfo file in fi)
@@ -199,6 +230,9 @@ namespace Microsoft.Build.BuildEngine {
get { return matchedItems; }
}
static bool IsRunningOnWindows {
get { return _runningOnWindows; }
}
}
}
@@ -328,15 +328,12 @@ namespace Microsoft.Build.BuildEngine {
void LogProjectStarted (Project project, string [] target_names)
{
ProjectStartedEventArgs psea;
if (target_names == null || target_names.Length == 0) {
if (project.DefaultTargets != String.Empty)
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName,
project.DefaultTargets, null, null);
else
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName, "default", null, null);
} else
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName, String.Join (";",
target_names), null, null);
if (target_names == null || target_names.Length == 0)
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName,
String.Empty, null, null);
else
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName,
String.Join (";", target_names), null, null);
eventSource.FireProjectStarted (this, psea);
}
@@ -78,7 +78,6 @@ namespace Microsoft.Build.BuildEngine {
bool allowItems = (options & ParseOptions.AllowItems) == ParseOptions.AllowItems;
bool allowMd = (options & ParseOptions.AllowMetadata) == ParseOptions.AllowMetadata;
expression = expression.Replace ('/', Path.DirectorySeparatorChar);
expression = expression.Replace ('\\', Path.DirectorySeparatorChar);
string [] parts;
@@ -299,7 +298,7 @@ namespace Microsoft.Build.BuildEngine {
if (item_regex == null)
item_regex = new Regex (
@"@\(\s*"
+ @"(?<itemname>[_A-Za-z][_0-9a-zA-Z]*)"
+ @"(?<itemname>[_A-Za-z][_\-0-9a-zA-Z]*)"
+ @"(?<has_transform>\s*->\s*'(?<transform>[^']*)')?"
+ @"(?<has_separator>\s*,\s*'(?<separator>[^']*)')?"
+ @"\s*\)");
@@ -312,7 +311,7 @@ namespace Microsoft.Build.BuildEngine {
if (property_regex == null)
property_regex = new Regex (
@"\$\(\s*"
+ @"(?<name>[_a-zA-Z][_0-9a-zA-Z]*)"
+ @"(?<name>[_a-zA-Z][_\-0-9a-zA-Z]*)"
+ @"\s*\)");
return property_regex;
}
@@ -323,8 +322,8 @@ namespace Microsoft.Build.BuildEngine {
if (metadata_regex == null)
metadata_regex = new Regex (
@"%\(\s*"
+ @"((?<name>[_a-zA-Z][_0-9a-zA-Z]*)\.)?"
+ @"(?<meta>[_a-zA-Z][_0-9a-zA-Z]*)"
+ @"((?<name>[_a-zA-Z][_\-0-9a-zA-Z]*)\.)?"
+ @"(?<meta>[_a-zA-Z][_\-0-9a-zA-Z]*)"
+ @"\s*\)");
return metadata_regex;
}
@@ -167,7 +167,7 @@ namespace Microsoft.Build.BuildEngine {
Evaluate (EvaluationType.Choose);
}
void Evaluate (EvaluationType type)
internal void Evaluate (EvaluationType type)
{
BuildItemGroup big;
BuildPropertyGroup bpg;
@@ -183,10 +183,6 @@ namespace Microsoft.Build.BuildEngine {
bpg = (BuildPropertyGroup) evaluate_iterator.Value;
if (ConditionParser.ParseAndEvaluate (bpg.Condition, project))
bpg.Evaluate ();
} else if (evaluate_iterator.Value is Import) {
import = (Import) evaluate_iterator.Value;
if (ConditionParser.ParseAndEvaluate (import.Condition, project))
import.Evaluate ();
}
// if it wasn't moved by adding anything because of evaluating a Import shift it
@@ -51,17 +51,16 @@ namespace Microsoft.Build.BuildEngine {
if (ProjectPath == String.Empty)
throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");
evaluatedProjectPath = EvaluateProjectPath (ProjectPath);
evaluatedProjectPath = GetFullPath ();
if (EvaluatedProjectPath == String.Empty)
throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");
}
// FIXME: condition
internal void Evaluate ()
{
evaluatedProjectPath = EvaluateProjectPath (ProjectPath);
string filename = GetFullPath ();
if (EvaluatedProjectPath == String.Empty)
throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");
string filename = evaluatedProjectPath;
// NOTE: it's a hack to transform Microsoft.CSharp.Targets to Microsoft.CSharp.targets
if (Path.HasExtension (filename))
filename = Path.ChangeExtension (filename, Path.GetExtension (filename));
@@ -47,9 +47,9 @@ namespace Microsoft.Build.BuildEngine {
internal void Add (Import import)
{
if (!filenames.ContainsKey (import.ProjectPath)) {
if (!filenames.ContainsKey (import.EvaluatedProjectPath)) {
groupingCollection.Add (import);
filenames.Add (import.ProjectPath, null);
filenames.Add (import.EvaluatedProjectPath, null);
}
}
@@ -72,6 +72,11 @@ namespace Microsoft.Build.BuildEngine {
array.SetValue(it.Current, i++);
}
}
internal bool Contains (Import import)
{
return filenames.ContainsKey (import.EvaluatedProjectPath);
}
public void CopyTo (Import[] array, int index)
{
@@ -60,7 +60,7 @@ namespace Microsoft.Build.BuildEngine {
bool isValidated;
BuildItemGroupCollection itemGroups;
ImportCollection imports;
string[] initialTargets;
List<string> initialTargets;
Dictionary <string, BuildItemGroup> last_item_group_containing;
bool needToReevaluate;
Engine parentEngine;
@@ -101,6 +101,8 @@ namespace Microsoft.Build.BuildEngine {
current_settings = BuildSettings.None;
builtTargetKeys = new List<string> ();
initialTargets = new List<string> ();
defaultTargets = new string [0];
globalProperties = new BuildPropertyGroup (null, this, null, false);
foreach (BuildProperty bp in parentEngine.GlobalProperties)
@@ -298,7 +300,7 @@ namespace Microsoft.Build.BuildEngine {
return false;
}
if (!initialTargetsBuilt && initialTargets != null && initialTargets.Length > 0) {
if (!initialTargetsBuilt) {
foreach (string target in initialTargets) {
if (!BuildTarget (target.Trim (), targetOutputs))
return false;
@@ -319,8 +321,7 @@ namespace Microsoft.Build.BuildEngine {
throw new ArgumentException ("targetNames cannot contain null strings");
if (!targets.Exists (target_name)) {
//FIXME: Log this!
Console.WriteLine ("Target named '{0}' not found in the project.", target_name);
LogError (fullFileName, "Target named '{0}' not found in the project.", target_name);
return false;
}
@@ -417,6 +418,13 @@ namespace Microsoft.Build.BuildEngine {
public void Load (string projectFileName)
{
if (String.IsNullOrEmpty (projectFileName))
throw new ArgumentNullException ("projectFileName");
if (!File.Exists (projectFileName))
throw new ArgumentException (String.Format ("Project file {0} not found", projectFileName),
"projectFileName");
this.fullFileName = Utilities.FromMSBuildPath (Path.GetFullPath (projectFileName));
string filename = fullFileName;
@@ -707,16 +715,7 @@ namespace Microsoft.Build.BuildEngine {
try {
ParentEngine.RemoveLoadedProject (this);
XmlReaderSettings settings = new XmlReaderSettings ();
if (SchemaFile != null) {
settings.Schemas.Add (null, SchemaFile);
settings.ValidationType = ValidationType.Schema;
settings.ValidationEventHandler += new ValidationEventHandler (ValidationCallBack);
}
XmlReader xmlReader = XmlReader.Create (textReader, settings);
xmlDocument.Load (xmlReader);
xmlDocument.Load (textReader);
if (xmlDocument.DocumentElement.Name == "VisualStudioProject")
throw new InvalidProjectFileException (String.Format (
@@ -724,6 +723,12 @@ namespace Microsoft.Build.BuildEngine {
"supported by xbuild. You need to convert it to msbuild " +
"format to build with xbuild.", fullFileName));
if (SchemaFile != null) {
xmlDocument.Schemas.Add (XmlSchema.Read (
new StreamReader (SchemaFile), ValidationCallBack));
xmlDocument.Validate (ValidationCallBack);
}
if (xmlDocument.DocumentElement.Name != "Project") {
throw new InvalidProjectFileException (String.Format (
"The element <{0}> is unrecognized, or not supported in this context.", xmlDocument.DocumentElement.Name));
@@ -766,12 +771,9 @@ namespace Microsoft.Build.BuildEngine {
if (ParentEngine.DefaultTasksRegistered)
taskDatabase.CopyTasks (ParentEngine.DefaultTasks);
if (xmlDocument.DocumentElement.GetAttributeNode ("DefaultTargets") != null)
defaultTargets = xmlDocument.DocumentElement.GetAttribute ("DefaultTargets").Split (';');
else
defaultTargets = new string [0];
ProcessProjectAttributes (xmlDocument.DocumentElement.Attributes);
initialTargets = new List<string> ();
defaultTargets = new string [0];
PrepareForEvaluate ();
ProcessElements (xmlDocument.DocumentElement, null);
isDirty = false;
@@ -783,12 +785,17 @@ namespace Microsoft.Build.BuildEngine {
foreach (XmlAttribute attr in attributes) {
switch (attr.Name) {
case "InitialTargets":
initialTargets = attr.Value.Split (new char [] {';'},
StringSplitOptions.RemoveEmptyEntries);
initialTargets.AddRange (attr.Value.Split (
new char [] {';', ' '},
StringSplitOptions.RemoveEmptyEntries));
break;
case "DefaultTargets":
defaultTargets = attr.Value.Split (new char [] {';'},
// first non-empty DefaultTargets found is used
if (defaultTargets == null || defaultTargets.Length == 0)
defaultTargets = attr.Value.Split (new char [] {';', ' '},
StringSplitOptions.RemoveEmptyEntries);
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildProjectDefaultTargets",
DefaultTargets, PropertyType.Reserved));
break;
}
}
@@ -796,6 +803,7 @@ namespace Microsoft.Build.BuildEngine {
internal void ProcessElements (XmlElement rootElement, ImportedProject ip)
{
ProcessProjectAttributes (rootElement.Attributes);
foreach (XmlNode xn in rootElement.ChildNodes) {
if (xn is XmlElement) {
XmlElement xe = (XmlElement) xn;
@@ -833,7 +841,7 @@ namespace Microsoft.Build.BuildEngine {
}
}
void Evaluate ()
void PrepareForEvaluate ()
{
evaluatedItems = new BuildItemGroup (null, this, null, true);
evaluatedItemsIgnoringCondition = new BuildItemGroup (null, this, null, true);
@@ -843,7 +851,10 @@ namespace Microsoft.Build.BuildEngine {
RemoveBuiltTargets ();
InitializeProperties ();
}
void Evaluate ()
{
groupingCollection.Evaluate ();
//FIXME: UsingTasks aren't really evaluated. (shouldn't use expressions or anything)
@@ -895,6 +906,7 @@ namespace Microsoft.Build.BuildEngine {
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildToolsPath", parentEngine.BinPath, PropertyType.Reserved));
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildExtensionsPath", ExtensionsPath, PropertyType.Reserved));
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildProjectDefaultTargets", DefaultTargets, PropertyType.Reserved));
EvaluatedProperties.AddProperty (new BuildProperty ("OS", OS, PropertyType.Environment));
// FIXME: make some internal method that will work like GetDirectoryName but output String.Empty on null/String.Empty
string projectDir;
@@ -933,10 +945,32 @@ namespace Microsoft.Build.BuildEngine {
void AddImport (XmlElement xmlElement, ImportedProject importingProject)
{
Import import;
import = new Import (xmlElement, this, importingProject);
// eval all the properties etc till the import
groupingCollection.Evaluate (EvaluationType.Property);
Import import = new Import (xmlElement, this, importingProject);
if (!ConditionParser.ParseAndEvaluate (import.Condition, this))
return;
if (Imports.Contains (import)) {
LogWarning (importingProject != null ? importingProject.FullFileName : fullFileName,
"A circular reference was found involving the import of {0}. Only" +
" the first import of this file will be used, ignoring others.",
import.ProjectPath);
return;
}
if (String.Compare (fullFileName, import.EvaluatedProjectPath) == 0) {
LogWarning (importingProject != null ? importingProject.FullFileName : fullFileName,
"The main project file was imported here, which creates a circular " +
"reference. Ignoring this import.");
return;
}
Imports.Add (import);
import.Evaluate ();
}
void AddItemGroup (XmlElement xmlElement, ImportedProject importedProject)
@@ -978,11 +1012,13 @@ namespace Microsoft.Build.BuildEngine {
public string DefaultTargets {
get {
return xmlDocument.DocumentElement.GetAttribute ("DefaultTargets");
return String.Join ("; ", defaultTargets);
}
set {
xmlDocument.DocumentElement.SetAttribute ("DefaultTargets", value);
defaultTargets = value.Split (new char [] {';'}, StringSplitOptions.RemoveEmptyEntries);
if (value != null)
defaultTargets = value.Split (new char [] {';', ' '},
StringSplitOptions.RemoveEmptyEntries);
}
}
@@ -1111,6 +1147,15 @@ namespace Microsoft.Build.BuildEngine {
ParentEngine.EventSource.FireWarningRaised (this, bwea);
}
void LogError (string filename, string message,
params object[] messageArgs)
{
BuildErrorEventArgs beea = new BuildErrorEventArgs (
null, null, filename, 0, 0, 0, 0, String.Format (message, messageArgs),
null, null);
ParentEngine.EventSource.FireErrorRaised (this, beea);
}
static string ExtensionsPath {
get {
if (extensions_path == null) {
@@ -1177,11 +1222,14 @@ namespace Microsoft.Build.BuildEngine {
public string InitialTargets {
get {
return xmlDocument.DocumentElement.GetAttribute ("InitialTargets");
return String.Join ("; ", initialTargets.ToArray ());
}
set {
initialTargets.Clear ();
xmlDocument.DocumentElement.SetAttribute ("InitialTargets", value);
initialTargets = value.Split (new char [] {';'}, StringSplitOptions.RemoveEmptyEntries);
if (value != null)
initialTargets.AddRange (value.Split (
new char [] {';', ' '}, StringSplitOptions.RemoveEmptyEntries));
}
}
@@ -1245,6 +1293,22 @@ namespace Microsoft.Build.BuildEngine {
internal static string XmlNamespace {
get { return ns; }
}
static string OS {
get {
PlatformID pid = Environment.OSVersion.Platform;
switch ((int)pid) {
case 128:
case 4:
return "Unix";
case 6:
return "OSX";
default:
return "Windows_NT";
}
}
}
}
}
@@ -300,6 +300,14 @@ namespace Microsoft.Build.BuildEngine {
get { return project; }
}
internal string TargetFile {
get {
if (importedProject != null)
return importedProject.FullFileName;
return project != null ? project.FullFileName : String.Empty;
}
}
internal List<BuildTask> BuildTasks {
get { return buildTasks; }
}
@@ -244,7 +244,8 @@ namespace Microsoft.Build.BuildEngine {
{
TargetStartedEventArgs tsea;
string projectFile = project.FullFileName;
tsea = new TargetStartedEventArgs (String.Format ("Target {0} started.", target.Name), null, target.Name, projectFile, null);
tsea = new TargetStartedEventArgs (String.Format ("Target {0} started.", target.Name), null,
target.Name, projectFile, target.TargetFile);
target.Engine.EventSource.FireTargetStarted (this, tsea);
}
@@ -252,7 +253,8 @@ namespace Microsoft.Build.BuildEngine {
{
TargetFinishedEventArgs tfea;
string projectFile = project.FullFileName;
tfea = new TargetFinishedEventArgs (String.Format ("Target {0} finished.", target.Name), null, target.Name, projectFile, null, succeeded);
tfea = new TargetFinishedEventArgs (String.Format ("Target {0} finished.", target.Name), null,
target.Name, projectFile, target.TargetFile, succeeded);
target.Engine.EventSource.FireTargetFinished (this, tfea);
}
@@ -108,6 +108,18 @@ namespace Microsoft.Build.BuildEngine {
{
foreach (XmlAttribute attrib in buildTask.TaskElement.Attributes)
ParseAttribute (attrib.Value);
foreach (XmlNode xn in buildTask.TaskElement.ChildNodes) {
XmlElement xe = xn as XmlElement;
if (xe == null)
continue;
//FIXME: error on any other child
if (String.Compare (xe.LocalName, "Output", StringComparison.Ordinal) == 0) {
foreach (XmlAttribute attrib in xe.Attributes)
ParseAttribute (attrib.Value);
}
}
}
}
@@ -160,6 +160,9 @@ namespace Microsoft.Build.BuildEngine {
throw new InvalidProjectFileException ("Only one of ItemName and PropertyName attributes can be specified.");
if (xmlElement.GetAttribute ("TaskParameter") == String.Empty)
throw new InvalidProjectFileException ("TaskParameter attribute must be specified.");
if (!ConditionParser.ParseAndEvaluate (xmlElement.GetAttribute ("Condition"), parentProject))
continue;
taskParameter = xmlElement.GetAttribute ("TaskParameter");
itemName = xmlElement.GetAttribute ("ItemName");
@@ -1,3 +1,27 @@
2009-10-08 Ankit Jain <[email protected]>
* ProjectTest.cs (TestBatchedMetadataRefInOutput): New.
2009-10-01 Ankit Jain <[email protected]>
* ImportTest.cs (TestAdd1): Add tests for multiple imports.
2009-09-29 Ankit Jain <[email protected]>
* ProjectTest.cs (TestPropertiesFromImportedProjects): New.
2009-09-26 Ankit Jain <[email protected]>
* TargetTest.cs (TestOverridingTargets): New.
2009-09-26 Ankit Jain <[email protected]>
* ProjectTest.cs (TestInitialTargetsWithImports):
(TestDefaultTargets):
(TestDefaultTargetsWithImports):
(TestNoDefaultTargetsWithImports):
(TestNoDefaultTargets): New tests.
2009-08-29 Ankit Jain <[email protected]>
* BuildItemTest.cs (TestSetMetadata5a): New.
@@ -31,6 +31,7 @@ using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using NUnit.Framework;
using System.IO;
namespace MonoTests.Microsoft.Build.BuildEngine {
[TestFixture]
@@ -42,9 +43,27 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
[Test]
public void TestAdd1 ()
{
string first = @"
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<Import Project='second.proj'/>
</Project>
";
using (StreamWriter sw = new StreamWriter ("Test/resources/first.proj")) {
sw.Write (first);
}
string second = @"
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
</Project>
";
using (StreamWriter sw = new StreamWriter ("Test/resources/second.proj")) {
sw.Write (second);
}
string documentString = @"
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<Import Project='Test/resources/Import.csproj'/>
<Import Project='Test/resources/first.proj'/>
<Import Project='Test/resources/Import.csproj' Condition='false'/>
</Project>
";
@@ -53,15 +72,21 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project = engine.CreateNewProject ();
project.LoadXml (documentString);
Import[] t = new Import [1];
Import[] t = new Import [2];
Assert.AreEqual (2, project.Imports.Count, "Number of imports");
project.Imports.CopyTo (t, 0);
string base_dir = Path.Combine (Environment.CurrentDirectory, Path.Combine ("Test", "resources"));
Assert.IsNull (t [0].Condition, "A1");
Assert.AreEqual (false, t [0].IsImported, "A2");
Assert.AreEqual ("Test/resources/Import.csproj", t [0].ProjectPath, "A3");
Assert.IsNotNull (t [0].EvaluatedProjectPath, "A4");
// FIXME: why there is no IsNotEmpty () in Mono NUnit?
Assert.IsTrue (String.Empty != t [0].EvaluatedProjectPath, "A5");
Assert.AreEqual (false, t[0].IsImported, "A5");
Assert.AreEqual ("Test/resources/first.proj", t[0].ProjectPath, "A6");
Assert.AreEqual (Path.Combine (base_dir, "first.proj"), t[0].EvaluatedProjectPath, "A7");
Assert.AreEqual (true, t[1].IsImported, "A2");
Assert.AreEqual ("second.proj", t[1].ProjectPath, "A3");
Assert.AreEqual (Path.Combine (base_dir, "second.proj"), t[1].EvaluatedProjectPath, "A4");
}
[Test]
@@ -1492,6 +1492,48 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual (3, include.Count, "A2");
}
[Test]
public void TestBatchedMetadataRefInOutput () {
string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
<ItemGroup>
<Coll1 Include=""A1""><Name>Abc</Name></Coll1>
<Coll1 Include=""A2""><Name>Def</Name></Coll1>
<Coll1 Include=""A3""><Name>Abc</Name></Coll1>
<Coll1 Include=""B1""><Name>Bar</Name></Coll1>
</ItemGroup>
<Target Name=""ShowMessage"">
<BatchingTestTask Sources=""@(Coll1)"" >
<Output TaskParameter=""Output"" ItemName=""AbcItems"" Condition=""'%(Coll1.Name)' == 'Abc'""/>
<Output TaskParameter=""Output"" ItemName=""NonAbcItems"" Condition=""'%(Coll1.Name)' != 'Abc'""/>
</BatchingTestTask>
<Message Text='AbcItems: @(AbcItems)' />
<Message Text='NonAbcItems: @(NonAbcItems)' />
</Target>
</Project>";
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
project.LoadXml (projectString);
bool result = project.Build ("ShowMessage");
if (!result) {
logger.DumpMessages ();
Assert.Fail ("A1: Build failed");
}
logger.CheckLoggedMessageHead ("AbcItems: A1;A3", "A2");
logger.CheckLoggedMessageHead ("NonAbcItems: A2;B1", "A2");
if (logger.NormalMessageCount != 0) {
logger.DumpMessages ();
Assert.Fail ("Unexpected extra messages found");
}
}
[Test]
public void TestInitialTargets ()
{
@@ -1514,15 +1556,282 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
try {
Assert.IsTrue (project.Build (), "Build failed");
Assert.AreEqual (0, logger.CheckHead ("Executing pre target", MessageImportance.Normal), "A1");
Assert.AreEqual (0, logger.CheckHead ("Executing boo target", MessageImportance.Normal), "A2");
Assert.AreEqual (0, logger.Count, "A3");
logger.CheckLoggedMessageHead ("Executing pre target", "A1");
logger.CheckLoggedMessageHead ("Executing boo target", "A2");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
} catch {
logger.DumpMessages ();
throw;
}
}
[Test]
public void TestInitialTargetsWithImports () {
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
string second = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" InitialTargets=""One "">
<Target Name=""One"">
<Message Text='Executing Second::One target'/>
</Target>
<Import Project='third.proj'/>
</Project>
";
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "second.proj")))) {
sw.Write (second);
}
string third = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" InitialTargets=""Two"">
<Target Name=""Two"">
<Message Text='Executing Third::Two target'/>
</Target>
</Project>
";
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "third.proj")))) {
sw.Write (third);
}
project.LoadXml (@"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" InitialTargets=""pre"">
<Target Name=""boo"">
<Message Text=""Executing boo target""/>
</Target>
<Target Name=""pre"">
<Message Text=""Executing pre target""/>
</Target>
<Import Project='Test/resources/second.proj'/>
</Project>");
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
try {
Assert.IsTrue (project.Build (), "Build failed");
logger.CheckLoggedMessageHead ("Executing pre target", "A1");
logger.CheckLoggedMessageHead ("Executing Second::One target", "A2");
logger.CheckLoggedMessageHead ("Executing Third::Two target", "A3");
logger.CheckLoggedMessageHead ("Executing boo target", "A4");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
Assert.AreEqual ("pre; One; Two", project.InitialTargets, "List of initial targets");
} catch {
logger.DumpMessages ();
throw;
}
}
[Test]
public void TestDefaultTargets () {
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
project.LoadXml (@"<Project DefaultTargets='pre' xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" >
<Target Name=""boo"">
<Message Text=""Executing boo target""/>
</Target>
<Target Name=""pre"">
<Message Text=""Executing pre target""/>
</Target>
</Project>");
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
try {
Assert.IsTrue (project.Build (), "Build failed");
logger.CheckLoggedMessageHead ("Executing pre target", "A1");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
Assert.AreEqual ("pre", project.DefaultTargets, "Default targets");
} catch {
logger.DumpMessages ();
throw;
}
}
[Test]
public void TestDefaultTargetsWithImports () {
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
string second = @"<Project DefaultTargets='One' xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<Target Name=""One"">
<Message Text='Executing Second::One target'/>
</Target>
</Project>";
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "second.proj")))) {
sw.Write (second);
}
project.LoadXml (@"<Project DefaultTargets='pre' xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" >
<Target Name=""boo"">
<Message Text=""Executing boo target""/>
</Target>
<Target Name=""pre"">
<Message Text=""Executing pre target""/>
</Target>
<Import Project='Test/resources/second.proj'/>
</Project>");
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
try {
Assert.IsTrue (project.Build (), "Build failed");
logger.CheckLoggedMessageHead ("Executing pre target", "A1");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
Assert.AreEqual ("pre", project.DefaultTargets, "Default targets");
} catch {
logger.DumpMessages ();
throw;
}
}
[Test]
public void TestNoDefaultTargetsWithImports () {
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
string second = @"<Project DefaultTargets='; One ; Two' xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<Target Name=""One"">
<Message Text='Executing Second::One target'/>
</Target>
<Target Name=""Two"">
<Message Text='Executing Second::Two target'/>
</Target>
</Project>";
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "second.proj")))) {
sw.Write (second);
}
project.LoadXml (@"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" >
<Target Name=""boo"">
<Message Text=""Executing boo target""/>
</Target>
<Target Name=""pre"">
<Message Text=""Executing pre target""/>
</Target>
<Import Project='Test/resources/second.proj'/>
</Project>");
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
try {
Assert.IsTrue (project.Build (), "Build failed");
logger.CheckLoggedMessageHead ("Executing Second::One target", "A1");
logger.CheckLoggedMessageHead ("Executing Second::Two target", "A2");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
Assert.AreEqual ("One; Two", project.DefaultTargets, "Default targets");
} catch {
logger.DumpMessages ();
throw;
}
}
[Test]
public void TestNoDefaultTargets () {
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
project.LoadXml (@"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" >
<Target Name=""boo"">
<Message Text=""Executing boo target""/>
</Target>
<Target Name=""pre"">
<Message Text=""Executing pre target""/>
</Target>
</Project>");
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
try {
Assert.IsTrue (project.Build (), "Build failed");
logger.CheckLoggedMessageHead ("Executing boo target", "A1");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
Assert.AreEqual ("", project.DefaultTargets, "Default targets");
} catch {
logger.DumpMessages ();
throw;
}
}
[Test]
public void TestPropertiesFromImportedProjects ()
{
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
string second = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" ToolsVersion=""3.5"">
<PropertyGroup>
<Prop1>InitialVal</Prop1>
</PropertyGroup>
<ItemGroup>
<Second Include=""$(ThirdProp):Third""/>
</ItemGroup>
<Target Name=""Main"">
<Message Text=""Prop1: $(Prop1) FooItem: @(FooItem)""/>
<Message Text=""Second: @(Second) ThirdProp: $(ThirdProp)""/>
</Target>
<Import Project=""third.proj""/>
</Project>";
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "second.proj")))) {
sw.Write (second);
}
string third = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" ToolsVersion=""3.5"">
<PropertyGroup>
<ThirdProp>Third Value</ThirdProp>
</PropertyGroup>
</Project>";
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "third.proj")))) {
sw.Write (third);
}
project.LoadXml (@"<Project InitialTargets=""Main"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<ItemGroup>
<FooItem Include=""$(Prop1):Something""/>
</ItemGroup>
<Import Project=""Test/resources/second.proj""/>
</Project>");
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
try {
Assert.IsTrue (project.Build (), "Build failed");
logger.CheckLoggedMessageHead ("Prop1: InitialVal FooItem: InitialVal:Something", "A1");
logger.CheckLoggedMessageHead ("Second: Third Value:Third ThirdProp: Third Value", "A2");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
} catch {
logger.DumpMessages ();
throw;
}
}
[Test]
public void TestRequiredTask_String1 ()
{
@@ -31,6 +31,7 @@ using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using NUnit.Framework;
using System.IO;
namespace MonoTests.Microsoft.Build.BuildEngine {
[TestFixture]
@@ -370,5 +371,54 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
}
[Test]
public void TestOverridingTargets ()
{
Engine engine;
Project project;
string second = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<Target Name='BeforeBuild'/>
<Target Name='AfterBuild'/>
<Target Name='Build' DependsOnTargets='BeforeBuild'>
<Message Text='Build executing'/>
<CallTarget Targets='AfterBuild'/>
</Target>
</Project>";
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "second.proj")))) {
sw.Write (second);
}
string documentString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<Target Name='AfterBuild'>
<Message Text='Overriding AfterBuild'/>
</Target>
<Import Project='Test/resources/second.proj'/>
<Target Name='BeforeBuild'>
<Message Text='Overriding BeforeBuild'/>
</Target>
</Project>";
engine = new Engine (Consts.BinPath);
project = engine.CreateNewProject ();
project.LoadXml (documentString);
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
bool result = project.Build ("Build");
if (!result) {
logger.DumpMessages ();
Assert.Fail ("Build failed");
}
logger.CheckLoggedMessageHead ("Overriding BeforeBuild", "A1");
logger.CheckLoggedMessageHead ("Build executing", "A1");
Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
}
}
}
@@ -1,3 +1,13 @@
2009-10-08 Ankit Jain <[email protected]>
* Items.cs (TestItemsWithWildcards): New.
2009-10-08 Ankit Jain <[email protected]>
* Items.cs (TestItems5): Fix to work correctly on windows
and unix.
(TestReservedMetadata): New.
2009-09-10 Ankit Jain <[email protected]>
* Items.cs (TestItems2a):
@@ -32,6 +32,8 @@ using System.Text;
using System.Xml;
using Microsoft.Build.BuildEngine;
using NUnit.Framework;
using System.IO;
using Microsoft.Build.Framework;
namespace MonoTests.Microsoft.Build.BuildEngine.Various {
[TestFixture]
@@ -318,14 +320,17 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<ItemGroup>
<Item Include=""A\B.txt;A\C.txt;B\B.zip;B\C.zip"" />
<ItemT Include=""@(Item->'%(RelativeDir)X/%(Filename)')"" />
<ItemT Include=""@(Item->'%(RelativeDir)X\%(Filename)')"" />
</ItemGroup>
</Project>
";
proj.LoadXml (documentString);
CheckItems (proj, "ItemT", "A1", @"A\X/B", @"A\X/C", @"B\X/B", @"B\X/C");
string dir_a = Path.Combine ("A", "X");
string dir_b = Path.Combine ("B", "X");
CheckItems (proj, "ItemT", "A1", Path.Combine (dir_a, "B"), Path.Combine (dir_a, "C"),
Path.Combine (dir_b, "B"), Path.Combine (dir_b, "C"));
}
[Test]
@@ -1386,5 +1391,129 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
Assert.AreEqual ("True", bi.GetMetadata ("M"), "A10");
Assert.AreEqual ("True", bi.GetEvaluatedMetadata ("M"), "A11");*/
}
[Test]
public void TestItemsWithWildcards ()
{
Engine engine = new Engine (Consts.BinPath);
Project proj = engine.CreateNewProject ();
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
// Setup
string basedir = PathCombine ("Test", "resources", "dir");
string aaa = PathCombine ("a", "aa", "aaa");
string bb = Path.Combine ("b", "bb");
string[] dirs = { aaa, bb, "c" };
string [] files = {
PathCombine (basedir, aaa, "foo.dll"),
PathCombine (basedir, bb, "bar.dll"),
PathCombine (basedir, bb, "sample.txt"),
Path.Combine (basedir, "xyz.dll")
};
string documentString = @"
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<ItemGroup>
<ItemsRel Include='dir\**\*.dll' />
<ItemsRelExpanded Include=""@(ItemsRel->'%(FullPath)')"" />
<ItemsAbs Include='$(MSBuildProjectDirectory)\dir\**\*.dll' />
</ItemGroup>
<Target Name='Main'>
<Message Text=""ItemsRelExpanded: %(ItemsRelExpanded.Identity)""/>
<Message Text='ItemsAbs: %(ItemsAbs.Identity)'/>
</Target>
</Project>";
try {
CreateDirectoriesAndFiles (basedir, dirs, files);
string projectdir = Path.Combine ("Test", "resources");
File.WriteAllText (Path.Combine (projectdir, "wild1.proj"), documentString);
proj.Load (Path.Combine (projectdir, "wild1.proj"));
if (!proj.Build ("Main"))
Assert.Fail ("Build failed");
string full_base_dir = Path.GetFullPath (basedir);
foreach (string prefix in new string[] { "ItemsRelExpanded: ", "ItemsAbs: " }) {
logger.CheckLoggedAny (prefix + PathCombine (full_base_dir, aaa, "foo.dll"),
MessageImportance.Normal, "A1");
logger.CheckLoggedAny (prefix + PathCombine (full_base_dir, bb, "bar.dll"), MessageImportance.Normal, "A2");
logger.CheckLoggedAny (prefix + PathCombine (full_base_dir, "xyz.dll"), MessageImportance.Normal, "A3");
}
} catch (AssertionException) {
logger.DumpMessages ();
throw;
} finally {
Directory.Delete (basedir, true);
}
}
[Test]
public void TestReservedMetadata ()
{
Engine engine = new Engine (Consts.BinPath);
Project proj = engine.CreateNewProject ();
MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
engine.RegisterLogger (logger);
string documentString = @"
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<ItemGroup><File1 Include=""bar\foo.dll""/></ItemGroup>
<Target Name='Main'>
<Message Text='file1: @(File1)'/>
<Message Text='file1: RootDir: %(File1.RootDir)'/>
<Message Text='file1: Directory: %(File1.Directory)'/>
</Target>
</Project>";
string projectdir = Path.Combine ("Test", "resources");
File.WriteAllText (Path.Combine (projectdir, "test1.proj"), documentString);
proj.Load (Path.Combine (projectdir, "test1.proj"));
if (!proj.Build ("Main")) {
logger.DumpMessages ();
Assert.Fail ("Build failed");
}
logger.DumpMessages ();
logger.CheckLoggedMessageHead ("file1: " + Path.Combine ("bar", "foo.dll"), "A1");
string path_root = Path.GetPathRoot (Path.GetFullPath (projectdir));
logger.CheckLoggedMessageHead ("file1: RootDir: " + path_root, "A2");
string fullpath = Path.GetFullPath (Path.Combine (projectdir, "bar"));
logger.CheckLoggedMessageHead ("file1: Directory: " + fullpath.Substring (path_root.Length) + Path.DirectorySeparatorChar, "A3");
if (logger.NormalMessageCount != 0) {
logger.DumpMessages ();
Assert.Fail ("Unexpected extra messages found");
}
}
void CreateDirectoriesAndFiles (string basedir, string[] dirs, string[] files)
{
foreach (string dir in dirs)
Directory.CreateDirectory (Path.Combine (basedir, dir));
foreach (string file in files)
File.WriteAllText (file, String.Empty);
}
string PathCombine (string path1, params string[] parts)
{
if (parts == null || parts.Length == 0)
return path1;
string final_path = path1;
foreach (string part in parts)
final_path = Path.Combine (final_path, part);
return final_path;
}
}
}
@@ -1,3 +1,12 @@
2009-10-12 Ankit Jain <[email protected]>
* Makefile: Add reference to Microsoft.Build.Engine .
2009-10-08 Ankit Jain <[email protected]>
* Microsoft.Build.Tasks_test.dll.sources: Added
RemoveDuplicatesTest.cs
2009-09-25 Ankit Jain <[email protected]>
* Microsoft.Build.Tasks.dll.sources: Added
+2 -1
View File
@@ -27,7 +27,8 @@ LIB_MCS_FLAGS = \
/r:System.Xml.dll \
/r:System.Windows.Forms.dll \
/r:Microsoft.Build.Utilities.dll \
/r:Microsoft.Build.Framework.dll
/r:Microsoft.Build.Framework.dll \
/r:Microsoft.Build.Engine.dll
TEST_MCS_FLAGS = \
/r:Microsoft.Build.Engine.dll \
@@ -1,3 +1,63 @@
2009-10-12 Ankit Jain <[email protected]>
* ResolveAssemblyReference.cs: Remove unnecessary tab in the warning
messages.
2009-10-12 Ankit Jain <[email protected]>
* MSBuild.cs (Execute): Handle build errors.
2009-10-09 Ankit Jain <[email protected]>
* Exec.cs (AddCommandLineCommands): Add '/q' for cmd.exe, to
turn 'echo off'. And make sure the script file on windows, has
a '.bat' extension, otherwise cmd.exe opens it in a text editor.
2009-10-09 Ankit Jain <[email protected]>
Fix bug #545703.
* Exec.cs (Command): On unix, change CRLF to CR.
2009-10-08 Ankit Jain <[email protected]>
* ResolveAssemblyReference.cs: Don't resolve any dependencies for
assemblies resolved from {PkgConfig}. Honor parent's CopyLocal for
dependencies.
2009-10-08 Ankit Jain <[email protected]>
* MSBuild.cs (Execute): Don't share target output items,
always create a copy.
2009-10-08 Ankit Jain <[email protected]>
* RemoveDuplicates.cs: Use item's ItemSpec as the key.
2009-10-07 Ankit Jain <[email protected]>
* ManagedCompiler.cs (HandleTaskExecutionErrors): Log error if
required.
2009-10-06 Ankit Jain <[email protected]>
* Exec.cs (ExecuteTool): Use DeleteTempFile instead of File.Delete
(HandleTaskExecutionErrors): Log error, if required.
* MSBuild.cs: Don't log error.
* Warning.cs: Don't log if @text is empty.
2009-09-29 Ankit Jain <[email protected]>
* Exec.cs: Write the commands, which can be multiline,
to a temporary file, and execute that with "cmd.exe /c"
on windows and "sh" on non-windows.
(LogToolCommand): Override, and emit the commands instead
of the actual args passed to the shell.
2009-09-28 Ankit Jain <[email protected]>
* WriteLinesToFiles.cs (Execute): Handle empty list of
lines.
2009-09-25 Ankit Jain <[email protected]>
* FindAppConfigFile.cs: New.
@@ -48,6 +48,7 @@ namespace Microsoft.Build.Tasks {
string stdErrEncoding;
string stdOutEncoding;
string workingDirectory;
string scriptFile;
public Exec ()
{
@@ -56,11 +57,17 @@ namespace Microsoft.Build.Tasks {
protected internal override void AddCommandLineCommands (CommandLineBuilderExtension commandLine)
{
if (IsRunningOnWindows)
commandLine.AppendSwitch ("/q /c");
if (!String.IsNullOrEmpty (command)) {
string[] commandTable = command.Split (null, 2);
string arguments = String.Empty;
if (commandTable.Length == 2)
commandLine.AppendSwitch (commandTable [1]);
scriptFile = Path.GetTempFileName ();
if (IsRunningOnWindows)
scriptFile = scriptFile + ".bat";
using (StreamWriter sw = new StreamWriter (scriptFile)) {
sw.Write (command);
}
commandLine.AppendFileNameIfNotNull (scriptFile);
}
base.AddCommandLineCommands (commandLine);
}
@@ -69,13 +76,18 @@ namespace Microsoft.Build.Tasks {
string responseFileCommands,
string commandLineCommands)
{
return base.ExecuteTool (pathToTool, responseFileCommands, commandLineCommands);
try {
return base.ExecuteTool (pathToTool, responseFileCommands, commandLineCommands);
} finally {
if (scriptFile != null)
DeleteTempFile (scriptFile);
}
}
[MonoTODO]
protected override string GenerateFullPathToTool ()
{
return command.Split (null, 2) [0];
return IsRunningOnWindows ? "cmd.exe" : "sh";
}
protected override string GetWorkingDirectory ()
@@ -85,6 +97,9 @@ namespace Microsoft.Build.Tasks {
protected override bool HandleTaskExecutionErrors ()
{
if (ExitCode != 0)
Log.LogError ("Command '{0}' exited with code: {1}.", Command, ExitCode);
return ExitCode == 0 || ignoreExitCode;
}
@@ -97,6 +112,7 @@ namespace Microsoft.Build.Tasks {
[MonoTODO]
protected override void LogToolCommand (string message)
{
Log.LogMessage (MessageImportance.Normal, "Executing: " + command);
}
protected override void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
@@ -113,7 +129,11 @@ namespace Microsoft.Build.Tasks {
[Required]
public string Command {
get { return command; }
set { command = value; }
set {
command = value;
if (Path.DirectorySeparatorChar == '/')
command = command.Replace ("\r\n", "\n");
}
}
public bool IgnoreExitCode {
@@ -166,6 +186,14 @@ namespace Microsoft.Build.Tasks {
get { return workingDirectory; }
set { workingDirectory = value; }
}
static bool IsRunningOnWindows {
get {
PlatformID pid = Environment.OSVersion.Platform;
return ((int) pid != 128 && (int) pid != 4 && (int) pid != 6);
}
}
}
}
@@ -31,6 +31,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -80,7 +81,12 @@ namespace Microsoft.Build.Tasks {
Directory.SetCurrentDirectory (Path.GetDirectoryName (filename));
outputs = new Hashtable ();
result = BuildEngine.BuildProjectFile (filename, targets, global_properties, outputs);
try {
result = BuildEngine.BuildProjectFile (filename, targets, global_properties, outputs);
} catch (InvalidProjectFileException e) {
Log.LogError ("Error building project {0}: {1}", filename, e.Message);
result = false;
}
if (result) {
// Metadata from the first item for the project file is copied
@@ -91,11 +97,14 @@ namespace Microsoft.Build.Tasks {
foreach (DictionaryEntry de in outputs) {
ITaskItem [] array = (ITaskItem []) de.Value;
foreach (ITaskItem item in array) {
// DONT share items!
ITaskItem new_item = new TaskItem (item);
// copy the metadata from original @project to here
// CopyMetadataTo does _not_ overwrite
first_item.CopyMetadataTo (item);
first_item.CopyMetadataTo (new_item);
outputItems.Add (item);
outputItems.Add (new_item);
//FIXME: Correctly rebase output paths to be relative to the
// calling project
@@ -104,7 +113,6 @@ namespace Microsoft.Build.Tasks {
}
}
} else {
Log.LogError ("Error while building {0}", filename);
if (stopOnFirstFailure)
break;
}
@@ -134,6 +134,9 @@ namespace Microsoft.Build.Tasks {
[MonoTODO]
protected override bool HandleTaskExecutionErrors ()
{
if (!Log.HasLoggedErrors && ExitCode != 0)
Log.LogError ("Compiler crashed with code: {0}.", ExitCode);
return ExitCode == 0 && !Log.HasLoggedErrors;
}
@@ -47,12 +47,12 @@ namespace Microsoft.Build.Tasks {
if (inputs == null || inputs.Length == 0)
return true;
Dictionary <ITaskItem, object> items = new Dictionary <ITaskItem, object> ();
Dictionary <string, ITaskItem> items = new Dictionary <string, ITaskItem> ();
List <ITaskItem> list = new List <ITaskItem> ();
foreach (ITaskItem item in inputs) {
if (!items.ContainsKey (item)) {
items.Add (item, null);
if (!items.ContainsKey (item.ItemSpec)) {
items.Add (item.ItemSpec, item);
list.Add (item);
}
}
@@ -152,9 +152,9 @@ namespace Microsoft.Build.Tasks {
}
Log.LogMessage (MessageImportance.Low, "Primary Reference {0}", item.ItemSpec);
ResolvedReference resolved_ref = ResolveReference (item, searchPaths);
ResolvedReference resolved_ref = ResolveReference (item, searchPaths, true);
if (resolved_ref == null) {
Log.LogWarning ("\tReference '{0}' not resolved", item.ItemSpec);
Log.LogWarning ("Reference '{0}' not resolved", item.ItemSpec);
assembly_resolver.LogSearchLoggerMessages ();
} else {
Log.LogMessage (MessageImportance.Low,
@@ -167,7 +167,8 @@ namespace Microsoft.Build.Tasks {
resolved_ref.FoundInSearchPathAsString);
if (TryAddNewReference (tempResolvedFiles, resolved_ref) &&
!IsFromGacOrTargetFramework (resolved_ref)) {
!IsFromGacOrTargetFramework (resolved_ref) &&
resolved_ref.FoundInSearchPath != SearchPath.PkgConfig) {
primaryReferences.Add (new PrimaryReference (
resolved_ref.TaskItem,
resolved_ref.TaskItem.GetMetadata ("CopyLocal")));
@@ -177,7 +178,7 @@ namespace Microsoft.Build.Tasks {
}
// Use @search_paths to resolve the reference
ResolvedReference ResolveReference (ITaskItem item, IEnumerable<string> search_paths)
ResolvedReference ResolveReference (ITaskItem item, IEnumerable<string> search_paths, bool set_copy_local)
{
ResolvedReference resolved = null;
bool specific_version;
@@ -224,7 +225,7 @@ namespace Microsoft.Build.Tasks {
break;
}
if (resolved != null)
if (resolved != null && set_copy_local)
SetCopyLocal (resolved.TaskItem, resolved.CopyLocal.ToString ());
return resolved;
@@ -271,7 +272,7 @@ namespace Microsoft.Build.Tasks {
AssemblyName aname = assembly_resolver.GetAssemblyNameFromFile (item.ItemSpec);
if (aname == null) {
Log.LogWarning ("\tReference '{0}' not resolved", item.ItemSpec);
Log.LogWarning ("Reference '{0}' not resolved", item.ItemSpec);
assembly_resolver.LogSearchLoggerMessages ();
continue;
}
@@ -289,7 +290,8 @@ namespace Microsoft.Build.Tasks {
FindAndAddRelatedFiles (item.ItemSpec, copy_local);
FindAndAddSatellites (item.ItemSpec, copy_local);
if (FindDependencies && !IsFromGacOrTargetFramework (rr))
if (FindDependencies && !IsFromGacOrTargetFramework (rr) &&
rr.FoundInSearchPath != SearchPath.PkgConfig)
primaryReferences.Add (new PrimaryReference (item, copy_local));
}
}
@@ -319,7 +321,8 @@ namespace Microsoft.Build.Tasks {
ResolvedReference resolved_ref = ResolveDependencyByAssemblyName (
aname, asm.FullName, parent_copy_local);
if (resolved_ref != null && !IsFromGacOrTargetFramework (resolved_ref))
if (resolved_ref != null && !IsFromGacOrTargetFramework (resolved_ref)
&& resolved_ref.FoundInSearchPath != SearchPath.PkgConfig)
dependencies.Enqueue (resolved_ref.TaskItem.ItemSpec);
}
alreadyScannedAssemblyNames.Add (asm.FullName, String.Empty);
@@ -342,9 +345,8 @@ namespace Microsoft.Build.Tasks {
ITaskItem item = new TaskItem (aname.FullName);
item.SetMetadata ("SpecificVersion", "false");
resolved_ref = ResolveReference (item, dependency_search_paths);
resolved_ref = ResolveReference (item, dependency_search_paths, false);
string copy_local = "false";
if (resolved_ref != null) {
Log.LogMessage (MessageImportance.Low, "\tReference {0} resolved to {1}.",
aname, resolved_ref.TaskItem.ItemSpec);
@@ -355,11 +357,11 @@ namespace Microsoft.Build.Tasks {
if (resolved_ref.FoundInSearchPath == SearchPath.Directory) {
// override CopyLocal with parent's val
resolved_ref.TaskItem.SetMetadata ("CopyLocal", parent_copy_local);
SetCopyLocal (resolved_ref.TaskItem, parent_copy_local);
Log.LogMessage (MessageImportance.Low,
"\tThis is CopyLocal {0} as parent item has this value",
copy_local);
parent_copy_local);
if (TryAddNewReference (tempResolvedFiles, resolved_ref)) {
FindAndAddRelatedFiles (resolved_ref.TaskItem.ItemSpec, parent_copy_local);
@@ -368,14 +370,13 @@ namespace Microsoft.Build.Tasks {
} else {
//gac or tgtfmwk
Log.LogMessage (MessageImportance.Low,
"\tThis is CopyLocal {0} as it is in the gac," +
"target framework directory or provided by a package.",
copy_local);
"\tThis is CopyLocal false as it is in the gac," +
"target framework directory or provided by a package.");
TryAddNewReference (tempResolvedFiles, resolved_ref);
}
} else {
Log.LogWarning ("\tReference '{0}' not resolved", aname);
Log.LogWarning ("Reference '{0}' not resolved", aname);
assembly_resolver.LogSearchLoggerMessages ();
}
@@ -44,8 +44,9 @@ namespace Microsoft.Build.Tasks {
public override bool Execute ()
{
if (text == null)
text = String.Empty;
if (String.IsNullOrEmpty (text))
return true;
Log.LogWarning (null, code, helpKeyword, BuildEngine.ProjectFileOfTaskNode,
BuildEngine.LineNumberOfTaskNode, BuildEngine.ColumnNumberOfTaskNode,
BuildEngine.LineNumberOfTaskNode, BuildEngine.ColumnNumberOfTaskNode,
@@ -70,4 +71,4 @@ namespace Microsoft.Build.Tasks {
}
}
#endif
#endif
@@ -50,9 +50,9 @@ namespace Microsoft.Build.Tasks {
{
try {
streamWriter = new StreamWriter (file.GetMetadata ("FullPath"), !overwrite);
foreach (ITaskItem line in lines) {
streamWriter.WriteLine (line);
}
if (lines != null)
foreach (ITaskItem line in lines)
streamWriter.WriteLine (line);
return true;
}
catch (Exception ex) {
@@ -18,6 +18,7 @@ Microsoft.Build.Tasks/GetFrameworkSdkPathTest.cs
Microsoft.Build.Tasks/MakeDirTest.cs
Microsoft.Build.Tasks/ManagedCompilerTest.cs
Microsoft.Build.Tasks/MessageTest.cs
Microsoft.Build.Tasks/RemoveDuplicatesTest.cs
Microsoft.Build.Tasks/RemoveDirTest.cs
Microsoft.Build.Tasks/ResolveAssemblyReferenceTest.cs
Microsoft.Build.Tasks/TestEngine.cs
@@ -1,3 +1,11 @@
2009-10-08 Ankit Jain <[email protected]>
* TestMessageLogger.cs (CheckLoggedAny): New.
2009-10-08 Ankit Jain <[email protected]>
* RemoveDuplicatesTest.cs: New.
2009-09-25 Ankit Jain <[email protected]>
* FindAppConfigFileTest.cs: New.
@@ -0,0 +1,104 @@
//
// RemoveDuplicatesTest.cs
//
// Author:
// Ankit Jain ([email protected])
//
// Copyright 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Tasks;
using Microsoft.Build.Utilities;
namespace MonoTests.Microsoft.Build.Tasks
{
[TestFixture]
public class RemoveDuplicatesTest
{
[Test]
public void Test1 ()
{
string documentString = @"
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"" ToolsVersion='3.5'>
<ItemGroup>
<Items Include='A'>
<MD>Value1</MD>
</Items>
<Items Include='A'>
<MD>Value1</MD>
</Items>
<Items Include='A'>
<MD>Value2</MD>
<MD2>Value2</MD2>
</Items>
<Items Include='B'>
<MD>Value1</MD>
</Items>
<Items Include='B'>
<MD>Value1</MD>
</Items>
<Items Include='C'>
<MD>Value1</MD>
</Items>
<Items Include='A'>
<MD>Value3</MD>
<MD3>Value3</MD3>
</Items>
</ItemGroup>
<Target Name='Main'>
<RemoveDuplicates Inputs='@(Items)'>
<Output TaskParameter='Filtered' ItemName='Filtered'/>
</RemoveDuplicates>
<Message Text=""Filtered items: %(Filtered.Identity) MD: %(Filtered.MD) MD2: %(Filtered.MD2) MD3: %(Filtered.MD3)""/>
</Target>
</Project>
";
Engine engine = new Engine (Consts.BinPath);
TestMessageLogger testLogger = new TestMessageLogger ();
engine.RegisterLogger (testLogger);
Project project = engine.CreateNewProject ();
project.LoadXml (documentString);
if (!project.Build ("Main")) {
testLogger.DumpMessages ();
Assert.Fail ("Build failed");
}
testLogger.CheckLoggedMessageHead ("Filtered items: A MD: Value1 MD2: MD3: ", "A1");
testLogger.CheckLoggedMessageHead ("Filtered items: B MD: Value1 MD2: MD3: ", "A2");
testLogger.CheckLoggedMessageHead ("Filtered items: C MD: Value1 MD2: MD3: ", "A3");
Assert.AreEqual (0, testLogger.NormalMessageCount, "Unexpected extra messages found");
}
}
}
@@ -192,6 +192,13 @@ namespace MonoTests.Microsoft.Build.Tasks
Assert.AreEqual (expected, actual, id);
}
public void CheckLoggedAny (string expected, MessageImportance importance, string id)
{
int res = CheckAny (expected, importance);
if (res != 0)
Assert.Fail ("{0}: Expected message '{1}' was not emitted.", id, expected);
}
}
@@ -73,6 +73,7 @@ namespace Microsoft.Build.Utilities
}
set {
buildEngine = value;
log = new TaskLoggingHelper (this);
}
}
@@ -1,3 +1,40 @@
2009-10-12 Ankit Jain <[email protected]>
* TaskLoggingHelper.cs: Use the buildEngine.ProjectFileOfTaskNode
in the event args.
2009-10-12 Ankit Jain <[email protected]>
* ToolTask.cs (ExecuteTool): Don't set toolOutput to null.
(HandleTaskExecutionErrors): toolOutput can be null.
Set toolOutput to null here.
2009-10-06 Ankit Jain <[email protected]>
* ToolTask.cs (Execute): HandleTaskExecutionErrors is called only
if exitCode != 0.
(ExecuteTool): Move logging of exitcode to HandleTaskExecutionErrors.
Remove MonoTODOs.
* TaskLoggingHelper.cs (LogMessageFromText): New.
(LogMessage): Refactor to use above.
2009-10-02 Ankit Jain <[email protected]>
* AppDomainIsolatedTask.cs (BuildEngine): Init 'log'.
2009-09-29 Ankit Jain <[email protected]>
* ToolTask.cs (ExecuteTool): Use LogToolCommand, instead of
directly logging.
(LogToolCommand): Implement.
2009-09-28 Ankit Jain <[email protected]>
* ToolTask.cs (ProcessOuputTool): Move logging of tool
output from here to ..
(ExecuteTool): .. here. As, ProcessOuputTool can be
overridden.
2009-09-24 Ankit Jain <[email protected]>
* ToolTask.cs (HasLoggedErrors): Add missing property.
@@ -101,7 +101,7 @@ namespace Microsoft.Build.Utilities
throw new ArgumentNullException ("message");
BuildErrorEventArgs beea = new BuildErrorEventArgs (
null, null, null, 0, 0, 0, 0, FormatString (message, messageArgs),
null, null, buildEngine.ProjectFileOfTaskNode, 0, 0, 0, 0, FormatString (message, messageArgs),
helpKeywordPrefix, null);
buildEngine.LogErrorEvent (beea);
hasLoggedErrors = true;
@@ -149,7 +149,7 @@ namespace Microsoft.Build.Utilities
if (showStackTrace == true)
sb.Append (e.StackTrace);
BuildErrorEventArgs beea = new BuildErrorEventArgs (
null, null, null, 0, 0, 0, 0, sb.ToString (),
null, null, buildEngine.ProjectFileOfTaskNode, 0, 0, 0, 0, sb.ToString (),
e.HelpLink, e.Source);
buildEngine.LogErrorEvent (beea);
hasLoggedErrors = true;
@@ -220,10 +220,7 @@ namespace Microsoft.Build.Utilities
if (message == null)
throw new ArgumentNullException ("message");
BuildMessageEventArgs bmea = new BuildMessageEventArgs (
FormatString (message, messageArgs), helpKeywordPrefix,
null, importance);
buildEngine.LogMessageEvent (bmea);
LogMessageFromText (FormatString (message, messageArgs), importance);
}
public void LogMessageFromResources (string messageResourceName,
@@ -276,13 +273,18 @@ namespace Microsoft.Build.Utilities
stream.Close ();
}
}
[MonoTODO]
public bool LogMessageFromText (string lineOfText,
MessageImportance importance)
{
if (lineOfText == null)
throw new ArgumentNullException ("lineOfText");
BuildMessageEventArgs bmea = new BuildMessageEventArgs (
lineOfText, helpKeywordPrefix,
null, importance);
buildEngine.LogMessageEvent (bmea);
return true;
}
@@ -291,7 +293,7 @@ namespace Microsoft.Build.Utilities
{
// FIXME: what about all the parameters?
BuildWarningEventArgs bwea = new BuildWarningEventArgs (
null, null, null, 0, 0, 0, 0, FormatString (message, messageArgs),
null, null, buildEngine.ProjectFileOfTaskNode, 0, 0, 0, 0, FormatString (message, messageArgs),
helpKeywordPrefix, null);
buildEngine.LogWarningEvent (bwea);
}
@@ -106,7 +106,8 @@ namespace Microsoft.Build.Utilities
exitCode = ExecuteTool (GenerateFullPathToTool (), GenerateResponseFileCommands (),
GenerateCommandLineCommands ());
return HandleTaskExecutionErrors ();
// HandleTaskExecutionErrors is called only if exitCode != 0
return exitCode == 0 || HandleTaskExecutionErrors ();
}
[MonoTODO]
@@ -138,8 +139,8 @@ namespace Microsoft.Build.Utilities
arguments = arguments + " " + GetResponseFileSwitch (responseFileName);
}
Log.LogMessage (MessageImportance.Normal, "Tool {0} execution started with arguments: {1} {2}",
pathToTool, commandLineCommands, responseFileCommands);
LogToolCommand (String.Format ("Tool {0} execution started with arguments: {1} {2}",
pathToTool, commandLineCommands, responseFileCommands));
output = Path.GetTempFileName ();
error = Path.GetTempFileName ();
@@ -168,9 +169,6 @@ namespace Microsoft.Build.Utilities
ProcessOutputFile (output, standardOutputLoggingImportance);
ProcessOutputFile (error, standardErrorLoggingImportance);
if (!Log.HasLoggedErrors && exitCode != 0)
Log.LogError ("Tool crashed: " + toolOutput.ToString ());
Log.LogMessage (MessageImportance.Low, "Tool {0} execution finished.", pathToTool);
return exitCode;
} finally {
@@ -182,7 +180,6 @@ namespace Microsoft.Build.Utilities
DeleteTempFile (output);
DeleteTempFile (error);
toolOutput = null;
}
}
@@ -210,6 +207,7 @@ namespace Microsoft.Build.Utilities
Log.LogError (output_str);
}
toolOutput.AppendLine (line);
LogEventsFromTextOutput (line, importance);
}
}
@@ -217,8 +215,6 @@ namespace Microsoft.Build.Utilities
protected virtual void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
{
toolOutput.AppendLine (singleLine);
singleLine = singleLine.Trim ();
if (singleLine.Length == 0)
return;
@@ -326,15 +322,18 @@ namespace Microsoft.Build.Utilities
return null;
}
[MonoTODO]
protected virtual string GetResponseFileSwitch (string responseFilePath)
{
return String.Format ("@{0}", responseFilePath);
}
[MonoTODO]
protected virtual bool HandleTaskExecutionErrors ()
{
if (!Log.HasLoggedErrors && exitCode != 0)
Log.LogError ("Tool exited with code: {0}. Output: {1}", exitCode,
toolOutput != null ? toolOutput.ToString () : String.Empty);
toolOutput = null;
return ExitCode == 0 && !Log.HasLoggedErrors;
}
@@ -346,6 +345,7 @@ namespace Microsoft.Build.Utilities
[MonoTODO]
protected virtual void LogToolCommand (string message)
{
Log.LogMessage (MessageImportance.Normal, message);
}
[MonoTODO]
@@ -1,3 +1,9 @@
2009-10-08 Ankit Jain <[email protected]>
* ReservedNameUtils.cs: Fix 'RootDir', 'Directory'.
(WithTrailingSlash): New.
Update to use the new WithTrailingSlash method.
2009-09-08 Ankit Jain <[email protected]>
* ReservedNameUtils.cs (RelativeDir): Add a trailing \ .
@@ -77,20 +77,20 @@ namespace Mono.XBuild.Utilities {
case "fullpath":
return Path.GetFullPath (itemSpec);
case "rootdir":
return Path.GetPathRoot (itemSpec);
if (Path.IsPathRooted (itemSpec))
return Path.GetPathRoot (itemSpec);
else
return Path.GetPathRoot (Environment.CurrentDirectory);
case "filename":
return Path.GetFileNameWithoutExtension (itemSpec);
case "extension":
return Path.GetExtension (itemSpec);
case "relativedir": {
string dir = Path.GetDirectoryName (itemSpec);
if (dir.Length > 0)
return dir + "\\";
else
return dir;
}
case "relativedir":
return WithTrailingSlash (Path.GetDirectoryName (itemSpec));
case "directory":
return Path.GetDirectoryName (Path.GetFullPath (itemSpec));
string fullpath = Path.GetFullPath (itemSpec);
return WithTrailingSlash (
Path.GetDirectoryName (fullpath).Substring (Path.GetPathRoot (fullpath).Length));
case "recursivedir":
// FIXME: how to handle this?
return String.Empty;
@@ -121,6 +121,14 @@ namespace Mono.XBuild.Utilities {
throw new ArgumentException ("Invalid reserved metadata name");
}
}
static string WithTrailingSlash (string path)
{
if (path.Length > 0)
return path + Path.DirectorySeparatorChar;
else
return path;
}
}
}
@@ -1,56 +1,60 @@
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Security;
#if !PLATFORM_COMPACTFRAMEWORK
using System.Runtime.ConstrainedExecution;
#endif
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("System.Data.SQLite")]
[assembly: AssemblyDescription("ADO.NET 2.0 Data Provider for SQLite")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("http://sqlite.phxsoftware.com")]
[assembly: AssemblyProduct("System.Data.SQLite")]
[assembly: AssemblyCopyright("Public Domain")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
#if PLATFORM_COMPACTFRAMEWORK && RETARGETABLE
[assembly: AssemblyFlags(AssemblyNameFlags.Retargetable)]
#endif
// Setting ComVisible to false makes the types in this assembly not visible
// to COM componenets. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
//[assembly: InternalsVisibleTo("System.Data.SQLite.Linq, PublicKey=002400000480000094000000060200000024000052534131000400000100010005a288de5687c4e1b621ddff5d844727418956997f475eb829429e411aff3e93f97b70de698b972640925bdd44280df0a25a843266973704137cbb0e7441c1fe7cae4e2440ae91ab8cde3933febcb1ac48dd33b40e13c421d8215c18a4349a436dd499e3c385cc683015f886f6c10bd90115eb2bd61b67750839e3a19941dc9c")]
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AllowPartiallyTrustedCallers]
[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
#endif
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.0.0.0")]
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AssemblyFileVersion("1.0.61.0")]
#endif
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../mono.pub")]
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Security;
#if !PLATFORM_COMPACTFRAMEWORK
using System.Runtime.ConstrainedExecution;
#endif
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("System.Data.SQLite")]
[assembly: AssemblyDescription("ADO.NET 2.0 Data Provider for SQLite")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("http://sqlite.phxsoftware.com")]
[assembly: AssemblyProduct("System.Data.SQLite")]
[assembly: AssemblyCopyright("Public Domain")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
#if PLATFORM_COMPACTFRAMEWORK && RETARGETABLE
[assembly: AssemblyFlags(AssemblyNameFlags.Retargetable)]
#endif
// Setting ComVisible to false makes the types in this assembly not visible
// to COM componenets. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
//[assembly: InternalsVisibleTo("System.Data.SQLite.Linq, PublicKey=002400000480000094000000060200000024000052534131000400000100010005a288de5687c4e1b621ddff5d844727418956997f475eb829429e411aff3e93f97b70de698b972640925bdd44280df0a25a843266973704137cbb0e7441c1fe7cae4e2440ae91ab8cde3933febcb1ac48dd33b40e13c421d8215c18a4349a436dd499e3c385cc683015f886f6c10bd90115eb2bd61b67750839e3a19941dc9c")]
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AllowPartiallyTrustedCallers]
[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
#endif
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
#if !MONOTOUCH
[assembly: AssemblyVersion("2.0.0.0")]
#else // !MONOTOUCH
[assembly: AssemblyVersion(Consts.FxVersion)]
#endif // !MONOTOUCH
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AssemblyFileVersion("1.0.61.0")]
#endif
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../mono.pub")]
@@ -1,3 +1,7 @@
2009-10-22 Jonathan Pryor <[email protected]>
* AssemblyInfo.cs: Use Consts.FxVersion when building for MONOTOUCH.
2004-04-30 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: Added
+8
View File
@@ -0,0 +1,8 @@
2009-11-03 Zoltan Varga <[email protected]>
* Makefile: Don't define LIBRARY_PACKAGE so it gets installed normally.
2009-11-02 Zoltan Varga <[email protected]>
* New directory containing the managed interface to the soft-mode debugger.
+15
View File
@@ -0,0 +1,15 @@
thisdir = class/Mono.Debugger.Soft
include ../../build/rules.make
LIBRARY = Mono.Debugger.Soft.dll
LIBRARY_SNK = ../mono.snk
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:Mono.Cecil.dll /r:System.Core.dll /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS -keyfile:$(LIBRARY_SNK)
NO_TEST = yes
ifneq (net_2_0, $(PROFILE))
NO_INSTALL = yes
endif
include ../../build/library.make
@@ -0,0 +1,59 @@
./Mono.Debugger/CustomAttributeTypedArgumentMirror.cs
./Mono.Debugger/ExceptionEvent.cs
./Mono.Debugger/ModuleMirror.cs
./Mono.Debugger/AppDomainMirror.cs
./Mono.Debugger/AssemblyLoadEvent.cs
./Mono.Debugger/VMStartEvent.cs
./Mono.Debugger/StackFrame.cs
./Mono.Debugger/CustomAttributeDataMirror.cs
./Mono.Debugger/ThreadStartEvent.cs
./Mono.Debugger/ILInstruction.cs
./Mono.Debugger/PrimitiveValue.cs
./Mono.Debugger/VMDisconnectedException.cs
./Mono.Debugger/Mirror.cs
./Mono.Debugger/EnumMirror.cs
./Mono.Debugger/FieldInfoMirror.cs
./Mono.Debugger/TypeMirror.cs
./Mono.Debugger/CustomAttributeNamedArgumentMirror.cs
./Mono.Debugger/DataConverter.cs
./Mono.Debugger/AssemblyMirror.cs
./Mono.Debugger/VirtualMachine.cs
./Mono.Debugger/VMMismatchException.cs
./Mono.Debugger/AppDomainUnloadEvent.cs
./Mono.Debugger/ExceptionEventRequest.cs
./Mono.Debugger/EventType.cs
./Mono.Debugger/StructMirror.cs
./Mono.Debugger/InvocationException.cs
./Mono.Debugger/IMirror.cs
./Mono.Debugger/VMDeathEvent.cs
./Mono.Debugger/MethodBodyMirror.cs
./Mono.Debugger/MethodEntryEvent.cs
./Mono.Debugger/MethodMirror.cs
./Mono.Debugger/BreakpointEventRequest.cs
./Mono.Debugger/MethodEntryEventRequest.cs
./Mono.Debugger/LocalVariable.cs
./Mono.Debugger/ParameterInfoMirror.cs
./Mono.Debugger/Event.cs
./Mono.Debugger/AppDomainCreateEvent.cs
./Mono.Debugger/ThreadDeathEvent.cs
./Mono.Debugger/SuspendPolicy.cs
./Mono.Debugger/VirtualMachineManager.cs
./Mono.Debugger/MethodExitEvent.cs
./Mono.Debugger/MethodExitEventRequest.cs
./Mono.Debugger/EventQueueImpl.cs
./Mono.Debugger/ObjectMirror.cs
./Mono.Debugger/Value.cs
./Mono.Debugger/StepEvent.cs
./Mono.Debugger/Location.cs
./Mono.Debugger/ObjectCollectedException.cs
./Mono.Debugger/EventRequest.cs
./Mono.Debugger/InvalidStackFrameException.cs
./Mono.Debugger/BreakpointEvent.cs
./Mono.Debugger/StringMirror.cs
./Mono.Debugger/PropertyInfoMirror.cs
./Mono.Debugger/ArrayMirror.cs
./Mono.Debugger/StepEventRequest.cs
./Mono.Debugger/Connection.cs
./Mono.Debugger/ThreadMirror.cs
./Mono.Debugger/TypeLoadEvent.cs
./Mono.Debugger/VMDisconnectEvent.cs
@@ -0,0 +1,20 @@
namespace Mono.Debugger
{
public class AppDomainCreateEvent : Event {
AppDomainMirror domain;
long id;
internal AppDomainCreateEvent (VirtualMachine vm, int req_id, long thread_id, long id) : base (EventType.AppDomainCreate, vm, req_id, thread_id) {
this.id = id;
}
public AppDomainMirror Domain {
get {
if (domain == null)
domain = vm.GetDomain (id);
return domain;
}
}
}
}
@@ -0,0 +1,61 @@
using System;
namespace Mono.Debugger
{
public class AppDomainMirror : Mirror
{
string friendly_name;
AssemblyMirror entry_assembly, corlib;
internal AppDomainMirror (VirtualMachine vm, long id) : base (vm, id) {
}
public string FriendlyName {
get {
if (friendly_name == null)
friendly_name = vm.conn.Domain_GetName (id);
return friendly_name;
}
}
// Not cached
public AssemblyMirror[] GetAssemblies () {
long[] ids = vm.conn.Domain_GetAssemblies (id);
AssemblyMirror[] assemblies = new AssemblyMirror [ids.Length];
// FIXME: Uniqueness
for (int i = 0; i < ids.Length; ++i)
assemblies [i] = vm.GetAssembly (ids [i]);
return assemblies;
}
// This returns null when called before the first AssemblyLoad event
public AssemblyMirror GetEntryAssembly () {
if (entry_assembly == null) {
long ass_id = vm.conn.Domain_GetEntryAssembly (id);
entry_assembly = vm.GetAssembly (ass_id);
}
return entry_assembly;
}
public AssemblyMirror Corlib {
get {
if (corlib == null) {
long ass_id = vm.conn.Domain_GetCorlib (id);
corlib = vm.GetAssembly (ass_id);
}
return corlib;
}
}
public StringMirror CreateString (string s) {
if (s == null)
throw new ArgumentNullException ("s");
return vm.GetObject<StringMirror> (vm.conn.Domain_CreateString (id, s));
}
}
}
@@ -0,0 +1,20 @@
namespace Mono.Debugger
{
public class AppDomainUnloadEvent : Event {
AppDomainMirror domain;
long id;
internal AppDomainUnloadEvent (VirtualMachine vm, int req_id, long thread_id, long id) : base (EventType.AppDomainUnload, vm, req_id, thread_id) {
this.id = id;
}
public AppDomainMirror Domain {
get {
if (domain == null)
domain = vm.GetDomain (id);
return domain;
}
}
}
}
@@ -0,0 +1,140 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace Mono.Debugger
{
public class ArrayMirror : ObjectMirror, IEnumerable {
public int[] lengths;
public int[] lower_bounds;
public int rank;
internal ArrayMirror (VirtualMachine vm, long id) : base (vm, id) {
}
public int Length {
get {
GetLengths ();
int length = lengths [0];
for (int i = 1; i < Rank; i++) {
length *= lengths [i];
}
return length;
}
}
public int Rank {
get {
GetLengths ();
return rank;
}
}
public int GetLength (int dimension) {
GetLengths ();
if (dimension < 0 || dimension >= Rank)
throw new ArgumentOutOfRangeException ("dimension");
return lengths [dimension];
}
public int GetLowerBound (int dimension) {
GetLengths ();
if (dimension < 0 || dimension >= Rank)
throw new ArgumentOutOfRangeException ("dimension");
return lower_bounds [dimension];
}
void GetLengths () {
if (lengths == null)
lengths = vm.conn.Array_GetLength (id, out this.rank, out this.lower_bounds);
}
public Value this [int index] {
get {
// FIXME: Multiple dimensions
if (index < 0 || index > Length - 1)
throw new IndexOutOfRangeException ();
return vm.DecodeValue (vm.conn.Array_GetValues (id, index, 1) [0]);
}
set {
// FIXME: Multiple dimensions
if (index < 0 || index > Length - 1)
throw new IndexOutOfRangeException ();
vm.conn.Array_SetValues (id, index, new ValueImpl [] { vm.EncodeValue (value) });
}
}
public IList<Value> GetValues (int index, int length) {
// FIXME: Multiple dimensions
if (index < 0 || index > Length - length)
throw new IndexOutOfRangeException ();
return vm.DecodeValues (vm.conn.Array_GetValues (id, index, length));
}
public void SetValues (int index, Value[] values) {
if (values == null)
throw new ArgumentNullException ("values");
// FIXME: Multiple dimensions
if (index < 0 || index > Length - values.Length)
throw new IndexOutOfRangeException ();
vm.conn.Array_SetValues (id, index, vm.EncodeValues (values));
}
IEnumerator IEnumerable.GetEnumerator ()
{
return new SimpleEnumerator (this);
}
internal class SimpleEnumerator : IEnumerator, ICloneable
{
ArrayMirror arr;
int pos, length;
public SimpleEnumerator (ArrayMirror arr)
{
this.arr = arr;
this.pos = -1;
this.length = arr.Length;
}
public object Current {
get {
if (pos < 0 )
throw new InvalidOperationException ("Enumeration has not started.");
if (pos >= length)
throw new InvalidOperationException ("Enumeration has already ended");
return arr [pos];
}
}
public bool MoveNext()
{
if (pos < length)
pos++;
if(pos < length)
return true;
else
return false;
}
public void Reset()
{
pos = -1;
}
public object Clone ()
{
return MemberwiseClone ();
}
}
}
}
@@ -0,0 +1,20 @@
namespace Mono.Debugger
{
public class AssemblyLoadEvent : Event {
AssemblyMirror assembly;
long id;
internal AssemblyLoadEvent (VirtualMachine vm, int req_id, long thread_id, long id) : base (EventType.AssemblyLoad, vm, req_id, thread_id) {
this.id = id;
}
public AssemblyMirror Assembly {
get {
if (assembly == null)
assembly = vm.GetAssembly (id);
return assembly;
}
}
}
}
@@ -0,0 +1,81 @@
using System;
using Mono.Debugger;
using Mono.Cecil;
namespace Mono.Debugger
{
public class AssemblyMirror : Mirror
{
string location;
MethodMirror entry_point;
bool entry_point_set;
ModuleMirror main_module;
AssemblyDefinition meta;
internal AssemblyMirror (VirtualMachine vm, long id) : base (vm, id) {
}
public string Location {
get {
if (location == null)
location = vm.conn.Assembly_GetLocation (id);
return location;
}
}
public MethodMirror EntryPoint {
get {
if (!entry_point_set) {
long mid = vm.conn.Assembly_GetEntryPoint (id);
if (mid != 0)
entry_point = vm.GetMethod (mid);
entry_point_set = true;
}
return entry_point;
}
}
public ModuleMirror ManifestModule {
get {
if (main_module == null) {
main_module = vm.GetModule (vm.conn.Assembly_GetManifestModule (id));
}
return main_module;
}
}
public ObjectMirror GetAssemblyObject () {
return vm.GetObject (vm.conn.Assembly_GetObject (id));
}
public TypeMirror GetType (string name, bool throwOnError, bool ignoreCase)
{
if (name == null)
throw new ArgumentNullException (name);
if (name.Length == 0)
throw new ArgumentException ("name", "Name cannot be empty");
if (throwOnError)
throw new NotImplementedException ();
return vm.GetType (vm.conn.Assembly_GetType (id, name, ignoreCase));
}
/*
* An optional Cecil assembly which could be used to access metadata instead
* of reading it from the debuggee.
*/
public AssemblyDefinition Metadata {
get {
return meta;
}
set {
if (value.MainModule.Name != ManifestModule.Name)
throw new ArgumentException ("The supplied assembly is named '" + value.MainModule.Name + "', while the assembly in the debuggee is named '" + ManifestModule.Name + "'.");
if (value.MainModule.Mvid != ManifestModule.ModuleVersionId)
throw new ArgumentException ("The supplied assembly's main module has guid '" + value.MainModule.Mvid + ", while the assembly in the debuggee has guid '" + ManifestModule.ModuleVersionId + "'.", "value");
meta = value;
}
}
}
}
@@ -0,0 +1,20 @@
namespace Mono.Debugger
{
public class BreakpointEvent : Event {
MethodMirror method;
long id;
internal BreakpointEvent (VirtualMachine vm, int req_id, long thread_id, long id, long loc) : base (EventType.Breakpoint, vm, req_id, thread_id) {
this.id = id;
}
public MethodMirror Method {
get {
if (method == null)
method = vm.GetMethod (id);
return method;
}
}
}
}
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Mono.Debugger
{
public sealed class BreakpointEventRequest : EventRequest {
MethodMirror method;
long location;
internal BreakpointEventRequest (VirtualMachine vm, MethodMirror method, long location) : base (vm, EventType.Breakpoint) {
if (method == null)
throw new ArgumentNullException ("method");
CheckMirror (vm, method);
if (method.Locations.Count > 0 && !method.Locations.Any (l => l.ILOffset == location))
throw new ArgumentException ("A breakpoint can only be set at an IL offset which is equal to the ILOffset property of one of the locations in method.Locations", "location");
this.method = method;
this.location = location;
}
public override void Enable () {
var mods = new List <Modifier> ();
mods.Add (new LocationModifier () { Method = method.Id, Location = location });
SendReq (mods);
}
}
}
@@ -0,0 +1,17 @@
2009-11-05 Zoltan Varga <[email protected]>
* VirtualMachineManager.cs (Listen): Resurrect the old listen method.
* VirtualMachineManager.cs (Connect): New method to connect to a runtime
listening at the provided address.
2009-11-04 Lluis Sanchez <[email protected]>
* VirtualMachineManager.cs: Properly redirect standard output.
2009-11-03 Zoltan Varga <[email protected]>
* EventRequest.cs (AssemblyFilter): New property to filter
events based on a list of assemblies.
* Connection.cs: Add assembly filters to the protocol implementation.
File diff suppressed because it is too large. Load diff
Loaded 100 of 997 files, more files were not shown because too many files have changed in this diff. Show more