Compare commits

..
674 Commits
Author SHA1 Message Date
nobody 2060885a61 This commit was manufactured by cvs2svn to create tag 'MCS_0_16'.
svn path=/tags/MCS_0_16/mcs/; revision=7922
2002-10-01 22:24:31 +00:00
Rodrigo Moya 454dcdbf14 2002-10-01 Luis Fernandez <[email protected]>
* System.Data/DataColumn.cs:
	* System.Data/DataRow.cs:
	* System.Data/DataRowCollection.cs:
	* System.Data/DataTable.cs: some fixes and implementation.

svn path=/trunk/mcs/; revision=7921
2002-10-01 22:24:31 +00:00
Duncan Mak f1e2dea617 2002-10-01 Duncan Mak <[email protected]>
* mono/os/Makefile.am: Add gc_wrapper.h.

svn path=/trunk/mono/; revision=7920
2002-10-01 22:19:18 +00:00
Duncan Mak aeb0f402b0 2002-10-01 Duncan Mak <[email protected]>
* runtime/Makefile.am: Fix the path for monoresgen.exe.

svn path=/trunk/mono/; revision=7919
2002-10-01 22:11:33 +00:00
Rodrigo Moya a9c99094e5 2002-09-28 Vladimir Vukicevic� <[email protected]>
* System.Data.OleDb/OleDbConnection.cs: Close
	reader properly in call to ExecuteScalar().

svn path=/trunk/mcs/; revision=7918
2002-10-01 22:09:43 +00:00
Miguel de Icaza 07dadd18e6 Bump release to 0.16
svn path=/trunk/mono/; revision=7917
2002-10-01 21:32:16 +00:00
Miguel de Icaza dfacc317bb Update NEWS file
svn path=/trunk/mono/; revision=7916
2002-10-01 21:31:55 +00:00
Miguel de Icaza 50d954e407 2002-10-01 Miguel de Icaza <[email protected]>
* expression.cs (Binary.ResolveOperator): Catch the case where
	DoNumericPromotions returns true,

	(Binary.DoNumericPromotions): Simplify the code, and the tests.

svn path=/trunk/mcs/; revision=7915
2002-10-01 21:19:19 +00:00
Gonzalo Paniagua Javier d3654afcba removed double topdir definition
svn path=/trunk/mcs/; revision=7914
2002-10-01 19:24:03 +00:00
Gonzalo Paniagua Javier 055226227b little fixes
svn path=/trunk/mcs/; revision=7913
2002-10-01 19:22:01 +00:00
Miguel de Icaza 4df4036832 Sorry
svn path=/trunk/mcs/; revision=7912
2002-10-01 19:13:26 +00:00
Miguel de Icaza 0e54ff0114 Fix
svn path=/trunk/mcs/; revision=7911
2002-10-01 19:06:01 +00:00
Miguel de Icaza fdac2e4440 Add to the build
svn path=/trunk/mcs/; revision=7910
2002-10-01 18:55:18 +00:00
Martin Baulig de5d618bba 2002-10-01 Martin Baulig <[email protected]>
* debug.c: Don't create an .il file for the dynamic symbol file.

svn path=/trunk/mono/; revision=7908
2002-10-01 18:44:01 +00:00
Martin Baulig f5895c6858 2002-10-01 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Don't emit methods and line numbers for
	the dynamic symbol file, just write the type table.  We can easily
	have an external helper program which creates a symbol file for an
	IL file.

svn path=/trunk/mono/; revision=7907
2002-10-01 18:42:50 +00:00
Gonzalo Paniagua Javier b927f644a1 2002-10-01 Gonzalo Paniagua Javier <[email protected]>
* MonoProperty.cs:
	* PropertyInfo.cs: fixed bug #31535.

svn path=/trunk/mcs/; revision=7906
2002-10-01 16:15:12 +00:00
Dick Porter eea28c3d23 2002-10-01 Dick Porter <[email protected]>
* timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
	Unfortunately libgc uses the same thread suspend technique that I
	want to, and the two don't mix: libgc will deadlock when it tries
	to stop the world if a thread has already been suspended by
	someone else.  Just do the simple suspended create rather than the
	general purpose thread suspension for now.

	* threads.c: Pass create flags to the timed_thread create call, to
	implement suspended thread creation.  ResumeThread() partially
	implemented, to cope with the case where a newly created but
	suspended thread is launched.

2002-10-01  Dick Porter  <[email protected]>

	* threads.c (ves_icall_System_Threading_Thread_Start_internal):
	Only add the handle to the cleanup array when we're about to
	launch the thread.  Bug 31425 deadlocked when the test was run on
	mono under w32.

svn path=/trunk/mono/; revision=7905
2002-10-01 15:59:52 +00:00
Martin Baulig 8574ac82b3 2002-10-01 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerInfo): Added mono_runtime_invoke().

svn path=/trunk/mono/; revision=7904
2002-10-01 13:38:49 +00:00
Martin Baulig 391cd6613a 2002-10-01 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Added support for properties.

svn path=/trunk/mono/; revision=7903
2002-10-01 13:37:49 +00:00
Rodrigo Moya 3dfe241caa 2002-10-01 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/AllTests.cs: added SqlBoolean test.

2002-10-01  ville <[email protected]>

	* System.Data.SqlClient/SqlBooleanTest.cs: new test suite for
	SqlBoolean class.

svn path=/trunk/mcs/; revision=7899
2002-10-01 09:18:23 +00:00
Gonzalo Paniagua Javier 8be3df2b99 2002-09-30 Gonzalo Paniagua Javier <[email protected]>
* list: added new files in System.Web.

	* System.Web/HttpApplication.cs: use the static file handler.
	* System.Web/HttpForbiddenHandler.cs: handler to forbid access.
	* System.Web/HttpMethodNotAllowedHandler.cs: handler for method not
	allowed.

	* System.Web/HttpUtility.cs: finished all UrlDecode methods.
	* System.Web/MimeTypes.cs: map from file extension to MIME type.
	* System.Web/StaticFileHandler.cs: serves static files

svn path=/trunk/mcs/; revision=7897
2002-09-30 23:38:44 +00:00
Dick Porter 1c4c28a73b 2002-09-30 Dick Porter <[email protected]>
* sockets.c (ioctlsocket): Set non-blocking mode in a better way,
	with fcntl.

svn path=/trunk/mono/; revision=7896
2002-09-30 14:43:10 +00:00
Dick Porter 367d52afe7 2002-09-30 Dick Porter <[email protected]>
* Win32Exception.cs: Sorted the errors, added EINPROGRESS

svn path=/trunk/mcs/; revision=7895
2002-09-30 14:42:48 +00:00
Dietmar Maurer 10fbbd6de6 2002-09-30 Dietmar Maurer <[email protected]>
* monoburg.c (main): add option to specify default costs, added
	experimental code to handle several input files.

svn path=/trunk/mono/; revision=7894
2002-09-30 13:58:49 +00:00
John Sohn 783ac37230 * Form.cs: Site property now calls base class
* FormTest.cs: set label position on test form
	* Label.cs: implemented more methods
	* makefile: stub no longer links to gc library

svn path=/trunk/mcs/; revision=7893
2002-09-30 04:27:56 +00:00
Nick Drochak cf85b96e59 2002-09-29 Nick Drochak <[email protected]>
* XmlTextReaderTest.cs (AssertEndDocument): Add messages for Asserts()
	so we can tell where this is failing.

svn path=/trunk/mcs/; revision=7890
2002-09-29 15:00:18 +00:00
Nick Drochak bb5893fd12 2002-09-29 Nick Drochak <[email protected]>
* DecimalTest.cs: Change from Assert() with == to AssertEquals(). This
	gets the tests to pass on linux, but they shouldn't need that.  Now
	to find out why.  This seems deep...

svn path=/trunk/mcs/; revision=7889
2002-09-29 14:42:31 +00:00
Gonzalo Paniagua Javier f2e90236bb 2002-09-28 Gonzalo Paniagua Javier <[email protected]>
* list: added PageHandlerFactory.

	* System.Web/HttpApplication.cs:
	* System.Web/HttpApplicationFactory.cs:
	* System.Web/HttpRequest.cs:
	* System.Web/HttpRuntime.cs:
	* System.Web.Compilation/AspElements.cs:
	* System.Web.Compilation/AspGenerator.cs:
	* System.Web.Compilation/AspParser.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateFactory.cs: Modified file.
	* System.Web.Configuration/HttpCapabilitiesBase.cs:
	* System.Web.Hosting/SimpleWorkerRequest.cs:
	* System.Web.UI/PageHandlerFactory.cs:
	* System.Web.UI/PageParser.cs:
	* System.Web.UI/TemplateControlParser.cs: we are now able to compile
	pages and use HttpApplication, HttpRuntime and SimpleWorkerRequest.

svn path=/trunk/mcs/; revision=7880
2002-09-28 07:44:14 +00:00
Gonzalo Paniagua Javier 7a2d262277 2002-09-28 Gonzalo Paniagua Javier <[email protected]>
* ThreadPool.cs: set IsThreadPoolThread before starting the worker.

svn path=/trunk/mcs/; revision=7879
2002-09-28 07:08:58 +00:00
Gonzalo Paniagua Javier 2cf49db82d 2002-09-27 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: give more information when wrong parameters passed.

svn path=/trunk/mcs/; revision=7878
2002-09-27 23:28:45 +00:00
Martin Baulig 12b25d25c1 2002-09-27 Martin Baulig <[email protected]>
* debug.c (debug_load_method_lines): Don't use sigaction() on win32.

svn path=/trunk/mono/; revision=7876
2002-09-27 19:11:06 +00:00
Dick Porter bb16b9c077 cygwin needs to link another library now
svn path=/trunk/mono/; revision=7875
2002-09-27 18:04:02 +00:00
Paolo Molaro 8edca8c7e4 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <[email protected]>
* reflection.c: unaligned store fix from Mark Crichton
	<[email protected]>.

svn path=/trunk/mono/; revision=7873
2002-09-27 16:57:46 +00:00
Paolo Molaro c01ccfa6f9 Dum de dum, need to escape %.
svn path=/trunk/mono/; revision=7870
2002-09-27 14:56:19 +00:00
Paolo Molaro 139aad4a64 Make it print the unknown operator value.
svn path=/trunk/mono/; revision=7869
2002-09-27 14:53:20 +00:00
Martin Baulig bf97c0f83d 2002-09-27 Martin Baulig <[email protected]>
* Assembly.cs (Assembly.GetReferencedAssemblies): Implemented.

svn path=/trunk/mcs/; revision=7868
2002-09-27 14:51:16 +00:00
Martin Baulig 2ef83b66ab 2002-09-27 Martin Baulig <[email protected]>
* icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
	New interncall.

svn path=/trunk/mono/; revision=7867
2002-09-27 14:49:22 +00:00
Dick Porter 604542bea7 2002-09-27 Dick Porter <[email protected]>
* configure.in: Check for semaphore.h.  Patch for BSD from
	[email protected] (Julio Merino).

2002-09-27  Dick Porter  <[email protected]>

	* semaphores.c: Only include semaphore.h if it's present. Patch
	for BSD from [email protected] (Julio Merino).

svn path=/trunk/mono/; revision=7865
2002-09-27 13:54:16 +00:00
Paolo Molaro 71178114f2 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <[email protected]>
* assembly.h, assembly.c: use a sane API to hook into the assembly
	loading process instead of a useless special-purpouse hack
	(ngen needs a hook, too, for example).

svn path=/trunk/mono/; revision=7864
2002-09-27 13:42:47 +00:00
Paolo Molaro e000f7dd39 Fri Sep 27 15:06:29 CEST 2002 Paolo Molaro <[email protected]>
* MonoCustomAttrs.cs: applied patch by "Si Jingnan"
	<[email protected]> to return also derived types.

svn path=/trunk/mcs/; revision=7863
2002-09-27 13:09:06 +00:00
Dick Porter dd1e6a5c10 2002-09-27 Dick Porter <[email protected]>
* processes.c: Pass environment and working directory to the
	daemon when forking.  Don't let argv[0] be duplicated when looking
	for the program name.  Implement EnumProcessModules (simple
	version for now, lsof-style later if needed), GetModuleBaseName,
	{Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
	aren't available on Linux).

	* process-private.h: Store the process name, and the working set
	min and max

	* handles.c:
	* handles-private.h: New functions to store and retrieve an array
	of strings in the scratch space

	* daemon.c: Don't miss deleting some handles when a client exits
	(we used to rely on the client doing the final cleanup, but
	obviously if the client is no longer there the daemon has to do
	it).

	Process forking now sets the environment and the working
	directory.

	* io.c: Don't confuse fd 0 with an unassigned handle struct

	* atomic.h: Add a google cache alternative to the msdn URL

2002-09-27  Dick Porter  <[email protected]>

	* threads.c (mono_thread_init): Call GetCurrentProcess() so
	io-layer can set up some process handle info.  Not needed on w32,
	but doesn't hurt either.

	* process.c: Pass the program name in the second parameter to
	CreateProcess, so the path is searched.  Include the working
	directory. Implemented process name, process enumeration, and some
	process detail internal calls.

	* icall.c: Added internal calls for process lookup, and some
	process details

svn path=/trunk/mono/; revision=7858
2002-09-27 12:02:56 +00:00
Dick Porter 2203f51858 2002-09-27 Dick Porter <[email protected]>
* interp.c: Tell glib what the program name is, by passing it the
	name of the managed file we're executing

2002-09-27  Dick Porter  <[email protected]>

	* mono.c: Tell glib what the program name is, by passing it the
	name of the managed file we're executing

svn path=/trunk/mono/; revision=7857
2002-09-27 11:44:02 +00:00
Dick Porter 0037b58a94 2002-09-27 Dick Porter <[email protected]>
* Process.cs: Implemented {get_,set_}{Min,Max}WorkingSet,
	ProcessName, GetProcessById, GetProcesses, GetProcessesByName.
	Pass the working directory to Start.  Pass the program and args in
	one string to be used with the second arg of CreateProcess, so it
	will search the path.

svn path=/trunk/mcs/; revision=7856
2002-09-27 11:39:50 +00:00
Miguel de Icaza d481bfdf60 2002-09-27 Miguel de Icaza <[email protected]>
* ecore.cs (EventExpr.Emit): Instead of emitting an exception,
	report error 70.

svn path=/trunk/mcs/; revision=7854
2002-09-27 05:13:57 +00:00
Martin Baulig 4bb37638b2 2002-09-26 Martin Baulig <[email protected]>
* trampoline.c (x86_magic_trampoline): Don't insert the breakpoint
	trampoline into the vtable, also use it for non-virtual methods,
	remove the breakpoint when done.

svn path=/trunk/mono/; revision=7850
2002-09-26 21:45:46 +00:00
Martin Baulig e04dfe9f14 2002-09-26 Martin Baulig <[email protected]>
* debug.c (debug_load_method_lines): Block SIGCHLD while running
	monodis.

svn path=/trunk/mono/; revision=7848
2002-09-26 20:31:18 +00:00
Miguel de Icaza 5f0e61d090 2002-09-26 Miguel de Icaza <[email protected]>
* ecore.cs (ConvertNumericExplicit): It is not enough that the
	conversion exists, but it is also required that the conversion be
	performed.  This manifested in "(Type64Enum) 2".

svn path=/trunk/mcs/; revision=7847
2002-09-26 20:18:07 +00:00
Martin Baulig 0eb502a6bd Incremented version number.
svn path=/trunk/mono/; revision=7844
2002-09-26 19:41:44 +00:00
Martin Baulig 7487ebe7dc 2002-09-26 Martin Baulig <[email protected]>
* debug.c: Reworked the whole debugging stuff.  We have now one
	single `mono_debug_handle' which keeps a hashtable of
	`AssemblyDebugInfo's (which may have different debugging formats).
	The AssemblyDebugInfo is now created when the assembly is loaded,
	but never when adding a class/type.

	* mono.c: Initialize debugging stuff after corlib and the assembly
	have been loaded.

svn path=/trunk/mono/; revision=7843
2002-09-26 19:41:20 +00:00
Martin Baulig 519d06df66 2002-09-26 Martin Baulig <[email protected]>
* assembly.c (mono_install_open_assembly_hook): New global
	function to install a function to be invoked each time a new
	assembly is loaded.
	(mono_assembly_open): Run this callback function if set.

	* debug-mono-symfile.c: Put back line numbers for the dynamic
	symbol file and also record the .il file as source file.  This
	allows us to install the temporary symbol file as `file.dbg' just
	like a compiler-generated one.

svn path=/trunk/mono/; revision=7842
2002-09-26 19:40:56 +00:00
Nick Zigarovich a1f03ed082 Corrected typo in gc.c (BOHEM vs BOEHM)
svn path=/trunk/mono/; revision=7841
2002-09-26 19:40:15 +00:00
Miguel de Icaza 110f012a21 2002-09-26 Miguel de Icaza <[email protected]>
* class.cs (TypeManager.AddMethod): The fix is not to change
	AddEnum, because that one was using a fully qualified name (every
	DeclSpace derivative does), but to change the AddMethod routine
	that was using an un-namespaced name.  This now correctly reports
	the duplicated name.

svn path=/trunk/mcs/; revision=7840
2002-09-26 18:33:24 +00:00
Miguel de Icaza ad25b25d96 Small hack to avoid the make -f makefile.gnu
svn path=/trunk/mcs/; revision=7839
2002-09-26 18:22:30 +00:00
Gonzalo Paniagua Javier ee5cee70b6 2002-09-26 Gonzalo Paniagua Javier <[email protected]>
* ApplicationHost.cs:
	* SimpleWorkerRequest.cs: workaround for bug #31245.

svn path=/trunk/mcs/; revision=7838
2002-09-26 18:01:06 +00:00
Gonzalo Paniagua Javier 61ed992ec2 2002-09-26 Gonzalo Paniagua Javier <[email protected]>
* Activator.cs: little fix in CreateInstance (Type, bool).

svn path=/trunk/mcs/; revision=7837
2002-09-26 17:55:05 +00:00
Dietmar Maurer eb89850b2e 2002-09-26 Dietmar Maurer <[email protected]>
* monoburg.c (emit_state): include additional fields to handle
	register allocation in dag_mode

svn path=/trunk/mono/; revision=7836
2002-09-26 13:35:51 +00:00
Miguel de Icaza e80c1f995b 2002-09-26 Miguel de Icaza <[email protected]>
* class.cs: Revert patch until I can properly fix it.  The issue
	is that we have a shared Type space across all namespaces
	currently, which is wrong.

	Options include making the Namespace a DeclSpace, and merge
	current_namespace/current_container in the parser.

svn path=/trunk/mcs/; revision=7833
2002-09-26 05:30:03 +00:00
Miguel de Icaza 643cb4cece Fix the build
svn path=/trunk/mcs/; revision=7832
2002-09-26 04:19:13 +00:00
Gonzalo Paniagua Javier c04e247ac7 oops
svn path=/trunk/mcs/; revision=7831
2002-09-26 01:36:38 +00:00
Gonzalo Paniagua Javier a71b02136a 2002-09-25 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: added some missing methods.
	* HttpApplicationFactory.cs: get event handlers for the application.
	* HttpAsyncResult.cs: little fixes.
	* HttpRequest.cs: make Encoding work even with no worker request.

svn path=/trunk/mcs/; revision=7830
2002-09-26 01:33:33 +00:00
Gonzalo Paniagua Javier 2e92d252d3 2002-09-25 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: implemented ObBubbleEvent.
	* Page.cs: temporary workaround to make POST work with xsp server.

svn path=/trunk/mcs/; revision=7829
2002-09-26 00:56:48 +00:00
Gonzalo Paniagua Javier 73094fe20a 2002-09-25 Gonzalo Paniagua Javier <[email protected]>
* ListControl.cs: fixed OnDataBinding.

svn path=/trunk/mcs/; revision=7828
2002-09-26 00:51:05 +00:00
Gonzalo Paniagua Javier f3cf15ac50 2002-09-25 Gonzalo Paniagua Javier <[email protected]>
* icall.c: fixed bug #31235 by copying a few lines from GetMethods to
	GetProperties. Also avoid calling g_slist_length in GetProperties and
	GetMethods.

svn path=/trunk/mono/; revision=7827
2002-09-25 23:46:37 +00:00
Miguel de Icaza e90b829c52 2002-09-25 Miguel de Icaza <[email protected]>
* cs-parser.jay: Improve error reporting when we get a different
	kind of expression in local_variable_type and
	local_variable_pointer_type.

	Propagate this to avoid missleading errors being reported.

svn path=/trunk/mcs/; revision=7823
2002-09-25 22:34:49 +00:00
Martin Baulig ad95a40a96 Always create a line entry for the last line.
svn path=/trunk/mono/; revision=7822
2002-09-25 21:49:31 +00:00
Martin Baulig 5fef166878 2002-09-25 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
	instead of guint64 for addresses and added prologue/epilogue info.

svn path=/trunk/mono/; revision=7819
2002-09-25 21:43:08 +00:00
Miguel de Icaza ebcbb5fca0 2002-09-25 Miguel de Icaza <[email protected]>
* ecore.cs (ImplicitReferenceConversion): treat
	TypeManager.value_type as a target just like object_type.   As
	code like this:

	ValueType v = 1;

	Is valid, and needs to result in the int 1 being boxed before it
	is assigned to the value type v.

svn path=/trunk/mcs/; revision=7818
2002-09-25 21:41:33 +00:00
Miguel de Icaza 8403be52d1 2002-09-25 Miguel de Icaza <[email protected]>
* class.cs (TypeContainer.AddEnum): Use the basename, not the name
	to validate the enumeration name.

svn path=/trunk/mcs/; revision=7817
2002-09-25 21:10:06 +00:00
Miguel de Icaza a657e86da3 2002-09-25 Miguel de Icaza <[email protected]>
* expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
	EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
	to [email protected] for finding the bug and providing a patch.

svn path=/trunk/mcs/; revision=7816
2002-09-25 20:58:38 +00:00
Gonzalo Paniagua Javier e94b7baef0 2002-09-25 Gonzalo Paniagua Javier <[email protected]>
* sockets.c:
	(_wapi_recvfrom): added ECONNRESET to the switch.

svn path=/trunk/mono/; revision=7815
2002-09-25 20:35:17 +00:00
Paolo Molaro b3aabafaa5 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <[email protected]>
* reflection.c: avoid unaligned stores (bug spotted by
	Mark Crichton  <[email protected]>).

svn path=/trunk/mono/; revision=7814
2002-09-25 20:21:28 +00:00
Martin Baulig e0063d14b3 2002-09-25 Martin Baulig <[email protected]>
* debug-private.h (DebugLineNumberInfo): Removed.  There's now a
	MonoDebugLineNumberEntry type in debug-mono-symfile.h which we're
	using instead of it.
	(DebugMethodInfo): Removed `line_numbers'.

	* debug.c: Reworked the line number generation; we're now using
	the MonoDebugLineNumberEntry try for all debugging formats.  This
	type also includes the line number and IL offset, this allows the
	JIT to produce better line number info: we only emit line number
	information for source lines which actually have code.

svn path=/trunk/mono/; revision=7812
2002-09-25 18:51:19 +00:00
Martin Baulig a1e50dc4c2 2002-09-25 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
	store line number info.  For the dynamic symbol file, we only need
	to provide the JIT generated dynamic line number info for the dynamic
	symbol file.

svn path=/trunk/mono/; revision=7811
2002-09-25 18:50:48 +00:00
Miguel de Icaza e742eb5e0e More assemblies
svn path=/trunk/mono/; revision=7810
2002-09-25 17:30:08 +00:00
Martin Baulig 6034ab0b3e 2002-09-25 Martin Baulig <[email protected]>
* debug.h: Removed external declaration of all functions which
	should only be called from the Mono Debugger and also made them
	static.  Since the debugger gets their address from the
	`MONO_DEBUGGER__debugger_info' vtable, there's no need to export
	these functions.

svn path=/trunk/mono/; revision=7807
2002-09-25 13:48:41 +00:00
Martin Baulig da6130fc83 2002-09-25 Martin Baulig <[email protected]>
Improved breakpoint support, we can now dynamically insert and
	remove breakpoints at runtime and when called from withing the
	Mono Debugger, we're using a special breakpoint trampoline.

	* debug.h (mono_method_has_breakpoint): New method to check
	whether to insert a breakpoint for a method.
	(mono_insert_breakpoint): New method to insert a breakpoint.
	(mono_insert_breakpoint_full): New method to insert a breakpoint,
	takes a MonoMethodDesc.
	(mono_remove_breakpoint): New method to remove a breakpoint.

	* debug.c (mono_debugger_insert_breakpoint): New function for the
	debugger.  Should only be called from the debugger.
	(mono_debugger_remove_breakpoint): Likewise.

	* mono.c (main): Use mono_insert_breakpoint() to insert breakpoints.

	* trampoline.c (get_breakpoint_trampoline): New static function to
	create a special breakpoint trampoline for the debugger.
	(x86_magic_trampoline): If we're running inside the Mono Debugger
	and a breakpoint was requested for the method, generate a special
	breakpoint trampoline.

	* jit.c (mono_debug_methods): Removed, use mono_insert_breakpoint()
	to insert a breakpoint.
	(mono_debug_last_breakpoint_address): Removed.
	(match_debug_method): Removed, use mono_method_has_breakpoint().

svn path=/trunk/mono/; revision=7806
2002-09-25 13:39:49 +00:00
Martin Baulig 2de418a43d 2002-09-25 Martin Baulig <[email protected]>
* debug-mono-symfile.h: Incremented version number.

svn path=/trunk/mono/; revision=7805
2002-09-25 13:37:07 +00:00
Martin Baulig 2386cc7881 Use g_message() here, not g_warning().
svn path=/trunk/mono/; revision=7804
2002-09-25 13:27:37 +00:00
Paolo Molaro 9056983301 Wed Sep 25 12:04:08 CEST 2002 Paolo Molaro <[email protected]>
* jit.c: reorder mono_runtime_cleanup () call since it needs the
	engine still fully working.

svn path=/trunk/mono/; revision=7803
2002-09-25 10:06:41 +00:00
Gaurav Vaish 78cefb0f7b 2002-09-25 Gaurav Vaish <[email protected]>
* RegextEditorDialog.cs   : Added a few more methods.
* BaseDataListComponentEditor.cs
                          : Completed.
* DataListComponentEditor.cs
                          : Completed
* BaseDataListPageInternal.cs,
* GeneralPageDataListInternal.cs,
* FormatPageInternal.cs,
* BordersPageInternal.cs  : Added private classes. Initial implementation.

svn path=/trunk/mcs/; revision=7802
2002-09-25 10:01:55 +00:00
Dietmar Maurer 6a89f19c0d 2002-09-25 Dietmar Maurer <[email protected]>
* added -p and -e options. monoburg is now able to work with DAGs.

svn path=/trunk/mono/; revision=7801
2002-09-25 08:03:19 +00:00
Mark Crichton 4e22c5b894 Stupid off-by-one error fixed.
The problem was that I incremented gr as if we were on a PPC box.  Sparc
doesn't need such "alignment" of the registers.

svn path=/trunk/mono/; revision=7800
2002-09-25 04:50:10 +00:00
Miguel de Icaza 6c03dfc7f7 2002-09-25 Miguel de Icaza <[email protected]>
* ecore.cs (TryImplicitIntConversion): When doing an
	implicit-enumeration-conversion, check if the type is 64-bits and
	perform a conversion before passing to EnumConstant.

svn path=/trunk/mcs/; revision=7799
2002-09-25 04:20:49 +00:00
Mark Crichton dbb66e9867 arch/sparc/tramp.c: Fixed once again. Now works, mostly.
io-layer/atomic.h: It's sparc on gcc/solaris, and __sparc__ on gcc/linux.
	           had to add an #ifdef.

svn path=/trunk/mono/; revision=7798
2002-09-25 01:52:30 +00:00
Adam Treat 62cc2c3017 * Added tageditor, a context menu for inserting monodoc tags
* Updated the GUI to handle the changes in the lib

svn path=/trunk/mcs/; revision=7794
2002-09-24 21:29:10 +00:00
Adam Treat fb12a3e446 * Added emember.cs and seealso.cs which help to flesh out the dtd
* Reworked Type.cs to support the full range of the monodoc.dtd

* Added support for the full monodoc.dtd to parser.cs

svn path=/trunk/mcs/; revision=7792
2002-09-24 21:27:49 +00:00
Martin Baulig 2021462e95 Small improvement.
svn path=/trunk/mono/; revision=7787
2002-09-24 20:32:46 +00:00
Martin Baulig 86d6940fac 2002-09-24 Martin Baulig <[email protected]>
* Assembly.cs (MonoDebugger_GetType): New method to get a Type
	from its metadata token.  This should only be used by the debugger.

svn path=/trunk/mcs/; revision=7784
2002-09-24 20:04:10 +00:00
Martin Baulig 4e1aed55c0 2002-09-24 Martin Baulig <[email protected]>
* debug.c (mono_debug_open): When we're invoked from inside the
	Mono Debugger, set mono_debugger_class_init_func (exported in
	metadata/class.c) to mono_add_type().
	(mono_add_type): Call mono_debug_symfile_add_type().

svn path=/trunk/mono/; revision=7783
2002-09-24 20:02:35 +00:00
Martin Baulig 688cde0904 2002-09-24 Martin Baulig <[email protected]>
* class.c (mono_debugger_class_init_func): New global function
	pointer variable.
	(mono_class_init): If mono_debugger_class_init_func is non-NULL,
	call it.

	* debug-mono-symfile.c (mono_debug_symfile_add_type): New
	function.  This is called via the mono_debugger_class_init_func
	hook to add all types to the dynamic type table.
	(ves_icall_MonoDebugger_GetType): New interncall to get a class
	from its metadata token.

	* icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
	New interncall for the debugger.

svn path=/trunk/mono/; revision=7782
2002-09-24 20:02:10 +00:00
Miguel de Icaza ffa9b1f8a4 Update files
svn path=/trunk/mcs/; revision=7781
2002-09-24 18:25:09 +00:00
Miguel de Icaza e135755a10 Add WarningException.cs
svn path=/trunk/mcs/; revision=7780
2002-09-24 18:23:42 +00:00
Nick Drochak e976db7f29 2002-09-24 Nick Drochak <[email protected]>
* icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
	before using it in case it is null.

svn path=/trunk/mono/; revision=7779
2002-09-24 15:21:19 +00:00
Gonzalo Paniagua Javier 7c83de8e4b 2002-09-24 Gonzalo Paniagua Javier <[email protected]>
* PathTest.cs: added test for null argument in IsPathRooted.

svn path=/trunk/mcs/; revision=7778
2002-09-24 15:05:32 +00:00
Martin Baulig 5d8eab5ec8 Don't include static fields.
svn path=/trunk/mono/; revision=7777
2002-09-24 14:14:01 +00:00
Nick Drochak 0032d48b02 2002-09-24 Nick Drochak <[email protected]>
* ArrayList.cs: Make enumerator throw exception if the ArrayList is
	mutated (Insert, Delete, etc.). Also, fix bug in InsertRange() when
	this was passed as parameter.

svn path=/trunk/mcs/; revision=7775
2002-09-24 14:11:07 +00:00
Nick Drochak 734d904e3e 2002-09-24 Nick Drochak <[email protected]>
* ArrayListTest.cs: Add test for InsertRange() for the case where an
	ArrayList is passed to itself to be insterted.

svn path=/trunk/mcs/; revision=7774
2002-09-24 14:10:33 +00:00
Martin Baulig 06c96bb5d1 Added support for structs and classes.
svn path=/trunk/mono/; revision=7772
2002-09-24 11:31:47 +00:00
Paolo Molaro b8bdaccfda Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <[email protected]>
* metadata.c: allow custom modifiers in local var signatures
	(bug spotted by Zoltan Varga).

svn path=/trunk/mono/; revision=7771
2002-09-24 11:27:44 +00:00
Gaurav Vaish 3e7f3ae17c 2002-09-24
* RegexTypeEditor.cs      : Completed
* RegexEditorDialog.cs    : Initial implementation.

svn path=/trunk/mcs/; revision=7770
2002-09-24 11:20:57 +00:00
Paolo Molaro c1595a2d68 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <[email protected]>
* class.c: deal with the <Module> class that may have a NULL vtable.
	Eliminate warnings.

svn path=/trunk/mono/; revision=7769
2002-09-24 10:14:55 +00:00
Paolo Molaro 3ee422999e Tue Sep 24 11:48:53 CEST 2002 Paolo Molaro <[email protected]>
* main.c: use mono_type_size () to get the size of
	a blob of data for a type (Zoltan Varga spotted the bug).

svn path=/trunk/mono/; revision=7768
2002-09-24 09:52:02 +00:00
Paolo Molaro a2a8d1547f Tue Sep 24 11:34:02 CEST 2002 Paolo Molaro <[email protected]>
* jit.c: avoid including cil-coff.h (again). Optimize typeof (type).
	Run finalize on domain cleanup.
	* mono.c: call setlocale ().
	* trampoline.c: clearer error message for invalid trampoline.

svn path=/trunk/mono/; revision=7767
2002-09-24 09:38:38 +00:00
Paolo Molaro e2440e9757 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <[email protected]>
* image.c, image.h: more strong name helpers.
	* monosn.c: more work: convert pem keys to cryptoapi format.

svn path=/trunk/mono/; revision=7766
2002-09-24 09:31:42 +00:00
Paolo Molaro 4ba3ae74aa Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <[email protected]>
* string-icalls.c: speedup IndexOf.

svn path=/trunk/mono/; revision=7765
2002-09-24 09:29:48 +00:00
Paolo Molaro b5f0912fcd 2002-09-21 Zoltan Varga <[email protected]>
* CallConvCdecl.cs: new file

	* CallConvFastcall.cs: new file

	* CallConvThiscall.cs: new file

	* CallConvStdcall.cs: new file

	* RuntimeHelpers.cs: Implemented OffsetToStringData, GetObjectValue and
	RunClassConstructor.

svn path=/trunk/mcs/; revision=7764
2002-09-24 09:20:39 +00:00
Paolo Molaro c94963533c Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: updates from [email protected].

svn path=/trunk/mono/; revision=7763
2002-09-24 09:19:59 +00:00
Paolo Molaro 72e36542ad Updates.
svn path=/trunk/mcs/; revision=7762
2002-09-24 09:18:12 +00:00
Paolo Molaro 02253ae5cd Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: cleanup: use mono_object_domain ().

svn path=/trunk/mono/; revision=7761
2002-09-24 09:11:30 +00:00
Paolo Molaro 7997efba36 2002-09-21 Zoltan Varga <[email protected]>
* AllTests.cs: new file

	* RuntimeHelpersTest.cs: new file

svn path=/trunk/mcs/; revision=7760
2002-09-24 09:09:35 +00:00
John Sohn 68e9564374 *** empty log message ***
svn path=/trunk/mcs/; revision=7759
2002-09-24 06:09:20 +00:00
John Sohn 7ef9bfb6a3 2002-9-24 John Sohn <[email protected]>
* Application.cs: Run method now creates the Form
	* ContainerControl.cs: no implementation but made sure overridden
	methods call the base class
	* Control.cs: Implemented several more methods in the implementation
	of this class. Implemented ControlCollection, allowing controls
	to be added and removed from the Form.
	* Form.cs: Implemented more methods of the Form class
	* FormTest.cs: Added code to draw and display a Label
	* Label.cs: Initial implementation of Label class. The Label can
	be added and displayed on a Form.
	* NativeWindow.cs: modified debugging (console) output
	* ScrollableControl.cs: no implementation but made sure overridden
	methods call the base class
	* Win32.cs: added more Win32 imports and definitions
	* monostub.c: now store the application HINSTANCE
	* makefile: added Label.cs to makefile

svn path=/trunk/mcs/; revision=7758
2002-09-24 06:06:39 +00:00
Adam Treat a20fc7fc78 * Broke up our monodoc source file so it's easier to extend. It was
getting to big ;)

svn path=/trunk/mcs/; revision=7757
2002-09-24 04:17:40 +00:00
Adam Treat 89b878c5df * Damn, I couldn't fine this anywhere... thanks gonzalo ;)
svn path=/trunk/mcs/; revision=7754
2002-09-24 01:58:58 +00:00
Adam Treat e751b881bf * Thanks gonzalo ;)
svn path=/trunk/mcs/; revision=7753
2002-09-24 01:50:05 +00:00
Adam Treat 31d8c204a5 * Hook up the options dialog
svn path=/trunk/mcs/; revision=7752
2002-09-24 01:11:15 +00:00
Miguel de Icaza 49efecf987 2002-09-23 Miguel de Icaza <[email protected]>
* decl.cs (Error_AmbiguousTypeReference); New routine used to
	report ambiguous type references.  Unlike the MS version, we
	report what the ambiguity is.   Innovation at work ;-)

svn path=/trunk/mcs/; revision=7751
2002-09-24 00:54:24 +00:00
Miguel de Icaza 73b75c4bef 2002-09-23 Miguel de Icaza <[email protected]>
* decl.cs (DeclSpace.FindType): Require a location argument to
	display when we display an ambiguous error.

	* ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.

	* interface.cs (GetInterfaceTypeByName): Pass location to FindType.

svn path=/trunk/mcs/; revision=7748
2002-09-24 00:32:57 +00:00
Martin Baulig 6c3be28a21 More work on the type stuff.
svn path=/trunk/mono/; revision=7746
2002-09-23 23:21:14 +00:00
Miguel de Icaza 0544e9c682 2002-09-23 Miguel de Icaza <[email protected]>
* expression.cs (EmitDynamicInitializers): Apply patch from
	[email protected] that fixes the order in which we emit our
	initializers.

svn path=/trunk/mcs/; revision=7745
2002-09-23 22:39:52 +00:00
Duncan Mak 23bb65c7a5 2002-09-23 Duncan Mak <[email protected]>
* XslTransform.cs (Laod): Implemented the simple version that
	takes one XPathNavigator as argument.
	(Save): New private method for recreating the XML in text from a
	XPathNavigator
	(WriteCurrentNode):
	(WriteTree): private methods for generating the text XML from the
	XPathNavigator tree.

svn path=/trunk/mcs/; revision=7744
2002-09-23 22:19:25 +00:00
Mark Crichton 4372c15832 Added information about the new LCC 4.2 release that supports compiling to
MSIL.

svn path=/trunk/mono/; revision=7743
2002-09-23 18:19:51 +00:00
Andrew Birkett a724359910 2002-09-23 Andrew Birkett <[email protected]>
* RijndaelManagedTest.cs: Fixed initialization order problem
	to match MS behaviour.

svn path=/trunk/mcs/; revision=7742
2002-09-23 18:07:38 +00:00
Andrew Birkett ff4ec3d133 2002-09-23 Andrew Birkett <[email protected]>
* corlib_linux_test.args: Added MD5Test

svn path=/trunk/mcs/; revision=7741
2002-09-23 18:06:10 +00:00
Gonzalo Paniagua Javier 26c28da391 2002-09-23 Gonzalo Paniagua Javier <[email protected]>
* HtmlAnchor.cs:
	* HtmlButton.cs:
	* HtmlContainerControl.cs:
	* HtmlControl.cs:
	* HtmlForm.cs:
	* HtmlGenericControl.cs:
	* HtmlImage.cs:
	* HtmlInputButton.cs:
	* HtmlInputCheckBox.cs:
	* HtmlInputControl.cs:
	* HtmlInputFile.cs:
	* HtmlInputHidden.cs:
	* HtmlInputImage.cs:
	* HtmlInputRadioButton.cs:
	* HtmlInputText.cs:
	* HtmlSelect.cs:
	* HtmlTable.cs:
	* HtmlTableCell.cs:
	* HtmlTableRow.cs:
	* HtmlTextArea.cs: added almost all missing attributes.

svn path=/trunk/mcs/; revision=7740
2002-09-23 17:59:02 +00:00
Martin Baulig b55c75b6e8 Added support for enum types.
svn path=/trunk/mono/; revision=7739
2002-09-23 16:42:25 +00:00
Martin Baulig 469bc8f420 Multi-dimensional arrays ...
svn path=/trunk/mono/; revision=7736
2002-09-23 15:51:17 +00:00
Nick Drochak 5877256e30 2002-09-24 Nick Drochak <[email protected]>
* ArrayListTest.cs: Add check that enumerator is invalidated after a
	method that changes the list, such as Add(), Remove(), etc.

svn path=/trunk/mcs/; revision=7735
2002-09-23 15:17:31 +00:00
Gonzalo Paniagua Javier b2d22b5280 Little fix to clean target for PEToolkit
svn path=/trunk/mcs/; revision=7733
2002-09-23 14:52:50 +00:00
Nick Drochak f9b5964873 2002-09-23 Nick Drochak <[email protected]>
* TraceTest.cs: Default level and size are 0 & 4, respectively.

svn path=/trunk/mcs/; revision=7732
2002-09-23 14:44:48 +00:00
Martin Baulig 8423c62e96 2002-09-23 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Improved type support.

svn path=/trunk/mono/; revision=7730
2002-09-23 14:36:08 +00:00
Paolo Molaro 64dc6f0c67 Update.
svn path=/trunk/mono/; revision=7729
2002-09-23 09:04:50 +00:00
Mark Crichton 2399ceea61 Starting rewrite of trampolining for SPARC. It needed some cleanup.
It doesn't work at all now.  GO PROGRESS!

svn path=/trunk/mono/; revision=7728
2002-09-23 02:25:43 +00:00
Gonzalo Paniagua Javier 7b6b950e75 2002-09-22 Gonzalo Paniagua Javier <[email protected]>
* Page.cs: fixed InvokeEventMethod now that Type.GetMethod does not
	return pvt methods.

svn path=/trunk/mcs/; revision=7727
2002-09-23 01:42:48 +00:00
Gonzalo Paniagua Javier b3c0ac9e01 2002-09-22 Gonzalo Paniagua Javier <[email protected]>
* System.IO/BinaryReaderTest.cs: more tests.

	* System.Security.Cryptography/AllTests.cs:
	* System.Security.Cryptography/ChangeLog:
	* System.Security.Cryptography/MD5Test.cs: added new MD5Test.cs.

	Patch from Eduardo Garc�a Cebollero ([email protected]).

svn path=/trunk/mcs/; revision=7726
2002-09-23 01:00:15 +00:00
Gonzalo Paniagua Javier 59d02c87d9 2002-09-22 Gonzalo Paniagua Javier <[email protected]>
* XmlConvert.cs: IsInvalid is now internal.
	* XmlNamespaceManager.cs: implemented RemoveNamespace
	* XmlTextReader.cs: return BaseURI and Encoding from the parser.
	* XmlTextWriter.cs: implemented WriteName and WriteNmToken.

svn path=/trunk/mcs/; revision=7725
2002-09-23 00:39:30 +00:00
Gonzalo Paniagua Javier 593854090b 2002-09-22 Gonzalo Paniagua Javier <[email protected]>
* get.c: closes bug #30814. Thanks to Zoltan Varga.

svn path=/trunk/mono/; revision=7724
2002-09-22 17:31:53 +00:00
Andrew Birkett 1a166dda7f 2002-09-22 Andrew Birkett <[email protected]>
* RijndaelManaged.cs: Added faster case for multiplication by 2 in GF(8)

svn path=/trunk/mcs/; revision=7723
2002-09-22 16:05:55 +00:00
Andrew Birkett 26e16e4f03 2002-09-22 Andrew Birkett <[email protected]>
* System.Security.Cryptography/RijndaelManagedTest.cs: BlockSize
	measured in bytes, not bits.

svn path=/trunk/mcs/; revision=7722
2002-09-22 15:28:10 +00:00
Andrew Birkett cc02964701 2002-09-22 Andrew Birkett <[email protected]>
* RijndaelManaged.cs: BlockSize now reports size in bytes.
	* ICryptoTransform.cs: Updated comments - BlockSizes are in bytes, unlike elsewhere.

svn path=/trunk/mcs/; revision=7721
2002-09-22 15:26:50 +00:00
Nick Drochak 279b42114e 2002-09-22 Nick Drochak <[email protected]>
* Parser.cs: Remove extraneous "using" that was stopping the build.

svn path=/trunk/mcs/; revision=7720
2002-09-22 14:35:04 +00:00
Martin Baulig 149657947f 2002-09-22 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Added support for reference types and strings.

svn path=/trunk/mono/; revision=7718
2002-09-22 13:46:42 +00:00
Martin Baulig 357528fd8f Removed another g_message().
svn path=/trunk/mono/; revision=7717
2002-09-22 13:45:54 +00:00
Johannes Roith 5e66030ed3 fix ximian link.
svn path=/trunk/mono/; revision=7715
2002-09-22 09:15:58 +00:00
Martin Baulig 0860aa1384 Removed this g_message().
svn path=/trunk/mono/; revision=7713
2002-09-21 23:25:29 +00:00
Martin Baulig 281f0d64b0 2002-09-22 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Started to work on the type table.

svn path=/trunk/mono/; revision=7712
2002-09-21 23:24:50 +00:00
Miguel de Icaza 447eb0ca67 2002-09-17 Asier Llano Palacios <[email protected]>
* CancelEventArgs.cs
	* CancelEventHandler.cs
	* PropertyChangedEventHandler.cs
	* IExtenderProvider.cs: Implemented

svn path=/trunk/mcs/; revision=7711
2002-09-21 21:39:37 +00:00
Miguel de Icaza e335c3c1a5 2002-09-21 Miguel de Icaza <[email protected]>
* FileStream.cs: Do not call FSync on the file.

svn path=/trunk/mcs/; revision=7710
2002-09-21 21:27:59 +00:00
Martin Baulig 062b365f91 2002-09-21 Martin Baulig <[email protected]>
* delegate.cs (Delegate.VerifyApplicability): Make this work if the
	delegate takes no arguments.

svn path=/trunk/mcs/; revision=7692
2002-09-21 18:42:24 +00:00
Piers Haken e3df4e4f28 2002-09-21 Piers Haken <[email protected]>
* XPathNavigatorEvaluateTests.cs: enable more tests, XPathException is now used properly.

svn path=/trunk/mcs/; revision=7691
2002-09-21 18:28:40 +00:00
Piers Haken e05854d185 2002-09-21 Piers Haken <[email protected]>
* XPathException: implementation
	* Expression.cs:
	* Iterator.cs:
	* Parser.jay:
	* Tokenizer.jay:
	* XPathNavigator.jay:
		use XPathException.

svn path=/trunk/mcs/; revision=7690
2002-09-21 18:26:49 +00:00
Martin Baulig 6500bbb03b 2002-09-21 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerSymbolFileTable): Use an actual typedef for this
	instead of writing a byte blob.
	(mono_debug_make_symbols): This doesn't touch the symbol tables anymore.
	(mono_debug_add_method): Incrementally add the new method to the symbol
	table.

	* exception.c (arch_handle_exception): If we have debugging support,
	call mono_debugger_update_symbol_file_table () as well.

svn path=/trunk/mono/; revision=7686
2002-09-21 17:16:34 +00:00
Martin Baulig 6f85fc7bd9 2002-09-21 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Largely reworked the symbol table format.
	The symbol table is now incrementally updated each time a new
	method is added.  We're now also using our own magic and version
	so that you don't need to recompile all your classes if the
	dynamic table changes.
	(mono_debug_update_mono_symbol_file): Removed.
	(mono_debug_symfile_add_method): New function to add a method.

svn path=/trunk/mono/; revision=7685
2002-09-21 17:14:47 +00:00
Martin Baulig 3c63374b42 2002-09-21 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 26.  Removed all the dynamic
	stuff, this library now just deals with the compiler generated symbol table.
	The dynamic stuff is private between the JIT and the debugger.

svn path=/trunk/mcs/; revision=7684
2002-09-21 17:12:30 +00:00
Matt Hunter afcfff04a2 implementing tests: XmlElementTests.TestSetAttributeNode
and XmlAttributeCollectionTest.TestAppend

svn path=/trunk/mcs/; revision=7681
2002-09-21 04:21:44 +00:00
Matt Hunter 07aae53fac implementing XmlElement.SetAttributeNode(localName, namespaceURI) and
implementing XmlAttributeCollection.Append(XmlAttribute)

svn path=/trunk/mcs/; revision=7680
2002-09-21 04:20:31 +00:00
Miguel de Icaza 73692dfb45 2002-09-20 Miguel de Icaza <[email protected]>
* constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
	from integers.

	* expression.cs: Extract the underlying type.

	* ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum

svn path=/trunk/mcs/; revision=7679
2002-09-21 04:12:05 +00:00
Adam Treat ff90b8ddf9 * Refactored some code
* Added archiver.cs

svn path=/trunk/mcs/; revision=7678
2002-09-21 03:49:26 +00:00
Adam Treat 711cd36714 * Integrated the flush methods and refactored some code.
svn path=/trunk/mcs/; revision=7677
2002-09-21 03:48:27 +00:00
Duncan Mak 7e5aeaec40 2002-09-20 Duncan Mak <[email protected]>
* data/config.in: Added reference to libxslt.

svn path=/trunk/mono/; revision=7676
2002-09-21 03:19:10 +00:00
Duncan Mak 8db33b5870 2002-09-16 Duncan Mak <[email protected]>
* Uri.cs (GetObjectData):
	(Uri): The key should be "AbsoluteUri", not "Uri".

2002-09-20  Duncan Mak  <[email protected]>

	* XslTransform.cs (Load): Implemented the  methods, not
	including the ones that deal with XPathNavigator (hopefully those
	will come later).
	(Transform): Implemented the version that saves directly to a file.
	(Save): New private method for recreating the XML in text from
	from an XmlReader

	We're now P/Invoking libxslt for doing XSLT work.

svn path=/trunk/mcs/; revision=7675
2002-09-21 03:18:17 +00:00
John Sohn 848e0d00ed added settings menu and initial configure dialog
svn path=/trunk/mcs/; revision=7674
2002-09-21 03:14:23 +00:00
Miguel de Icaza 80e1821593 2002-09-20 Miguel de Icaza <[email protected]>
* expression.cs: Extract the underlying type.

svn path=/trunk/mcs/; revision=7672
2002-09-21 00:02:02 +00:00
Miguel de Icaza e9d574a279 2002-09-20 Miguel de Icaza <[email protected]>
* ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum

svn path=/trunk/mcs/; revision=7671
2002-09-20 23:53:34 +00:00
Martin Baulig 6b24be88df 2002-09-21 Martin Baulig <[email protected]>
* Assembly.cs (MonoDebugger_GetLocalTypeFromSignature): New method to
	get the type of a local variable from its signature.  This should only
	be used by the debugger.

svn path=/trunk/mcs/; revision=7669
2002-09-20 23:41:46 +00:00
Martin Baulig 72e148a30f 2002-09-21 Martin Baulig <[email protected]>
* icall.c
	("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
	New interncall.

	* debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
	New interncall to get a method from its metadata token.

svn path=/trunk/mono/; revision=7668
2002-09-20 23:40:47 +00:00
Martin Baulig b5f6dcaa76 Ooops, fixed a typo in my last commit.
svn path=/trunk/mono/; revision=7667
2002-09-20 23:39:21 +00:00
Martin Baulig b6688165af 2002-09-21 Martin Baulig <[email protected]>
* ModuleBuilder.cs (ModuleBuilder.symbol_writer): Make this
	field internal, not private.
	(ModuleBuilder.SymWriter_DefineLocalVariable): Removed.

	* LocalBuilder.cs (LocalBuilder.SetLocalSymInfo): Use the
	ISymbolWriter's DefineLocalVariable() method instead of the
	IMonoSymbolWriter hack.

svn path=/trunk/mcs/; revision=7666
2002-09-20 23:16:47 +00:00
Martin Baulig ba422481d9 2002-09-21 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Create type table.

svn path=/trunk/mono/; revision=7664
2002-09-20 23:13:33 +00:00
Martin Baulig dda30d78db 2002-09-21 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 25.  Added information about
	local variables.

svn path=/trunk/mcs/; revision=7663
2002-09-20 23:12:48 +00:00
Adam Treat 0d05c3f3ad * Eliminate pesky carriage returns
svn path=/trunk/mcs/; revision=7662
2002-09-20 22:39:04 +00:00
Martin Baulig 12f74ca39f 2002-09-20 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.

svn path=/trunk/mono/; revision=7661
2002-09-20 22:01:55 +00:00
Martin Baulig 6a7f5875ba 2002-09-20 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 24.  Added a type index
	table.  Write the type of a local variable or a parameter as an index
	into this table.

svn path=/trunk/mcs/; revision=7660
2002-09-20 22:00:52 +00:00
Martin Baulig afd46500d4 2002-09-20 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs: Remove all the unused interfaces.

svn path=/trunk/mcs/; revision=7659
2002-09-20 21:05:41 +00:00
Miguel de Icaza 8e90ead220 Provide location informtaion
svn path=/trunk/mcs/; revision=7658
2002-09-20 20:58:19 +00:00
Miguel de Icaza 6706e60bd6 2002-09-20 Miguel de Icaza <[email protected]>
* decl.cs (FindType): Sorry about this, fixed the type lookup bug.

svn path=/trunk/mcs/; revision=7657
2002-09-20 20:47:34 +00:00
Mark Crichton 62f353dcb1 More Solaris/BSD fixes. This now allows shared handles to work on BSD
and BSD like systems.

Please test this code.  The only thing left is to fix POSIX shared threads
on Solaris...

svn path=/trunk/mono/; revision=7650
2002-09-20 17:10:02 +00:00
Martin Baulig 9a47cec765 2002-09-20 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 23, include the size
	of a variable.

svn path=/trunk/mcs/; revision=7647
2002-09-20 15:01:25 +00:00
Martin Baulig 162bc3d1f5 2002-09-20 Martin Baulig <[email protected]>
* debug.c (mono_debug_add_method): The `MonoDebugVarInfo' now includes
	the size of the variable.

svn path=/trunk/mono/; revision=7646
2002-09-20 15:00:46 +00:00
Martin Baulig bd17401c0b 2002-09-20 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 22.  Provide information
	about parameters and local variables.

svn path=/trunk/mcs/; revision=7645
2002-09-20 14:42:33 +00:00
Martin Baulig 079e9ba377 2002-09-20 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Provide information about params and locals.

svn path=/trunk/mono/; revision=7644
2002-09-20 14:41:55 +00:00
Martin Baulig 7b119ca3dd 2002-09-20 Martin Baulig <[email protected]>
* Assembly.cs (MonoDebugger_GetMethod): New method to get a MethodBase
	from its metadata token.  This should only be used by the debugger.

svn path=/trunk/mcs/; revision=7642
2002-09-20 13:38:00 +00:00
Martin Baulig 7b72546da7 2002-09-20 Martin Baulig <[email protected]>
* icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
	New interncall.

	* debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
	interncall to get a method from its metadata token.

svn path=/trunk/mono/; revision=7641
2002-09-20 13:36:05 +00:00
Paolo Molaro 14043542c4 Wed Sep 4 18:09:58 CEST 2002 Paolo Molaro <[email protected]>
* configure.in: add some needed defines to fix support of
	threads in the GC.

svn path=/trunk/mono/; revision=7640
2002-09-20 13:34:35 +00:00
Adam Treat 99dc6fbb98 * Begin the implementation of the Archive methods and extend the parser
to parse the go-mono.org/monodoc.dtd

* Added additional metadata to the data representation

svn path=/trunk/mcs/; revision=7638
2002-09-20 05:03:26 +00:00
Adam Treat 0d5c1c0dd8 * Begin the implementation of the Archive methods Sync and Flush.
* Set the FileRoot for the loaded Master.xml and allow the forms to flush to
the specified path.

svn path=/trunk/mcs/; revision=7637
2002-09-20 05:01:31 +00:00
Adam Treat ae4a470206 * Another fix to the Depth property to handle a more complex heirarchy.
svn path=/trunk/mcs/; revision=7636
2002-09-20 04:36:16 +00:00
Adam Treat ec02f3a0bc * The Depth property was not implemented correctly and the Read method did not
take the newline character into account.  The whitespace handling is very preliminary
but it is better than before, where every NON-AREA was being treated as NodeType.Text
example: <Foo name="Blah"> NON-AREA <Bar> TEXT </Bar> NON-AREA </Foo>  The text reader
now correctly performs the Depth example found here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclassdepthtopic.asp

svn path=/trunk/mcs/; revision=7635
2002-09-20 04:25:39 +00:00
Miguel de Icaza 6947f0572d 2002-09-19 Miguel de Icaza <[email protected]>
* class.cs (TypeContainer.DefineType): We can not use the nice
	PackingSize with the size set to 1 DefineType method, because it
	will not allow us to define the interfaces that the struct
	implements.

	This completes the fixing of bug 27287

	* ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
	means also structs.  This fixes part of the problem.
	(Expresion.ImplicitReferenceConversionExists): ditto.

svn path=/trunk/mcs/; revision=7633
2002-09-19 23:23:32 +00:00
Martin Baulig eb13c3c328 2002-09-20 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs: Use fullly qualified name for
	System.Diagnostics.SymbolStore.ISymbolWriter rather than `using' this
	namespace.  This allows us to use the name `ISymbolWriter' in our own
	code.

svn path=/trunk/mcs/; revision=7632
2002-09-19 22:58:38 +00:00
Martin Baulig 38cee46306 2002-09-20 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Added a few checks for method->header
	being non-NULL.  This should never happen, but for the moment
	let's use a g_warning() rather than a g_assert().

svn path=/trunk/mono/; revision=7631
2002-09-19 22:26:53 +00:00
Miguel de Icaza b007341324 2002-09-19 Miguel de Icaza <[email protected]>
* decl.cs (DeclSparce.ResolveType): Only report the type-not-found
	error if there were no errors reported during the type lookup
	process, to avoid duplicates or redundant errors.  Without this
	you would get an ambiguous errors plus a type not found.  We have
	beaten the user enough with the first error.

	(DeclSparce.FindType): Emit a warning if we have an ambiguous
	reference.

	* ecore.cs (SimpleName.DoResolveType): If an error is emitted
	during the resolution process, stop the lookup, this avoids
	repeated error reports (same error twice).

	* rootcontext.cs: Emit a warning if we have an ambiguous reference.

svn path=/trunk/mcs/; revision=7630
2002-09-19 22:25:47 +00:00
Miguel de Icaza 045eaf1f77 Add new test
svn path=/trunk/mcs/; revision=7629
2002-09-19 22:08:21 +00:00
Miguel de Icaza 14d6027ca5 Improve test
svn path=/trunk/mcs/; revision=7628
2002-09-19 21:48:10 +00:00
Miguel de Icaza 3ce9a0001a 2002-09-19 Miguel de Icaza <[email protected]>
* typemanager.cs (LookupType): Redo the type lookup code to match
	the needs of System.Reflection.

	The issue is that System.Reflection requires references to nested
	types to begin with a "+" sign instead of a dot.  So toplevel
	types look like: "NameSpace.TopLevelClass", and nested ones look
	like "Namespace.TopLevelClass+Nested", with arbitrary nesting
	levels.

svn path=/trunk/mcs/; revision=7627
2002-09-19 21:42:00 +00:00
Andrew Birkett 79f8741a6f * System.Security.Cryptography/RijndaelManagedTest.cs: New test
* System.Security.Cryptography/AllTests.cs: Added RijndaelManagedTest
	* corlib_linux_test.args: Added RijndaelManagedTest

svn path=/trunk/mcs/; revision=7626
2002-09-19 19:32:22 +00:00
Andrew Birkett df0838678e * Rijndael.cs: Create() now gives you a RijndaelManaged object
* RijndaelManaged.cs: Added dummy GenerateKey until we have a proper RNG.
* SymmetricAlgorithm.cs: Updated comments

svn path=/trunk/mcs/; revision=7625
2002-09-19 19:31:14 +00:00
Martin Baulig dba32d8363 2002-09-19 Martin Baulig <[email protected]>
* test-154.cs: Added testcase from bug #30487.

svn path=/trunk/mcs/; revision=7624
2002-09-19 18:53:06 +00:00
Martin Baulig e9e273a33b 2002-09-19 Martin Baulig <[email protected]>
* codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
	says that a method always returns or always throws an exception,
	don't report the CS0161.

	* statement.cs (FlowBranching.UsageVector.MergeChildren): Always
	set `Returns = new_returns'.

svn path=/trunk/mcs/; revision=7623
2002-09-19 18:52:46 +00:00
Mark Crichton 3eedd84b18 Beginning to add support for Solaris. Tested on Solaris 9.
Shared handles are still not working, will be addressed soon.

Trampoline code still broken, expect a rewrite.

svn path=/trunk/mono/; revision=7622
2002-09-19 18:30:56 +00:00
Duncan Mak 0a7663f9d5 2002-09-19 Duncan Mak <[email protected]>
* Array.cs (CopyTo): Revert back to 1.40, this is stopping
	I18N/Common from building right now.

svn path=/trunk/mcs/; revision=7621
2002-09-19 17:50:33 +00:00
Nick Drochak 999104f3d0 2002-09-19 Nick Drochak <[email protected]>
* StreamReaderTest.cs: Pinpoint error closing streams

svn path=/trunk/mcs/; revision=7620
2002-09-19 14:11:54 +00:00
Nick Drochak 9736241ce6 2002-09-19 Nick Drochak <[email protected]>
* ArrayTest.cs: Report errors with CopyTo().

svn path=/trunk/mcs/; revision=7619
2002-09-19 14:10:02 +00:00
Nick Drochak 0bcab3f27c 2002-09-19 Nick Drochak <[email protected]>
* Array.cs (CopyTo): Account for Object type and base (primitive) types
	* Type.cs (IsAssignableFrom): return false for a null parameter

svn path=/trunk/mcs/; revision=7618
2002-09-19 14:04:42 +00:00
Nick Drochak c556617566 2002-09-19 Nick Drochak <[email protected]>
* Array.cs (CopyTo): Check that source type can be cast automatically
	to the destination type.

svn path=/trunk/mcs/; revision=7617
2002-09-19 12:11:59 +00:00
Nick Drochak 6d07086de5 2002-09-19 Nick Drochak <[email protected]>
* ArrayTest.cs: Can check for exception throw now on CopyTo(). Re-
	enable test.

svn path=/trunk/mcs/; revision=7616
2002-09-19 12:05:06 +00:00
Martin Baulig e9f6f3b943 2002-09-19 Martin Baulig <[email protected]>
* expression.cs (MemberAccess.ResolveMemberAccess): When resolving
	to an enum constant, check for a CS0176.

svn path=/trunk/mcs/; revision=7615
2002-09-19 11:49:22 +00:00
Dietmar Maurer d8b7637801 2002-09-18 Dietmar Maurer <[email protected]>
* linear-scan.c (mono_analyze_liveness): we can save 30% of needed
	iterations if we visit blocks in reverse order.

svn path=/trunk/mono/; revision=7614
2002-09-19 09:17:09 +00:00
Gaurav Vaish c55b3d8237 2002-09-16 Gaurav Vaish <[email protected]>
* AdRotatorDesigner.cs    : GetDesignTimeHtml() - Removed "MonoTODO"
* ButtonDesigner.cs       : Completed.
* CalendarAutoFormatDialog.cs
                          : Initial implementation.
  	* CalendarDesigner.cs     : Initial implementation.
* CheckBoxDesigner.cs     : Completed.
* HyperLinkDesigner.cs    : Almost completed. See "FIXME".
* LabelDesigner.cs        : Completed.
* LinkButtonDesigner.cs   : Completed.
* TableCellsCollectionEditor.cs
                          : Completed
  	* TableDesigner.cs        : Initial implementation.

2002-09-16     Gaurav Vaish <[email protected]>

* TODO                    : TODO Updates. Found some undocumented
                            classes.

svn path=/trunk/mcs/; revision=7613
2002-09-19 08:25:02 +00:00
Gonzalo Paniagua Javier 7b527404dd 2002-09-19 Gonzalo Paniagua Javier <[email protected]>
* XmlTextReader.cs: fixed #30239.
	* XmlTextWriter.cs: fixed #30240.

svn path=/trunk/mcs/; revision=7612
2002-09-19 07:55:56 +00:00
Gonzalo Paniagua Javier f9fcc1d75e 2002-09-19 Gonzalo Paniagua Javier <[email protected]>
* XmlCustomFormatter.cs: finished.
	* XmlSerializationReader.cs: implemented some more methods.

svn path=/trunk/mcs/; revision=7611
2002-09-19 07:16:01 +00:00
Gonzalo Paniagua Javier 7faec3f1be 2002-09-19 Gonzalo Paniagua Javier <[email protected]>
* XmlConvert.cs: finished implementation.

svn path=/trunk/mcs/; revision=7610
2002-09-19 07:11:24 +00:00
Nick Drochak f6e3aaa0b1 Forgot one...
svn path=/trunk/mcs/; revision=7609
2002-09-19 06:59:15 +00:00
Nick Drochak e1a0fb9915 2002-09-19 Nick Drochak <[email protected]>
* TraceImpl.cs: Remove debug prints

svn path=/trunk/mcs/; revision=7608
2002-09-19 06:56:12 +00:00
Nick Drochak 7a11028c33 2002-09-19 Nick Drochak <[email protected]>
* TraceListenerCollection.cs: Set Indet level and size to default
	values.  The values from TraceImpl might have been changed.

svn path=/trunk/mcs/; revision=7607
2002-09-19 06:48:05 +00:00
Nick Drochak 4d00f22660 2002-09-19 Nick Drochak <[email protected]>
* TraceTest.cs: Clear list of listeners before each test.

svn path=/trunk/mcs/; revision=7606
2002-09-19 06:47:14 +00:00
Miguel de Icaza 021524678e Update index
svn path=/trunk/mono/; revision=7605
2002-09-19 06:12:26 +00:00
Miguel de Icaza f22633ce5f 2002-09-18 Miguel de Icaza <[email protected]>
* class.cs (TypeContainer.CheckPairedOperators): Now we check
	for operators that must be in pairs and report errors.

svn path=/trunk/mcs/; revision=7603
2002-09-19 01:17:25 +00:00
Martin Baulig e58b64a8f7 2002-09-19 Martin Baulig <[email protected]>
* debug-mono-symfile.c (read_string, write_string): Reflect latest
	changes in the symbol file format.

svn path=/trunk/mono/; revision=7598
2002-09-19 00:40:39 +00:00
Miguel de Icaza c1728ca2d8 2002-09-18 Miguel de Icaza <[email protected]>
* ecore.cs (SimpleName.DoResolveType): During the initial type
	resolution process, when we define types recursively, we must
	check first for types in our current scope before we perform
	lookups in the enclosing scopes.

svn path=/trunk/mcs/; revision=7596
2002-09-18 23:47:26 +00:00
Miguel de Icaza 31891eac8e 2002-09-18 Miguel de Icaza <[email protected]>
* expression.cs (MakeByteBlob): Handle Decimal blobs.

svn path=/trunk/mcs/; revision=7595
2002-09-18 22:46:26 +00:00
Gonzalo Paniagua Javier 709edea6bc Make it build on unix
svn path=/trunk/mcs/; revision=7587
2002-09-18 15:20:59 +00:00
Martin Baulig f7fa3e9881 2002-09-18 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Set version number to 21.

svn path=/trunk/mono/; revision=7586
2002-09-18 14:00:52 +00:00
Martin Baulig 8125abef6b 2002-09-18 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 21.  Encode the source file
	as a 4-byte length field followed by the UTF8 encoded string.

svn path=/trunk/mcs/; revision=7585
2002-09-18 13:59:31 +00:00
Martin Baulig 0c2ce64528 2002-09-18 Martin Baulig <[email protected]>
* IMonoBinaryReader.cs: New interface.

	* MonoSymbolTable.cs: Use IMonoBinaryReader instead of binary reader.

svn path=/trunk/mcs/; revision=7582
2002-09-18 13:13:26 +00:00
Dick Porter 4786e2ce84 2002-09-18 Dick Porter <[email protected]>
* threads.c (mon_new): Use the GC_MALLOC macro to hide differences
	on netbsd.  Fixes bug 30051.

svn path=/trunk/mono/; revision=7579
2002-09-18 12:04:02 +00:00
Gonzalo Paniagua Javier aa0acdf4b2 2002-09-18 Gonzalo Paniagua Javier <[email protected]>
* XmlSerializationReader.cs: implemented a few methods.

	* XmlAnyElementAttribute.cs:
	* XmlArrayAttribute.cs:
	* XmlChoiceIdentifierAttribute.cs:
	* XmlElementAttribute.cs:
	* XmlMemberMapping.cs:
	* XmlMembersMapping.cs: class status based fixes.

svn path=/trunk/mcs/; revision=7578
2002-09-18 07:43:41 +00:00
Miguel de Icaza b8f3703cd2 2002-09-18 Miguel de Icaza <[email protected]>
* expression.cs (Invocation.VerifyArgumentsCompat): Call
	TypeManager.TypeToCoreType on the parameter_type.GetElementType.
	I thought we were supposed to always call this, but there are a
	few places in the code where we dont do it.

svn path=/trunk/mcs/; revision=7577
2002-09-18 06:57:32 +00:00
Adam Treat 9f4c5d1676 * Added the QProgressDialog and extensions to the form widgets
svn path=/trunk/mcs/; revision=7576
2002-09-18 06:41:05 +00:00
Gonzalo Paniagua Javier f13b9706bf implemented DefaultBinder and GetDefaultMembers
svn path=/trunk/mcs/; revision=7575
2002-09-18 05:29:37 +00:00
Gonzalo Paniagua Javier 6918735598 2002-09-18 Gonzalo Paniagua Javier <[email protected]>
* System.Xml/XmlDocument.cs:
	* System.Xml/XmlTextWriter.cs:
	* System.Xml/XmlValidatingReader.cs:
	* System.Xml.Schema/XmlSchemaCollection.cs:
	* System.Xml.Schema/XmlSchemaException.cs:
	* System.Xml.Schema/XmlSchemaObjectCollection.cs:
	* System.Xml.Serialization/SoapTypeAttribute.cs:
	* System.Xml.Serialization/XmlAttributes.cs:
	* System.Xml.Serialization/XmlMapping.cs:
	* System.Xml.Serialization/XmlReflectionImporter.cs:
	* System.Xml.Serialization/XmlSerializer.cs:
	* System.Xml.Serialization/XmlTextAttribute.cs:
	* System.Xml.Xsl/XslTransform.cs: misc. fixed and implementation.

	* System.Xml.Serialization/SchemaTypes.cs: New file.
	* System.Xml.Serialization/TypeData.cs: New file.
	* System.Xml.Serialization/TypeTranslator.cs: New file.

svn path=/trunk/mcs/; revision=7574
2002-09-18 05:21:10 +00:00
Kral Ferch a98017c882 xpath tests for string(), concat(), starts-with(), and contains().
svn path=/trunk/mcs/; revision=7572
2002-09-18 04:48:32 +00:00
Gonzalo Paniagua Javier 68f4f02905 2002-09-18 Gonzalo Paniagua Javier <[email protected]>
* Type.cs: implemented IsAssignableFrom.

svn path=/trunk/mcs/; revision=7571
2002-09-18 04:05:07 +00:00
Adam Treat 16e0c171f6 * Implemented some nice sorting methods
svn path=/trunk/mcs/; revision=7570
2002-09-18 03:08:33 +00:00
Miguel de Icaza ca050ddc0d Flushety Flush
svn path=/trunk/mono/; revision=7569
2002-09-17 22:59:13 +00:00
Gonzalo Paniagua Javier da120aecba Actually build PEToolkit on unix
svn path=/trunk/mcs/; revision=7568
2002-09-17 22:52:29 +00:00
Miguel de Icaza ffe1660a03 oops
svn path=/trunk/mcs/; revision=7567
2002-09-17 21:47:45 +00:00
Miguel de Icaza 23b3aa1be5 2002-09-17 Miguel de Icaza <[email protected]>
* driver.cs: Add support in -linkres and -resource to specify the
	name of the identifier.

svn path=/trunk/mcs/; revision=7566
2002-09-17 21:24:13 +00:00
Miguel de Icaza 8928220dab Update man page
svn path=/trunk/mono/; revision=7565
2002-09-17 21:23:51 +00:00
Miguel de Icaza 76f71ea43b Add decimal to MakeByteBlob
svn path=/trunk/mcs/; revision=7564
2002-09-17 18:16:08 +00:00
Nick Drochak 9f997ad5cd 2002-09-17 Nick Drochak <[email protected]>
* UriTest.cs: Fixed some path separator issues for the tests running on
	linux.

	* TraceTest.cs: Remove extraneous Console.WriteLine().

	* ServicePointManagerTest.cs: Convert Console.WriteLine() into a Fail()

	* TraceImpl.cs: Add some debug to find the error.  Still working on
	this one.

svn path=/trunk/mcs/; revision=7563
2002-09-17 15:05:21 +00:00
Miguel de Icaza 7e6e368b3f I got mixed up
svn path=/trunk/mono/; revision=7562
2002-09-17 14:49:51 +00:00
Adam Treat abcf740ff1 * Fixed CreateInstance to honor the bflags argument.
svn path=/trunk/mcs/; revision=7561
2002-09-17 14:44:11 +00:00
Miguel de Icaza bebcc60989 Apply patch to Brushes
svn path=/trunk/mcs/; revision=7560
2002-09-17 14:38:02 +00:00
Nick Drochak c1b04d89b3 2002-09-17 Nick Drochak <[email protected]>
* System_test.build: Oops.  Don't build the old standalone exe either.

svn path=/trunk/mcs/; revision=7559
2002-09-17 14:00:26 +00:00
Nick Drochak 93ed6ca92a 2002-09-17 Nick Drochak <[email protected]>
* TheTests.cs: Removed.  Not needed anymore since NUnit runs on linux.
	* Syste_test.build: Build a linux version of the unit tests (just a
	different linking of dll's)

svn path=/trunk/mcs/; revision=7558
2002-09-17 13:51:33 +00:00
Adam Treat d17799bf9a * The rest of the Master.xml files for the assemblies. Note: we're still missing
assemblies such as System.DirectoryServices.dll

svn path=/trunk/mcs/; revision=7557
2002-09-17 06:31:43 +00:00
Gonzalo Paniagua Javier 8421f2e98c 2002-09-17 Gonzalo Paniagua Javier <[email protected]>
* reflection.c:
	(set_version_from_string): little fix.

svn path=/trunk/mono/; revision=7553
2002-09-17 05:00:04 +00:00
Gaurav Vaish e4667928cb 2002-09-16 Gaurav Vaish <[email protected]>
* TODO                    : TODO Updates. Found some undocumented
                            classes.

svn path=/trunk/mcs/; revision=7552
2002-09-17 04:50:56 +00:00
Miguel de Icaza 7d9658d15a 2002-09-16 Miguel de Icaza <[email protected]>
* ecore.cs (StandardConversionExists): Sync with the conversion
	code: allow anything-* to void* conversions.

svn path=/trunk/mcs/; revision=7551
2002-09-17 04:34:26 +00:00
Gonzalo Paniagua Javier f8a4aeba3f added list file and 'disabled' build with mcs
svn path=/trunk/mcs/; revision=7550
2002-09-17 03:00:43 +00:00
Miguel de Icaza bbec6a7fb9 Add nant file
svn path=/trunk/mcs/; revision=7549
2002-09-17 02:29:52 +00:00
Miguel de Icaza 695ddcd816 Update news
svn path=/trunk/mono/; revision=7548
2002-09-17 02:24:09 +00:00
Miguel de Icaza 03d3f9b784 2002-9-15 Asier Llano <[email protected]>
* Fixes	the enum values in the following enums
	* ContentAlignment.cs:
	* FontStyle.cs:
	* GraphicsUnit.cs:
	* KnownColor.cs:
	* RotateFlipType.cs:
	* StringAligment.cs:
	* StringDigitSubstitute.cs:
	* StringFormatFlags.cs:
	* StringTrimming.cs:
	* StringUnit.cs:
	* SolidBrush.cs: Easy implementation
	* Brushes.cs:    Implementation based on SolidBrush and Color class.
        * Brush.cs:      Fixes based on the status web).
	* CharacterRange.cs: Implemented the missing Lenth property.

svn path=/trunk/mcs/; revision=7547
2002-09-17 02:15:18 +00:00
Adam Treat 74467c031a * Update on the mono documentation tools.
svn path=/trunk/mono/; revision=7546
2002-09-17 02:10:46 +00:00
Miguel de Icaza 3eeddbd69d Add makefile.gnu
svn path=/trunk/mcs/; revision=7545
2002-09-17 01:59:21 +00:00
Miguel de Icaza 3b8e6c5823 Add Sergey Panov's ILASM to the build, waiting for an update
svn path=/trunk/mcs/; revision=7544
2002-09-17 01:44:02 +00:00
Miguel de Icaza db76d32644 Add Mono.PEToolkit to the build
svn path=/trunk/mcs/; revision=7543
2002-09-17 01:19:47 +00:00
Miguel de Icaza 9b1aad2b6f Add Sergey Chaban's Mono.PEToolkit
svn path=/trunk/mcs/; revision=7542
2002-09-17 01:18:57 +00:00
Adam Treat 501655c80d * Images for MonoDoc
svn path=/trunk/mcs/; revision=7541
2002-09-17 01:02:37 +00:00
Adam Treat be956b47ec * Hurray! The mono documentation editor :-)
svn path=/trunk/mcs/; revision=7540
2002-09-17 01:01:51 +00:00
Miguel de Icaza 6407333030 Remove debugging message
svn path=/trunk/mcs/; revision=7539
2002-09-17 01:00:37 +00:00
Adam Treat ffb41f4845 * This is the tool used to generate the Master.xml files on Windows
svn path=/trunk/mcs/; revision=7538
2002-09-17 01:00:28 +00:00
Miguel de Icaza 25f808006a 2002-09-16 Miguel de Icaza <[email protected]>
* ecore.cs (FindMostSpecificSource): Use an Expression argument
	instead of a Type, because we might be handed over a Literal which
	gets a few more implicit conversions that plain types do not.  So
	this information was being lost.

	Also, we drop the temporary type-holder expression when not
	required.

svn path=/trunk/mcs/; revision=7537
2002-09-17 01:00:02 +00:00
Adam Treat 16e839a58d * This is/will be the shared lib for MonoDoc
svn path=/trunk/mcs/; revision=7536
2002-09-17 00:59:18 +00:00
Adam Treat c9d6bbeb43 * Initial setup for MonoDoc
svn path=/trunk/mcs/; revision=7535
2002-09-17 00:57:08 +00:00
Adam Treat 1e60974b30 * More cleanup.
svn path=/trunk/mcs/; revision=7534
2002-09-17 00:52:28 +00:00
Adam Treat 0bc22702d7 * More cleanup
svn path=/trunk/mcs/; revision=7533
2002-09-17 00:44:36 +00:00
Adam Treat b5cd8474f8 * More cleaning up.
svn path=/trunk/mcs/; revision=7532
2002-09-17 00:42:31 +00:00
Adam Treat c50d7b5903 * Removed John's tools. We are using a different method.
svn path=/trunk/mcs/; revision=7531
2002-09-17 00:36:05 +00:00
Miguel de Icaza 2d9580e265 2002-09-17 Martin Baulig <[email protected]>
* class.cs (PropertyBase.CheckBase): Don't check the base class if
	this is an explicit interface implementation.

svn path=/trunk/mcs/; revision=7530
2002-09-17 00:29:10 +00:00
Miguel de Icaza 685ae9720b 2002-09-16 Miguel de Icaza <[email protected]>
* TextWriter.cs (Null): The Null field should be an instance of a
	TextWriter class that does nothing, so it is an instance of the
	NullTextWriter class.

svn path=/trunk/mcs/; revision=7529
2002-09-16 23:45:37 +00:00
Martin Baulig f6d17c09aa 2002-09-17 Martin Baulig <[email protected]>
* class.cs (PropertyBase.CheckBase): Don't check the base class if
	this is an explicit interface implementation.

svn path=/trunk/mcs/; revision=7528
2002-09-16 22:59:40 +00:00
Martin Baulig 59a19aba9a 2002-09-17 Martin Baulig <[email protected]>
* test-148.cs: Added testcase for base indexers.

svn path=/trunk/mcs/; revision=7527
2002-09-16 22:14:48 +00:00
Martin Baulig 6914d4218b 2002-09-17 Martin Baulig <[email protected]>
* class.cs (PropertyBase.CheckBase): Make this work for indexers with
	different `IndexerName' attributes.

	* expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
	(IndexerAccess): Added special protected ctor for BaseIndexerAccess and
	virtual CommonResolve().

svn path=/trunk/mcs/; revision=7526
2002-09-16 22:13:52 +00:00
Chris Toshok 9749a97dc5 initial import
svn path=/trunk/mcs/; revision=7525
2002-09-16 21:26:14 +00:00
Miguel de Icaza 132cd42b52 Small temporary fix, Lupus will fix right
svn path=/trunk/mono/; revision=7524
2002-09-16 21:08:47 +00:00
Miguel de Icaza 2bfd7fce53 2002-09-16 Miguel de Icaza <[email protected]>
* SocketFlags.cs: Add missing enumeration.

	* UdpClient.cs: Make Dispose private.

svn path=/trunk/mcs/; revision=7523
2002-09-16 19:31:26 +00:00
Miguel de Icaza 1fb1efbead 2002-09-16 Miguel de Icaza <[email protected]>
* Uri.cs: Implemented a few of the protected methods.

svn path=/trunk/mcs/; revision=7522
2002-09-16 19:25:22 +00:00
Miguel de Icaza 52dfba4436 Add newlines
svn path=/trunk/mono/; revision=7521
2002-09-16 18:54:28 +00:00
Miguel de Icaza 392d8a86c0 2002-09-16 Miguel de Icaza <[email protected]>
* statement.cs (Foreach.Resolve): Indexers are just like variables
	or PropertyAccesses.

svn path=/trunk/mcs/; revision=7520
2002-09-16 18:46:48 +00:00
Miguel de Icaza a1af8aab94 Another place where we did not track correctly the line
svn path=/trunk/mcs/; revision=7519
2002-09-16 18:38:07 +00:00
Paolo Molaro d44b07c77a Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <[email protected]>
* monosn.c, Makefile.am: added strong name utility.
	* reflection.h, reflection.c: implemented delayed signing,
	locale, version and hash id assembly attributes.

svn path=/trunk/mono/; revision=7515
2002-09-16 17:07:44 +00:00
Paolo Molaro ec10d849ad Mon Sep 16 19:02:58 CEST 2002 Paolo Molaro <[email protected]>
* AssemblyBuilder.c: special case some custom attributes.

svn path=/trunk/mcs/; revision=7514
2002-09-16 17:07:27 +00:00
Paolo Molaro 1328a6f481 Mon Sep 16 18:49:55 CEST 2002 Paolo Molaro <[email protected]>
* main.c, get.c, dump.c: updates for changes in libmetadata.

svn path=/trunk/mono/; revision=7513
2002-09-16 16:57:36 +00:00
Paolo Molaro 3df5349721 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <[email protected]>
* loader.c, metadata.c: load param attributes in signatures.

svn path=/trunk/mono/; revision=7512
2002-09-16 16:57:21 +00:00
Miguel de Icaza 5d9454bbbd 2002-09-16 Miguel de Icaza <[email protected]>
* cs-tokenizer.cs (consume_string): Track line numbers and columns
	inside quoted strings, we were not doing this before.

svn path=/trunk/mcs/; revision=7510
2002-09-16 15:37:20 +00:00
Martin Baulig aa086e723d Make this compile.
svn path=/trunk/mcs/; revision=7509
2002-09-16 14:57:47 +00:00
Gaurav Vaish 4c4187ac70 2002-09-16 Gaurav Vaish <[email protected]>
* AdRotatorDesigner.cs    : Damn those typo errors.

svn path=/trunk/mcs/; revision=7505
2002-09-16 13:03:27 +00:00
Gaurav Vaish 18bcfe421b 2002-09-16 Gaurav Vaish <[email protected]>
* System.Design.build  : Excludes the System.Web.UI.Design.WebControls namespace

svn path=/trunk/mcs/; revision=7504
2002-09-16 12:58:31 +00:00
Gaurav Vaish 01e83c57f2 2002-09-16 Gaurav Vaish <[email protected]>
* .cvsignore   : Now ignores more files

svn path=/trunk/mcs/; revision=7503
2002-09-16 12:56:49 +00:00
Gaurav Vaish 115a1bc919 2002-09-16 Gaurav Vaish <[email protected]>
* System.Design.build  : Project name is "System.Design"

svn path=/trunk/mcs/; revision=7502
2002-09-16 12:47:59 +00:00
Gaurav Vaish e8824ac3e4 2002-09-16 Gaurav Vaish <[email protected]>
* AdRotatorDesigner.cs    : Completed.

svn path=/trunk/mcs/; revision=7501
2002-09-16 12:46:47 +00:00
Gaurav Vaish ca3c45f076 2002-09-16 Gaurav Vaish <[email protected]>
* System.Design.build : Added the build file

svn path=/trunk/mcs/; revision=7500
2002-09-16 12:44:46 +00:00
Gaurav Vaish f2bce6f4ce 2002-09-16 Gaurav Vaish <[email protected]>
* AdRotatorDesigner.cs    : Initial implementation.
* TODOAttribute.cs        : The TODO-Attribute class.
* TODO                    : Added file
* ChangeLog               : Added file

svn path=/trunk/mcs/; revision=7499
2002-09-16 12:25:16 +00:00
Martin Baulig e3a5c81cda 2002-09-16 Martin Baulig <[email protected]>
* ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
	resolve it.  This is needed for the definite assignment check of the
	instance expression, fixes bug #29846.
	(PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.

svn path=/trunk/mcs/; revision=7498
2002-09-16 11:55:55 +00:00
Gaurav Vaish 5b96bba155 2002-09-16 Gaurav Vaish <[email protected]>
* System.Web.UI.Design.WebControls : Added directory

svn path=/trunk/mcs/; revision=7497
2002-09-16 11:37:33 +00:00
Martin Baulig 36cbf13e9b 2002-09-16 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Added string table with all method names.

svn path=/trunk/mono/; revision=7495
2002-09-16 11:18:26 +00:00
Martin Baulig 2ef5ab765d 2002-09-16 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 20.

svn path=/trunk/mcs/; revision=7494
2002-09-16 11:16:30 +00:00
John Sohn 1d5f157767 * Control.cs:
* ScrollableControl.cs
        * Form.cs: added Win32 implementation to more methods and properties
        * MessageBox.cs: fixed typo
        * makefile: now using pkg-config for including and linking glib

svn path=/trunk/mcs/; revision=7492
2002-09-16 06:09:09 +00:00
Nick Drochak b358c5c6ba 2002-09-16 Nick Drochak <[email protected]>
* MemoryStream.cs (Close): Don't throw an exception if the stream
	is already closed.

svn path=/trunk/mcs/; revision=7491
2002-09-16 04:38:41 +00:00
Nick Drochak 826216fc0a 2002-09-16 Nick Drochak <[email protected]>
* PrivateFontCollection.cs: Fix build error.  Cannot put ComVisible on
	constructors.

svn path=/trunk/mcs/; revision=7490
2002-09-16 04:11:03 +00:00
Nick Drochak 999e715866 2002-09-16 Nick Drochak <[email protected]>
* parameter.cs: Fix compile error.  Cannot reference static member
	from an instance object.  Is this an mcs bug?

svn path=/trunk/mcs/; revision=7489
2002-09-16 04:00:24 +00:00
Johannes Roith eba68d5a04 use correct EventHandlers
svn path=/trunk/mcs/; revision=7488
2002-09-15 22:04:06 +00:00
Johannes Roith a7586e9345 throw NotImplemented Exeption()
svn path=/trunk/mcs/; revision=7487
2002-09-15 21:36:21 +00:00
Johannes Roith 8099daa3f3 add TODOAttribute.cs
svn path=/trunk/mcs/; revision=7486
2002-09-15 21:34:40 +00:00
Johannes Roith 2569eb1b80 small fix.
svn path=/trunk/mcs/; revision=7480
2002-09-15 19:20:46 +00:00
Duncan Mak d1eb94eb67 2002-09-15 Duncan Mak <[email protected]>
* FileSystemWatcher.cs (FileSystemWatcher): Fixed the null-param
	constructor.

svn path=/trunk/mcs/; revision=7479
2002-09-15 18:46:41 +00:00
Andrew Birkett d554416afa 2002-09-15 Andrew Birkett <[email protected]>
* RijndaelManaged.cs: Added support for CBC-mode, PKCS7/Zero padding.
	* SymmetricAlgorithm.cs: IV size must match block size, not key size.
	  Key property now sets KeySizeValue correctly in bits.

svn path=/trunk/mcs/; revision=7477
2002-09-15 17:48:42 +00:00
Johannes Roith 8cfefa5129 initial import
svn path=/trunk/mcs/; revision=7476
2002-09-15 16:17:22 +00:00
Andrew Birkett 9819ad6367 2002-09-15 Andrew Birkett <[email protected]>
* man/mcs.1: --probe is now --expect-error.

svn path=/trunk/mono/; revision=7475
2002-09-15 16:13:31 +00:00
Miguel de Icaza e148821cdd 2002-09-15 Miguel de Icaza <[email protected]>
* FileStream.cs (Dispose): Call FlushBuffer(), and not Flush, as
	Flush calls fsync().

	The API docs show no explicit mention that Flush() should even do
	an fsync, I am thinking that we should drop that from the
	runtime.

This significantly improves the thumbnail creation in mPhoto

svn path=/trunk/mcs/; revision=7473
2002-09-15 06:28:54 +00:00
Gonzalo Paniagua Javier 3fcb6699a2 2002-09-15 Gonzalo Paniagua Javier <[email protected]>
* XmlTextReader.cs: line and position begin with 1.

svn path=/trunk/mcs/; revision=7472
2002-09-15 03:43:45 +00:00
Miguel de Icaza d45d3ca5cd Spelling fixes
svn path=/trunk/mono/; revision=7468
2002-09-14 20:32:36 +00:00
Miguel de Icaza ec9cd9342d Update Winforms information
svn path=/trunk/mono/; revision=7467
2002-09-14 20:15:29 +00:00
Martin Baulig f77e88e224 2002-09-14 Martin Baulig <[email protected]>
* decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
	multiple times.  Fixes bug #30295, added test-166.cs.

svn path=/trunk/mcs/; revision=7464
2002-09-14 16:57:29 +00:00
Martin Baulig 2e6da6116b 2002-09-14 Martin Baulig <[email protected]>
* test-166.cs: New test.

svn path=/trunk/mcs/; revision=7463
2002-09-14 16:53:16 +00:00
Martin Baulig 7ee74a2c67 2002-09-14 Martin Baulig <[email protected]>
* verify-4.cs: Added testcase from bug #29857.

svn path=/trunk/mcs/; revision=7462
2002-09-14 16:08:48 +00:00
Martin Baulig 5f2723750f 2002-09-14 Martin Baulig <[email protected]>
* statement.cs (Block.Emit): Don't emit unreachable code.
	(Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
	`break' statements.
	(Goto.Emit, Continue.Emit): Set ec.Breaks = true.

svn path=/trunk/mcs/; revision=7461
2002-09-14 15:31:44 +00:00
Piers Haken 901e27abde 2002-09-12 Piers Haken <[email protected]>
* XPathNavigatorEvaluateTests.cs: enable string() tests.

svn path=/trunk/mcs/; revision=7460
2002-09-14 14:24:44 +00:00
Piers Haken 096cca20dc 2002-09-14 Piers Haken <[email protected]>
* */makefile.gnu:
		use $(topdir)
		build nunit into $(topdir)/class/lib

svn path=/trunk/mcs/; revision=7459
2002-09-14 14:14:40 +00:00
Piers Haken 94280409f0 2003-09-14 Piers Haken <[email protected]>
* PrivateFontCollection.cs: import interop for ComVisible attribute

svn path=/trunk/mcs/; revision=7458
2002-09-14 14:07:54 +00:00
Martin Baulig ef71ae0b4c 2002-09-14 Martin Baulig <[email protected]>
* parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
	is set.

svn path=/trunk/mcs/; revision=7457
2002-09-14 13:19:57 +00:00
Martin Baulig e4db77f4fb 2002-09-14 Martin Baulig <[email protected]>
* typemanager.cs (TypeManager.IsNestedChildOf): This must return false
	if `type == parent' since in this case `type.IsSubclassOf (parent)' will
	be false on the ms runtime.

svn path=/trunk/mcs/; revision=7456
2002-09-14 12:02:43 +00:00
Martin Baulig b50d9debff 2002-09-12 Martin Baulig <[email protected]>
* test-40.cs: Removed the syntax errors from this test.

svn path=/trunk/mcs/; revision=7455
2002-09-14 11:47:43 +00:00
Martin Baulig e95210cc26 2002-09-14 Martin Baulig <[email protected]>
* MonoSymbolWriter.cs, IMonoSymbolWriter.cs, MonoSymbolTableWriter.cs:
	Make all classes and interfaces which don't need to be public internal.

svn path=/trunk/mcs/; revision=7454
2002-09-14 11:37:57 +00:00
Martin Baulig 7a50edd0f8 Ooops, make this build.
svn path=/trunk/mcs/; revision=7450
2002-09-14 00:27:48 +00:00
Martin Baulig 73ef4bfacc 2002-09-14 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoSymbolFile): Added method range table for
	fast method lookup.

svn path=/trunk/mono/; revision=7449
2002-09-14 00:10:54 +00:00
Martin Baulig 2db249b6c6 2002-09-11 Martin Baulig <[email protected]>
* gc.c: Call GC_unregister_disappearing_link() on all links when
	finalizing them, this is necessary to aviod a crash in boehm's
	finalize handler.

svn path=/trunk/mono/; revision=7448
2002-09-14 00:06:40 +00:00
Martin Baulig f0a3f6ff0c 2002-09-14 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Use only CLS-compliant types here, bumped version
	number to 19.

	* MonoSymbolTableReader.cs: Removed, this is now in the debugger.

svn path=/trunk/mcs/; revision=7447
2002-09-14 00:05:28 +00:00
Rafael Teixeira dc405bc445 ArgumentProcessorAttribute added
svn path=/trunk/mcs/; revision=7445
2002-09-13 23:08:32 +00:00
Rafael Teixeira 432d688ab2 2002-08-31 Rafael Teixeira <[email protected]>
* merged many sources from mcs/mcs, to resync

svn path=/trunk/mcs/; revision=7444
2002-09-13 23:05:34 +00:00
Gonzalo Paniagua Javier 56e0f5c928 Added new stub
svn path=/trunk/mcs/; revision=7443
2002-09-13 21:27:51 +00:00
Gonzalo Paniagua Javier 0bfa6eba80 2002-09-13 Gonzalo Paniagua Javier <[email protected]>
* CodeIdentifiers.cs:
	* XmlSchemaExporter.cs:
	* XmlSchemaImporter.cs:
	* XmlSchemas.cs:
	* XmlSerializationWriteCallback.cs:
	* XmlSerializationWriter.cs:
	* XmlSerializer.cs:
	* XmlSerializerNamespaces.cs: some class status based fixed and
	implemented a couple of methods.

svn path=/trunk/mcs/; revision=7442
2002-09-13 21:15:11 +00:00
Gonzalo Paniagua Javier 8d6c1867c0 2002-09-13 Gonzalo Paniagua Javier <[email protected]>
* Parser.cs: commented out non-existent namespace (it compiles fine
	with mcs because of a bug that is already on bugzilla).

svn path=/trunk/mcs/; revision=7441
2002-09-13 20:41:38 +00:00
Gonzalo Paniagua Javier e3f4037161 2002-09-13 Gonzalo Paniagua Javier <[email protected]>
* XmlException.cs: added a new internal constructor for IXmlLineInfo
	and output line and position info in Message.

	* XmlReader.cs: implemented missing bits.

svn path=/trunk/mcs/; revision=7440
2002-09-13 20:39:10 +00:00
Gonzalo Paniagua Javier e53b062a80 removed Sample.cs
svn path=/trunk/mcs/; revision=7439
2002-09-13 19:30:25 +00:00
Dennis Hayes d5725f2ff1 2002-09-13 Dennis Hayes ([email protected])
* checked in for Everaldo Canuto [email protected]

* FontCollection.cs
* GenericFontFamilies.cs
* HotkeyPrefix.cs
* InstalledFontCollection.cs
* PrivateFontCollection.cs
* TextRenderingHint.cs

svn path=/trunk/mcs/; revision=7438
2002-09-13 17:56:51 +00:00
Dennis Hayes db16975b2c 2002-9-13 Dennis Hayes ([email protected])
* sample.cs
* removed personal template that should not have been checked in

svn path=/trunk/mcs/; revision=7437
2002-09-13 17:49:09 +00:00
Dennis Hayes 276270710a 2002-9-13 DennisHayes <[email protected]>
* PageSettings.cs 
* PaperSize.cs 
* PaperSource.cs 
* PrintControler.cs 
* PrintDocument.cs 
* PrintingPermission.cs 
* PrintPageEventHandler.cs 
* QueryPageSettingEventArgs.cs 
* QueryPageSettingsEventHandler.cs 
* added todos back
* minor bug fixes

svn path=/trunk/mcs/; revision=7436
2002-09-13 17:43:58 +00:00
Dennis Hayes 2176ccd445 2002-9-2 DennisHayes <[email protected]>
* PropertyItem.cs t
* MetaHeader.cs t
* MetafileHeader.cs t
* Metafile.cs t
* ImageFormat.cs t
* ImageCodecInfo.cs t
* ColorMatrix.cs t
* ColorMap.cs t
* WmfPlaceableFileHeader.cs t
* Added todos back

svn path=/trunk/mcs/; revision=7435
2002-09-13 17:39:47 +00:00
Paolo Molaro 708f7135e8 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <[email protected]>
* reflection.c: record the public key token of referenced assemblies.

svn path=/trunk/mono/; revision=7434
2002-09-13 14:07:05 +00:00
Paolo Molaro fc844c6c01 Fri Sep 13 15:56:04 CEST 2002 Paolo Molaro <[email protected]>
* mono-digest.h, mono-sha1.c: Added mono_digest_get_public_token()
	to get the public key token from a public key.

svn path=/trunk/mono/; revision=7433
2002-09-13 13:58:22 +00:00
Paolo Molaro a52c79cb41 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <[email protected]>
* image.c, image.h: added functions to get the strong name and the
	public key of an assembly.
	* pedump.c: use them.

svn path=/trunk/mono/; revision=7432
2002-09-13 13:44:25 +00:00
Paolo Molaro 5a58a1b09c Fri Sep 13 15:39:41 CEST 2002 Paolo Molaro <[email protected]>
* main.c: dump public key.
	* get.c, util.h, util.c: prettyfy data dumps.

svn path=/trunk/mono/; revision=7431
2002-09-13 13:42:07 +00:00
Miguel de Icaza 32bd01ec10 Flush
svn path=/trunk/mcs/; revision=7429
2002-09-13 03:49:36 +00:00
Piers Haken b407458d97 2002-09-12 Piers Haken <[email protected]>
* XPathNavigatorEvaluateTests.cs: enable string() tests.

svn path=/trunk/mcs/; revision=7428
2002-09-13 03:32:21 +00:00
Piers Haken 474fe75047 2002-09-12 Piers Haken <[email protected]>
* Tokenizer.cs: fix parsing numbers that start with '.'
	* DefaultContext.cs: use MS-compatible formatting of doubles

svn path=/trunk/mcs/; revision=7427
2002-09-13 03:17:22 +00:00
Piers Haken a49dae415f 2002-09-12 Piers Haken <[email protected]>
* XPathNavigatorEvaluateTests.cs: enable last() & count() tests.

svn path=/trunk/mcs/; revision=7426
2002-09-13 02:40:26 +00:00
Piers Haken 0d3a9e6aaf 2002-09-12 Piers Haken <[email protected]>
* Iterator.cs: added NullIterator to handle unspecified contexts
	* XPathNavigator.cs: use NullIterator insted of SelfIterator when context is unspecified.
	* XPathNodeIterator.cs: change default _count to -1 to prevent recalculations for NullIterators

svn path=/trunk/mcs/; revision=7424
2002-09-13 02:35:47 +00:00
Piers Haken 234ede86c6 2002-09-12 Piers Haken <[email protected]>
* XmlDocumentNavigator.cs: implement MoveToId()

svn path=/trunk/mcs/; revision=7423
2002-09-13 02:15:40 +00:00
Piers Haken 643a34dd9a 2002-09-12 Piers Haken <[email protected]>
* Expression.cs, Parser.jay: allow ExprSLASH to take a generic expression as its left argument.
	* Iterator.cs: fix SlashIterator.Clone() when _iterRight is null.
	* DefaultContext.cs: fix id() return type.

svn path=/trunk/mcs/; revision=7422
2002-09-13 02:13:11 +00:00
Adam Treat 62f60f8731 * The System.dll Master.xml file. For use with MonoDoc.
svn path=/trunk/mcs/; revision=7421
2002-09-13 02:04:20 +00:00
Adam Treat 1b0029d99e * The mscorlib Master.xml file. This will be used by the MonoDoc GUI
svn path=/trunk/mcs/; revision=7420
2002-09-13 02:02:11 +00:00
Gonzalo Paniagua Javier f03736cdec 2002-09-13 Gonzalo Paniagua Javier <[email protected]>
* ColorConverter.cs: readded MonoTODOs and implemented a couple of
	methods.

svn path=/trunk/mcs/; revision=7419
2002-09-12 23:27:52 +00:00
Martin Baulig 2ff1173034 2002-09-13 Martin Baulig <[email protected]>
* ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
	the CS0038 error message.

svn path=/trunk/mcs/; revision=7418
2002-09-12 23:19:26 +00:00
Martin Baulig 59dc9ab7df 2002-09-12 Martin Baulig <[email protected]>
* cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
	implicit conversion can be done between enum types.

	* enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
	check whether an implicit conversion to the current enum's UnderlyingType
	exists and report an error if not.

	* codegen.cs (CodeGen.Init): Delete the symbol file when compiling
	without debugging support.

	* delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
	Fixes bug #30235.  Thanks to Ricardo Fern�ndez Pascual.

svn path=/trunk/mcs/; revision=7417
2002-09-12 22:58:01 +00:00
Gonzalo Paniagua Javier 17813fc84d 2002-09-12 Gonzalo Paniagua Javier <[email protected]>
* Char.cs: implemented ToString (char)
	* IntegerFormatter.cs: made it internal.

svn path=/trunk/mcs/; revision=7416
2002-09-12 22:52:36 +00:00
Gonzalo Paniagua Javier cc1d059ed0 2002-09-13 Gonzalo Paniagua Javier <[email protected]>
* list.unix: added new files.
	* System.Drawing.Imaging/MetafileType.cs: implemented missing enum.

svn path=/trunk/mcs/; revision=7415
2002-09-12 22:47:25 +00:00
Miguel de Icaza 6d7b54637f Removed strange character
svn path=/trunk/mcs/; revision=7414
2002-09-12 21:40:14 +00:00
Miguel de Icaza a9de18eec9 2002-09-12 Miguel de Icaza <[email protected]>
* expression.cs (CheckedExpr, UnCheckedExpr): If we have a
	constant inside, return it.

svn path=/trunk/mcs/; revision=7413
2002-09-12 21:39:43 +00:00
Dennis Hayes cda70e3aea 2002-9-2 DennisHayes <[email protected]>
* Duplex.cs
	* InvalidPrinterExecption.cs
	* Margins.cs
	* MarginsConverter.cs
	* PageSettings.cs
	* PaperKind.cs
	* PaperSize.cs
	* PaperSource.cs
	* PaperSourceCollection.cs
	* PaperSourceKind.cs
	* PaperUnitConvert.cs
	* PreviewPageInfo.cs
	* PreviewPrintControler.cs
	* PrintControler.cs
	* PrintDocument.cs
	* PrinterResolution.cs
	* PrinterResolutionKind.cs
	* PrinterSettings.cs
	* PrinterUnit.cs
	* PrintEventArgs.cs
	* PrintEventHandler.cs
	* PrintingPermission.cs
	* PrintingPermissionAttribute.cs
	* PrintingPermissionLevel.cs
	* PrintPageEventArgs.cs
	* PrintPageEventHandler.cs
	* PrintRange.cs
	* QueryPageSettingEventArgs.cs
	* QueryPageSettingsEventHandler.cs
	* StandardPrintController.cs
	* Added null classes for most/all classes, Many stubs, and some implmentation

svn path=/trunk/mcs/; revision=7410
2002-09-12 18:47:50 +00:00
Dennis Hayes e2ec2cde28 2002-9-2 DennisHayes <[email protected]>
* AdjustableArrowCap.cs
	* Blend.cs
	* ColorBlend.cs
	* CombineMode.cs
	* CompostingMode.cs
	* CompostingQuality.cs
	* CoordinateSpace.cs
	* CustomLineCap.cs
	* DashCap.cs
	* DashStyle.cs
	* FillMode.cs
	* FlushIntention.cs
	* GraphicsContainer.cs
	* GraphicsPathIterator.cs
	* GraphicsState.cs
	* HatchBrush.cs
	* HatchStyle.cs
	* InterpolationMode.cs
	* LinearGradientBrush.cs
	* LinearGradientMode.cs
	* LineCap.cs
	* LineJoin.cs
	* MatrixOrder.cs
	* PathData.cs
	* PathGradientBrush.cs
	* PathPointType.cs
	* PenAligment.cs
	* PenType.cs
	* PixelOffsetMode.cs
	* QualityMode.cs
	* RegionData.cs
	* SmoothingMode.cs
	* WarpMode.cs
	* WrapMode.cs
	* Added null classes for most/all classes, Many stubs, and some implmentation

svn path=/trunk/mcs/; revision=7409
2002-09-12 18:41:33 +00:00
Dennis Hayes 057909bc36 2002-9-2 DennisHayes <[email protected]>
* FontConverter.cs
	* FontFamily.cs
	* Icon.cs
	* IconConverter.cs
	* ImageAnimator.cs
	* ImageConverter.cs
	* ImageFormatConverter.cs
	* PointConverter.cs
	* RectangleConverter.cs
	* Sample.cs
	* SizeConverter.cs
	* SolidBrush.cs
	* StringFormat.cs
	* SystemBrushes.cs
	* SystemIcons.cs
	* SystemPens.cs
	* TextureBrush.cs
	* ToolboxBitmapAttribute.cs
	* Added null classes for most/all classes, Many stubs, and some implmentation

svn path=/trunk/mcs/; revision=7408
2002-09-12 18:35:49 +00:00
Dick Porter 93aff8c4da 2002-09-12 Dick Porter <[email protected]>
* unix.args: Add System.Globalization.SortKey,
	System.Globalization.StringInfo and
	System.Globalizaton.TextElementEnumerator

2002-09-12  Dick Porter  <[email protected]>

	* ThaiBuddhistCalendar.cs:
	* TextInfo.cs:
	* TaiwanCalendar.cs:
	* RegionInfo.cs:
	* KoreanCalendar.cs:
	* JulianCalendar.cs:
	* JapaneseCalendar.cs:
	* HijriCalendar.cs:
	* HebrewCalendar.cs:
	* GregorianCalendar.cs:
	* CultureInfo.cs:
	* CompareInfo.cs: Stub out missing methods

svn path=/trunk/mcs/; revision=7407
2002-09-12 18:34:38 +00:00
Dennis Hayes 5f79974ab1 2002-9-2 DennisHayes <[email protected]>
* checked in for Everaldo Canuto (everaldo.canuto@bol,com.br)
	* BitmapData.cs
	* ColorAdjustType.cs
	* ColorChannelFlag.cs
	* ColorMap.cs
	* ColorMapType.cs
	* ColorMatrix.cs
	* ColorMatrixFlag.cs
	* ColorMode.cs
	* EmfPlusRecordType.cs
	* EmfType.cs
	* EncoderParameterValueType.cs
	* EncoderValue.cs
	* ImageCodecFlags.cs
	* ImageCodecInfo.cs
	* ImageFlags.cs
	* ImageFormat.cs
	* ImageLockMode.cs
	* MetafileFrameUnit.cs
	* MetafileHeader.cs
	* MetaHeader.cs
	* PaletteFlags.cs
	* PixelFormat.cs
	* PlayRecordCallback.cs
	* PropertyItem.cs
	* WmfPlaceableFileHeader.cs
	* Added null classes for most/all classes, Many stubs, and some implmentation

svn path=/trunk/mcs/; revision=7406
2002-09-12 18:30:13 +00:00
Dennis Hayes 0f54d4b16f 2002-9-2 DennisHayes <[email protected]>
* ColorPalette.cs
* FrameDimension.cs
* Metafile.cs
* Added stubs, implmentation

svn path=/trunk/mcs/; revision=7405
2002-09-12 18:24:39 +00:00
Dennis Hayes 83b8fc6048 2002-9-2 DennisHayes <[email protected]>
* Matrix.cs
	* Added stubs, implmentation

svn path=/trunk/mcs/; revision=7404
2002-09-12 18:20:57 +00:00
Dennis Hayes cc40965131 2002-9-2 DennisHayes <[email protected]>
* Bitmap.cs
* Color.cs
* ColorConverter.cs
* Image.cs
* Pen.cs
* Added stubs, implmentation

svn path=/trunk/mcs/; revision=7403
2002-09-12 18:17:15 +00:00
Johannes Roith f973f337e3 add mono setup
svn path=/trunk/mono/; revision=7402
2002-09-12 17:01:44 +00:00
Nick Drochak cf42c5be87 2002-09-13 Nick Drochak <[email protected]>
* EnumTest.cs: Add an extreme value test for format.

svn path=/trunk/mcs/; revision=7400
2002-09-12 16:20:08 +00:00
Nick Drochak afdd7b1d16 2002-09-13 Nick Drochak <[email protected]>
* Enum.cs (Format): handle the "d" format for both signed and unsigned
	underlying types.

svn path=/trunk/mcs/; revision=7399
2002-09-12 16:19:11 +00:00
Martin Baulig 0239aa7828 2002-09-12 Martin Baulig <[email protected]>
* typemanager.cs (TypeManager.IsNestedChildOf): New method.

	* ecore.cs (IMemberExpr.DeclaringType): New property.
	(SimpleName.SimpleNameResolve): Check whether we're accessing a
	nonstatic member of an outer type (CS0038).

svn path=/trunk/mcs/; revision=7398
2002-09-12 16:13:21 +00:00
Martin Baulig d01a931d9f 2002-09-12 Martin Baulig <[email protected]>
* cs0038.cs: New test.

svn path=/trunk/mcs/; revision=7397
2002-09-12 15:45:40 +00:00
Dick Porter 5f1b4c67f5 2002-09-12 Dick Porter <[email protected]>
* unix.args: Add System.ArgIterator and System.TypedReference

	* corlib.build: Adding DecimalConstantAttribute to Decimal (which
	corcompare showed as missing) causes a SecurityException in
	corcompare, so exclude Decimal from the corlib_cmp build.

2002-09-12  Dick Porter  <[email protected]>

	* UIntPtr.cs: Remove the [StructLayout(LayoutKind.Auto)]
	attribute, as there doesn't appear to be any struct
	layout-depending code here (and corcompare says it should be
	LayoutKind.Sequential)

	* Decimal.cs: Stub out missing methods, add
	[DecimalConstantAttribute] to the constant fields (as shown by
	corcompare).

	* LocalDataStoreSlot.cs:
	* Environment.cs:
	* Char.cs:
	* Array.cs: Stub out missing methods.

	* TypedReference.cs:
	* ArgIterator.cs: Stub out

	* AppDomainSetup.cs:
	* AppDomain.cs: Stub out missing methods, add missing
	ClassInterface(ClassInterfaceType.None) attribute.

2002-09-12  Dick Porter  <[email protected]>

	* TypeBuilder.cs: Say _which_ Type has already been created

svn path=/trunk/mcs/; revision=7395
2002-09-12 15:38:21 +00:00
Gonzalo Paniagua Javier fdcb013b16 2002-09-12 Gonzalo Paniagua Javier <[email protected]>
* list: added 2 new files.
	* System.Web.UI.WebControls/DataGrid.cs: fixed compilation

svn path=/trunk/mcs/; revision=7391
2002-09-12 13:07:39 +00:00
Gaurav Vaish 021c2720cf 2002-09-12 Gaurav Vaish <[email protected]>
* PagedDataSource.cs   - FirstIndexInPage : Fixed bug.
* DataGrid.cs          - CreateControlHierarchy(bool)
                            : working towards completion.
    	                       - ResolveDataSource(object, string)
       	                            : stubbed new method
    	                       - CreateItem(....)
       	                            : stubbed new method
    	                Well. It's almost done.
* DataGridTableInternal.cs
                       - Added new internal class.

svn path=/trunk/mcs/; revision=7390
2002-09-12 12:38:36 +00:00
Dietmar Maurer ba88a15e12 array code cleanup
svn path=/trunk/mono/; revision=7389
2002-09-12 12:27:46 +00:00
Dietmar Maurer a03ff8d5ba 2002-09-12 Dietmar Maurer <[email protected]>
* exception.c: added patch from Julio Merno to fix bug #30048

svn path=/trunk/mono/; revision=7384
2002-09-12 10:58:56 +00:00
Dietmar Maurer 4301d72d8c 2002-09-12 Dietmar Maurer <[email protected]>
* marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.

svn path=/trunk/mono/; revision=7383
2002-09-12 10:50:09 +00:00
Dietmar Maurer 03317f7a4c fix for bug 29365
svn path=/trunk/mono/; revision=7382
2002-09-12 08:48:57 +00:00
Andrew Birkett 77f0cd8d73 2002-09-11 Andrew Birkett <[email protected]>
* RijndaelManaged.cs: Implemented ECB-mode Rijndael cipher.
	* Rijndael.cs: Set valid key/block sizes.
	* SymmetricAlgorithm.cs: Remove throw from ctr so we can instantiate
	  derived classes.  Fixes to key sizes so they are measured in bits.
	* KeySizes.cs: Updated comments to emphasize that sizes are in bits.

svn path=/trunk/mcs/; revision=7381
2002-09-12 08:15:30 +00:00
Kral Ferch c57901837e more xpath core function tests.
svn path=/trunk/mcs/; revision=7379
2002-09-12 05:16:17 +00:00
Miguel de Icaza 2cb13bd9a8 2002-09-12 Miguel de Icaza <[email protected]>
* marshal.c (mono_marshal_get_managed_wrapper): Added
	MONO_TYPE_BOOLEAN

svn path=/trunk/mono/; revision=7378
2002-09-12 04:39:32 +00:00
Miguel de Icaza b44bec6c3f 2002-09-11 Miguel de Icaza <[email protected]>
* driver.cs: Activate the using-error detector at warning level
	4 (at least for MS-compatible APIs).

	* namespace.cs (VerifyUsing): Small buglett fix.

svn path=/trunk/mcs/; revision=7377
2002-09-12 03:10:18 +00:00
Miguel de Icaza 7837ad922c 2002-09-11 Miguel de Icaza <[email protected]>
* ModuleBuilder.cs (GetTypes): Implement.

svn path=/trunk/mcs/; revision=7376
2002-09-12 02:53:48 +00:00
Miguel de Icaza c594caf965 2002-09-11 Miguel de Icaza <[email protected]>
* pending.cs (PendingImplementation): pass the container pointer.

	* interface.cs (GetMethods): Allow for recursive definition.  Long
	term, I would like to move every type to support recursive
	definitions, not the current ordering mechanism that we have right
	now.

	The situation is this: Attributes are handled before interfaces,
	so we can apply attributes to interfaces.  But some attributes
	implement interfaces, we will now handle the simple cases
	(recursive definitions will just get an error).

svn path=/trunk/mcs/; revision=7375
2002-09-12 02:11:42 +00:00
Kral Ferch 85cf5e87a3 Some tests for XPathNavigator.Evaluate()
svn path=/trunk/mcs/; revision=7372
2002-09-12 01:12:50 +00:00
Gonzalo Paniagua Javier ef94f0465d 2002-09-11 Gonzalo Paniagua Javier <[email protected]>
* CodeDomProvider.cs:
	* IndentedTextWriter.cs: misc. fixes.

svn path=/trunk/mcs/; revision=7370
2002-09-11 23:40:37 +00:00
Gonzalo Paniagua Javier fe249c988a 2002-09-11 Gonzalo Paniagua Javier <[email protected]>
* CodeBinaryOperatorType.cs:
	* CodeMemberEvent.cs:
	* CodeParameterDeclarationExpression.cs:
	* CodeTypeMember.cs:
	* CodeTypeReference.cs:
	* CodeTypeReferenceCollection.cs: misc. fixes

svn path=/trunk/mcs/; revision=7369
2002-09-11 23:40:11 +00:00
Miguel de Icaza b62468c7ec 2002-09-11 Miguel de Icaza <[email protected]>
* parameter.cs: Only invalidate types at the end if we fail to
	lookup all types.

svn path=/trunk/mcs/; revision=7368
2002-09-11 19:14:00 +00:00
Martin Baulig 2b48d1c45b 2002-09-11 Martin Baulig <[email protected]>
* gc.c: Call GC_unregister_disappearing_link() on all links when
	finalizing them, this is necessary to aviod a crash in boehm's
	finalize handler.

svn path=/trunk/mono/; revision=7367
2002-09-11 18:43:56 +00:00
Gonzalo Paniagua Javier cbe5c9f1d7 oops
svn path=/trunk/mcs/; revision=7365
2002-09-11 15:54:56 +00:00
Gonzalo Paniagua Javier 9848badf22 2002-09-11 Gonzalo Paniagua Javier <[email protected]>
* list: added new files.
	* System.Web.Compilation/AspElements.cs: added WebService directive.
	* System.Web.Compilation/WebServiceCompiler.cs: New file.
	* System.Web.UI/SimpleWebHandlerParser.cs: New file.
	* System.Web.UI/WebServiceParser.cs: New file.

svn path=/trunk/mcs/; revision=7364
2002-09-11 15:53:53 +00:00
Paolo Molaro 29b37ee691 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <[email protected]>
* gc.c: handle GetTarget for finalized objects spotted and fixed by
	[email protected].

svn path=/trunk/mono/; revision=7363
2002-09-11 15:11:24 +00:00
Nick Drochak c991b0d27d 2002-09-12 Nick Drochak <[email protected]>
* Double.cs (ToString): Throw exception when "X" format is passed in.

svn path=/trunk/mcs/; revision=7362
2002-09-11 15:10:32 +00:00
Dick Porter c77d9a071f 2002-09-11 Dick Porter <[email protected]>
* Mutex.cs:
	* ManualResetEvent.cs:
	* AutoResetEvent.cs: Use the WaitHandle.Handle property instead of
	the private field

	* WaitHandle.cs: Hide the os_handle field and the WaitOne_internal
	method

svn path=/trunk/mcs/; revision=7361
2002-09-11 15:01:31 +00:00
Nick Drochak 0160dcc880 2002-09-11 Nick Drochak <[email protected]>
* DoubleTest.cs: Add test for bad format string passed to ToString().
	* Int64Test.cs: Re-enable broad range of test values.
	* MulticastDeletegateTest.cs: Re-enable test for correct order of
	delegate firing.

svn path=/trunk/mcs/; revision=7360
2002-09-11 14:49:30 +00:00
Paolo Molaro b88507b22a Wed Sep 11 15:26:34 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs: implemented Module property.

svn path=/trunk/mcs/; revision=7359
2002-09-11 13:30:46 +00:00
Paolo Molaro 101bcbc576 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: implemented MonoType::Module.
	* reflection.c, reflection.h: mono_module_get_object () from
	Tomi Pakarinen <[email protected]>.

svn path=/trunk/mono/; revision=7358
2002-09-11 13:30:05 +00:00
Paolo Molaro 1bc7a5c672 Compilation fix.
svn path=/trunk/mcs/; revision=7357
2002-09-11 11:11:27 +00:00
Paolo Molaro affee047b3 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: ignore overridden methods in GetMethods ().
	Fix for FieldInfo::SetValue().
	* object.c: handle float/double in runtime invoke.

svn path=/trunk/mono/; revision=7356
2002-09-11 10:57:39 +00:00
Paolo Molaro cf3b279815 Wed Sep 11 12:49:51 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs, Type.cs: implemented InvokeMember.


Wed Sep 11 12:50:54 CEST 2002 Paolo Molaro <[email protected]>

	* Binder.cs: more default binder implementation.
	* FieldInfo.cs, MonoField.cs: fixed SetValue () implementation.
	* MonoMethod.cs: use the binder in the Invoke () implementation.
	Implemented custom attributes methods and ToString for constructors.

svn path=/trunk/mcs/; revision=7355
2002-09-11 10:57:34 +00:00
Paolo Molaro 38435c8147 Wed Sep 11 11:06:43 CEST 2002 Paolo Molaro <[email protected]>
* Delegate.cs: check the type passed to CreateDelegate is a Delegate
	type. Check the method signature matches.

svn path=/trunk/mcs/; revision=7353
2002-09-11 09:08:58 +00:00
Gonzalo Paniagua Javier 4c015b6312 2002-09-10 Gonzalo Paniagua Javier <[email protected]>
* FileTest.cs: don't leave AFile.txt open.

svn path=/trunk/mcs/; revision=7352
2002-09-10 14:00:43 +00:00
Paolo Molaro 5cff2490a6 Runtime invoke tests.
svn path=/trunk/mono/; revision=7351
2002-09-10 13:57:49 +00:00
Paolo Molaro ff0eb523ec Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <[email protected]>
* object.c: allow a constructor to be called again on an object.

svn path=/trunk/mono/; revision=7350
2002-09-10 13:53:48 +00:00
Paolo Molaro 02133437a9 Tue Sep 10 12:12:51 CEST 2002 Paolo Molaro <[email protected]>
* ConstructorBuilder.cs: added a field to hold the handle.

svn path=/trunk/mcs/; revision=7349
2002-09-10 10:18:18 +00:00
Paolo Molaro a1bf6e0ea7 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <[email protected]>
* class.h, class.c: move field layout code to it's own function and
	export it. Get an interface id earlier. Move fields in MonoClass
	so they are more cache friendly and align the bitfields.
	* loader.c: temporary handle get_param_names() for a runtime method.
	* reflection.c, reflection.h: more code to handle runtime creation of
	types.

svn path=/trunk/mono/; revision=7348
2002-09-10 10:18:18 +00:00
Gonzalo Paniagua Javier 41681b5c8d 2002-09-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs:
	* HttpWebResponse.cs: applied another patch from Shahms E. King
	([email protected]).

svn path=/trunk/mcs/; revision=7346
2002-09-09 23:15:01 +00:00
Miguel de Icaza 5ac4160881 2002-09-09 Miguel de Icaza <[email protected]>
* StreamWriter.cs: When no encoding is provided, create an
	encoding without markers, this is what MS does.

svn path=/trunk/mcs/; revision=7344
2002-09-09 21:50:52 +00:00
Miguel de Icaza 51853f78b0 Update errors
svn path=/trunk/mcs/; revision=7343
2002-09-09 21:46:41 +00:00
Martin Baulig b86562e6d7 Oooops.
svn path=/trunk/mcs/; revision=7342
2002-09-09 21:42:46 +00:00
Martin Baulig 5d84732a2a 2002-09-09 Martin Baulig <[email protected]>
* ecore.cs (PropertyExpr.Emit): Also check for
	TypeManager.system_int_array_get_length so this'll also work when
	compiling corlib.  Fixes #30003.

svn path=/trunk/mcs/; revision=7339
2002-09-09 20:01:37 +00:00
Martin Baulig d2960a4b02 2002-09-09 Martin Baulig <[email protected]>
* expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
	and throw an exception if we can't get the type's size.  Fixed #30040,
	added test-165.cs.

svn path=/trunk/mcs/; revision=7338
2002-09-09 19:13:14 +00:00
Martin Baulig b736b03814 2002-09-09 Martin Baulig <[email protected]>
* makefile: Reverted Ravi's `Update'.  When moving tests from
	TESTS_NOPASS to TEST_SOURCES, please make sure that they actually
	pass on both platforms and don't do it without a ChangeLog entry.

svn path=/trunk/mcs/; revision=7337
2002-09-09 19:11:19 +00:00
Martin Baulig 8c35777cb0 Added my two new tests.
svn path=/trunk/mcs/; revision=7336
2002-09-09 19:09:21 +00:00
Martin Baulig fe00426683 2002-09-09 Martin Baulig <[email protected]>
* test-165.cs: Added testcase for bug #30040.

svn path=/trunk/mcs/; revision=7335
2002-09-09 19:05:53 +00:00
Martin Baulig 28f233ce52 2002-09-09 Martin Baulig <[email protected]>
* ecore.cs (PropertyExpr.DoResolve): Added check for static properies.

svn path=/trunk/mcs/; revision=7333
2002-09-09 18:33:01 +00:00
Paolo Molaro d893e4d96c Mon Sep 9 17:31:12 CEST 2002 Paolo Molaro <[email protected]>
* TypeBuilder.cs: prepare for the real CreateType implementation.

svn path=/trunk/mcs/; revision=7331
2002-09-09 15:57:14 +00:00
Dick Porter 356f13e5b5 2002-09-09 Dick Porter <[email protected]>
* acconfig.h:
	* configure.in: Simplify thread checks, by using canned rules for
	particular systems (based on the sleepycat db configure.in).
	Tested on linux/x86, freebsd and w32.  Solaris also added, but I
	don't have a solaris machine to try it on.

svn path=/trunk/mono/; revision=7330
2002-09-09 15:39:28 +00:00
Martin Baulig 08e8e1f3ad 2002-09-09 Martin Baulig <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): We need to use a special
	signature with the pinvoke field being set for the actual call.

svn path=/trunk/mono/; revision=7329
2002-09-09 14:45:17 +00:00
Dick Porter 4b4e6c118a Point at updated gimp-for-w32 files
svn path=/trunk/mono/; revision=7328
2002-09-09 12:08:58 +00:00
Martin Baulig b2f4a1cccb 2002-09-09 Martin Baulig <[email protected]>
* expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
	context.  Fixes bug #30027.

	* delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
	virtual functions.  Fixes bug #30043, added test-164.cs.

svn path=/trunk/mcs/; revision=7326
2002-09-09 09:41:54 +00:00
Dietmar Maurer 27dd4bbea0 2002-09-09 Dietmar Maurer <[email protected]>
* x86.brg (LDELEMA): use x86_lea

svn path=/trunk/mono/; revision=7325
2002-09-09 09:26:57 +00:00
Martin Baulig 9a4b3f5e01 2002-09-09 Martin Baulig <[email protected]>
* test-164.cs: Added testcase for virtual functions in delegate
	creating expressions (Bug #30043).

svn path=/trunk/mcs/; revision=7324
2002-09-09 09:11:46 +00:00
Ravi Pratap M ae14ed5b48 2002-09-08 Ravi Pratap <[email protected]>
* attribute.cs : Fix a small NullRef crash thanks to my stupidity.

svn path=/trunk/mcs/; revision=7323
2002-09-08 18:52:52 +00:00
Nick Drochak 4936a9cfdd 2002-09-08 Nick Drochak <[email protected]>
* DateTimeTest.cs: Disable test bug file it in bugzilla.

svn path=/trunk/mcs/; revision=7322
2002-09-08 14:21:55 +00:00
Martin Baulig 56837e12e2 So why the hell did someone commit this non-printable character ?
svn path=/trunk/mcs/; revision=7321
2002-09-08 13:58:37 +00:00
Nick Drochak 8b737a2b3b 2002-09-08 Nick Drochak <[email protected]>
* PathTest.cs (TestCombine): XP puts it's system root in WINDOWS not
	WINNT.

svn path=/trunk/mcs/; revision=7320
2002-09-08 13:31:55 +00:00
Martin Baulig 54b164923f Hardcode sizeof (long) to 8 bytes to make it compile without /unsafe.
The runtime uses a guint64 type for this, so this'll always be 8 bytes.

svn path=/trunk/mcs/; revision=7319
2002-09-08 13:06:31 +00:00
Nick Drochak 5c254cb310 2002-09-08 Nick Drochak <[email protected]>
* driver.cs: Use an object to get the windows codepage since it's not a
	static property.

svn path=/trunk/mcs/; revision=7317
2002-09-08 12:42:23 +00:00
Miguel de Icaza 4a25a54d0d 2002-09-08 Miguel de Icaza <[email protected]>
* statement.cs (For.Emit): for infinite loops (test == null)
	return whether there is a break inside, not always "true".

svn path=/trunk/mcs/; revision=7315
2002-09-08 05:50:52 +00:00
Miguel de Icaza 40ea2dfb2d 2002-09-08 Miguel de Icaza <[email protected]>
* namespace.cs (UsingEntry): New struct to hold the name of the
	using definition, the location where it is defined, and whether it
	has been used in a successful type lookup.

	* rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
	strings.

	* decl.cs: ditto.

svn path=/trunk/mcs/; revision=7314
2002-09-08 05:45:11 +00:00
Ravi Pratap M c4db22ae77 Update the cs0182 test to actually contain the error message too :-)
svn path=/trunk/mcs/; revision=7313
2002-09-08 05:06:36 +00:00
Ravi Pratap M 12ae4f82e7 2002-09-06 Ravi Pratap <[email protected]>
* attribute.cs : Fix incorrect code which relied on catching
	a NullReferenceException to detect a null being passed in
	where an object was expected.

svn path=/trunk/mcs/; revision=7312
2002-09-08 04:49:30 +00:00
Paolo Molaro 5011ad5bf8 Dum de dum, pass the value...
svn path=/trunk/mcs/; revision=7303
2002-09-07 09:13:42 +00:00
Paolo Molaro 8721448885 Sat Sep 7 10:16:52 CEST 2002 Paolo Molaro <[email protected]>
* RuntimeMethodHandle.cs: implemented GetFunctionPointer().

svn path=/trunk/mcs/; revision=7302
2002-09-07 08:18:55 +00:00
Paolo Molaro acb3179a1c Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: removed some unused icalls. Start of map of glib charsets
	to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().

svn path=/trunk/mono/; revision=7301
2002-09-07 08:17:03 +00:00
Miguel de Icaza 079a95a1e6 Distinguish general from specific correctly from my previous patch
svn path=/trunk/mcs/; revision=7300
2002-09-07 01:19:22 +00:00
Franklin Wise 5fda660239 Implemented GetHashCode for constraint classes. Added tests and continued
work on DataColumn

svn path=/trunk/mcs/; revision=7299
2002-09-07 01:09:22 +00:00
Miguel de Icaza c816fb79c4 2002-09-06 Miguel de Icaza <[email protected]>
* expression.cs (Cast): Simplified by using ResolveType instead of
	manually resolving.

	* statement.cs (Catch): Fix bug by using ResolveType.

svn path=/trunk/mcs/; revision=7298
2002-09-07 00:49:26 +00:00
Miguel de Icaza b5d4c0ea0b Document /codepage
svn path=/trunk/mono/; revision=7297
2002-09-07 00:17:40 +00:00
Miguel de Icaza a17af36749 2002-09-06 Miguel de Icaza <[email protected]>
* driver.cs: (CSCParseOption): Support the /codepage: option.

	Make default code page Latin-1

svn path=/trunk/mcs/; revision=7296
2002-09-07 00:17:26 +00:00
Miguel de Icaza 2eefff50b3 2002-09-06 Miguel de Icaza <[email protected]>
* Console.cs: Specify an encoder, otherwise we will get the UTF8
	encoder that by default emits the byte markers.

2002-09-06  Miguel de Icaza  <[email protected]>

	* StreamReader.cs: Implement detection of byte marks and skipping
	of byte marks at the beginning of the stream.

	(ReadToEnd): Use buffered read instead of char-by-char
	processing.

	Correct the default arguments for creating the StreamReader.

2002-09-06  Miguel de Icaza  <[email protected]>

	* Encoding.cs (UTF8, Unicode): Create with a preamble, that is
	what the Microsoft version does.

	(UnixConsoleEncoding): New internal method, used to get the
	encoding, in the future, this should pull the locale, map to
	charset and then code page.

svn path=/trunk/mcs/; revision=7295
2002-09-06 23:57:02 +00:00
Kral Ferch 8e511e9e31 Added XPathNavigatorMatchesTests.cs to the MonoMicro.Test project
svn path=/trunk/mcs/; revision=7294
2002-09-06 22:46:38 +00:00
Martin Baulig 54ac5974b2 2002-09-06 Martin Baulig <[email protected]>
* debug.c (debug_update_il_offsets): Fixed a memory corruption bug.
	If you were getting random crashes when using the JIT with debugging
	turned on, this fixes it.

svn path=/trunk/mono/; revision=7291
2002-09-06 20:21:50 +00:00
Ravi Pratap M a8dcc7f06d 2002-09-06 Ravi Pratap <[email protected]>
* expression.cs (BetterConversion): Special case for when we have
	a NullLiteral as the argument and we have to choose between string
	and object types - we choose string the way csc does.

	* attribute.cs (Attribute.Resolve): Catch the
	NullReferenceException and report error #182 since the Mono
	runtime no more has the bug and having this exception raised means
	we tried to select a constructor which takes an object and is
	passed a null.

svn path=/trunk/mcs/; revision=7290
2002-09-06 19:51:35 +00:00
Ravi Pratap M ae841349e3 More tests pass so move them to the regular test suite
svn path=/trunk/mcs/; revision=7289
2002-09-06 19:51:09 +00:00
Ravi Pratap M 9ed5c36cd3 Add new error that we catch
svn path=/trunk/mcs/; revision=7288
2002-09-06 19:46:58 +00:00
Ravi Pratap M 0441b0183a 2002-09-06 Ravi Pratap <[email protected]>
* test-163.cs : Add test to check we select string
	over object when we have a Null literal as the argument.

	* makefile : Update.

svn path=/trunk/mcs/; revision=7287
2002-09-06 19:34:24 +00:00
Paolo Molaro 785a7ef43b Fri Sep 6 20:14:04 CEST 2002 Paolo Molaro <[email protected]>
* Delegate.cs: look also for non-public methods until we have the
	security checks in place.

svn path=/trunk/mcs/; revision=7285
2002-09-06 18:16:17 +00:00
Paolo Molaro b4879492ca Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <[email protected]>
* debug-helpers.c: break infinite loop (found and fixed by
	Holger Arnold <[email protected]>).

svn path=/trunk/mono/; revision=7283
2002-09-06 14:11:13 +00:00
Dick Porter e7086535fc More automake lines rearranging: select the "stable" version _after_ we've
checked the automake version.

It seems a bit daft to make sure we've got the latest "unstable" automake
and then not use it, but we have seen builds fail when a slightly older
"unstable" version is installed on the system.

svn path=/trunk/mono/; revision=7282
2002-09-06 12:02:45 +00:00
Dick Porter 3b0393cb64 Can't do the automake check until the mono dir has been checked out of CVS.
(Because automake-wrapper examines the dir to see which version of automake
to use.)

svn path=/trunk/mono/; revision=7281
2002-09-06 11:26:24 +00:00
Paolo Molaro 332d2ced8a Fri Sep 6 12:20:06 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs: consider also the full name in GetInterface.

svn path=/trunk/mcs/; revision=7280
2002-09-06 10:21:51 +00:00
Paolo Molaro 193e77c5cb Fri Sep 6 12:11:28 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs: implemented GetMembers, GetConstructorImpl and
	GetMethodImpl using the binder.
	* Type.cs: GetConstructorImpl/GetConstructor fixes.

svn path=/trunk/mcs/; revision=7279
2002-09-06 10:15:16 +00:00
Dietmar Maurer 33c90290aa only set ESP if necessary
svn path=/trunk/mono/; revision=7278
2002-09-06 09:18:19 +00:00
Dietmar Maurer 1b4e5d7b3f 2002-09-06 Dietmar Maurer <[email protected]>
* emit-x86.c (arch_emit_epilogue): use pop instead of mov

svn path=/trunk/mono/; revision=7277
2002-09-06 09:15:26 +00:00
Paolo Molaro c93b99378c Update with info on MONO_PATH.
svn path=/trunk/mono/; revision=7276
2002-09-06 08:11:56 +00:00
Ravi Pratap M 9c0368959f I am the worst kind of hacker there is ....
svn path=/trunk/mcs/; revision=7273
2002-09-05 19:16:17 +00:00
Ravi Pratap M 043305a683 Flush ChangeLog
svn path=/trunk/mcs/; revision=7272
2002-09-05 19:13:59 +00:00
Ravi Pratap M 464a887dc8 2002-09-05 Ravi Pratap <[email protected]>
* ecore.cs (ImplicitNumericConversion): Conversion from underlying
	type to the enum type is not allowed. Remove code corresponding to
	that.

	(ConvertNumericExplicit): Allow explicit conversions from
	the underlying type to enum type. This precisely follows the spec
	and closes a bug filed by Gonzalo.

svn path=/trunk/mcs/; revision=7271
2002-09-05 19:13:42 +00:00
Ravi Pratap M 68d2c7f12e Remove debug message - sorry, guys !
svn path=/trunk/mcs/; revision=7270
2002-09-05 18:45:33 +00:00
Paolo Molaro d5aa1a82fd Thu Sep 5 20:36:27 CEST 2002 Paolo Molaro <[email protected]>
* Binder.cs: finished the Binder class and implemented the default
	binder.

svn path=/trunk/mcs/; revision=7269
2002-09-05 18:38:31 +00:00
Martin Baulig 07513d7230 2002-09-05 Martin Baulig <[email protected]>
* debug.c (MONO_DEBUGGER__debugger_info): New global data symbol
	which is read by the debugger.

svn path=/trunk/mono/; revision=7268
2002-09-05 18:36:46 +00:00
Ravi Pratap M e65847b3f9 2002-09-05 Ravi Pratap <[email protected]>
* attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
	expressions too. Previously we were checking only in one place for
	positional arguments leaving out named arguments.

svn path=/trunk/mcs/; revision=7265
2002-09-05 17:18:28 +00:00
Ravi Pratap M aa5d984a6d 2002-09-05 Ravi Pratap <[email protected]>
* interface.cs (PopulateMethod): Return if there are no argument
	types. Fixes a NullReferenceException bug.

svn path=/trunk/mcs/; revision=7264
2002-09-05 17:06:03 +00:00
Ravi Pratap M 36beb952d2 2002-09-05 Ravi Pratap <[email protected]>
* expression.cs (Invocation.OverloadResolve): Flag a nicer error
	message (1502, 1503) when we can't locate a method after overload
	resolution. This is much more informative and closes the bug
	Miguel reported.

svn path=/trunk/mcs/; revision=7263
2002-09-05 16:56:59 +00:00
Paolo Molaro 5b684ccab5 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: target may be null in create_delegate.

svn path=/trunk/mono/; revision=7262
2002-09-05 16:52:43 +00:00
Paolo Molaro 76ba0a9d7f Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <[email protected]>
* marshal.c: handle a boolean return type.

svn path=/trunk/mono/; revision=7261
2002-09-05 15:43:57 +00:00
Paolo Molaro f91791a18d Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <[email protected]>
* gc.c: put HIDE_POINTER/REVEAL_POINTER only here.

svn path=/trunk/mono/; revision=7260
2002-09-05 11:12:13 +00:00
Dietmar Maurer f82ceee6bb 2002-09-03 Dietmar Maurer <[email protected]>
* System.Runtime.Remoting.Channels.CORBA/CORBAChannel.cs:
	impl. the channel wrapper.

	* System.Runtime.Remoting.Channels.Simple/SimpleChannel.cs:
	impl. the channel wrapper.

	* System.Runtime.Remoting.Channels.Simple/SimpleServerChannel.cs
	(GetUrlsForUri): use all available channel uris.

svn path=/trunk/mcs/; revision=7259
2002-09-05 07:59:45 +00:00
Gonzalo Paniagua Javier 8ba95aa556 2002-09-05 Gonzalo Paniagua Javier <[email protected]>
* XmlTextWriter.cs: fixed bug #29886.

svn path=/trunk/mcs/; revision=7258
2002-09-05 02:35:27 +00:00
Franklin Wise f6b277b235 Added new tests for various System.Data classes. More flushing out of
the DataTable and supporting classes.

svn path=/trunk/mcs/; revision=7257
2002-09-05 01:46:40 +00:00
Jonathan Pryor 69c9f2c6b3 Implemented better attribute support for C# output.
svn path=/trunk/mcs/; revision=7250
2002-09-04 18:08:05 +00:00
Gonzalo Paniagua Javier 409920670c 2002-09-04 Gonzalo Paniagua Javier <[email protected]>
* compiler.csproj:
	* compiler.csproj.user: patch from Adam Chester ([email protected]).

svn path=/trunk/mcs/; revision=7249
2002-09-04 17:33:52 +00:00
Paolo Molaro 1184f808fb Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <[email protected]>
* gc.c: fix weakreferences.

svn path=/trunk/mono/; revision=7248
2002-09-04 17:25:14 +00:00
Jonathan Pryor 51b30c8d57 Get rid of silly compiler warning about unreachable code.
svn path=/trunk/mcs/; revision=7246
2002-09-04 17:02:16 +00:00
Paolo Molaro db50b71b63 Make the built response file depend on the file list.
svn path=/trunk/mcs/; revision=7245
2002-09-04 16:32:59 +00:00
Gonzalo Paniagua Javier 8a50239ee4 2002-09-04 Gonzalo Paniagua Javier <[email protected]>
* PathTest.cs: some fixes to make it work also on unix.

svn path=/trunk/mcs/; revision=7244
2002-09-04 16:29:48 +00:00
Jonathan Pryor d7ae8d619e * EnumTest.cs:
- Added additional "x" formatter test case to test most recent Enum.cs
      patch
    - Code cleanup so that all TestFormat test cases would be executed
    - Change exception types in TestFormat_Args so that it passes on .NET.
      (Some ArgumentNullExceptions should be been ArgumentExceptions.)

svn path=/trunk/mcs/; revision=7243
2002-09-04 16:11:28 +00:00
Miguel de Icaza 4b2f24ea56 Flush & announce
svn path=/trunk/mono/; revision=7242
2002-09-04 15:27:05 +00:00
Miguel de Icaza ae52b007cf Flush
svn path=/trunk/mono/; revision=7241
2002-09-04 15:20:47 +00:00
Miguel de Icaza 5455d3bcc9 Flush docs
svn path=/trunk/mono/; revision=7240
2002-09-04 15:18:50 +00:00
Paolo Molaro 9e1fdee82e Wed Sep 4 14:06:09 CEST 2002 Paolo Molaro <[email protected]>
* Makefile.am: link libmono directly into mono. Use a ld script
	to reduce exported symbols.

svn path=/trunk/mono/; revision=7239
2002-09-04 12:09:46 +00:00
Paolo Molaro 9de3cc5947 Wed Sep 4 14:01:25 CEST 2002 Paolo Molaro <[email protected]>
* Encoding.cs: use icall to get default codepage.
	* DefaultEncoding.cs: remove useless class.

svn path=/trunk/mcs/; revision=7238
2002-09-04 12:04:16 +00:00
Paolo Molaro 974559cf5c Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: added icall to get default codepage.

svn path=/trunk/mono/; revision=7237
2002-09-04 12:01:49 +00:00
Juli Mallett f19cfba5e7 2002-09-04 Juli Mallett <[email protected]>
* configure.in: Include <sys/types.h> when checking <sys/un.h> stuff.

Taken from the FreeBSD port by Yukihiro Nakai <[email protected]>, to reduce
the patches needed by that port, once the next release is out.

svn path=/trunk/mono/; revision=7236
2002-09-04 08:06:39 +00:00
Miguel de Icaza f4d826a8d4 2002-09-04 Miguel de Icaza <[email protected]>
* Double.cs, Single.cs, Char.cs, Boolean.cs: Use internal for the actual value
	instead of public.

	* LocalDataStoreSlot.cs: Make constructor internal.

svn path=/trunk/mcs/; revision=7234
2002-09-04 04:55:20 +00:00
Miguel de Icaza b0a21ed982 2002-09-04 Miguel de Icaza <[email protected]>
* Int16.cs, UInt16.cs, Int32.cs, UInt32.cs, Int64.cs, UInt64.cs,
	SByte.cs, Byte.cs, Char.cs: Use internal for the actual value
	instead of public.

svn path=/trunk/mcs/; revision=7233
2002-09-04 04:45:45 +00:00
Miguel de Icaza 05d8302025 Make the variable match the prototype
svn path=/trunk/mcs/; revision=7231
2002-09-04 04:07:45 +00:00
Miguel de Icaza 4276594cbb 2002-09-03 Miguel de Icaza <[email protected]>
* statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
	it was important that we stored the right value after the
	reduction in `converted'.

svn path=/trunk/mcs/; revision=7230
2002-09-04 04:05:07 +00:00
Miguel de Icaza 0968f763a3 Improve test
svn path=/trunk/mcs/; revision=7229
2002-09-04 04:03:26 +00:00
Dennis Hayes abdd012125 2002-9-2 DennisHayes <[email protected]>
* GraphicsPath.cs
	* added stub needed for system.windows.forms

svn path=/trunk/mcs/; revision=7228
2002-09-04 02:39:21 +00:00
Dennis Hayes 281e05c862 2002-9-2 DennisHayes <[email protected]>
* Brushes.cs : stubbed, added colors. Not sure how to implement,
				 but this should at least save someone some typing.
	* CharacterRange.cs :Implmented
	* Region.cs : stub needed for system.windows.forms

svn path=/trunk/mcs/; revision=7227
2002-09-04 02:35:26 +00:00
Dennis Hayes e5c4e36a5e 2002-8-6 DennisHayes <[email protected]>
* AccessibleObject.cs
* AmbientProperties.cs
* AxHost.cs
* Button.cs
* ButtonBase.cs
* CheckBox.cs
* ColorDialog.cs
* ColumnHeader.cs
* ComboBox.cs
* ContainerControl.cs
* DataGrid.cs
* DateTimePicker.cs
* ListControl.cs
* PrintPreviewDialog.cs
* Implmented any functions.

* System.Windows.Forms.csproj
* System.Windows.Forms.csproj.user
* Added win32.cs

svn path=/trunk/mcs/; revision=7226
2002-09-04 02:22:56 +00:00
Gonzalo Paniagua Javier c7a35e4544 2002-09-03 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs:
	* HttpWebResponse.cs: applied patch from Shahms E. King
	([email protected]).

svn path=/trunk/mcs/; revision=7225
2002-09-04 01:42:23 +00:00
Martin Baulig 5c623e61ff 2002-09-04 Martin Baulig <[email protected]>
* location.cs (Location.SymbolDocument): Use full pathnames for the
	source files.

svn path=/trunk/mcs/; revision=7223
2002-09-03 23:27:46 +00:00
Juli Mallett 54890e5fa4 Back out the previous revision, the previous previous revision was right, as
long as one reran autoheader (autogen.sh).

svn path=/trunk/mono/; revision=7214
2002-09-03 19:56:00 +00:00
Martin Baulig 3ee223464a 2002-09-03 Martin Baulig <[email protected]>
* debug.c (free_method_info): Make this actually work.

svn path=/trunk/mono/; revision=7212
2002-09-03 18:48:54 +00:00
Jonathan Pryor c1512698fd See ChangeLog for details.
svn path=/trunk/mcs/; revision=7211
2002-09-03 17:57:40 +00:00
Jonathan Pryor 1859baf1d3 * Enum.cs: Fixed Enum.Format so that the "x" format specifier would work
properly.

svn path=/trunk/mcs/; revision=7210
2002-09-03 17:28:30 +00:00
Dick Porter 7a858ef3f1 2002-09-03 Dick Porter <[email protected]>
* Thread.cs: Added thread ID field

svn path=/trunk/mcs/; revision=7209
2002-09-03 16:43:19 +00:00
Dick Porter 081119cf87 2002-09-03 Dick Porter <[email protected]>
* threads.h:
	* threads.c: Removed PosixKillThread(), because it's not in the
	w32 api

2002-09-03  Dick Porter  <[email protected]>

	* threads.h:
	* threads.c: Use MonoThread instead of MonoObject where
	apropriate.

	Store running thread objects in a hash table, so that we have all
	the info to hand when waiting for them to finish
	(means we don't need OpenThread() any more, so mingw builds should
	be fully functional again.)

	* verify.c:
	* object.h: Added thread ID to MonoThread

svn path=/trunk/mono/; revision=7208
2002-09-03 16:41:29 +00:00
Adam Treat 37e118ce90 * Applied [email protected]'s changes. This fixes method lookups that ignore
case and that ignore parameter signatures resulting in incorrect behavior.

svn path=/trunk/mcs/; revision=7207
2002-09-03 15:16:42 +00:00
Dietmar Maurer 1a0547470d 2002-09-03 Dietmar Maurer <[email protected]>
* System.Runtime.Remoting.Channels.CORBA/CORBAChannel.cs:
	impl. the channel wrapper.

	* System.Runtime.Remoting.Channels.Simple/SimpleChannel.cs:
	impl. the channel wrapper.

	* System.Runtime.Remoting.Channels.Simple/SimpleServerChannel.cs
	(GetUrlsForUri): use all available channel uris.

svn path=/trunk/mcs/; revision=7206
2002-09-03 13:56:31 +00:00
Dietmar Maurer b1313d9e7f revert my last change - it needs to be public
svn path=/trunk/mcs/; revision=7205
2002-09-03 13:04:37 +00:00
Dietmar Maurer 26cf616714 2002-09-03 Dietmar Maurer <[email protected]>
* MonoMethodMessage.cs: make in an iternal class again.

svn path=/trunk/mcs/; revision=7204
2002-09-03 12:47:18 +00:00
Martin Baulig 8d3599ce6d Increase symbol file generation when adding a new method.
svn path=/trunk/mono/; revision=7202
2002-09-03 12:39:30 +00:00
Martin Baulig d6933f0cac 2002-09-03 Martin Baulig <[email protected]>
* icall.c (System.Reflection.Assembly::get_location): New interncall.

svn path=/trunk/mono/; revision=7201
2002-09-03 12:38:18 +00:00
Martin Baulig b997879ae9 2002-09-03 Martin Baulig <[email protected]>
* Assembly.cs (Assembly.Location): Implemented.

svn path=/trunk/mcs/; revision=7200
2002-09-03 12:36:38 +00:00
Martin Baulig 31d6d573f9 2002-09-03 Martin Baulig <[email protected]>
* ConfigurationSettings.cs (ConfigurationSettings.GetConfig): Use the
	correct configuration filename, fixed the TODO.
	(GetSectionHanderType): Renamed to GetSectionHandlerType.

	* NameValueSectionHandler.cs (NameValueSectionHandler.Create): Allow
	whitespaces in the configuration file.

svn path=/trunk/mcs/; revision=7199
2002-09-03 12:36:00 +00:00
Gonzalo Paniagua Javier 3583837ad7 Removed stuff included by mistake in my last commit.
svn path=/trunk/mono/; revision=7198
2002-09-03 12:16:53 +00:00
Gonzalo Paniagua Javier fce1655a31 2002-09-03 Gonzalo Paniagua Javier <[email protected]>
* icall.c: fixed leak in get_temp_path. Thanks lupus.

svn path=/trunk/mono/; revision=7197
2002-09-03 12:09:55 +00:00
Dick Porter 5e37acebe6 Insist that the cygwin libiconv package is installed (seems to work around
libtool braindamage)

svn path=/trunk/mono/; revision=7196
2002-09-03 10:12:23 +00:00
Gonzalo Paniagua Javier 56b6a6396b 2002-09-03 Gonzalo Paniagua Javier <[email protected]>
* DefaultContext.cs: fixed bug #28840.
	* Expression.cs: added FIXME.

svn path=/trunk/mcs/; revision=7195
2002-09-03 10:01:37 +00:00
Gonzalo Paniagua Javier 9fc1f796b0 2002-09-03 Gonzalo Paniagua Javier <[email protected]>
* StringCollection.cs: fixes bug #29791. Thanks to Marcus Urban
	([email protected]).

svn path=/trunk/mcs/; revision=7194
2002-09-03 09:55:35 +00:00
Rafael Teixeira cb4d014f4c 2002-09-03 Rafael Teixeira <[email protected]>
* integrated new version of Mono.GetOptions (reflection/attributes-based)

svn path=/trunk/mcs/; revision=7193
2002-09-03 08:00:37 +00:00
Rafael Teixeira 1734110f45 2002-09-03 Rafael Teixeira <[email protected]>
* integrated new version of Mono.GetOptions (reflection/attributes-based)

svn path=/trunk/mcs/; revision=7192
2002-09-03 07:58:28 +00:00
Dietmar Maurer bcc53e7bad CORBA Channel, ObjRef serialisation support
svn path=/trunk/mcs/; revision=7191
2002-09-03 07:22:30 +00:00
John Sohn 3dc3dc6f39 * Control.cs: mapped more of the functions to the Win32 API
* Win32.cs: added more Win32 imports and definitions

svn path=/trunk/mcs/; revision=7190
2002-09-03 06:15:20 +00:00
Rafael Teixeira ea216a1299 see the changelog
svn path=/trunk/mcs/; revision=7189
2002-09-03 06:12:30 +00:00
Miguel de Icaza 96005596ea Remove this, get things working for now
svn path=/trunk/mono/; revision=7187
2002-09-03 01:59:18 +00:00
Miguel de Icaza 3491edf333 Flush: removed redundant instructions + Added Mono licensing
svn path=/trunk/mono/; revision=7186
2002-09-03 00:19:00 +00:00
Martin Baulig 05fedf2865 Reflect latest mono_disasm_code_one() changes.
svn path=/trunk/mono/; revision=7183
2002-09-02 23:59:39 +00:00
Martin Baulig 5ddb5007c9 2002-09-03 Martin Baulig <[email protected]>
* AssemblerWriterI386.cs, IAssemblerWriter.cs, MonoDwarfFileWriter.cs,
	README, README.relocation-table, csharp-lang.[ch], gdb-csharp-support.patch,
	gdb-variable-scopes.patch: Removed.

svn path=/trunk/mcs/; revision=7182
2002-09-02 23:58:04 +00:00
Martin Baulig fa72802d3b 2002-09-03 Martin Baulig <[email protected]>
* debug.h (MonoDebugFormat): Killed MONO_DEBUG_FORMAT_DWARF2_PLUS.
	* debug-dwarf2-plus.c: Removed.

	* debug-private.h (DebugMethodInfo): Removed the `method_info' field.
	(AssemblyDebugInfo): Removed the old `symfile' field and renamed
	`mono_symfile' to `symfile'.

	* debug.c (mono_debug_open): Replaced the assembly argument with a
	file name argument; you can now call this before loading the assembly.
	(debug_generate_method_lines): The MonoDebugILOffsetInfo struct is gone,
	we now use MonoSymbolFileLineNumberEntry's and a separate address array
	instead; splitted out all MonoSymbolFileLineNumberEntry code into
	debug_generate_il_offsets() and debug_update_il_offsets().
	(mono_debug_add_method): Don't create the MonoDebugMethodInfo here; it's
	created when reading the symbol file or from debug_load_method_lines().
	(debug_load_method_lines): Create the MonoDebugMethodInfo for all methods.

	* exception.c (arch_handle_exception): Call mono_debug_make_symbols() before
	looking up an address.

	* debug.c: Don't create the .il files for MONO_DEBUG_FORMAT_MONO.

	* mono.c (main): Initialize debugging before loading the first assembly.

svn path=/trunk/mono/; revision=7181
2002-09-02 23:53:35 +00:00
Martin Baulig bb667a46b5 2002-09-03 Martin Baulig <[email protected]>
* debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
	argument to store the end address of the disassembled instruction.

	* debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
	here from debug-symfile.h.
	(MonoDebugMethodJitInfo): Moved all fields which are filled out by the
	JIT into this struct.
	(MonoSymbolFile): Added `char *image_file' field.
	(MonoDebugGetMethodFunc): Removed.
	(mono_debug_update_mono_symbol_file): Removed the hash table argument.
	(mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
	(mono_debug_find_method): New method.

	* debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
	create a full symbol file.
	(mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
	and static symbol files.
	(mono_debug_find_method): The symbol file keeps an internal method hash,
	call this to get a MonoDebugMethodInfo from a MonoMethod.

	* debug-symfile.[ch]: Removed.

svn path=/trunk/mono/; revision=7180
2002-09-02 23:53:03 +00:00
Martin Baulig 4c5aafabb4 2002-09-03 Martin Baulig <[email protected]>
* MonoSymbolTableReader.cs (MonoSymbolTableReader.ImageFile): New
	public property.

	* MonoSymbolTable.cs: Bumped version number to 18.

svn path=/trunk/mcs/; revision=7179
2002-09-02 23:35:06 +00:00
Diego Sevilla Ruiz e983072823 2002-09-02 Diego Sevilla Ruiz <[email protected]>
* doc/ccvs: Added how to convert SSH keys (from SSH Communications
	Security) to the OpenSSH keys required by mono CVS
	access.

svn path=/trunk/mono/; revision=7178
2002-09-02 19:30:37 +00:00
Dick Porter 35474b62da Cope with the cygwin pkgconfig being installed
svn path=/trunk/mono/; revision=7177
2002-09-02 13:59:34 +00:00
Jonathan Pryor d5c20ef5e1 * ChangeLog: Updated for type-reflector
* makefile: Added type-reflector to the build.

svn path=/trunk/mcs/; revision=7176
2002-09-02 01:18:41 +00:00
Jonathan Pryor 32ffb354c1 Added new tool to the CVS repository, type-reflector.
See README for more information.

svn path=/trunk/mcs/; revision=7175
2002-09-02 01:08:14 +00:00
John Sohn c48238d24e * MessageBox.cs: added mostly complete implementation of the
MessageBox class
	* Application.cs: completed implementation of Run methods, implemented
	message handler functionality
	* Form.cs: implemented the Close event, allows the Application class to
	receive notification for shutting down the application
	* FormTest.cs: added additional functionality to test most methods
	currently implemented in the Application and Form class
	* NativeWindowTest.cs: fixed methods which received the MSG structure,
	previously was using an integer type instead of the struct
	* Win32.cs: added more Win32 imports and definitions
	* makefile: added the MessageBox.cs class to the build

svn path=/trunk/mcs/; revision=7174
2002-09-01 21:40:40 +00:00
Juli Mallett ba419c4ef8 2002-09-01 Juli Mallett <[email protected]>
* configure.in, mono/interpreter/interp.c,
	mono/io-layer/handles.c, mono/io-layer/processes.c,
	mono/io-layer/threads.c, mono/io-layer/timed-thread.c,
	mono/io-layer/wait.c, mono/jit/helpers.c, mono/jit/jit.c,
	mono/metadata/appdomain.c, mono/metadata/class.c,
	mono/metadata/domain.c, mono/metadata/gc.c,
	mono/metadata/object.c, mono/metadata/reflection.c,
	mono/metadata/threads.c, mono/os/gc_wrapper.h,
	mono/utils/mono-hash.c: Add a new header, gc_wrapper.h, to
	wrap inclusion of gc.h for boehm, since from FreeBSD and
	OpenBSD ports, gc.h is <gc.h>, but on GNU it seems to be
	in <gc/gc.h>.  This will reduce the diffs FreeBSD ports has
	to apply, and also makes it possible for me to build with
	GC on OpenBSD/macppc built by hand.

svn path=/trunk/mono/; revision=7173
2002-09-01 20:47:55 +00:00
Juli Mallett 271f6b2dc8 2002-09-01 Juli Mallett <[email protected]>
* configure.in: On BSD don't try to use -ldl, we simply don't use it.

svn path=/trunk/mono/; revision=7172
2002-09-01 20:05:50 +00:00
Juli Mallett ef113c8323 2002-09-01 Juli Mallett <[email protected]>
* mono/dis/dis-cil.c:
	* configure.in: Check for <wchar.h> via autoconf, don't use it if
	it isn't there, as it seems to work fine without it on OpenBSD.

svn path=/trunk/mono/; revision=7171
2002-09-01 19:14:09 +00:00
Dietmar Maurer 2e2f30bd0c * ObjRef.cs: gather the channel date at creation time.
* ChannelDataStore.cs: use a hash to store other keys

svn path=/trunk/mcs/; revision=7162
2002-08-31 12:43:34 +00:00
Rafael Teixeira 239886689a cvsignore
svn path=/trunk/mcs/; revision=7161
2002-08-31 07:52:00 +00:00
Rafael Teixeira a97a5e5831 2002-08-31 Rafael Teixeira <[email protected]>
* merged expression.cs from mcs/mcs, to resync

svn path=/trunk/mcs/; revision=7160
2002-08-31 07:48:31 +00:00
Juli Mallett 09754dbb8d 2002-08-30 Juli Mallett <[email protected]>
* list.unix, makefile.gnu: Added build glue for UNIX.

svn path=/trunk/mcs/; revision=7159
2002-08-31 04:21:35 +00:00
Miguel de Icaza 5489fc358e 2002-08-30 Miguel de Icaza <[email protected]>
* expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
	of the expression resolve mechanism, because that will catch the
	SimpleName error failures.

svn path=/trunk/mcs/; revision=7157
2002-08-31 01:59:09 +00:00
Miguel de Icaza e1bfc82707 2002-08-30 Miguel de Icaza <[email protected]>
* expression.cs (Conditional): If we can not resolve the
	expression, return, do not crash.

svn path=/trunk/mcs/; revision=7156
2002-08-30 21:57:47 +00:00
Dietmar Maurer 4d1b3ab9d5 added missing files
svn path=/trunk/mcs/; revision=7155
2002-08-30 16:52:03 +00:00
Dietmar Maurer 3069d9c5c3 removed unnecessary writeline
svn path=/trunk/mcs/; revision=7154
2002-08-30 16:29:22 +00:00
Dietmar Maurer a810886642 2002-08-30 Dietmar Maurer <[email protected]>
* System.Runtime.Remoting.Channels.Simple/SimpleWireFormat.cs: add
	more types.

svn path=/trunk/mcs/; revision=7153
2002-08-30 16:21:07 +00:00
Dietmar Maurer fc30c69bcf added an example, semove unnecessary WriteLine
svn path=/trunk/mcs/; revision=7152
2002-08-30 14:46:16 +00:00
Dietmar Maurer 2e4f40e23d channel example implementation
svn path=/trunk/mcs/; revision=7151
2002-08-30 14:01:21 +00:00
Nick Drochak 98fae5bd7f 2002-08-30 Nick Drochak <[email protected]>
* PathTest.cs (TestGetPathRoot):  Don't assume current directory will
	be on the C: drive (mine wasn't).

svn path=/trunk/mcs/; revision=7150
2002-08-30 05:47:59 +00:00
John Sohn 1093c32524 RegisterClass/WNDPROC callback is now initialized entrely in C#, simplified
the stub application

svn path=/trunk/mcs/; revision=7149
2002-08-30 05:36:19 +00:00
Miguel de Icaza 2b395e4143 2002-08-29 Miguel de Icaza <[email protected]>
* image.c (do_mono_image_open): Remove linker version check.

svn path=/trunk/mono/; revision=7147
2002-08-30 04:59:06 +00:00
Gonzalo Paniagua Javier 80f46045ee 2002-08-29 Gonzalo Paniagua Javier <[email protected]>
* ArrayList.cs: fixed bug #29658.

svn path=/trunk/mcs/; revision=7146
2002-08-30 00:29:22 +00:00
Dick Porter 1dbf4ea99d Pass LDFLAGS when linking monoburg
svn path=/trunk/mono/; revision=7145
2002-08-29 23:41:29 +00:00
Gonzalo Paniagua Javier 7e8c804d86 2002-08-29 Gonzalo Paniagua Javier <[email protected]>
* cs-tokenizer.cs:
	(location): display token name instead of its number.

svn path=/trunk/mcs/; revision=7144
2002-08-29 23:11:41 +00:00
Miguel de Icaza 55634e1f2b Add new logo
svn path=/trunk/mono/; revision=7143
2002-08-29 23:10:02 +00:00
Gonzalo Paniagua Javier b41bf89278 2002-08-29 Gonzalo Paniagua Javier <[email protected]>
* MonoField.cs:
	(GetValue): allow obj to be null (used for static fields).

svn path=/trunk/mcs/; revision=7142
2002-08-29 23:07:52 +00:00
Dick Porter 80575b9add New versions of the build scripts. The windows one checks that automake
is new enough (fixes strangeness reported by Gonzalo.)

The other one now copes with enough system variation to work on Freebsd.

svn path=/trunk/mono/; revision=7140
2002-08-29 16:47:27 +00:00
Dietmar Maurer 425cd9f8fe 2002-08-29 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_managed_wrapper): don't cache
	wrappers for instance methods.

svn path=/trunk/mono/; revision=7139
2002-08-29 15:00:13 +00:00
Rafael Teixeira 3a6c0cbb1d 2002-08-29 Rafael Teixeira <[email protected]>
* merged assign.cs, attribute.cs, class.cs, codegen.cs, const.cs, decl.cs, delegate.cs, ecore.cs, enum.cs,
        expression.cs, interface.cs, pending.cs, report.cs, rootcontext.cs, statement.cs, support.cs and
        typemanager.cs from mcs/mcs, to resync

svn path=/trunk/mcs/; revision=7138
2002-08-29 14:19:58 +00:00
Gonzalo Paniagua Javier ac893ff6f1 2002-08-29 Gonzalo Paniagua Javier <[email protected]>
* CheckArgument.cs: fixed check for empty string.
	* Path.cs: various fixes. It passes all the tests in new PathTest.

svn path=/trunk/mcs/; revision=7137
2002-08-29 11:41:48 +00:00
Gonzalo Paniagua Javier b0da22d0cc 2002-08-29 Gonzalo Paniagua Javier <[email protected]>
* icall.c: added ves_icall_System_IO_Path_get_temp_path.

svn path=/trunk/mono/; revision=7136
2002-08-29 11:38:36 +00:00
Gonzalo Paniagua Javier 42a105053e 2002-08-29 Gonzalo Paniagua Javier <[email protected]>
* PathTest.cs: improved.

svn path=/trunk/mcs/; revision=7135
2002-08-29 11:32:15 +00:00
Juli Mallett e4cff48d9a 2002-08-28 Juli Mallett <[email protected]>
* arch.cs, compiler.cs: Give the interpreter machine a property
	for the retrieval of the group count.

	* regex.cs: Use the new GroupCount property of the factory to
	initialise the current group count, and restructure code to compile
	the pattern only the first time it is needed (essentially backing
	out the previous revision of regex.cs, to use the new code.)

svn path=/trunk/mcs/; revision=7132
2002-08-28 18:46:54 +00:00
Radek Doulik 962db8699b retval value type fixed
svn path=/trunk/mono/; revision=7127
2002-08-28 15:26:29 +00:00
Radek Doulik f8b7cbf694 fixed valuetypes marshaling in delegates
svn path=/trunk/mono/; revision=7126
2002-08-28 14:41:08 +00:00
Dick Porter c25efc9f92 2002-08-28 Dick Porter <[email protected]>
* mono/os/win32/util.c:
	* mono/os/unix/util.c:
	* mono/os/util.h: mono_set_rootdir() doesnt take any args now.
	(It doesn't do anything on unix builds, and the w32 version no
	longer needs an arg.)

	* configure.in: Add HOST_CC for w32 builds

2002-08-28  Dick Porter  <[email protected]>

	* Makefile.am: Export HOST_CC for w32 builds

2002-08-28  Dick Porter  <[email protected]>

	* interp.c: mono_set_rootdir() doesnt take any args now

	* Makefile.am: Export HOST_CC and turn on optimisation for w32 builds

2002-08-28  Dick Porter  <[email protected]>

	* mono.c: mono_set_rootdir() doesnt take any args now

	* Makefile.am: Export HOST_CC for w32 builds

svn path=/trunk/mono/; revision=7124
2002-08-28 14:14:24 +00:00
Duncan Mak 2b31a83b28 2002-08-29 Duncan Mak <[email protected]>
* StreamWriter.cs: Set DisposedAlready after calling flush. Fixes
	the build for gtk#.

svn path=/trunk/mcs/; revision=7123
2002-08-28 09:22:19 +00:00
Dietmar Maurer b1d4839dd3 2002-08-28 Dietmar Maurer <[email protected]>
* jit.c (mono_store_tree): only allocate vars if really necessary

svn path=/trunk/mono/; revision=7122
2002-08-28 09:09:25 +00:00
Gaurav Vaish 63da177af1 2002-08-28 Gaurav Vaish <[email protected]>
* DataSourceInternal.cs       - Added new class (internal).
* ChangeLog                   - Updated Info.

svn path=/trunk/mcs/; revision=7121
2002-08-28 06:17:19 +00:00
Nick Drochak 5e3f295d55 *** empty log message ***
svn path=/trunk/mono/; revision=7120
2002-08-28 04:07:42 +00:00
Gonzalo Paniagua Javier b65b32946f 2002-08-28 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: fixed buglet.

svn path=/trunk/mcs/; revision=7119
2002-08-28 02:51:50 +00:00
Gonzalo Paniagua Javier 5bf2383288 2002-08-27 Gonzalo Paniagua Javier <[email protected]>
* System.IO/BinaryReader.cs:
	* System.IO/BinaryWriter.cs:
	* System.IO/MemoryStream.cs:
	* System.IO/StreamReader.cs:
	* System.IO/StreamWriter.cs:
	* System.IO/StringReader.cs:
	* System.IO/StringWriter.cs:
	* System.IO/TextWriter.cs:
	* System.Threading/WaitHandle.cs: IDisposable fixes.

svn path=/trunk/mcs/; revision=7118
2002-08-28 02:30:47 +00:00
Gonzalo Paniagua Javier 3e02dca4b6 2002-08-28 Gonzalo Paniagua Javier <[email protected]>
* System.ComponentModel/Component.cs:
	* System.ComponentModel/ComponentCollection.cs:
	* System.ComponentModel/Container.cs:
	* System.ComponentModel/MarshalByValueComponent.cs:
	* System.Diagnostics/Process.cs:
	* System.Diagnostics/TextWriterTraceListener.cs:
	* System.IO/FileSystemWatcher.cs:
	IDisposable fixes.

svn path=/trunk/mcs/; revision=7117
2002-08-28 02:30:24 +00:00
Martin Baulig 6563dbd72c 2002-08-28 Martin Baulig <[email protected]>
* expression.cs (Binary.ResolveOperator): Don't silently return
	but return an error if an operator cannot be applied between two
	enum types.

svn path=/trunk/mcs/; revision=7116
2002-08-28 02:27:19 +00:00
Martin Baulig 230c0d7d06 Oops, default to public if no attribute is given.
svn path=/trunk/mcs/; revision=7115
2002-08-28 02:13:53 +00:00
Martin Baulig b8204cc351 2002-08-28 Martin Baulig <[email protected]>
* class.cs (Constructor.Define): Set the permission attributes
	correctly instead of making all constructors public.

svn path=/trunk/mcs/; revision=7114
2002-08-28 00:43:14 +00:00
Martin Baulig 0c06e20cc0 2002-08-28 Martin Baulig <[email protected]>
* ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
	for private members before reporting a CS0103; if we find anything,
	it's a CS0122.

svn path=/trunk/mcs/; revision=7112
2002-08-27 23:52:31 +00:00
Martin Baulig 5305f826e0 2002-08-28 Martin Baulig <[email protected]>
* typemanager.cs (TypeManager.FilterWithClosure): It's not enough
	to check whether `closure_start_type == closure_invocation_type',
	we also need to check whether `m.DeclaringType == closure_invocation_type'
	before bypassing the permission checks.  We might be accessing
	protected/private members from the base class.
	(TypeManager.RealMemberLookup): Only set private_ok if private
	members were requested via BindingFlags.NonPublic.

	* ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.

	* expression.cs (MemberAccess.ResolveMemberAccess): Set
	MethodGroupExpr.IsExplicitImpl if appropriate.
	(Invocation.DoResolve): Don't report the CS0120 for explicit
	interface implementations.

svn path=/trunk/mcs/; revision=7111
2002-08-27 23:31:07 +00:00
Martin Baulig 6718c8a85d 2002-08-27 Martin Baulig <[email protected]>
* cs0120-3.cs: New test.

svn path=/trunk/mcs/; revision=7110
2002-08-27 21:16:29 +00:00
Martin Baulig f2008bcb4a 2002-08-27 Martin Baulig <[email protected]>
* expression.cs (Invocation.DoResolve): If this is a static
	method and we don't have an InstanceExpression, we must report
	a CS0120.

svn path=/trunk/mcs/; revision=7109
2002-08-27 21:13:48 +00:00
Martin Baulig f3c7da05e3 2002-08-27 Martin Baulig <[email protected]>
* debug.c: The mono symbol file is installed together with the assembly
	it belongs to and it's used on a per-image basis.

svn path=/trunk/mono/; revision=7101
2002-08-27 17:54:23 +00:00
Paolo Molaro db6e307c86 Tue Aug 27 19:44:32 CEST 2002 Paolo Molaro <[email protected]>
* mono.c: don't use the cil-coff header outside of the loader.

svn path=/trunk/mono/; revision=7100
2002-08-27 17:46:10 +00:00
Gonzalo Paniagua Javier a16a51c225 2002-08-27 Gonzalo Paniagua Javier <[email protected]>
* makefile.gnu:
	* class/library.make:
	* class/makefile.gnu:
	* class/I18N/makefile.gnu
	* class/corlib/makefile.gnu:
	* class/corlib/Test/ChangeLog:
	* class/corlib/Test/corlib_linux_test.args:
	* class/corlib/Test/makefile.gnu:
	* class/corlib/Test/run_test.sh:
	* jay/makefile.gnu:
	* mcs/makefile.gnu:
	* monoresgen/makefile.gnu:
	* nunit/makefile.gnu:

	Allow running 'make -f makefile.gnu test' from top directory.
	In the libraries makefile.gnu you just have to add TEST_DIR=dirname
	with the name where tests reside.

svn path=/trunk/mcs/; revision=7099
2002-08-27 17:31:06 +00:00
Paolo Molaro 7818abc420 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <[email protected]>
* file-io.c process.c: MonoString are null terminated, no
	need for mono_string_to_utf16() anymore.

svn path=/trunk/mono/; revision=7096
2002-08-27 16:37:08 +00:00
Paolo Molaro a0e8b42612 Removed iconv header.
svn path=/trunk/mono/; revision=7094
2002-08-27 16:19:47 +00:00
Paolo Molaro 3923c5163d Tue Aug 27 18:17:43 CEST 2002 Paolo Molaro <[email protected]>
* configure.in: remove iconv checks.

svn path=/trunk/mono/; revision=7093
2002-08-27 16:19:15 +00:00
Paolo Molaro 258276203c Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <[email protected]>
* icall.c, unicode.h, unicode.c: removed unused iconv stuff.

svn path=/trunk/mono/; revision=7091
2002-08-27 16:05:14 +00:00
Paolo Molaro 0b315c47ee Tue Aug 27 16:57:18 CEST 2002 Paolo Molaro <[email protected]>
* TypeBuilder.cs: remove duplicate code and fix
	named field reading in custom attr.

svn path=/trunk/mcs/; revision=7089
2002-08-27 14:59:42 +00:00
Paolo Molaro b4244586e2 Tue Aug 27 16:39:47 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs: speedup access to common data.

svn path=/trunk/mcs/; revision=7088
2002-08-27 14:42:09 +00:00
Paolo Molaro 740dee6302 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <[email protected]>
* icall.c, reflection.h: speedup System.MonoType.

svn path=/trunk/mono/; revision=7087
2002-08-27 14:42:07 +00:00
Paolo Molaro ab1d8f9b91 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <[email protected]>
* reflection.c: allow null as the value of a string argument in
	custom attributes constructors.

svn path=/trunk/mono/; revision=7086
2002-08-27 14:39:19 +00:00
Gonzalo Paniagua Javier 0673413dec 2002-08-27 Gonzalo Paniagua Javier <[email protected]>
* makefile.gnu:
	* src/NUnitConsole/makefile.gnu: some modifications to use the other
	makefiles and build dll and exe on linux.

	* src/makefile.gnu: New file.
	* src/NUnitCore/list.unix: New file.
	* src/NUnitCore/makefile.gnu: New file.

svn path=/trunk/mcs/; revision=7085
2002-08-27 13:29:18 +00:00
Martin Baulig 22b9f047d9 2002-08-27 Martin Baulig <[email protected]>
* debug.c (mono_debugger_internal_get_symbol_files): Removed, we need
	to use global variables for this since they're stored in a core file.
	(mono_debugger_symbol_file_table_generation): New global variable.
	(mono_debugger_symbol_file_table): New global variable.
	(mono_debugger_update_symbol_file_table): New global function to update
	the symbol file table.

svn path=/trunk/mono/; revision=7083
2002-08-27 12:56:58 +00:00
Martin Baulig a266b5dd42 2002-08-27 Martin Baulig <[email protected]>
* trampoline.c (mono_generic_trampoline_code): New global variable.
	(arch_create_jit_trampoline): Use the new global variable to store the
	generic trampoline code instead of using a static one.  This allows the
	debugger to access this variable to check whether a method is a trampoline.

	* debug.h (mono_generic_trampoline_code): Added external declaration.

svn path=/trunk/mono/; revision=7082
2002-08-27 12:01:46 +00:00
Martin Baulig a3bba04e9c 2002-08-27 Martin Baulig <[email protected]>
* MonoSymbolTable.cs (MethodAddress): Removed `TrampolineAddress'.

svn path=/trunk/mcs/; revision=7081
2002-08-27 11:56:30 +00:00
Martin Baulig 8d9dd544ae 2002-08-27 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
	`trampoline_address' field.

svn path=/trunk/mono/; revision=7080
2002-08-27 11:55:30 +00:00
Martin Baulig 1ff926d1d3 Reverted, it isn't needed anymore.
2002-08-24  Martin Baulig  <[email protected]>

	* rawbuffer.c (mono_raw_buffer_load): Added `int is_shared'
	argument.  This is a flag which specifies whether we do a private
	copy-on-write mapping even when a writable mapping was requested.

svn path=/trunk/mono/; revision=7079
2002-08-27 11:52:16 +00:00
Dietmar Maurer 48cabf2578 2002-08-27 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): removed wrong null
	check (fixes bug #29486)

svn path=/trunk/mono/; revision=7078
2002-08-27 07:53:32 +00:00
Miguel de Icaza 5dc2a03871 I can not figure out, how I made 0.15, without it being on cvs
svn path=/trunk/mono/; revision=7077
2002-08-27 06:41:12 +00:00
Gonzalo Paniagua Javier 416a22b786 Added clean target.
svn path=/trunk/mcs/; revision=7076
2002-08-27 03:06:15 +00:00
Nick Drochak f80004b19f 2002-08-27 Nick Drochak <[email protected]>
* index: fix small typo for top news item

svn path=/trunk/mono/; revision=7075
2002-08-27 03:02:24 +00:00
Gonzalo Paniagua Javier b1c3e6b4bc Oops
svn path=/trunk/mcs/; revision=7074
2002-08-27 02:07:57 +00:00
Gonzalo Paniagua Javier 9e679a80e4 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* list: added new files in System.Web.Security
	* System.Web.Security/DefaultAuthenticationEventHandler.cs:
	* System.Web.Security/DefaultAuthenticationModule.cs:
	* System.Web.Security/FileAuthorizationModule.cs:
	* System.Web.Security/FormsAuthentication.cs:
	* System.Web.Security/FormsAuthenticationEventArgs.cs:
	* System.Web.Security/FormsAuthenticationEventHandler.cs:
	* System.Web.Security/FormsAuthenticationModule.cs:
	* System.Web.Security/FormsAuthenticationTicket.cs:
	* System.Web.Security/FormsIdentity.cs:
	* System.Web.Security/PassportAuthenticationEventArgs.cs:
	* System.Web.Security/PassportAuthenticationEventHandler.cs:
	* System.Web.Security/PassportAuthenticationModule.cs:
	* System.Web.Security/PassportIdentity.cs:
	* System.Web.Security/UrlAuthorizationModule.cs:
	* System.Web.Security/WindowsAuthenticationEventArgs.cs:
	* System.Web.Security/WindowsAuthenticationEventHandler.cs:
	* System.Web.Security/WindowsAuthenticationModule.cs: new files. Some
	of them implemented, some others stubbed out.

svn path=/trunk/mcs/; revision=7073
2002-08-27 02:03:20 +00:00
Gonzalo Paniagua Javier c87c2fda2b 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* unix.args: added a couple of new files in System.Security.Principal.
	* System.Security.Principal/WindowsIdentity.cs:
	* System.Security.Principal/WindowsImpersonationContext.cs: stubbed.

svn path=/trunk/mcs/; revision=7072
2002-08-27 01:40:49 +00:00
Martin Baulig d2bb06c6f2 2002-08-27 Martin Baulig <[email protected]>
* debug.c (MonoDebugHandle): Moved the method hash into the
	AssemblyDebugInfo struct since we need to use a separate hash for each
	MonoImage.

	* debug.c: Added special undocumented command line argument to create a
	symbol file for IL files on-the-fly.  In this case, we also need to create
	the IL files and parse them.
	(mono_debugger_internal_get_symbol_files): Return something more reasonable.

svn path=/trunk/mono/; revision=7067
2002-08-26 23:28:55 +00:00
Martin Baulig 05ee953635 2002-08-27 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Changed the file format in a way that allows us
	open it read-only and to use a specially malloced area for all the
	dynamic data.  We can now also generate a symbol file on-the-fly if we're
	debugging IL code and there is no MCS generated symbol file for it.

svn path=/trunk/mono/; revision=7066
2002-08-26 23:25:36 +00:00
Martin Baulig 97542158b6 2002-08-27 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Changed the file format in a way that allows us
	open it read-only and to use a specially malloced area for all the
	dynamic data.

svn path=/trunk/mcs/; revision=7065
2002-08-26 23:23:36 +00:00
Gonzalo Paniagua Javier d201881f93 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWorkerRequest.cs: mcs doesn't go crazy. It's just me, that forgot
	to add HttpMapPath to the list file...

svn path=/trunk/mcs/; revision=7064
2002-08-26 23:14:23 +00:00
Gonzalo Paniagua Javier ff19f0aa42 Added IHttpMapPath.cs
svn path=/trunk/mcs/; revision=7063
2002-08-26 23:11:53 +00:00
Ravi Pratap M e09e903225 2002-08-26 Ravi Pratap <[email protected]>
* XmlAttribute.cs (InnerText): Implement getting this property.

	* XmlNode.cs (InnerText): Ensure that we append only values of
	text nodes.

svn path=/trunk/mcs/; revision=7061
2002-08-26 20:26:15 +00:00
Gonzalo Paniagua Javier 06a84330ee 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWorkerRequest.cs: fixes compilation with mcs. I will add a bug
	report when i get a test case.

svn path=/trunk/mcs/; revision=7060
2002-08-26 20:25:21 +00:00
Gonzalo Paniagua Javier e4e5331199 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* ApplicationHost.cs: little fixes.

svn path=/trunk/mcs/; revision=7058
2002-08-26 19:45:11 +00:00
Gonzalo Paniagua Javier 22239e7634 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs:
	* HttpCachePolicy.cs:
	* HttpResponseHeader.cs:
	* HttpResponseStream.cs:
	* HttpResponseStreamProxy.cs:
	* HttpValueCollection.cs: misc. fixes based on class status page.

	* IHttpMapPath.cs: New file.

	* HttpRequest.cs: implemented ContentEncoding.
	* HttpWorkerRequest.cs: mono-stylized and implemented
	SendResponseFromMemory.

svn path=/trunk/mcs/; revision=7057
2002-08-26 19:27:46 +00:00
Ravi Pratap M 5d82d5ca9f Fix typo.
svn path=/trunk/mcs/; revision=7055
2002-08-26 17:29:56 +00:00
Paolo Molaro 4358d78a0e Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <[email protected]>
* object.c: added a define for a good string and array
	creation speedup (not enabled by default because we need to deal with
	the synch stuff).

svn path=/trunk/mono/; revision=7052
2002-08-26 14:50:32 +00:00
Nick Drochak 6ec3005613 2002-08-26 Nick Drochak <[email protected]>
* BinaryReaderTest.cs: Closing the stream twice doesn not throw any
	exceptions on .NET.

svn path=/trunk/mcs/; revision=7051
2002-08-26 14:47:25 +00:00
Paolo Molaro 6c10f94827 Mon Aug 26 16:44:54 CEST 2002 Paolo Molaro <[email protected]>
* *.cs: change to conform to mono coding style.

svn path=/trunk/mcs/; revision=7050
2002-08-26 14:46:37 +00:00
Gonzalo Paniagua Javier e60e67f9be Added 'clean' target to build file
svn path=/trunk/mcs/; revision=7049
2002-08-26 03:24:22 +00:00
Gonzalo Paniagua Javier 71ed9a2dd0 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* XmlWriter.cs: made ws and namespaceManager protected. mcs has a bug
	that allowed compiling this.
	[ FIXME: filed bug #29435. mcs should have failed on this ]

svn path=/trunk/mcs/; revision=7048
2002-08-26 03:14:30 +00:00
Gonzalo Paniagua Javier b83d3bf2ad 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* AuthenticationMode.cs:
	* ClientTargetSectionHandler.cs:
	* FormsAuthPasswordFormat.cs:
	* FormsProtectionEnum.cs:
	* HttpCapabilitiesBase.cs: fixes base on class status page.

svn path=/trunk/mcs/; revision=7047
2002-08-26 02:53:15 +00:00
Gonzalo Paniagua Javier 7ab3214054 2002-08-26 Gonzalo Paniagua Javier <[email protected]>
* list: added new files.

	* System.Web.UI.WebControls/FontUnit.cs:
	* System.Web.UI.WebControls/HorizontalAlign.cs:
	* System.Web.UI.WebControls/Unit.cs:
	* System.Web.UI.WebControls/VerticalAlign.cs: fixes based on class
	status page.

	* System.Web.UI.WebControls/HorizontalAlignConverter.cs: implemented.
	* System.Web.UI.WebControls/VerticalAlignConverter.cs: implemented.

	* System.Web.UI.WebControls/FontUnitConverter.cs: implemented
	GetStandardValues ().

	* System.Web.UI.WebControls/WebColorConverter.cs: implemented
	ConvertFrom () and ConvertTo ().

svn path=/trunk/mcs/; revision=7046
2002-08-26 02:36:24 +00:00
Rodrigo Moya 49f4f066e8 2002-08-25 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbTransaction.cs (OleDbTransaction): manage
	correctly the isolation level.
	(IsolationLevel): likewise.
	(~OleDbTransaction): implemented.

	* System.Data.OleDb/libgda.cs: added more needed stuff.

svn path=/trunk/mcs/; revision=7043
2002-08-26 01:23:20 +00:00
Gonzalo Paniagua Javier a3d9d0e4d5 *** empty log message ***
svn path=/trunk/mcs/; revision=7042
2002-08-26 00:59:16 +00:00
Gonzalo Paniagua Javier d1062e5f1d Moved from System.Web.Utils to System.Web.Util
svn path=/trunk/mcs/; revision=7041
2002-08-26 00:57:47 +00:00
Martin Baulig eeb019ede8 2002-08-26 Martin Baulig <[email protected]>
* debug.c (mono_debugger_internal_free_symbol_files): New function.
	(mono_debugger_internal_symbol_files_changed): New global variable.

svn path=/trunk/mono/; revision=7039
2002-08-26 00:26:53 +00:00
Martin Baulig b4f60eb86b Removed some debugging stuff and made this work for the first line in a method.
svn path=/trunk/mono/; revision=7038
2002-08-26 00:25:41 +00:00
Martin Baulig a524dfbda7 2002-08-26 Martin Baulig <[email protected]>
* loader.c (mono_lookup_pinvoke_call): Include the error message
	from g_module_error() in the error message.

svn path=/trunk/mono/; revision=7037
2002-08-26 00:25:15 +00:00
Gonzalo Paniagua Javier 7912776803 added TcpServerChannel.cs
svn path=/trunk/mcs/; revision=7036
2002-08-26 00:16:07 +00:00
Gonzalo Paniagua Javier 75ab78e4bb Moving this file to System.Runtime.Remoting.dll
svn path=/trunk/mcs/; revision=7035
2002-08-26 00:12:01 +00:00
Tim Coleman ad41847caa 2002-08-25 Tim Coleman <[email protected]>
* XmlNode.cs:
                Change CreateNavigator to not be virtual.
        * XmlElement.cs:
                Add set_Prefix and InnerText accessors.
        * XmlEntityReference.cs:
                Add set_Value accessor.
        * XmlTextWriter.cs:
                Make objects which should be private private.
        * XmlWriter.cs:
                Remove WriteStartElementInternal abstract definition.
        * XmlValidatingReader.cs:
                New stubs added.

svn path=/trunk/mcs/; revision=7034
2002-08-25 22:04:31 +00:00
Martin Baulig 9443a98307 2002-08-25 Martin Baulig <[email protected]>
* expression.cs (Binary.ResolveOperator): Don't allow `!=' and
	`==' between a valuetype and an object.

svn path=/trunk/mcs/; revision=7033
2002-08-25 21:55:13 +00:00
Sergey Chaban f5d4a50a8e Fixed small typo that resulted in infinite loop when pasing signatures with custom modifiers.
svn path=/trunk/mono/; revision=7028
2002-08-25 17:20:16 +00:00
Tim Coleman a47aca07c9 2002-08-24 Tim Coleman <[email protected]>
* SoapCodeExporter.cs:
                Fix return value of ExportTypeMapping.
        * XmlCustomFormatter.cs:
                Change methods to be internal instead of public.
        * XmlSerializationWriter.cs:
                Modify GetPrimitiveTypeName to build on linux.
                Modify GetQualifiedName to return an incrementing prefix
                instead of the same one all the time (still need to manage
                conflicts)
                Modify WriteElementString to only do special stuff is XsiType
                is not defined.
                Modify WriteTypedPrimitive to use FromXmlQualifiedName if it's
                an XmlQualifiedName.

svn path=/trunk/mcs/; revision=7023
2002-08-25 05:16:40 +00:00
Miguel de Icaza feb82bd617 2002-08-25 Miguel de Icaza <[email protected]>
* ecore.cs (TypeExpr): Provide a ToString method.

svn path=/trunk/mcs/; revision=7022
2002-08-25 05:16:30 +00:00
Tim Coleman 66c54d45e3 2002-08-24 Tim Coleman <[email protected]>
* list:
                New files added to build.

svn path=/trunk/mcs/; revision=7021
2002-08-25 04:33:29 +00:00
Tim Coleman 92f445d92c 2002-08-24 Tim Coleman <[email protected]>
* HttpServerProtocol.cs:
        * WebServiceHandler.cs:
                Some commented code added, from analysing
                an exception trace.
        * MimeReturnWriter.cs:
        * XmlReturnWriter.cs:
                New stubs added.

svn path=/trunk/mcs/; revision=7020
2002-08-25 04:32:55 +00:00
Martin Baulig 61be84f5d6 Added public property to get the methods.
svn path=/trunk/mcs/; revision=7018
2002-08-25 01:07:56 +00:00
Miguel de Icaza d46fda6d71 2002-08-24 Miguel de Icaza <[email protected]>
* StreamReader.cs: Removed TODOs, as the code seems to be
	complete.

svn path=/trunk/mcs/; revision=7017
2002-08-25 00:04:06 +00:00
Martin Baulig 6231adbb70 Use start and end addresses for methods.
svn path=/trunk/mono/; revision=7016
2002-08-25 00:04:06 +00:00
Martin Baulig 80105b4782 Use StartAddress and EndAddress for methods.
svn path=/trunk/mcs/; revision=7015
2002-08-25 00:03:38 +00:00
Miguel de Icaza f7cd19e933 2002-08-24 Miguel de Icaza <[email protected]>
* Path.cs (GetTempFileName): Make this routine atomic by not
	testing and then creating, but using the create call to ensure
	that we own the filename.

svn path=/trunk/mcs/; revision=7014
2002-08-24 23:59:54 +00:00
Radek Doulik d0497fcc46 fixed struct marshaling, 108 tests pass now
svn path=/trunk/mono/; revision=7013
2002-08-24 23:54:12 +00:00
Martin Baulig ecf4ffdc4f 2002-08-24 Martin Baulig <[email protected]>
* debug.c (mono_debugger_internal_symbol_files): New function.

svn path=/trunk/mono/; revision=7010
2002-08-24 23:12:44 +00:00
Martin Baulig 474fba8120 Oooops, that was a cut&paste error ...
svn path=/trunk/mono/; revision=7009
2002-08-24 23:11:31 +00:00
Martin Baulig 416f94ed9b 2002-08-25 Martin Baulig <[email protected]>
* MonoSymbolTableReader.cs: New file.  This is the reader for the
	new symbol file format.

svn path=/trunk/mcs/; revision=7008
2002-08-24 23:02:46 +00:00
Miguel de Icaza a58ff9d3c1 Flush
svn path=/trunk/mono/; revision=7007
2002-08-24 22:55:31 +00:00
Juli Mallett 21c8194c65 2002-08-24 Juli Mallett <[email protected]>
* configure.in: Recognise OpenBSD/macppc as PowerPC.

svn path=/trunk/mono/; revision=7006
2002-08-24 22:25:58 +00:00
Gonzalo Paniagua Javier a72919388c 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* TypeBuilder.cs: UnspecifiedTypeSize is 0.

svn path=/trunk/mcs/; revision=7005
2002-08-24 17:57:01 +00:00
Gonzalo Paniagua Javier e8d3094b31 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* LifetimeServices.cs: the class is sealed.

svn path=/trunk/mcs/; revision=7004
2002-08-24 17:55:11 +00:00
Gonzalo Paniagua Javier df590f5519 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* ChannelServices.cs: added private .ctor

svn path=/trunk/mcs/; revision=7003
2002-08-24 17:53:45 +00:00
Gonzalo Paniagua Javier 4c38a8392d 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* ArrayList.cs:
	* BitArray.cs:
	* CaseInsensitiveComparer.cs:
	* CaseInsensitiveHashCodeProvider.cs:
	* IEnumerable.cs:
	* Queue.cs: misc. fixes based on class status page.

svn path=/trunk/mcs/; revision=7002
2002-08-24 17:52:23 +00:00
Gonzalo Paniagua Javier 851bbb86ad 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* ASCIIEncoding.cs:
	* Decoder.cs:
	* Encoder.cs:
	* Encoding.cs:
	* UTF7Encoding.cs:
	* UTF8Encoding.cs:
	* UnicodeEncoding.cs: added Serializable attribute.

svn path=/trunk/mcs/; revision=7001
2002-08-24 17:49:22 +00:00
Gonzalo Paniagua Javier 8df6fef700 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: improved performace by using String.InternalCopyTo
	instead of using ToCharArray all over the place (more that 50% of
	speed improvement when using Append).

svn path=/trunk/mcs/; revision=7000
2002-08-24 17:46:16 +00:00
Martin Baulig 56d9f7cfdc 2002-08-24 Martin Baulig <[email protected]>
* debug.c (mono_debug_write_symbols): Added support for the new
	debugging format.

svn path=/trunk/mono/; revision=6999
2002-08-24 17:29:56 +00:00
Martin Baulig 955251d0a3 2002-08-24 Martin Baulig <[email protected]>
* rawbuffer.c (mono_raw_buffer_load): Added `int is_shared'
	argument.  This is a flag which specifies whether we do a private
	copy-on-write mapping even when a writable mapping was requested.

	* debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
	function to update the symbol file.  The symbol file is mmap()ed
	writable, but private.  This allows us to install the symbol file
	together with the assembly.

svn path=/trunk/mono/; revision=6998
2002-08-24 17:29:06 +00:00
Gonzalo Paniagua Javier 67576cf33d Removed. It's almost the same as InternalCopyTo in string-icalls.c
svn path=/trunk/mono/; revision=6997
2002-08-24 16:48:44 +00:00
Gonzalo Paniagua Javier e822f0183a 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* icall.c: added ves_icall_StringBuilder_CopyChars.

svn path=/trunk/mono/; revision=6996
2002-08-24 16:17:09 +00:00
Martin Baulig 296030ce22 Added docu about the new mono' debugging format and removed dwarf-plus' since I'm about to remove this.
svn path=/trunk/mono/; revision=6995
2002-08-24 16:04:31 +00:00
Martin Baulig 4924193d17 2002-08-24 Martin Baulig <[email protected]>
* mono.c (main): The `--debug' argument now knows about a new
	debugging format `mono' which will be used to display source lines
	in backtraces.

	* debug.h (MonoDebugFormat): Added a new MONO_DEBUG_FORMAT_MONO
	which will be used when displaying backtraces.  It reads a new
	binary symbol file.

svn path=/trunk/mono/; revision=6994
2002-08-24 16:03:19 +00:00
Martin Baulig 589c754cf8 2002-08-24 Martin Baulig <[email protected]>
* debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
	but they can read the new symbol file format which mcs is now creating.

	* debug-symfile.c (mono_debug_find_source_location): Moved to
	debug-mono-symfile.c; this is now operating on the new symbol file.

svn path=/trunk/mono/; revision=6993
2002-08-24 16:02:31 +00:00
Martin Baulig 0ab5f8b4da 2002-08-24 Martin Baulig <[email protected]>
* codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
	now called proggie.dbg and it's a binary file.

svn path=/trunk/mcs/; revision=6992
2002-08-24 15:57:45 +00:00
Martin Baulig 0f999df09c 2002-08-24 Martin Baulig <[email protected]>
* MonoSymbolTable.cs, MonoSymbolTableWriter.cs: New files.  This
	creates a binary application.dbg file which will be used by the
	JIT to display source lines for exceptions.

	* list.unix: Disabled the dwarf file writer in the build.

svn path=/trunk/mcs/; revision=6991
2002-08-24 15:54:44 +00:00
Dietmar Maurer 2634b55731 more tcp channel code, renamed soap namespace to Soap
svn path=/trunk/mcs/; revision=6990
2002-08-24 10:39:22 +00:00
Tim Coleman 2255211cb9 2002-08-23 Tim Coleman <[email protected]>
* list:
                New files added to build.

svn path=/trunk/mcs/; revision=6987
2002-08-24 04:17:14 +00:00
Tim Coleman 60f5e9158d 002-08-23 Tim Coleman <[email protected]>
* ServerProtocol.cs:
        * SoapServerProtocol.cs:
                More cleanup, comparison with class status.
        * WebServiceHandler.cs:
        * HttpServerProtocol.cs:
                New stubs added.

svn path=/trunk/mcs/; revision=6986
2002-08-24 04:16:30 +00:00
Miguel de Icaza affbd09104 Flush
svn path=/trunk/mono/; revision=6985
2002-08-24 00:53:06 +00:00
Miguel de Icaza 736b3c4147 Add
svn path=/trunk/mcs/; revision=6984
2002-08-24 00:49:12 +00:00
Miguel de Icaza c3bad0708e Flush
svn path=/trunk/mono/; revision=6983
2002-08-24 00:34:40 +00:00
Miguel de Icaza 73651b5b2a Fix
svn path=/trunk/mono/; revision=6982
2002-08-23 23:52:51 +00:00
Miguel de Icaza b30b11435b Prepare for 0.15
svn path=/trunk/mono/; revision=6981
2002-08-23 23:36:10 +00:00
nobody 4e4824afab This commit was manufactured by cvs2svn to create branch 'SAVANNAH_CVS'.
svn path=/branches/SAVANNAH_CVS/mcs/; revision=6844
2002-08-21 10:08:33 +00:00
Martin Baulig 7f0542b133 Importing NUnit 1.11.
svn path=/branches/NUNIT/mcs/; revision=2713
2002-02-27 09:38:21 +00:00
nobody 9f187b5dd0 This commit was manufactured by cvs2svn to create branch 'NUNIT'.
svn path=/branches/NUNIT/mcs/; revision=2712
2002-02-27 09:38:18 +00:00
1200 changed files with 176785 additions and 34109 deletions

No files matched your search

+100
View File
@@ -1,3 +1,103 @@
2002-10-01 Duncan Mak <[email protected]>
* mono/os/Makefile.am: Add gc_wrapper.h.
* runtime/Makefile.am: Fix the path for monoresgen.exe.
2002-09-27 Dick Porter <[email protected]>
* configure.in: Check for semaphore.h. Patch for BSD from
[email protected] (Julio Merino).
2002-09-20 Duncan Mak <[email protected]>
* data/config.in: Added reference to libxslt.
2002-09-20 Mark Crichton <[email protected]>
* configure.in: added NEED_LINK_UNLINK to make io-layer more portable.
Linux has a "virtual fs" for UNIX sockets, Solaris and BSD don't.
For systems that do not have such a virtual FS, define
NEED_LINK_UNLINK.
* acconfig.h: added NEED_LINK_UNLINK
Wed Sep 4 18:09:58 CEST 2002 Paolo Molaro <[email protected]>
* configure.in: add some needed defines to fix support of
threads in the GC.
2002-09-19 Mark Crichton <[email protected]>
* configure.in: Added checks for Solaris to use X/Open functionality.
Really needed for the io-layer code.
2002-09-15 Andrew Birkett <[email protected]>
* man/mcs.1: --probe is now --expect-error.
2002-09-09 Dick Porter <[email protected]>
* acconfig.h:
* configure.in: Simplify thread checks, by using canned rules for
particular systems (based on the sleepycat db configure.in).
Tested on linux/x86, freebsd and w32. Solaris also added, but I
don't have a solaris machine to try it on.
2002-09-04 Juli Mallett <[email protected]>
* configure.in: Include <sys/types.h> when checking <sys/un.h> stuff.
2002-09-02 Diego Sevilla Ruiz <[email protected]>
* doc/ccvs: Added how to convert SSH keys (from SSH Communications
Security) to the OpenSSH keys required by mono CVS
access.
2002-09-01 Juli Mallett <[email protected]>
* configure.in, mono/interpreter/interp.c,
mono/io-layer/handles.c, mono/io-layer/processes.c,
mono/io-layer/threads.c, mono/io-layer/timed-thread.c,
mono/io-layer/wait.c, mono/jit/helpers.c, mono/jit/jit.c,
mono/metadata/appdomain.c, mono/metadata/class.c,
mono/metadata/domain.c, mono/metadata/gc.c,
mono/metadata/object.c, mono/metadata/reflection.c,
mono/metadata/threads.c, mono/os/gc_wrapper.h,
mono/utils/mono-hash.c: Add a new header, gc_wrapper.h, to
wrap inclusion of gc.h for boehm, since from FreeBSD and
OpenBSD ports, gc.h is <gc.h>, but on GNU it seems to be
in <gc/gc.h>. This will reduce the diffs FreeBSD ports has
to apply, and also makes it possible for me to build with
GC on OpenBSD/macppc built by hand.
2002-09-01 Juli Mallett <[email protected]>
* configure.in: On BSD don't try to use -ldl, we simply don't use it.
2002-09-01 Juli Mallett <[email protected]>
* mono/dis/dis-cil.c:
* configure.in: Check for <wchar.h> via autoconf, don't use it if
it isn't there, as it seems to work fine without it on OpenBSD.
2002-08-28 Dick Porter <[email protected]>
* mono/os/win32/util.c:
* mono/os/unix/util.c:
* mono/os/util.h: mono_set_rootdir() doesnt take any args now.
(It doesn't do anything on unix builds, and the w32 version no
longer needs an arg.)
* configure.in: Add HOST_CC for w32 builds
Tue Aug 27 18:17:43 CEST 2002 Paolo Molaro <[email protected]>
* configure.in: remove iconv checks.
2002-08-24 Juli Mallett <[email protected]>
* configure.in: Recognise OpenBSD/macppc as PowerPC.
Tue Aug 20 15:15:52 CEST 2002 Paolo Molaro <[email protected]>
+81
View File
@@ -1,3 +1,84 @@
Hello!
Version 0.16 of Mono has been released! This is mostly a bug
fix release, a lot of work has been going on to make existing
features more robust and less buggy. Also, contributions are
too varied, so it is hard to classify them in groups.
* Stats
795 commits to mono and mcs since August 23rd.
* News
The changes that got in this releases are mostly
bugfixes. Miguel, Martin and Ravi attacked lots of bugs in the
compiler, Dick fixed a bunch of bugs related to processes and
threads. Mark Crichton resumed his work on the SPARC port and
made lots of progress there. Juli Mallett has been working on
making sure Mono also builds on BSD systems. As usual, Dietmar
and Paolo supplied their continuous stream of fixes to the
runtime.
Dietmar has completed the work on the runtime side for
remoting support and we ship now with a sample channel, the
System.Runtime.Remoting.Sample. This can be used as a
reference implementation for anyone interested in implementing
other channels (like a CORBA channel).
Duncan got preliminary XSLT support done by using
libxslt.
Gonzalo (with some help from Patrik) has been working hard
making our ASP.NET implementation work on both Mono and MS by
migrating the existing xsp code to the class library. Gaurav
started working on the classes in System.Design.dll and Chris
Toshok checked in Mono.Directory.LDAP, which will be the
foundation to implement the System.DirectoryServices assembly.
Various fixes from Kral, Jason, Piers and Gonzalo were
committed to System.Xml; Martin Algiers reports that the
upcoming NAnt release will be fully compatible with Mono.
Miguel imported Sergey Chaban's Mono.PEToolkit and ilasm code
to CVS. Nick, as always, continues to refine our testing
framework by improving our tests. Andrew Birkett continues to
improve the implementation of our security/cryptographic
classes. Jonathan Pryor contributed type-reflector the our
list of tools.
* Other News From Behind de Curtain.
While the above is pretty impressive on its own, various other
non-released portions of Mono have been undergoing: Adam Treat
has been leading the effort to document our class libraries
and produce the tools required for it.
Martin Baulig has been working on the Mono Debugger which is
not being released yet. This debugger allows both native
Linux application as well as CIL applications to be debugged
at the same time (and in fact, you can use this to debug the
JIT engine). The debugger is written in C# with some C glue
In the meant A new JIT engine is under development, focused on
adding more of the high-end optimizations which will be
integrated on an ahead-of-time-compiler. Dietmar and Paolo
have been working on this.
* Contributors to this release
* Non-Ximian developers: Adam Treat, Andrew Birkett, Dennis
Hayes, Diego Sevilla, Franklin Wise, Gaurav Vaish ,Jason
Diamond, Johannes Roith, John Sohn, Jonathan Pryor, Juli
Mallett, Kral Ferch, Mike Crichton, Nick Drochak, Nick
Zigarovich, Piers Haken, Rafael Teixeira, Ricardo Fernandez
Pascual, Sergey Chaban, Tim Coleman.
* Ximian developers: Dietmar, Paolo, Dick, Duncan, Ravi,
Miguel, Martin, Chris, Joe, Gonzalo, Rodrigo.
---------------------------------------------------------------------------------
* Sergey Chaban added thread-safe support to
System.Collections.SortedList.
+1 -1
View File
@@ -5,7 +5,6 @@
#undef HAVE_SOL_TCP
#undef HAVE_IP_PKTINFO
#undef HAVE_STRUCT_IP_MREQN
#undef HAVE_PTHREAD
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#undef USE_MONO_MUTEX
#undef HAVE_LARGE_FILE_SUPPORT
@@ -18,3 +17,4 @@
#undef HAVE_TIMEZONE
#undef HAVE_TM_GMTOFF
#undef MONO_SIZEOF_SUNPATH
#undef NEED_LINK_UNLINK
+51
View File
@@ -0,0 +1,51 @@
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
#undef HAVE_INET_PTON
#undef HAVE_INET_ATON
#undef HAVE_SOL_IP
#undef HAVE_SOL_TCP
#undef HAVE_IP_PKTINFO
#undef HAVE_STRUCT_IP_MREQN
#undef HAVE_PTHREAD
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#undef USE_MONO_MUTEX
#undef HAVE_LARGE_FILE_SUPPORT
#undef PLATFORM_WIN32
#undef HAVE_NEW_ICONV
#undef NAME_DEV_RANDOM
#undef HAVE_CRYPT_RNG
#undef HAVE_BOEHM_GC
/* The number of bytes in a void *. */
#undef SIZEOF_VOID_P
/* Define if you have the inet_aton function. */
#undef HAVE_INET_ATON
/* Define if you have the inet_pton function. */
#undef HAVE_INET_PTON
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
+67 -118
View File
@@ -1,26 +1,44 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono, 0.14)
AM_INIT_AUTOMAKE(mono, 0.16)
AM_MAINTAINER_MODE
dnl ****************************************
dnl *** Check if we're building on win32 ***
dnl ****************************************
AC_MSG_CHECKING([if building for some Win32 platform])
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32)
CC="gcc -mno-cygwin"
HOST_CC="gcc"
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS"
libdl=
;;
*-*-*bsd*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
AC_DEFINE(NEED_LINK_UNLINK)
libdl=
;;
*-*-linux*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
libdl="-ldl"
;;
*-*-solaris*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
AC_DEFINE(NEED_LINK_UNLINK)
;;
*)
AC_MSG_WARN([*** Please add $host to configure.in checks!])
platform_win32=no
libdl="-ldl"
;;
esac
AC_MSG_RESULT($platform_win32)
AC_MSG_RESULT(ok)
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
@@ -52,14 +70,14 @@ AC_HEADER_STDC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h)
AC_CHECK_HEADERS(iconv.h)
AC_CHECK_HEADERS(giconv.h)
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h)
# for mono/metadata/debug-symfile.c
AC_CHECK_HEADERS(elf.h)
# for mono/dis
AC_CHECK_HEADERS(wchar.h)
# not 64 bit clean in cross-compile
AC_CHECK_SIZEOF(void *, 4)
@@ -105,6 +123,7 @@ AC_SUBST(GLIB_LIBS)
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
AC_CHECK_HEADERS(gc.h gc/gc.h)
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
gc=auto
AC_ARG_WITH(gc, [ --with-gc=boehm,none],[gc=$with_gc])
@@ -123,8 +142,7 @@ case "x$gc" in
AC_MSG_WARN("Compiling mono without GC.")
;;
*)
dnl When the JIT works with libgc, use this chunk.
dnl # If libgc was found, use it. Otherwise just warn.
# If libgc was found, use it. Otherwise just warn.
if test "x$found_boehm" != "xyes"; then
AC_MSG_WARN("Compiling mono without GC.")
else
@@ -133,7 +151,6 @@ dnl # If libgc was found, use it. Otherwise just warn.
LIBS="$LIBS -lgc $libdl"
gc="boehm"
fi
dnl AC_MSG_WARN("Compiling mono without GC.")
;;
esac
@@ -279,6 +296,7 @@ if test x$platform_win32 = xno; then
AC_MSG_CHECKING(size of sockaddr_un.sun_path)
AC_CACHE_VAL(cv_mono_sizeof_sunpath,
[AC_TRY_RUN([
#include <sys/types.h>
#include <stdio.h>
#include <sys/un.h>
@@ -295,87 +313,43 @@ if test x$platform_win32 = xno; then
AC_MSG_RESULT($cv_mono_sizeof_sunpath)
AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
dnl *****************************
dnl *** Checks for libxnet ***
dnl *****************************
case "${host}" in
*solaris* )
AC_MSG_CHECKING(for Solaris XPG4 support)
if test -f /usr/lib/libxnet.so; then
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
LIBS="$LIBS -lxnet"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -Wno-char-subscripts"
fi
;;
esac
dnl *****************************
dnl *** Checks for libpthread ***
dnl *****************************
AC_SEARCH_LIBS(pthread_create, pthread c_r, [
AM_CONDITIONAL(THREADS_PTHREAD, true)
AC_DEFINE(HAVE_PTHREAD)
# Need pthread_mutex_timedlock
pthread_CFLAGS=""
orig_CPPFLAGS=$CPPFLAGS
# This is a gcc-specific error, but we already set
# gcc-specific options in CFLAGS
CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
AC_MSG_CHECKING(for pthread_mutex_timedlock)
AC_TRY_COMPILE([ #include <pthread.h>], [
pthread_mutex_t mut=PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_timedlock(&mut, NULL);
], [
# Works!
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
], [
AC_MSG_RESULT(no)
# glibc requires -D_GNU_SOURCE before it will declare
# this function
AC_MSG_CHECKING(whether _GNU_SOURCE is needed for pthread_mutex_timedlock)
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_TRY_COMPILE([ #include <pthread.h>], [
pthread_mutex_t mut=PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_timedlock(&mut, NULL);
], [
AC_MSG_RESULT(yes)
pthread_CFLAGS="-D_GNU_SOURCE"
AC_DEFINE(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
], [
AC_MSG_RESULT(no)
dnl Add other variants here
AC_MSG_WARN(Working around pthread_mutex_timedlock)
])
])
CPPFLAGS=$orig_CPPFLAGS
CPPFLAGS="$CPPFLAGS $pthread_CFLAGS"
# Need PTHREAD_MUTEX_RECURSIVE
pthread_CFLAGS=""
orig_CPPFLAGS=$CPPFLAGS
# This is a gcc-specific error, but we already set
# gcc-specific options in CFLAGS
CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
pthread_mutexattr_t attr;
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
], [
# Works!
AC_MSG_RESULT(ok)
], [
AC_MSG_RESULT(no)
# glibc requires -D_GNU_SOURCE before it will declare
# this macro
AC_MSG_CHECKING(whether _GNU_SOURCE is needed for PTHREAD_MUTEX_RECURSIVE)
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_TRY_COMPILE([ #include <pthread.h>], [
pthread_mutexattr_t attr;
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
], [
AC_MSG_RESULT(ok)
pthread_CFLAGS="-D_GNU_SOURCE"
], [
AC_MSG_RESULT(no)
dnl Add other variants here
AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
AC_DEFINE(USE_MONO_MUTEX)
])
])
CPPFLAGS=$orig_CPPFLAGS
CPPFLAGS="$CPPFLAGS -D_REENTRANT $pthread_CFLAGS"
AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
pthread_mutexattr_t attr;
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
], [
AC_MSG_ERROR([libpthread is required on non-win32 hosts])
AC_MSG_RESULT(ok)
], [
AC_MSG_RESULT(no)
AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
AC_DEFINE(USE_MONO_MUTEX)
])
dnl ********************************
@@ -409,12 +383,8 @@ if test x$platform_win32 = xno; then
fi
fi
else
AM_CONDITIONAL(THREADS_PTHREAD, false)
# This is a kludge, we really ought to test for libws2_32, but
# I can't make AC_CHECK_LIB link (the symbols seem to be mangled
# with @num suffixes)
LIBS="$LIBS -lws2_32"
CFLAGS="$CFLAGS -mno-cygwin"
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
fi
dnl ****************************
@@ -482,27 +452,6 @@ if test "x$ac_cv_have_dev_random" = "xno" \
***]])
fi
if test "x$cross_compiling" = "xno"; then
# check for new iconv version
AC_MSG_CHECKING(for new iconv)
AC_CACHE_VAL(new_iconv,[
AC_TRY_RUN([#include <stdio.h>
#include <iconv.h>
int main()
{
exit (iconv_open ("UTF-16le", "UTF-8") == (iconv_t)-1);
}
],
new_iconv=yes,new_iconv=)])
if test -n "$new_iconv"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_NEW_ICONV)
else
AC_MSG_RESULT(no)
fi
fi
AC_MSG_CHECKING([if inter-process shared handles are requested])
AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
AC_MSG_RESULT($try_shared_handles)
@@ -520,7 +469,7 @@ i*86-*-*) TARGET=X86; arch_target=x86;;
sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
#m68k-*-linux*) TARGET=M68K;;
powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
esac
+1
View File
@@ -1,4 +1,5 @@
<configuration>
<dllmap dll="cygwin1.dll" target="@LIBC@" />
<dllmap dll="libc" target="@LIBC@" />
<dllmap dll="libxslt.dll" target="libxslt.so" />
</configuration>
+24 -4
View File
@@ -6,10 +6,11 @@
If you are not a developer, but want to track the development, please
see the <a href="anoncvs.html">AnonCVS</a> instructions.
Send an e-mail to miguel with your public SSH key for this
purpose. Please specify if the key was generated with SSH1 or SSH2.
Send an e-mail to miguel with your public OpenSSH key for this
purpose. Please specify if the key was generated with SSH version 1
or version 2.
If you are using SSH2, please generate your key using:
If you are using SSH version 2, please generate your key using:
<pre>
ssh-keygen -t rsa
@@ -17,13 +18,32 @@
And mail me the id_rsa.pub file.
If you are using SSH1, run:
If you are using SSH version 1, run:
<pre>
ssh-keygen
</pre>
And mail me your identity.pub file.
If you are using SSH from SSH Communications Security (they offer
a free SSH client for personal use), you have to use OpenSSH to
convert your public key to the required format. You have to use
OpenSSH's ssh-keygen program and write the following:
<pre>
ssh-keygen -i -f id_XXX.pub > my_public_key.pub
</pre>
where the file <pre>id_XXX.pub</pre> is your public key file,
normally located under <pre>~/.ssh/</pre> or <pre>~/.ssh2/</pre>.
Send to miguel the <pre>my_public_key.pub</pre> file.
The *exact* format for this file must be:
<pre>
ssh-rsa XXXXX....
</pre>
You will need CVS and SSH. Windows users can get both by
installing Cygwin (<a
href="http://www.cygwin.com">http://www.cygwin.com</a>)
+32 -70
View File
@@ -14,87 +14,49 @@
and updating class library documentation, including:
<ul>
<li><a href="#docstub">docstub</a></li>
<li><a href="#docverify">docverify</a></li>
<li><a href="#docconv">docconv</a></li>
<li><a href="#docgen">docgen</a></li>
<li><a href="#monodoc">monodoc</a></li>
<li><a href="#monodoc">MonoDoc - A graphical documentation editor and viewer.</a></li>
<li><a href="#mkmaster">MkMaster - A command line tool to feed stub information to MonoDoc.</a></li>
<li><a href="#aspnet">An ASP.NET documentation editor.</a></li>
<li><a href="#xsltool">An xsl tool to convert monodoc xml to html documentation.</a></li>
</ul>
** XML Documentation Files and Formats
*** Monodoc XML
This XML is similar to the XML documentation described in the
C# standard, with added tags for internationalization and a
slightly different structure. Documentation and a DTD/Schema
for Monodoc XML is forthcoming.
Monodoc XML does not contain any definitive type information,
and is only useful in conjunction with the Type definition for
whatever is being documented.
This XML could be generated by hand, by monostub, or by monodoc.
*** Assembly XML
This XML is generated by combining runtime type information for
an Assembly with a collection of Monodoc XML files. The resultant
XML (in the best of cases) contains both complete type and
documentary information for each type in the assembly.
This XML contains enough information to be transformed into
user-accessible documentation. It is likely that scripts
will be created to generate reference docs as HTML and other
formats.
Documentation and a DTD/Schema for Assembly XML is forthcoming.
This XML is Mono's documentation format. Documentation and a DTD/Schema
for Monodoc XML is located in cvs and can be found <a href="http://go-mono.org/monodoc.dtd">here</a>.
This XML could be generated by MonoDoc or the ASP.NET client.
More about the XML format <a href="http://go-mono.org/monodoc-xml.html">here</a>.
** Documentation Tools
*** <a name="docstub">docstub</a>
Given a type name and an assembly, generates stub Monodoc XML
documentation for the type. Optionally, docstub can attempt to
populate initial documentation from an XML file in the format
published along with the ECMA standard.
*** <a name="docverify">docverify</a>
Given a Monodoc XML file and an assembly, verifies that the
documentation matches the compiled type. Checks signatures,
parameters, et cetera.
*** <a name="docconv">docconv</a>
Converts from Monodoc XML to the standard C# compiler-emitted
XML format and vice versa.
*** <a name="docgen">docgen</a>
Given an assembly and a collection of Monodoc XML files, creates
an Assembly XML file containing all documentation and type information
available. This output is suitable for transforming into user
documentation.
*** <a name="monodoc">monodoc</a>
A GUI tool for documentation and translation, this encapsulates
the capabilities of docstub, docverify, docconv, and docgen in
a friendly user interface. In addition, monodoc provides features
to ease translation, such as side-by-side editing and coverage
statistics.
*** <a name="monodoc">MonoDoc</a>
A graphical documentation editor and viewer. Currently, MonoDoc
consists of a Qt# application and is in heavy development.
*** <a name="mkmaster">MkMaster</a>
This tool creates the Master.xml file that MonoDoc uses as a reference
for documentation generation. This is a reflection engine that is used
to gather metadata from assemblies and create an xml representation.
*** <a name="aspnet">ASP.NET</a>
This tool is planned.
*** <a name="xsltool">An XSL converter</a>
This tool is planned. If someone wants to step forward and adopt this
project, it would be very helpful ;)
** Status and Roadmap
*** 2 January 2002
*** 16, September 2002
As I write the initial version of this document, very little has been
implemented. Currently, there is a:
<ul>
<li>Preliminary version of the Monodoc XML format</li>
<li>Preliminary version of the docstub utility</li>
</ul>
Here's hoping for frequent, productive updates.
A preliminary version of MonoDoc is in Mono's cvs. It is under heavy development.
Once this is complete we will start documenting the API!
** Get Involved
Help us define Mono's documentation structure! Subscribe to
Help us develop Mono's documentation tools! Subscribe to
<a href="http://lists.ximian.com/mailman/listinfo/mono-docs-list">mono-docs-list</a>
and wade right in.
+1 -1
View File
@@ -9,5 +9,5 @@
href="http://primates.ximian.com/~miguel">http://primates.ximian.com/~miguel"</a>
You can also <a
href="http://www.ximian.com/about/contact.php3">reach Ximian.</a>
href="http://www.ximian.com/about_us/contact/">reach Ximian.</a>
+192 -220
View File
@@ -6,70 +6,158 @@
href="runtime.html">Runtime</a> description for more details
on this part of the project.
The code for the C# compiler as well as the language error
test suite and the class library are in the `mcs' package, we
will move this later into `mono' itself.
Some useful links: <a
href="http://www.go-mono.org/mono-beginning.html">Resources/Beginning
section</a>, the <a
href="http://www.go-mono.org/faq.html">FAQ</a> and the <a
href="http://geneura.ugr.es/~jaime/deploy/mono-common-problems.html">
Mono Common Problems</a>.
<b>Note: (Beginners read!)</b> There are a couple of documents you
should read before going ahead. You can reach them in the
<a href="http://www.go-mono.org/mono-beginning.html">Resources/Beginning section</a>. And the <a href="http://www.go-mono.org/faq.html">FAQ</a>
and the <a href="http://geneura.ugr.es/~jaime/deploy/mono-common-problems.html">
Mono Common Problems</a>. Might be useful too. Take the Mono Beginners
HOWTO for your system and proceed as it's described there.
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.15</b><br>
<a href="archive/mono-0.15">Release notes</a><br>
Aug 23rd, 2002.
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.15.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.15.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1alpha5.tar.gz">Boehm GC 6.1alpha5</a>
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b>
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1alpha5-1.src.rpm">libgc-6.1alpha5-1.src.rpm</a>
<li><a href="archive/mono-0.15-1.src.rpm">mono-0.15-1.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.3/x86</b>
<ul>
<li><a href="archive/redhat-73-i386/libgc-6.1alpha5-1.i386.rpm">libgc-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/libgc-devel-6.1alpha5-1.i386.rpm">libgc-devel-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-0.15-1.i386.rpm">mono-0.15-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-devel-0.15-1.i386.rpm">mono-devel-0.15-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 7.1/x86</b>
<ul>
<li><a href="archive/redhat-71-i386/libgc-6.1alpha5-1.i386.rpm">libgc-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/libgc-devel-6.1alpha5-1.i386.rpm">libgc-devel-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-0.15-1.i386.rpm">mono-0.15-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-devel-0.15-1.i386.rpm">mono-devel-0.15-1.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Mandrake 8.2/x86</b>
<ul>
<li><a href="archive/mandrake-82-i386/libgc-6.1alpha5-1.i586.rpm">libgc-6.1alpha5-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1alpha5-1.i586.rpm">libgc-devel-6.1alpha5-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-0.15-1.i586.rpm">mono-0.15-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-devel-0.15-1.i586.rpm">mono-devel-0.15-1.i586.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>SuSE 8.0/x86</b>
<ul>
<li><a href="archive/suse-80-i386/libgc-6.1alpha5-1.i386.rpm">libgc-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/libgc-devel-6.1alpha5-1.i386.rpm">libgc-devel-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-0.15-1.i386.rpm">mono-0.15-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-devel-0.15-1.i386.rpm">mono-devel-0.15-1.i386.rpm</a>
</ul>
</td>
</tr>
<tr bgcolor="#999999">
<td>
<b>Windows (win95 friendly)</b>
<ul>
<li><a href="archive/mono-w32-Aug_28_2002.zip">Mono-w32</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="http://www.sport-huettn.de/mono/mono-0.15-stable.exe">Mono-Setup</a>
</ul>
</td>
</tr>
<tr bgcolor="#999999">
<td bgcolor="#999999">
<b>Red Hat null-8.0/x86</b>
<ul>
<li><a href="archive/redhat-null-i386/libgc-6.1alpha5-1.i386.rpm">libgc-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-null-i386/libgc-devel-6.1alpha5-1.i386.rpm">libgc-devel-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-null-i386/mono-0.15-1.i386.rpm">mono-0.15-1.i386.rpm</a>
<li><a href="archive/redhat-null-i386/mono-devel-0.15-1.i386.rpm">mono-devel-0.15-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
&nbsp;
</td>
</tr>
</table>
</td>
</tr>
<tr>
<tr bgcolor="#CCCCC">
<td>
<b>Regression Tests</b><br>
</td>
<td>
You can get binaries for the Mono Regression Test
Suite <a href="archive/mono-tests.tar.gz">here</a>
</td>
</tr>
</tbody>
</table>
<a name="sources">
*** Sources
Stay up to date on the Mono team's development using the
<a href="http://lists.ximian.com/mailman/listinfo/mono-cvs-list">
mono-cvs-list</a> mailing list. The CVS source code can also
be browsed <a href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?cvsroot=Mono#dirlist">here</a>
<a name="jun-7">
<b>Mono 0.13</b>
New packaged versions of the Mono C# compiler and Mono runtime
are now available. The latest version is 0.13.
<ul>
* <a href="archive/mono-0.13">Mono 0.13 release notes</a>
* <a href="archive/mcs-0.13.tar.gz">mcs-0.13.tar.gz</a>
Mono C# compiler with class library source code.
* <a href="archive/mono-0.13.tar.gz">mono-0.13.tar.gz</a>
Mono runtime.
</ul>
* Snapshots
** Binaries for other platforms.
Already daily volunteer's made binaries:
<ul>
* <a href="http://www.atoker.com/mono">Debian Linux</a>
* <a href="http://noa.tm/mono/">Red Hat (and RPM based systems)</a>
* <a href="http://www.debianplanet.org/mono/">DebianPlanet</a>
* <a href="http://www.superin.formativ.net/mono/mono.htm">Windows</a> (works without cygwin!)
</ul>
<b>Note1:</b> Don't look for the Mono BaseLabs RPMs; they are not providing it
anymore.<br>
<b>Note2:</b> You will find that you can get binaries for the gtk-sharp
package too.
* Snapshots
<a name="snapshots">
For up to date sources, it is recommended that you use the Mono
source code from either the
<a href="http://www.go-mono.com/snapshots">nightly snapshots</a> or
the <a href="anoncvs.html">Anonymous CVS</a>. The nightly
snapshots are done every night at 10pm EST (Boston Time).
The anoncvs mirrors provided by Hispalinux are updated every six
hours.
The nightly snapshots are not guaranteed to build, but most of the
time they should. They should give you a window to see what we are
up to.
<a href="http://www.go-mono.com/snapshots">Nightly snapshots</a> of
the CVS repository are made every day at 10pm EST (Boston
Time). These are not guaranteed to build, they are just a
snapshot of the tree.
The <a href="anoncvs.html">anoncvs</a> mirrors provided by
Hispalinux are updated every six hours.
* Compiling with scripts
There are scripts to help build mono for both Unix and Windows. Get
<a href="mono-build.sh">mono-build.sh</a> for Unix, or <a
@@ -100,51 +188,53 @@
set your CVSROOT environment variable before running the script to
select a particular cvs server.
** Mono Regression Test Suite
You can get binaries for the Mono Regression Test Suite <a
href="archive/mono-tests.tar.gz">here</a>
<a name="install">
** Building the software manually
You will need to obtain the Mono dependencies first: <a
href="http://www.gtk.org">glib 2.x</a> and
<a href="http://www.freedesktop.org/software/pkgconfig">pkg-config</a>.
*** Building on Linux
<ul>
Unpack the Mono runtime distribution:
<pre>
tar xzvf mono-X.XX.tar.gz
cd mono-X.XX
</pre>
<p>
You can build mono and mcs in Linux but to do that be
sure to obtain the corlib.dll and install it before
trying to compile.
In linux be sure you get <a href="http://www.gtk.org">glib2.0</a>
(>= 2.0.4, 2.0.6
recomended) and <a href="http://www.freedesktop.org/software/pkgconfig">pkg-config</a> 0.80.
Also the corresponding development packages for those as
well as the GNU Build Tools (make, autoconf...).
Then download the mono packages and compile them.
You must start compiling mcs and then mono.
Be sure you set all the environment variables before
compiling. You can use pkg-config --list-all to see
if you forgot to set some of them.
Normally you should enter:
export ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
if your install prefix is /usr/local.
If you downloaded the Mono nightly snapshots, untar the
snapshot.
Change directories to "<strong>mcs</strong>".
Configure, compile and install:
Then configure, compile and install:
<pre>
<strong>./configure
./configure --prefix=/usr/local
make
make install</strong></pre>
make install</pre>
Do the same in the "<strong>mono</strong>" directory.
This will give you a runtime, C# compiler and runtime
libraries.
If you want to recompile the runtime and the compiler,
follow these steps, first unpack the MCS package:
<pre>
tar xzvf mcs-X.XX.tar.gz
cd mcs-X.XX
</pre>
Then use the following command to compile and install:
<pre>
make -f makefile.gnu install prefix=/usr/local
</pre>
You can change /usr/local to something else if you want.
</ul>
*** On Windows, to install and work on the compiler and the class libraries:
@@ -157,7 +247,7 @@
* Install <a href="http://msdn.microsoft.com/downloads">
Microsoft .NET Framework SDK</a>.
* Change to the <strong>/usr/local</strong> directory
* Change to the /usr/local directory
of your Cygwin installation.<br>
Unzip the precompiled packages listed above.
@@ -168,13 +258,14 @@
<a href="http://www.go-mono.com/snapshots">nightly snapshot
</a>, untar the snapshot.
* Change directories to <strong>"mcs"</strong>.
* Change directories to "mcs".
* Compile:
<pre>
<strong>make windows</strong>
make
</pre>
</ul>
*** On Windows, to compile the mono runtime:
@@ -184,18 +275,18 @@
<a href="http://www.go-mono.com/snapshots">nightly snapshot
</a>, untar the snapshot.
* Change directories to <strong>"mono"</strong>.
* Change directories to "mono".
* Configure, compile and install:
<pre><strong>
<pre>
./configure --prefix=c:/mono
make
make install
</strong></pre>
</pre>
</ul>
* Software resources, notes and old releases:
* Software resources and notes
The required and additional software can be downloaded here:
@@ -210,12 +301,13 @@
* Precompiled GLIB 2.0 and pkg-config packages (and
their dependencies) by the <a href="http://www.gimp.org/~tml/gimp/win32//index.html">GIMP for Windows</a> project from
<a href="http://www.go-mono.com/archive/pkgconfig-0.80-tml-20020101.zip">http://www.go-mono.com/archive/pkgconfig-0.80-tml-20020101.zip</a>
<a href="http://www.go-mono.com/archive/glib-1.3.12-20020101.zip">http://www.go-mono.com/archive/glib-1.3.12-20020101.zip</a>
<a href="http://www.go-mono.com/archive/glib-dev-1.3.12-20020101.zip">http://www.go-mono.com/archive/glib-dev-1.3.12-20020101.zip</a>
<a href="http://www.go-mono.com/archive/libiconv-1.7.zip">http://www.go-mono.com/archive/libiconv-1.7.zip</a>
<a href="http://www.go-mono.com/archive/libiconv-dev-1.7.zip">http://www.go-mono.com/archive/libiconv-dev-1.7-20020101.zip</a>
<a href="http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip">http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip</a>
<a href="http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip">http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip</a><br>
<a href="http://www.go-mono.com/archive/glib-2.0.4-20020703.zip">http://www.go-mono.com/archive/glib-2.0.4-20020703.zip</a> <br>
<a href="http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip">http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip</a> <br>
<a href="http://www.go-mono.com/archive/libiconv-1.7.zip">http://www.go-mono.com/archive/libiconv-1.7.zip</a> <br>
<a href="http://www.go-mono.com/archive/libiconv-dev-1.7.zip">http://www.go-mono.com/archive/libiconv-dev-1.7-20020101.zip</a> <br>
<a href="http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip">http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip</a><br>
* Download the Mono source code from the
<a href="#feb-11">packaged versions</a> or
@@ -244,12 +336,12 @@
<nobr><tt>extern char *strsignal (int sig);</tt></nobr> to
<nobr><tt>extern const char *strsignal (int sig);</tt></nobr>.
<pre><strong>
<pre>
tar xzvf pkg-config-0.8.0.tar.gz
cd pkg-config-0.8.0
./configure --prefix=/usr
make
make install</strong>
make install
</pre>
* Download, compile and install <a href="ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.7.tar.gz">libiconv</a> from source.<br>
@@ -265,123 +357,3 @@ make install</strong>
</ul>
<a name="oldreleases">
*** Old releases.
<ul>
<ul>
<a name="apr-24">
<b>Mono 0.11; April 24, 2002</b>
* <a href="archive/mono-0.11">Mono 0.11 release notes</a>
* <a href="archive/mcs-0.11.tar.gz">mcs-0.11.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.11.tar.gz">mono-0.11.tar.gz</a>
Mono runtime
</ul>
<ul>
<a name="mar-27">
<b>Mono 0.10; March 27, 2002</b>
* <a href="archive/mono-0.10">Mono 0.10 release notes</a>
* <a href="archive/mcs-0.10.tar.gz">mcs-0.10.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.10.tar.gz">mono-0.10.tar.gz</a>
Mono runtime
</ul>
<ul>
<a name="feb-22">
<b>Mono 0.9; February 22, 2002</b>
* <a href="archive/mono-0.9">Mono 0.9 release notes</a>
* <a href="archive/mcs-0.9.tar.gz">mcs-0.9.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.9.tar.gz">mono-0.9.tar.gz</a>
Mono runtime
</ul>
<a name="feb-11">
<b>February 11, 2002</b>
* <a href="archive/mcs-0.8.tar.gz">mcs-0.8.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.8.tar.gz">mono-0.8.tar.gz</a>
Mono runtime
</ul>
<a name="sep-18">
<b>September 18, 2001</b>
<ul>
* <a href="archive/mono-0.7.tar.gz">mono-0.7.tar.gz</a>: Mono Runtime 0.7 release.
* <a href="archive/mcs-0.7.tar.gz">mcs-0.7.tar.gz</a>: Mono Compiler and Classes 0.7 release.
* <a href="archive/mono-0.7">Release Notes.</a>
</ul>
<a name="august-22">
<b>August 22, 2001</b>
<ul>
* <a href="archive/mono-0.6.tar.gz">mono-0.6.tar.gz</a>: Mono Runtime 0.6 release.
* <a href="archive/mono-compiler-classes-0.6.tar.gz">mono-compiler-classes-0.6.tar.gz</a>: Mono Compiler and Classes 0.6 release.
* <a href="archive/mono-0.6">Release Notes.</a>
</ul>
<a name="july-29">
<b>July 29, 2001</b>
<ul>
* <a href="archive/mono-0.5.tar.gz">mono-0.5.tar.gz</a>: Mono Runtime 0.5 release.
* <a href="archive/mono-0.5">Release Notes.</a>
</ul>
<a name="july-22">
<b>July 22, 2001</b>
<ul>
* <a href="archive/mcs-22-Jul-2001.tar.gz">mcs-22-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mcs-Jul-22-Jul-19-2001.tar.gz">Differences since 19</a>: CVS snapshot.
* <a href="archive/mcs-22">Release Notes.</a>
</ul>
<a name="july-19">
<b>July 19th, 2001</b>
<ul>
* <a href="archive/mcs-19-Jul-2001.tar.gz">mcs-19-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mcs-Jul-17-Jul-19-2001.tar.gz">Differences since 17</a>: CVS snapshot.
* <a href="archive/mcs-19">Release Notes.</a>
</ul>
<a name="july-17">
<b>July 17th, 2001</b>
<ul>
* <a href="archive/mcs-17-Jul-2001.tar.gz">mcs-17-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mcs-Jul-15-Jul-17-2001.tar.gz">Differences since 15</a>: CVS snapshot.
* <a href="archive/mcs-17">Release Notes.</a>
</ul>
<a name="july-15">
<b>July 15th, 2001</b>
<ul>
* <a href="archive/mcs-15-Jul-2001.tar.gz">mcs-15-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mono-0.4.tar.gz">mono-0.4.tar.gz</a>: Packaged Source Code.
* <a href="archive/mono-0.4">Release Notes.</a>
</ul>
<a name="july-14">
<b>July 14th, 2001</b>
<ul>
* <a href="archive/mcs-12-Jul-2001.tar.gz">mcs-12-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mono-0.3.tar.gz">mono-0.3.tar.gz</a>: Packaged Source Code.
</ul>
<a name="july-8">
<b>July 8th, 2001</b>
<ul>
* <a href="archive/mcs-08-Jul-2001.tar.gz">mcs-08-Jul-2001.tar.gz</a>: CVS Snapshot
* <a href="archive/mono-08-Jul-2001.tar.gz">mono-08-Jul-2001.tar.gz</a>: CVS Snapshot
</ul>
</ul>
+85 -144
View File
@@ -2,7 +2,6 @@
<a href="#ximian">The Ximian Role in the Mono project</a><br>
<a href="#gnome">Mono and GNOME</a><br>
<a href="#gui">Building GUI applications with Mono</a><br>
<a href="#winforms">Mono and WinForms</a><br>
<a href="#msft">Mono and Microsoft</a><br>
<a href="#pnpproject">Mono and the Portable.NET Project</a><br>
<a href="#webservices">Web Services</a><br>
@@ -21,7 +20,7 @@
<a href="#problems">Mono Common Problems</a><br>
A <a
href="http://www.es.gnome.org/documentacion/articulos/MONO-PUF/MONO-PUF/">spanish
href="http://www.es.gnome.org/documentacion/articulos/mono-puf/mono-puf/">Spanish
translation</a> is also available
<a name="basics"></a>
@@ -44,7 +43,7 @@ A: The ".NET Initiative" is a somewhat nebulous company-wide effort by
framework. Mono is an implementation of the development framework,
but not an implementation of anything else related to the .NET
Initiative, such as Passport, software-as-a-service, or
corporate rebranding.
corporate re-branding.
Q: What technologies are included in Mono?
@@ -97,7 +96,7 @@ A: Yes, we will be implementing the APIs of the .NET Framework SDK
Q: Will you offer an ECMA-compliant set of class libraries?
A: Eventually we will. Our current focus is on interoperating
A: Eventually we will. Our current focus is on inter-operating
with the Microsoft SDK, but we will also offer an ECMA compliant
set of libraries.
@@ -196,7 +195,7 @@ A: Mono will ship on various stages as they mature. Some people
require only a subset of the technologies, those will ship first.
More advanced features will take more time to develop. A support
timeline will be available in June 2002.
time line will be available in June 2002.
<a name="gnome"></a>
** Mono and GNOME
@@ -225,7 +224,7 @@ A: It is still far to early for discussions of "switching over." No
We encourage GNOME developers to continue using the existing tools,
libraries and components. Improvements made to GNOME will have an
impact on Mono, as they would be the "backend" for various classes.
impact on Mono, as they would be the "back-end" for various classes.
Q: Will Mono include compatibility with Bonobo components? What is the
relationship between Mono and Bonobo?
@@ -273,7 +272,7 @@ A: As long as your applications are 100% .NET and do not make use
of P/Invoke to call Win32 functions, your smart client applications
will run on Mono platforms.
Q: Where can I learn mora about Gtk#?
Q: Where can I learn more about Gtk#?
A: The following <a href="http://gtk-sharp.sourceforge.net>link</a> sends you to the page of the project.
@@ -300,47 +299,11 @@ A: There is a sample file called `DbClient' in gtk-sharp/samples that you
gtk-sharp/sample/DbClient, where there is a GTK# application that uses
System.Data. It does not use DataAdapter, but DataReader though.
<a name="winforms"></a>
** Mono and WinForms
Q: Can you tell me why aren't you implementing WinForms?.
A: (This is based in an original mail to mono-list written by Miguel de
Icaza. You should read it for completion, but the core part is here).
First, Windows.Forms is packed with quirks and is not that great of a
toolkit in the first place. Up to the point of the unconfirmed rumor
that Microsoft is working on a replacement for it.
Once the runtime is done, we will very likely start contributing to
the Gtk# project ourselves, and we will likely start doing feasibility
work on getting Mono used by Gnome developers: full gnome apps and
extending existing applications.
Those interested in hacking on Windows.Forms are welcome to do so,
but Ximian will not likely look at it in the near future; if there is
enough demand, or I can be convinced that Windows.Forms is useful for
something Ximian might re-evaluate our resource allocation for this
task.
By doing native ports, we could use the same API on all those systems.
Also, Gtk is mature enough, we know this because we have built an entire
desktop (and all sorts of very window system-specific hacks), and we
have built a bunch of productivity applications with it.
Q: What about VCL?.
Someone mentioned VCL. The only problem with the VCL is that it can
only be used for GPL applications (or I guess you could license it from
Borland for your app), and would have to be ported from Delphi to C#
(or someone would have to write a CIL compiler for it).
Q: What about doing something like the eclipse project (www.eclipse.org)?
A: The Eclipse toolkit is not a general purpose toolkit.  It will require a
lot of work before it is such a thing.  It is a toolkit used to
implement a development environment.
Q: Do you have an estimate for when Windows.Forms will be released?
A: We do not know, volunteers are working on this, but there is no set
date yet. The current approach is using the Wine Library to implement
it.
<a name="msft"></a>
** Mono and Microsoft
@@ -365,7 +328,7 @@ Q: Do you fear that Microsoft will change the spec and render Mono
A: No. Microsoft proved with the CLI and the C# language that it was
possible to create a powerful foundation for many languages to
interoperate. We will always have that.
inter-operate. We will always have that.
Even if changes happened in the platform which were undocumented,
the existing platform would a value on its own.
@@ -445,17 +408,17 @@ Q: Will I be able to compile a Microsoft VB.NET application and execute
A: Once we have a complete VisualBasic runtime, yes.
Q: Can mono run the WebMatrix ?
Q: Can mono run the WebMatrix?
A: No. That requires winforms (we don't have).
A: No. That requires System.Windows.Forms support which is not
currently implemented.
Q: Does mono have something like Passport ? (ie PassportIdentity class,somewhere
in System.Web ?) . Will mono have a server side Passport/Similar framework
for XSP as well as client classes ?
Q: Does mono have something like Passport?
Will mono have a server side Passport/Similar framework for XSP as well as client classes?
A: Not yet, but the client side API for authentication is not the problem.
We will likely have a lot of other authentication APIs, like the Liberty
Aliance APIs. The problem is people on the web provider end that might use
Alliance APIs. The problem is people on the web provider end that might use
this for authentication.
<a name="pnpproject"></a>
@@ -474,7 +437,7 @@ A: Most of Mono is being written using C#, with only
<li> A multi-platform runtime engine: both a JIT engine and an
interpreter exist. The JIT engine runs currently on x86
systems, while the interpreter works on Sparc, StrongARM and
systems, while the interpreter works on SPARC, StrongARM and
PowerPC systems.
<li> Supports Linux, Windows and Solaris at this point.
@@ -482,21 +445,21 @@ A: Most of Mono is being written using C#, with only
<li> The JIT engine is written using a portable instruction
selector which not only generates good code (we are told
that we are faster than Rotor, but it is hard to tell) but
is also the foundation to retarget the JIT engine to other
is also the foundation to re-target the JIT engine to other
systems.
The system employed is described in various compiler
books and it is very similar to what is described in the
book that covers LCC, the Ansi C retargetable C compiler.
book that covers LCC, the ANSI C retargetable C compiler.
<li> The JIT engine supports inlining, constant folding and propagation,
<li> The JIT engine supports in-lining, constant folding and propagation,
<li> Full support for remoting in the runtime, but the class
libraries are still behind.
<li> The C# compiler, the JIT engine and the class libraries are
mature enough that the whole system is self-hosting, ie, that
it can be fully developed with itself at this point.
mature enough that the whole system is self-hosting. This means that
we develop Mono completely with itself at this point.
<li> We are not yet done, and there is a lot of work left to be
done
@@ -523,7 +486,7 @@ A: Mono is only related to Web Services in that it will implement the
Q: Can I author Web Services with Mono?
A: You will be able to write Web Services on .NET that run on Mono and
viceversa.
vice-versa.
Q: If Mono implements the SDK classes, will I be able to write and
execute .NET Web Services with it?
@@ -545,9 +508,9 @@ A: Yes. The CLI contains enough information about a class that
exposing it to other RPC systems (like CORBA) is really simple, and
does not even require support from an object.
We will be implementing CORBA interoperation as an extension to the
We will be implementing CORBA inter-operation as an extension to the
Mono classes so that we can integrate with Bonobo, just like
Microsoft provides COM interoperation classes and support
Microsoft provides COM inter-operation classes and support
mechanisms.
Q: Can I serialize my objects to other things other than XML?
@@ -562,13 +525,13 @@ A: No. Mono will be using a new implementation of CORBA that isn't still started
<a name="devel"></a>
** Development Tools and Issues
Q: Will it be possible to use the CLI features without using bytecodes
Q: Will it be possible to use the CLI features without using byte codes
or the JIT?
A: Yes. The CLI engine will be made available as a shared library.
The garbage collection engine, the threading abstraction, the
object system, the dynamic type code system and the JIT will be
available for C developers to integreate with their applications if
available for C developers to integrate with their applications if
they wish to do so.
Q: Will you have new development tools?
@@ -609,7 +572,7 @@ Q: What about using something like Jabber instead of the System.Messaging
namespace?.
A: In short, MSMQ is not something like Jabber, but asynchronous messaging
through queues. Usefull queues do more than serialize messages, they are
through queues. Useful queues do more than serialize messages, they are
also platform bridges.
Q: Are you supporting XMLDocument and relatives?.
@@ -620,14 +583,14 @@ A: Currently, we aren't implementing them yet. It would require updates to
Q: Is there any plan to develop an aspx server for Mono?.
A: The webserver turned out to be very simple compared to the rest of the
A: The web server turned out to be very simple compared to the rest of the
work. Gonzalo has got the page generator mostly done (a module called
xsp, who has nothing to do with the XSP term used in the Apache Project).
Patrik has done a lot of the work to get the ProcessRequest to work.
You can try to help in the final touches to the System.Web classes and
writing regression tests for the widgets we have.
Q: Is there any way I can develop the class libraries using linux yet?
Q: Is there any way I can develop the class libraries using Linux yet?
A: Yes. Some class libraries can be developed on Linux. Search for
Paolo's post (he lists which classes can be compiled fine now).
@@ -635,7 +598,7 @@ A: Yes. Some class libraries can be developed on Linux. Search for
Q: Is there any way I can install a known working copy of mono in /usr,
and an experimental copy somewhere else, and have both copies use
their own libraries? (I'm still not very good at library paths in
linux)
Linux)
A: Yes. Just use two installation prefixes.
@@ -645,52 +608,19 @@ A: If you do a test suite for C#, you might want to keep it
independent of the Mono C# compiler, so that other compiler
implementations can later use it.
Q: Is the current stage the implementation of mono_create_trampoline
function? Hence the sparc-codegen.h is reasonably complete? Is
mono/arch/x86/* the best reference material for this stuff?
A: sparc-codegen.h is basically complete. We may want to add some
convenience macros along the way, but it has all the stuff you need.
And yes, or, the ppc/ dir, since the ppc call convention is more similar
to the sparc one than the x86 one. The current issues with the sparc
code are. roughly:
1) it needs to handle overflowing the out registers (the additional
arguments need to be put on the stack)
2) it needs to flush the icache where the generated code is stored
3) it needs to implement mono_create_method_pointer to get delegates
working
4) it needs a couple of updates (mono_method_pointer_get is no longer
needed, for example)
Q: Would it be too terrible to have another corlib signed as mscorlib?
A: We rename corlib to mscorlib also when saving the PE files, in fact,
the runtime can execute program created by mono just fine.
Q: How do I build corlib under Linux?
A: You can build your own (see the web site on how to get the mcs
project from cvs), but in order to build them using mcs you need a
set of working class libraries. After building the runtime (using
mono-build.sh) get them from the nightly build and put them (and
mcs.exe) in your mono/install/lib directory. Then you should be able
to do: cd mcs, then: make -f makefile.gnu, then: cp mcs/mcs.exe
class/lib/*.dll ../install/lib Also, you should know that you can
either get your dose of DLLs from MonoCharge, or from
http://primates.ximian.com/~miguel/runtime. MonoCharge is updated
automatically, while the later is only updated when Miguel is around
Once you have the DLLs, you can use `make -f makefile.gnu' as described
before to self-host.
Q: Is there a relatively straightforward way to repeat the steps taken
by Paolo to get Mono completely self-hosted on linux?
by Paolo to get Mono completely self-hosted on Linux?
A: To build the compiler and class libraries in Linux, run:
<ul><li>make -f makefile.gnu. To install them, run: </li>
<li>make -f makefile.gnu install</li>
<li>You can also specify a prefix:</li>
<li>make -f makefile.gnu install prefix=/opt</li>
<li>make -f makefile.gnu install prefix=/opt/mono</li>
</ul>
If you want to produce and distribute a monocharge tarball, run:
make -f makefile.gnu dist
Of course you have to run these in the top level mcs directory.
@@ -708,7 +638,7 @@ A: The remoting infrastructure is in place. Some of the channels and
formatters are not.
Q: I'm wondering if there are any plans to start using nant to build the
class lib + test lib. i think that every project neeed/should use an
class lib + test lib. i think that every project need/should use an
automated build process and nant + a couple of tools enables this. is
the problem that the compiler can't run nant yet?
@@ -733,7 +663,7 @@ Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since
A: Linux is enough.
Q: Any plan to make ASP.NET in mono works with Apache in linux?.
Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
A: Yes, we have plans to do so, but we need to wait for Patrik's patches to
HttpRuntime. Once that is there, writing a mod_mono should be trivial
@@ -756,12 +686,9 @@ Q: In developing the data architecture for the application are there and
transition (minimum code rewrite) to Mono's ADO.NET implementation? (For
example, strongly typed datasets versus untyped datasets, etc...)
A: we are implementing all the classes in Microsoft .NET's System.Data, so
you can be sure that things will work the same in Mono as with the MS's
implementation. We'll maybe provide extra classes to fix some things
we've found missing while developing ADO.NET in Mono, but if you keep
using the MS's System.Data classes, things will work out of the box with
no changes (or at least that's the plan :-)
A: We are implementing all the classes in Microsoft .NET's System.Data, so
you can be sure that things will work the same in Mono as with the Microsoft
implementation.
<a name="java">
** Mono and Java
@@ -772,7 +699,7 @@ Q: Why don't you use Java? After all, there are many languages that
A: You can get very good tools for doing Java development on free
systems right now. <a href="http://www.redhat.com">Red Hat</a> has
contributed a <a href="http://gcc.gnu.org">GCC</a> <a
href="http://gcc.gnu.org/java">frontend for Java</a> that can take
href="http://gcc.gnu.org/java">front-end for Java</a> that can take
Java sources or Java byte codes and generate native executables; <a
href="http://www.transvirtual.com">Transvirtual</a> has implemented
<a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
@@ -791,10 +718,10 @@ A: Yes, Java could target the CLI. We have details on a <a
href="ideas.html#guavac">project</a> that someone could take on to
make this happen.
Microsoft has an implemenation of the Java language called J# that
Microsoft has an implementation of the Java language called J# that
can target the CIL execution engine.
Q: Is it possible to write a JVM byte code to CIL convertor?
Q: Is it possible to write a JVM byte code to CIL converter?
A: Yes, it is possible. Here are a few starting point:
@@ -814,7 +741,7 @@ A: Yes, it is possible. Here are a few starting point:
be translated into the equivalent "meaning" in CLR-land.
</ul>
Q: Could mono become a hybrid cil/java platform?
Q: Could mono become a hybrid CIL/java platform?
A: No. It is quite far from the philosophy of the project. The idea of Mono
is, to have only _one_ VM, on which all can run. And if there existing a
@@ -822,15 +749,15 @@ A: No. It is quite far from the philosophy of the project. The idea of Mono
like J-Sharp on Mono, you can write programs in Java, which than can run
on Mono. You do not need two bindings (like your example: GTK-Sharp _and_
Java-Gnome). You need only _one_ of it (GTK-Sharp). Thats the idea of Mono.
An other point is, that there are no people, who use OpenSource-JVMs. They
An other point is, that there are no people, who use Open Source-JVMs. They
all prefer Suns original. But for Unix there don't exist a .NET-Framework.
So it is possible, that in the future Mono is the standard .NET for unixes.
So it is possible, that in the future Mono is the standard .NET for Unixes.
Q: Do you plan to implement a Javascript compiler?
A: Yes. Eto Demerzal has started a Rhino port to C#.
After this is completed, we will begin developing
the Javascript compiler.
the JavaScript compiler.
<a name="extending"></a>
** Extending Mono
@@ -861,7 +788,7 @@ A: Embracing a good technology is good. Extending technologies in
encourage you to make those classes operate correctly well in both
Mono and .NET.
Q: Is there any way I can develop the class libraries using linux yet?
Q: Is there any way I can develop the class libraries using Linux yet?
A: Yes. Some class libraries can be developed on Linux. Search for
Paolo's post (he lists which classes can be compiled fine now).
@@ -869,7 +796,7 @@ A: Yes. Some class libraries can be developed on Linux. Search for
Q: Is there any way I can install a known working copy of mono in /usr,
and an experimental copy somewhere else, and have both copies use
their own libraries? (I'm still not very good at library paths in
linux)
Linux)
A: Yes. Just use two installation prefixes.
@@ -887,7 +814,7 @@ Q: What about Mono on non Linux-based systems?
A: Our main intention at Ximian is to be able to develop GNOME
applications with Mono, but if you are interested in providing a
port of the Winform classes to other platforms (frame buffer or
port of the Winforms classes to other platforms (frame buffer or
MacOS X for example), we would gladly integrate them, as long
they are under an open source license.
@@ -897,21 +824,21 @@ A: Mono currently runs on Linux, Windows, Solaris and FreeBSD.
There is a JIT engine available for x86 processors that can
generate code and optimizations tailored for a particular CPU.
Interpreters exist for the SPARC, PowerPC and StrongARM cpus.
Interpreters exist for the SPARC, PowerPC and StrongARM CPUs.
Q: Does Mono run on Windows?
A: Yes. The Compiler and the runtime both run on Windows.
A: Yes. You can get pre-compiled
binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
Q: When will mono and mcs compile on Linux?.
Q: Does Mono run on Linux?
A: That happend a long time ago. Know you can download and compile
them or even install them from already made binary packages for
Windows and for Linux (RPM/DEB).
A: Yes. You can get pre-compiled
binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
Q: Will I require Cygwin to run mono?
A: No. While you'll need it to compile it, it runs without cygwin and does not even require cygwin1.dll
A: No. Cygwin is only required to build Mono.
Q: Will Mono depend on GNOME?
@@ -940,7 +867,7 @@ Q: Has anyone succeeded in building a Mac version of the C# environment.
A: You could try to check with the Darwin people, or the Fink people.
Mono/C# is self hosting on Linux/PPC which is the hard part, so it
should be relatively simple to get it to work on macos
should be relatively simple to get it to work on MacOS
<a name="reuse"></a>
** Reusing Existing Code
@@ -987,7 +914,7 @@ Q: Will built-in reporting be supported for crystal reports? This is a
heavily used part of our system.
A: Probably not. Crystal Reports are propriety. Someone may try to emulate
the behaviour, but no-one has yet volunteered.
the behavior, but no-one has yet volunteered.
Q: Who about writing to the registry? As I understand it, Linux does not have
a counterpart to the registry. Should I avoid relying on that feature?
@@ -1008,7 +935,7 @@ A: if their license is compatible with mono's, yes, we'd think about porting
<a name="gcc"></a>
** Mono and GCC
Q: Are you working on a GCC front-end to C#? A GCC backend that will
Q: Are you working on a GCC front-end to C#? A GCC back-end that will
generate CIL images? What about making a front-end to GCC that
takes CIL images and generates native code?
@@ -1074,6 +1001,14 @@ A: The C# Compiler is released under the terms of the <a
href="http://www.opensource.org/licenses/mit-license.html">MIT X11</a>
license.
The Mono runtime and the Mono C# Compiler are also available under
a proprietary license for those who can not use the LGPL and the
GPL in their code.
For licensing details, contact <a
href="mailto:[email protected]">[email protected]</a>
Q: I would like to contribute code to Mono under a particular
license. What licenses will you accept?
@@ -1081,6 +1016,9 @@ A: We will have to evaluate the licenses for compatibility first,
but as a general rule, we will accept the code under the same
terms of the "container" module.
Q: Is the Mono
<a name="patents"></a>
** Patents
@@ -1091,7 +1029,9 @@ Q: Could patents be used to completely disable Mono (either submarine
A: No. First, its basic functional capabilities have pre-existed too
long to be held up by patents. The basic components of Mono are
technologically equivalent to Sun's Java technology, which has been
around for years. Mono will also implement multi-language and
around for years.
Mono will also implement multi-language and
multi-architecture support, but there are previous technologies
such as UCSD p-code and ANDF that also support multiple languages
using a common intermediate language. The libraries are similar
@@ -1117,11 +1057,11 @@ A: The key difference between CORBA (and COM) and the CLI is that the
CLI allows "data-level interoperability" because every
language/component uses the same data layout and memory management.
This means you can operate directly upon the datatypes that someone
This means you can operate directly upon the data types that someone
else provides, without having to go via their interfaces. It also
means you don't have to "marshall" (convert) parameters (data
means you don't have to "marshal" (convert) parameters (data
layouts are the same, so you can just pass components directly) and
you don't have to worry about memory managment, because all
you don't have to worry about memory management, because all
languages/components share the same garbage collector and address
space. This means much less copying and no need for reference
counting.
@@ -1135,7 +1075,7 @@ Q: Will Ximian offer certifications on Mono or related technologies?.
A: It's possible. But there is no plan about this. So the short answer is no.
Q: Are there any Boehm's gc binaries?
Q: Are there any Boehm's GC binaries?
A: Yes. You can find RPMs <a href="http://java.thn.htu.se/~toor/">here</a>, though
if your distribution provides the correct packages, you should use those.
@@ -1144,12 +1084,13 @@ A: Yes. You can find RPMs <a href="http://java.thn.htu.se/~toor/">here</a>, thou
Q: How can I report a bug?
A: The best thing is to track down the bug and provide a simple test to
reproduce the bug. You can then add the bug to
<a href="http://bugzilla.ximian.com/enter_bug.cgi">bugzilla</a> or
simply send it to [email protected]. Please provide info about
what version of mono you're using and any relevant details to be
able to repoduce the bug. Note that bugs reported on the mailing-list
may be easily forgotten, so it's better to file them in bugzilla.
reproduce the bug. You can then add the bug to the
<a href="http://bugzilla.ximian.com/enter_bug.cgi">bugtracking system</a>.
Please provide information about what version of mono you're using
and any relevant details to be able to reproduce the bug. Note that
bugs reported on the mailing-list may be easily forgotten, so it's
better to file them in the <a href="http://bugzilla.ximian.com/enter_bug.cgi">bug tracking system</a>.
Q: Does mcs support the same command line options as the MS C#
compiler?
+8
View File
@@ -13,6 +13,14 @@ Some of them may start contributing because they want a mention in the
* Mono Hackers
** Sergey Chaban
Sergey has been a long time contributor to the project, from the early
work on the class libraries that were critical to Mono's origin: every
time you use a Hashtable in Mono, it runs Sergey's code, to the
low-level optimizations on the JIT engine and to his work on ILASM and
the PEToolkit. And countless other things.
** Nick Drochak
The first, deserved, entry in the <b>Mono Hackers Hall Of Fame</b> is for
+103 -1
View File
@@ -33,9 +33,11 @@
<td>
<table border=1>
<tr>
<td>
<td colspan="3">
<b><center>Mono Status</center></b>
</td>
</tr>
<tr>
<td>
<b><a href="c-sharp.html">C# Compiler</a></b>
</td>
@@ -84,6 +86,106 @@
</tr>
</table>
<h3>Events</h3>
<ul>
<li><b><a
href="http://www.sigs-datacom.de/sd/kongresse/dotnet_2002/index.htm">.NET
ONE 2002:</a></b> Come see Paolo, Mike and Miguel from the Mono team at the .NET ONE conference in Frankfurt.</ul>
</ul>
@item Sep 19th, 2002: Mono Survey.
Help us plan for the future of Mono by filing out the <a
href="http://primates.ximian.com/~miguel/monosurvey">First Mono
Survey</a>
@item Sep 17th, 2002: Mono Hackers Hall of Fame: Sergey Chaban
The <a href="hackers.html">Mono Hackers Hall Of Fame</a>
continues to show our appreciation to the excellent
contributors that made <b>mono::</b> a successful free
software project.
This time the Hall of Fame welcomes Sergey Chaban. Sergey has
been a long time contributor to the project, from the early
work on the class libraries that were critical to Mono's
origin: every time you use a Hashtable in Mono, it runs
Sergey's code, to the low-level optimizations on the JIT
engine and to his work on ILASM and the PEToolkit.
@item Sep 16th, 2002: Documentation Tools, ILASM, Debugger, Mono LDAP, Winforms
Adam Treat has started moving the documentation universe again. We
have a new strategy to document our APIs (given that we have
chosen <a href="classlib-doc.html">not to document the code
inline</a>). This includes the use of a master reference file
that will hold the entry points to document. All master files
for our assemblies have been checked into CVS now.
Sergey Chaban's Mono.PEToolkit and ILASM tools have been
checked into CVS. Although ILASM is old and will soon be
updated, we wanted to get the build issues sorted out.
Martin Baulig's Mono Debugger is still on its early stages,
but you can run and run step by step your C# code and C code
(including the Mono runtime). Dwarf-2 is required to compile
your code. The regular step, step-into, and assembly-level
step and step-into are supported. And comes with a Gtk#
UI. The debugger is written mostly in C# with some C glue
code. Most of the work is on the engine, we will be working
on making a good UI in the future.
Chris Toshok of the Hungry Programmer's fame has checked in
Mono.Directory.LDAP, a C# wrapper for the LDAP libraries.
This is the substrate for implementing the
System.DirectoryServices assembly.
Andrew has also continued with some of the cryptographic
classes implemetation.
After much public debate, we have chosen a new <a
href="winforms.html">strategy to implement winforms</a>.
Implementing a Gtk, Qt or Aqua based version of Winforms was
going to be almost as complex as implementing Wine itself. So
the new strategy is to only roll out a WineLib-based
implementation.
@item Sep 4th, 2002: .NET One 2002 Program available
The <a
href="http://www.sigs-datacom.de/sd/kongresse/dotnet_2002/index.htm">.NET
ONE 2002</a> conference in Frankfurt is now available. Paolo
will be talking about the Mono JIT and embedding the Mono
runtime in your Windows and Linux applications. Mike Kestner
will talk about <a href="http://gtk-sharp.sf.net">Gtk#</a> and
the automatic binding generator used by Gtk# and Miguel will
be talking about the Mono project on Monday's keynote and on
the Mono C# compiler on Tuesday.
@item Sep 3rd, 2002: Apache integration
<a
href="http://lists.ximian.com/archives/public/mono-list/2002-September/001862.html">Sterling</a>
announced an Apache module that hosts
Mono, and allows CIL code to run from within Apache, giving the
module access to the Apache runtime. This uses the Mono embedding
API.
@item Aug 24th, 2002: Gtk# 0.4 released
Shortly after <a href="download.html">Mono 0.15</a> was
released a fresh version of <a
href="http://gtk-sharp.sf.net">Gtk#</a> was <a
href="http://lists.ximian.com/archives/public/mono-list/2002-August/001702.html">announced</a>.
@item Aug 23rd, 2002: Mono 0.15 released
Mono 0.15 has been released. Source and RPMs are <a
href="download.html">available</a>. The release notes are <a
href="archive/mono-0.15">here</a>
@item Aug 21th, 2002: Portable.NET encodings integrated into Mono.
Rhys Weatherley has contributed the Portable.NET encoders to
+4
View File
@@ -1,5 +1,9 @@
* Java
<b>This is an outline on how to support Java, actual
implementations of ideas like this can be found <a href="http://radio.weblogs.com/0109845/">here</a></b>
It would be interesting to support the Java language as part
of the Mono project.
+12 -5
View File
@@ -14,7 +14,7 @@
<ul>
* <a href="#JavaScript">Java Script</a>
* <a href="java.html">Java</a>
* <a href="#java.html">Java</a>
* <a href="#c">C</a>
</ul>
@@ -24,6 +24,13 @@
* <a href="#Tachy">Tachy</a> (scheme-like)
</ul>
<a name="Java">
** Java
There is a very interesting project to make a JavaVM for .NET
<a href="http://radio.weblogs.com/0109845/">here</a>
<a name="MonoLogo">
** MonoLogo
@@ -101,10 +108,10 @@
Ideally GCC could be modified to generate CIL, but it is a
big task. That would give us various compilers in one pass.
Rumor is that the next version of the LCC compiler will
include an IL backend. We do not know how extensive the support
for integration with .NET will be, but it would be an interesting
excercise to add an extension to C to call into .NET code.
<a href="http://www.cs.princeton.edu/software/lcc">LCC</a> 4.2
has been recently released. This release adds support for compiling
ANSI C programs to CIL. Note that the CIL support only works on Win32
right now, but should be easy to convert to Mono/other architectures.
LCC is not an open source compiler, but it is free as long as you
do not profit from selling it.
+51 -12
View File
@@ -17,6 +17,12 @@ echo "Building Mono and dependencies in $here, installing to $here/install"
PATH=$here/install/bin:$here/install/lib:$PATH
# Make sure cygwin's libiconv is installed, or libtool blows its tiny mind
if [ ! -f /usr/lib/libiconv.la ]; then
echo "You need to install the cygwin \"libiconv\" package!"
exit -1
fi
# Check mono out first, so we can run aclocal from inside the mono dir (it
# needs to see which version of the real aclocal to run)
test -z "$CVSROOT" && CVSROOT=:pserver:[email protected]:/mono
@@ -42,6 +48,18 @@ fi
cvs checkout mono || exit -1
echo "Checking automake version"
automake_required="1.6.2"
automake_version=`automake --version | head -1 | awk '{print $4}' | tr -d '[a-zA-Z]' | sed 's/-.*$//g'`
echo "Found automake version $automake_version"
if expr $automake_version \< $automake_required > /dev/null; then
echo "Your automake is too old! You need version $automake_required or newer."
exit -1
else
echo "Automake version new enough."
fi
# Select the stable version anyway...
if [ ! -z "${AUTO_STABLE}" -o -e /usr/autotool/stable ]; then
export AUTO_STABLE=${AUTO_STABLE:-/usr/autotool/stable}
export AUTO_DEVEL=${AUTO_STABLE}
@@ -49,8 +67,7 @@ fi
# Need to install pkgconfig and set ACLOCAL_FLAGS if there is not a
# pkgconfig installed already. Otherwise set PKG_CONFIG_PATH to the
# glib we're about to install in $here/install. This script could
# attempt to be clever and see if glib 2 is already installed, too.
# glib we're about to install in $here/install.
# --print-ac-dir was added in 1.2h according to the ChangeLog. This
@@ -61,15 +78,17 @@ fi
# it finds two copies of the m4 macros). The GIMP for Windows
# pkgconfig sets its prefix based on the location of its binary, so we
# dont need PKG_CONFIG_PATH (the internal pkgconfig config file
# $prefix is handled similarly).
# $prefix is handled similarly). For the cygwin pkgconfig we do need to
# set it, and we need to edit the mingw pc files too.
function aclocal_scan () {
# Quietly ignore the rogue '-I' and other aclocal flags that
# aren't actually directories...
#
# cd into mono/ so that the aclocal wrapper can work out which version
# of aclocal to run
for i in `(cd mono && aclocal --print-ac-dir)` $ACLOCAL_FLAGS
# of aclocal to run, and add /usr/share/aclocal too cos aclocal looks there
# too.
for i in `(cd mono && aclocal --print-ac-dir)` /usr/share/aclocal $ACLOCAL_FLAGS
do
if [ -f $i/$1 ]; then
return 0
@@ -96,10 +115,17 @@ function install_package() {
fi
}
if ! aclocal_scan pkg.m4 ; then
ACLOCAL_FLAGS="-I $here/install/share/aclocal $ACLOCAL_FLAGS"
# pkgconfig is only used during the build, so we can use the cygwin version
# if it exists
if aclocal_scan pkg.m4 ; then
install_pkgconfig=no
else
install_pkgconfig=yes
fi
# But we still need to use the mingw libs for glib & co
ACLOCAL_FLAGS="-I $here/install/share/aclocal $ACLOCAL_FLAGS"
export PATH
export ACLOCAL_FLAGS
@@ -110,15 +136,28 @@ fi
# Fetch and install pkg-config, glib, iconv, intl
install_package pkgconfig-0.80-tml-20020101.zip bin/pkg-config.exe pkgconfig
install_package glib-1.3.12-20020101.zip lib/libglib-1.3-12.dll glib
install_package glib-dev-1.3.12-20020101.zip lib/glib-1.3.lib glib-dev
if [ $install_pkgconfig = "yes" ]; then
install_package pkgconfig-0.11-20020310.zip bin/pkg-config.exe pkgconfig
else
echo "Not installing pkgconfig, you already seem to have it installed"
fi
install_package glib-2.0.4-20020703.zip lib/libglib-2.0-0.dll glib
install_package glib-dev-2.0.4-20020703.zip lib/glib-2.0.lib glib-dev
install_package libiconv-1.7.zip lib/iconv.dll iconv
install_package libiconv-dev-1.7.zip lib/iconv.lib iconv-dev
install_package libintl-0.10.40-20020101.zip lib/libintl-1.dll intl
install_package libgc-dev.zip lib/gc.dll gc-dev
# Needed to find the libiconv bits
if [ $install_pkgconfig = "no" ]; then
echo "Fixing up the pkgconfig paths"
for i in $here/install/lib/pkgconfig/*.pc
do
mv $i $i.orig
sed -e "s@^prefix=/target\$@prefix=$here/install@" < $i.orig > $i
done
export PKG_CONFIG_PATH=$here/install/lib/pkgconfig
fi
# Needed to find the libgc bits
CPPFLAGS="$CPPFLAGS -I$here/install/include"
LDFLAGS="$LDFLAGS -L$here/install/lib"
export CPPFLAGS
+61 -12
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#! /usr/bin/env bash
# Script to automate the building of mono and its dependencies.
# Relies on wget being installed (could make it fall back to using
@@ -17,6 +17,44 @@ echo "Building Mono and dependencies in $here, installing to $here/install"
PATH=$here/install/bin:$PATH
LD_LIBRARY_PATH=$here/install/lib:$LD_LIBRARY_PATH
# Find a tool to fetch files. It must take an HTTP URL on the command line and
# save the file in the current directory. (It must also talk HTTP/1.1, which
# rules out BSD's ftp(1), at least on FreeBSD 4.4.)
viable_downloaders="wget fetch"
for i in $viable_downloaders
do
if which $i > /dev/null; then
downloader=`which $i`
break
fi
done
if [ -z "$downloader" ]; then
echo "Can't find a commandline download tool (tried: $viable_downloaders)"
exit -1
else
echo "Using $downloader to fetch files"
fi
# We need to prefer GNU make if there's a choice. BSD make falls over in
# the glib build if gtk-doc is disabled.
viable_makers="gmake make"
for i in $viable_makers
do
if which $i > /dev/null; then
MAKE=$i
break
fi
done
if [ -z "$MAKE" ]; then
echo "Can't find a make tool (tried: $viable_makers)"
exit -1
else
echo "Using $MAKE"
export MAKE
fi
# Need to install pkgconfig and set ACLOCAL_FLAGS if there is not a
# pkgconfig installed already. Otherwise set PKG_CONFIG_PATH to the
# glib we're about to install in $here/install. This script could
@@ -64,14 +102,14 @@ function install_package() {
echo "Installing $name..."
if [ ! -f $here/$tarfile ]; then
wget http://www.go-mono.org/archive/$tarfile
(cd $here && $downloader http://www.go-mono.com/archive/$tarfile)
fi
# Assume that the package built correctly if the dir is there
if [ ! -d $here/$dirname ]; then
# Build and install package
tar xzf $here/$tarfile || exit -1
(cd $here/$dirname; ./configure --prefix=$here/install $configure_options || exit -1; make || exit -1; make install || exit -1)
(cd $here && tar xzf $tarfile) || exit -1
(cd $here/$dirname; ./configure --prefix=$here/install $configure_options || exit -1; $MAKE || exit -1; $MAKE install || exit -1)
success=$?
if [ $success -ne 0 ]; then
echo "***** $name build failure. Run rm -rf $here/$dirname to have this script attempt to build $name again next time"
@@ -113,12 +151,23 @@ export LD_LIBRARY_PATH
export ACLOCAL_FLAGS
export PKG_CONFIG_PATH
CPPFLAGS="$CPPFLAGS -I$here/install/include"
LDFLAGS="$LDFLAGS -L$here/install/lib"
# Freebsd puts iconv in /usr/local, so see if we need to add
# /usr/local/include and /usr/local/lib to CPPFLAGS and LDFLAGS. We could
# skip this if it would add /usr/include and /usr/lib, but leaving it
# shouldnt break anything.
iconvh=`locate include/iconv.h`
iconvh_dir=`dirname $iconvh`
iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'`
echo "Adding $iconvh_dir to CPPFLAGS"
echo "Adding $iconvlib_dir to LDFLAGS"
CPPFLAGS="$CPPFLAGS -I$here/install/include -I$iconvh_dir"
LDFLAGS="$LDFLAGS -L$here/install/lib -L$iconvlib_dir"
export CPPFLAGS
export LDFLAGS
# Grab pkg-config-0.8, glib-1.3.12 if necessary
# Grab pkg-config, glib and libgc if necessary
if [ $install_pkgconfig = "yes" ]; then
install_package pkgconfig-0.8.0.tar.gz pkgconfig-0.8.0 pkgconfig ""
@@ -127,16 +176,16 @@ else
fi
if [ $install_glib = "yes" ]; then
install_package glib-1.3.13.tar.gz glib-1.3.13 glib ""
install_package glib-2.0.6.tar.gz glib-2.0.6 glib ""
else
echo "Not installing glib, you already seem to have it installed"
fi
if [ $install_libgc = "yes" ]; then
LIBS="-ldl" install_package gc6.0.tar.gz gc6.0 libgc "--enable-threads=pthreads"
install_package gc6.1alpha5.tar.gz gc6.1alpha5 libgc "--enable-threads=pthreads"
# make install didnt do the headers!
mkdir -p $here/install/include/gc
cp -r $here/gc6.0/include/* $here/install/include/gc
cp -r $here/gc6.1alpha5/include/* $here/install/include/gc
else
echo "Not installing libgc, you already seem to have it installed"
fi
@@ -166,12 +215,12 @@ elif [ ${CVSROOT:0:9} = ":pserver:" ]; then
fi
fi
cvs checkout mono || exit -1
(cd $here && cvs checkout mono) || exit -1
# Build and install mono
echo "Building and installing mono"
(cd $here/mono; ./autogen.sh --prefix=$here/install || exit -1; make || exit -1; make install || exit -1) || exit -1
(cd $here/mono; ./autogen.sh --prefix=$here/install || exit -1; $MAKE || exit -1; $MAKE install || exit -1) || exit -1
echo ""
+246
View File
@@ -0,0 +1,246 @@
System.Object
System.Exception
System.ValueType
System.Delegate
System.MulticastDelegate
System.Enum
System.Activator
System.ArgIterator
System.__ComObject
System.TypedReference
System.Security.AllowPartiallyTrustedCallersAttribute
System.Runtime.Serialization.Formatter
System.Runtime.Serialization.FormatterConverter
System.Runtime.Serialization.FormatterServices
System.Runtime.Serialization.ObjectIDGenerator
System.Runtime.Serialization.ObjectManager
System.Reflection.ModuleResolveEventHandler
System.Reflection.Pointer
System.Globalization.CompareInfo
System.Globalization.HebrewCalendar
System.Globalization.HijriCalendar
System.Globalization.JapaneseCalendar
System.Globalization.KoreanCalendar
System.Globalization.SortKey
System.Globalization.StringInfo
System.Globalization.TaiwanCalendar
System.Globalization.TextElementEnumerator
System.Globalization.TextInfo
System.Globalization.ThaiBuddhistCalendar
System.IO.IsolatedStorage.IsolatedStorageFile
System.Reflection.Emit.MethodRental
System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
System.Runtime.CompilerServices.CallConvCdecl
System.Runtime.CompilerServices.CallConvStdcall
System.Runtime.CompilerServices.CallConvThiscall
System.Runtime.CompilerServices.CallConvFastcall
System.Runtime.CompilerServices.CustomConstantAttribute
System.Runtime.CompilerServices.DateTimeConstantAttribute
System.Runtime.CompilerServices.DiscardableAttribute
System.Runtime.CompilerServices.DecimalConstantAttribute
System.Runtime.CompilerServices.CompilationRelaxationsAttribute
System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
System.Runtime.CompilerServices.IDispatchConstantAttribute
System.Runtime.CompilerServices.IsVolatile
System.Runtime.CompilerServices.IUnknownConstantAttribute
System.Runtime.CompilerServices.RequiredAttributeAttribute
System.Runtime.InteropServices.ArrayWithOffset
System.Runtime.InteropServices.DispIdAttribute
System.Runtime.InteropServices.ClassInterfaceType
System.Runtime.InteropServices.ClassInterfaceAttribute
System.Runtime.InteropServices.ComVisibleAttribute
System.Runtime.InteropServices.LCIDConversionAttribute
System.Runtime.InteropServices.ComRegisterFunctionAttribute
System.Runtime.InteropServices.ComUnregisterFunctionAttribute
System.Runtime.InteropServices.ProgIdAttribute
System.Runtime.InteropServices.ImportedFromTypeLibAttribute
System.Runtime.InteropServices.IDispatchImplType
System.Runtime.InteropServices.IDispatchImplAttribute
System.Runtime.InteropServices.ComSourceInterfacesAttribute
System.Runtime.InteropServices.ComConversionLossAttribute
System.Runtime.InteropServices.TypeLibTypeFlags
System.Runtime.InteropServices.TypeLibFuncFlags
System.Runtime.InteropServices.TypeLibVarFlags
System.Runtime.InteropServices.TypeLibTypeAttribute
System.Runtime.InteropServices.TypeLibFuncAttribute
System.Runtime.InteropServices.TypeLibVarAttribute
System.Runtime.InteropServices.ComImportAttribute
System.Runtime.InteropServices.PreserveSigAttribute
System.Runtime.InteropServices.ComAliasNameAttribute
System.Runtime.InteropServices.AutomationProxyAttribute
System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
System.Runtime.InteropServices.CoClassAttribute
System.Runtime.InteropServices.ComEventInterfaceAttribute
System.Runtime.InteropServices.COMException
System.Runtime.InteropServices.ComMemberType
System.Runtime.InteropServices.CurrencyWrapper
System.Runtime.InteropServices.DispatchWrapper
System.Runtime.InteropServices.ErrorWrapper
System.Runtime.InteropServices.ExtensibleClassFactory
System.Runtime.InteropServices.HandleRef
System.Runtime.InteropServices.InvalidComObjectException
System.Runtime.InteropServices.InvalidOleVariantTypeException
System.Runtime.InteropServices.TypeLibImporterFlags
System.Runtime.InteropServices.ExporterEventKind
System.Runtime.InteropServices.ITypeLibExporterNotifySink
System.Runtime.InteropServices.ITypeLibConverter
System.Runtime.InteropServices.MarshalDirectiveException
System.Runtime.InteropServices.ObjectCreationDelegate
System.Runtime.InteropServices.RuntimeEnvironment
System.Runtime.InteropServices.RegistrationServices
System.Runtime.InteropServices.SafeArrayRankMismatchException
System.Runtime.InteropServices.SafeArrayTypeMismatchException
System.Runtime.InteropServices.SEHException
System.Runtime.InteropServices.TypeLibConverter
System.Runtime.InteropServices.BIND_OPTS
System.Runtime.InteropServices.UCOMIBindCtx
System.Runtime.InteropServices.UCOMIConnectionPointContainer
System.Runtime.InteropServices.UCOMIConnectionPoint
System.Runtime.InteropServices.UCOMIEnumMoniker
System.Runtime.InteropServices.CONNECTDATA
System.Runtime.InteropServices.UCOMIEnumConnections
System.Runtime.InteropServices.UCOMIEnumConnectionPoints
System.Runtime.InteropServices.UCOMIEnumString
System.Runtime.InteropServices.UCOMIEnumVARIANT
System.Runtime.InteropServices.FILETIME
System.Runtime.InteropServices.UCOMIMoniker
System.Runtime.InteropServices.UCOMIPersistFile
System.Runtime.InteropServices.UCOMIRunningObjectTable
System.Runtime.InteropServices.STATSTG
System.Runtime.InteropServices.UCOMIStream
System.Runtime.InteropServices.DESCKIND
System.Runtime.InteropServices.BINDPTR
System.Runtime.InteropServices.UCOMITypeComp
System.Runtime.InteropServices.TYPEKIND
System.Runtime.InteropServices.TYPEFLAGS
System.Runtime.InteropServices.IMPLTYPEFLAGS
System.Runtime.InteropServices.TYPEATTR
System.Runtime.InteropServices.FUNCDESC
System.Runtime.InteropServices.IDLFLAG
System.Runtime.InteropServices.IDLDESC
System.Runtime.InteropServices.PARAMFLAG
System.Runtime.InteropServices.PARAMDESC
System.Runtime.InteropServices.TYPEDESC
System.Runtime.InteropServices.ELEMDESC
System.Runtime.InteropServices.VARDESC
System.Runtime.InteropServices.DISPPARAMS
System.Runtime.InteropServices.EXCEPINFO
System.Runtime.InteropServices.FUNCKIND
System.Runtime.InteropServices.INVOKEKIND
System.Runtime.InteropServices.CALLCONV
System.Runtime.InteropServices.FUNCFLAGS
System.Runtime.InteropServices.VARFLAGS
System.Runtime.InteropServices.UCOMITypeInfo
System.Runtime.InteropServices.SYSKIND
System.Runtime.InteropServices.LIBFLAGS
System.Runtime.InteropServices.TYPELIBATTR
System.Runtime.InteropServices.UCOMITypeLib
System.Runtime.InteropServices.UnknownWrapper
System.Runtime.Remoting.IObjectHandle
System.Runtime.Remoting.IRemotingTypeInfo
System.Runtime.Remoting.IChannelInfo
System.Runtime.Remoting.IEnvoyInfo
System.Runtime.Remoting.RemotingConfiguration
System.Runtime.Remoting.TypeEntry
System.Runtime.Remoting.ActivatedClientTypeEntry
System.Runtime.Remoting.ActivatedServiceTypeEntry
System.Runtime.Remoting.WellKnownClientTypeEntry
System.Runtime.Remoting.WellKnownServiceTypeEntry
System.Runtime.Remoting.RemotingException
System.Runtime.Remoting.ServerException
System.Runtime.Remoting.RemotingTimeoutException
System.Runtime.Remoting.RemotingServices
System.Runtime.Remoting.InternalRemotingServices
System.Runtime.Remoting.SoapServices
System.Runtime.Remoting.Activation.UrlAttribute
System.Runtime.Remoting.Messaging.IMessageSink
System.Runtime.Remoting.Messaging.AsyncResult
System.Runtime.Remoting.Messaging.CallContext
System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
System.Runtime.Remoting.Messaging.InternalMessageWrapper
System.Runtime.Remoting.Messaging.IMethodCallMessage
System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
System.Runtime.Remoting.Messaging.HeaderHandler
System.Runtime.Remoting.Messaging.IMessageCtrl
System.Runtime.Remoting.Messaging.IRemotingFormatter
System.Runtime.Remoting.Messaging.ReturnMessage
System.Runtime.Remoting.Messaging.MethodCall
System.Runtime.Remoting.Messaging.ConstructionCall
System.Runtime.Remoting.Messaging.MethodResponse
System.Runtime.Remoting.Messaging.ConstructionResponse
System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
System.Runtime.Remoting.Messaging.OneWayAttribute
System.Runtime.Remoting.Messaging.MessageSurrogateFilter
System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
System.Runtime.Remoting.Contexts.CrossContextDelegate
System.Runtime.Remoting.Contexts.ContextProperty
System.Runtime.Remoting.Contexts.IContextPropertyActivator
System.Runtime.Remoting.Contexts.IContributeClientContextSink
System.Runtime.Remoting.Contexts.IContributeDynamicSink
System.Runtime.Remoting.Contexts.IContributeEnvoySink
System.Runtime.Remoting.Contexts.IContributeObjectSink
System.Runtime.Remoting.Contexts.IContributeServerContextSink
System.Runtime.Serialization.Formatters.InternalRM
System.Runtime.Serialization.Formatters.InternalST
System.Runtime.Serialization.Formatters.SoapMessage
System.Runtime.Serialization.Formatters.SoapFault
System.Runtime.Serialization.Formatters.ServerFault
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
System.Security.Cryptography.CryptoConfig
System.Security.Cryptography.KeyedHashAlgorithm
System.Security.Cryptography.HMACSHA1
System.Security.Cryptography.MACTripleDES
System.Security.Cryptography.MaskGenerationMethod
System.Security.Cryptography.PasswordDeriveBytes
System.Security.Cryptography.PKCS1MaskGenerationMethod
System.Security.Cryptography.RC2
System.Security.Cryptography.RC2CryptoServiceProvider
System.Security.Cryptography.RSACryptoServiceProvider
System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1SignatureDeformatter
System.Security.Cryptography.RSAPKCS1SignatureFormatter
System.Security.Cryptography.SHA1Managed
System.Security.Cryptography.TripleDES
System.Security.Cryptography.TripleDESCryptoServiceProvider
System.Security.Permissions.EnvironmentPermission
System.Security.Permissions.FileDialogPermission
System.Security.Permissions.IsolatedStorageFilePermission
System.Security.Permissions.PrincipalPermissionAttribute
System.Security.Permissions.SecurityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermission
System.Security.Permissions.ReflectionPermission
System.Security.Permissions.RegistryPermission
System.Security.Permissions.PrincipalPermission
System.Security.Permissions.SiteIdentityPermission
System.Security.Permissions.StrongNameIdentityPermission
System.Security.Permissions.StrongNamePublicKeyBlob
System.Security.Permissions.UIPermission
System.Security.Permissions.UrlIdentityPermission
System.Security.Permissions.ZoneIdentityPermission
System.Security.Policy.ApplicationDirectory
System.Security.Policy.ApplicationDirectoryMembershipCondition
System.Security.Policy.FirstMatchCodeGroup
System.Security.Policy.Hash
System.Security.Policy.HashMembershipCondition
System.Security.Policy.NetCodeGroup
System.Security.Policy.PermissionRequestEvidence
System.Security.Policy.Publisher
System.Security.Policy.PublisherMembershipCondition
System.Security.Policy.Site
System.Security.Policy.SiteMembershipCondition
System.Security.Policy.StrongName
System.Security.Policy.StrongNameMembershipCondition
System.Security.Policy.UnionCodeGroup
System.Security.Policy.Url
System.Security.Policy.UrlMembershipCondition
System.Security.Policy.Zone
System.Security.Policy.ZoneMembershipCondition
System.Security.Principal.WindowsIdentity
System.Security.Principal.WindowsImpersonationContext
System.Security.Principal.WindowsPrincipal
System.Threading.CompressedStack
+8 -5
View File
@@ -7,11 +7,14 @@
1,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
2,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
2,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
2,System.Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
2,System.Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
2,System.Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
2,System.Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
2,System.Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
2,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
2,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
2,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
2,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
2,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
2,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
2,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
2,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
1,C# Compiler,c-sharp.html,c-sharp.src
1,Status,status.html,status.src
0,Download,download.html,download.src
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

+54 -48
View File
@@ -4,57 +4,63 @@ CSC=csc
CORCOMPARE=../../../mcs/tools/corcompare
OBJECTS= \
deploy/ado-net.html \
deploy/anoncvs.html \
deploy/asp-net.html \
deploy/books.html \
deploy/contributing.html \
deploy/class-status.html \
deploy/class-status-corlib.html \
deploy/class-status-System.html \
deploy/class-status-System.Xml.html \
deploy/class-status-System.Drawing.html \
deploy/class-status-System.Data.html \
deploy/class-status-System.Web.html \
deploy/class-status-System.Web.Services.html \
deploy/class-library.html \
deploy/classlib-doc.html \
deploy/contact.html \
deploy/c-sharp.html \
deploy/ccvs.html \
deploy/documentation.html \
deploy/download.html \
deploy/faq.html \
deploy/gcc-frontend.html \
deploy/hackers.html \
deploy/index.html \
deploy/ideas.html \
deploy/java.html \
deploy/jit-debug.html \
deploy/jit-debug-sample.html \
deploy/jit-debug-sample2.html \
deploy/languages.html \
deploy/mailing-lists.html \
deploy/mono-beginning.html \
deploy/mono-contribution-howto.html \
deploy/monodoc-xml.html \
deploy/papers.html \
deploy/passport.html \
deploy/plans.html \
deploy/porting.html \
deploy/ppc.html \
deploy/rationale.html \
deploy/resources.html \
deploy/roadmap.html \
deploy/runtime.html \
deploy/status.html \
deploy/testing.html \
deploy/tools.html \
deploy/ado-net.html \
deploy/anoncvs.html \
deploy/asp-net.html \
deploy/books.html \
deploy/contributing.html \
deploy/class-status.html \
deploy/class-status-corlib.html \
deploy/class-status-System.html \
deploy/class-status-System.Xml.html \
deploy/class-status-System.Drawing.html \
deploy/class-status-System.Data.html \
deploy/class-status-System.Web.html \
deploy/class-status-System.Web.Services.html \
deploy/class-status-Microsoft.VisualBasic.html \
deploy/class-status-System.EnterpriseServices.html \
deploy/class-status-System.Runtime.Serialization.Formatters.Soap.html \
deploy/class-library.html \
deploy/classlib-doc.html \
deploy/contact.html \
deploy/c-sharp.html \
deploy/ccvs.html \
deploy/documentation.html \
deploy/download.html \
deploy/faq.html \
deploy/gcc-frontend.html \
deploy/hackers.html \
deploy/index.html \
deploy/ideas.html \
deploy/java.html \
deploy/jit-debug.html \
deploy/jit-debug-sample.html \
deploy/jit-debug-sample2.html \
deploy/languages.html \
deploy/mailing-lists.html \
deploy/mono-beginning.html \
deploy/mono-contribution-howto.html \
deploy/monodoc-xml.html \
deploy/papers.html \
deploy/passport.html \
deploy/plans.html \
deploy/porting.html \
deploy/ppc.html \
deploy/rationale.html \
deploy/resources.html \
deploy/roadmap.html \
deploy/runtime.html \
deploy/status.html \
deploy/testing.html \
deploy/tools.html \
deploy/winforms.html
#2,Configuration.Install,class-status-System.Configuration.Install.html,class-status-System.Configuration.Install.src,cm/cormissing.css,cm/cormissing.js
#2,Runtime.Remoting,class-status-System.Runtime.Remoting.html,class-status-System.Runtime.Remoting.src,cm/cormissing.css,cm/cormissing.js
# deploy/class-status-System.html \
# deploy/class-status-System.Configuration.Install.html \
# deploy/class-status-System.Runtime.Remoting.html \
NON_HTML_SOURCES= \
NON_HTML_SOURCES= \
../mono-build.sh \
../mono-build-w32.sh
+4 -3
View File
@@ -2,10 +2,11 @@
<html>
<head>
<title>#TITLE#</title>
<!-- background-image: url("images/bgsquares.gif"); -->
<style type="text/css">
<!--
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
background-image: url("images/bgsquares.gif");
background-attachment: fixed; }
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
font-size: 14px; }
@@ -27,7 +28,7 @@
a.navi2:visited { color: #cccccc; }
a.navi2:hover { color: #ee9900; text-decoration: underline; }
// -->
// -->
</style>
#CSS#
#SCRIPT#
@@ -38,7 +39,7 @@
<tr>
<td><img src="images/pixel.gif" alt=""></td><!-- left border -->
<td colspan="4">
<a href="http://www.go-mono.com"><img src="images/mono.gif"
<a href="http://www.go-mono.com"><img src="images/mono-new.gif"
alt="mono-logo" border="0"></a></td>
<td><img src="images/pixel.gif" alt=""></td><!-- right border -->
</tr>
+25 -17
View File
@@ -1,9 +1,20 @@
* System.Windows.Forms
System.Windows.Forms eventually will support multiple
toolkits. Ximian will be delivering a product that will allow
for System.Windows.Forms applications to integrate with GNOME
through Gtk and MacOS X using Cocoa.
System.Windows.Forms is currently being implemented using the
Win32 API, we will be using <a
href="http://www.winehq.com">WineLib</a> on Unix systems to
emulate the Win32 API.
Although the original plans were to use Gtk on X and Cocoa on
MacOS X, it would be very hard to emulate the event model in
which some Winforms applications depend, and it would be very
hard to implement the Wndproc method.
In terms of integrating visually with the desktop, we are
hoping to contribute to the Wine project an mechanism to make
it use the Gtk+ themes on X11 and Cocoa on MacOS to render the
widgets, and get the native look and feel on each of these
platforms.
There are no current plans to support embedded devices, but
Gtk/FrameBuffer is an option. If you have suggestions or
@@ -12,19 +23,15 @@
* Contributing
Currently Ximian developers are busy making our JIT engine
feature complete, and dealing with the low-level details of
the Mono runtime.
If you are interested in contributing, you can start stubbing
out classes and providing enumerations. That will help us
significantly when we start working on the actual bindings.
Christian Meyer is currently organizing this effort.
The Winforms effort is being coordinated by <a
href="mailto:[email protected]">Dennis Hayes</a>. If you are
interested in helping out with this effort, get in touch with
him.
* System.Drawing
Using existing libraries to implement some of the functionality required
Using existing libraries to implement some of the
functionality required:
<ul>
* gdk-pixbuf is a generic image loader that loads an image
@@ -75,12 +82,13 @@
MacOS
System.Drawing.Blah
MacOS ports of "System.Drawing.Blah"
Win32
WineLIB
System.Drawing.Blah
Win32 ports of "System.Drawing.Blah"
Then we use nant targets to include/exclude the right set of
files to create the assembly.
Notice that there is a proof of concept Gtk-backend for
Windows.Forms, but nobody is working on it, and for the
reasons stated before it is not a long term strategy.
* Open questions:
+19 -8
View File
@@ -44,6 +44,14 @@ the math operations checked (the default is unchecked).
Sets the default compilation mode to `unchecked'. This makes all
the math operations unchecked (this is the default).
.TP
.I -codepage:ID
Specifies the code page used to process the input files from the
point it is specified on. By default files will be processed in the
Latin-1 code page. The compiler will also automatically detect
Unicode files that have an embedded byte mark at the beginning. The
special ID "utf8" can be used to switch to utf8 and the ID "reset"
restores the automatic handling of code pages.
.TP
.I \-define:SYMLIST, -d:SYMLIST
Defines the symbol listed by the semi-colon separeted list SYMLIST
SYMBOL. This can be tested in the source code by the pre-processor,
@@ -56,6 +64,10 @@ Generate debugging information.
.I \-debug-
Do not generate debugging information.
.TP
.I \-\-expect-error X L
The compiler will expect the code to generate an error
named `X' in line `L'. This is only used by the test suite.
.TP
.I \-\-fatal
This is used for debugging the compiler. This makes the error emission
generate an exception that can be caught by a debugger.
@@ -90,15 +102,14 @@ Names the output file to be generated.
.I \-\-parse
Used for benchmarking. The compiler will only parse its input files.
.TP
.I \-\-probe X L
Probes for the code to generate an error named `X' in line `L'. This
is only used by the test suite.
.TP
.I /resource:RESOURCE
Embeds to the given resource file.
.I /resource:RESOURCE[,ID]
Embeds to the given resource file. The optional ID can be used to
give a different name to the resource. If not specified, the resource
name will be the file name.
.TP
.I /linkresource:RESOURCE
Links to the given resource file.
.I /linkresource:RESOURCE[,ID]
Links to the specified RESOURCE. The optional ID can be used to give
a name to the linked resource.
.TP
.I \-recurse:PATTERN, --recurse PATTERN
Does recursive compilation using the specified pattern. In Unix the
+8 -9
View File
@@ -96,12 +96,9 @@ Writes out stabs debug information.
.I "dwarf"
Writes out dwarf debug information.
.TP
.I "dwarf-plus"
Uses an extended debugging information file which has been generated
by MCS. This extended debugging information will allow you to debug
C# source code rather than IL code. To use it, just run the JIT in
your debugger and call "mono_debug_make_symbols" each time the program
stops.
.I "mono"
Use a symbol file which has been created by MCS. It can be used to get
source lines in stack traces.
.PP
The "stabs" and "dwarf" formats support the following options:
.TP
@@ -131,10 +128,12 @@ behaviour.
Update the *.il files if their assemblies have changed, but only if the
file already exists.
.PP
The "dwarf-plus" format supports the following options:
.SH ENVIRONMENT VARIABLES
.TP
.I "dont_fallback"
Don't fallback to normal dwarf2 if the symbol file cannot be found.
.I "MONO_PATH"
Provides a search path to mono and mint where to look for library files.
Directories are separated by the platform path separator (colons on unix). Example:
.B /home/username/lib:/usr/local/mono/lib
.PP
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
+26
View File
@@ -1,3 +1,29 @@
2002-09-14 Piers Haken <[email protected]>
* */makefile.gnu:
use $(topdir)
build nunit into $(topdir)/class/lib
2002-08-27 Gonzalo Paniagua Javier <[email protected]>
* makefile.gnu:
* class/library.make:
* class/makefile.gnu:
* class/I18N/makefile.gnu
* class/corlib/makefile.gnu:
* class/corlib/Test/ChangeLog:
* class/corlib/Test/corlib_linux_test.args:
* class/corlib/Test/makefile.gnu:
* class/corlib/Test/run_test.sh:
* jay/makefile.gnu:
* mcs/makefile.gnu:
* monoresgen/makefile.gnu:
* nunit/makefile.gnu:
Allow running 'make -f makefile.gnu test' from top directory.
In the libraries makefile.gnu you just have to add TEST_DIR=dirname
with the name where tests reside.
2002-08-23 Martin Baulig <[email protected]>
* class/makefile.gnu: Add class/Mono.CSharp.Debugger to the build.
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../../..
LIBRARY = ../../lib/I18N.CJK.dll
LIBRARY = $(topdir)/class/lib/I18N.CJK.dll
LIB_LIST = list.unix
LIB_FLAGS = --unsafe --resource jis.table -r corlib -r mscorlib -r I18N
@@ -8,6 +8,6 @@ LIB_FLAGS = --unsafe --resource jis.table -r corlib -r mscorlib -r I18N
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=
export MONO_PATH_PREFIX = ../../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../../library.make
include $(topdir)/class/library.make
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../../..
LIBRARY = ../../lib/I18N.dll
LIBRARY = $(topdir)/class/lib/I18N.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib -r mscorlib
@@ -8,6 +8,6 @@ LIB_FLAGS = -r corlib -r mscorlib
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=
export MONO_PATH_PREFIX = ../../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../../library.make
include $(topdir)/class/library.make
+20
View File
@@ -93,4 +93,24 @@
</csc>
</target>
<target name="clean">
<delete failonerror="false">
<fileset basedir="../lib">
<includes name="I18N.dll"/>
<includes name="I18N.CJK.dll"/>
<includes name="I18N.MidEast.dll"/>
<includes name="I18N.Other.dll"/>
<includes name="I18N.Rare.dll"/>
<includes name="I18N.West.dll"/>
</fileset>
</delete>
<!-- Uncomment this if build file added for those.
<nant basedir="Common" target="clean"/>
<nant basedir="CJK" target="clean"/>
<nant basedir="MidEast" target="clean"/>
<nant basedir="Other" target="clean"/>
<nant basedir="Rare" target="clean"/>
<nant basedir="West" target="clean"/>
-->
</target>
</project>
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../../..
LIBRARY = ../../lib/I18N.MidEast.dll
LIBRARY = $(topdir)/class/lib/I18N.MidEast.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib -r mscorlib -r I18N
@@ -8,6 +8,6 @@ LIB_FLAGS = -r corlib -r mscorlib -r I18N
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=
export MONO_PATH_PREFIX = ../../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../../library.make
include $(topdir)/class/library.make
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../../..
LIBRARY = ../../lib/I18N.Other.dll
LIBRARY = $(topdir)/class/lib/I18N.Other.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib -r mscorlib -r I18N
@@ -8,6 +8,6 @@ LIB_FLAGS = -r corlib -r mscorlib -r I18N
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=
export MONO_PATH_PREFIX = ../../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../../library.make
include $(topdir)/class/library.make
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../../..
LIBRARY = ../../lib/I18N.Rare.dll
LIBRARY = $(topdir)/class/lib/I18N.Rare.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib -r mscorlib -r I18N
@@ -8,6 +8,6 @@ LIB_FLAGS = -r corlib -r mscorlib -r I18N
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=
export MONO_PATH_PREFIX = ../../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../../library.make
include $(topdir)/class/library.make
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../../..
LIBRARY = ../../lib/I18N.West.dll
LIBRARY = $(topdir)/class/lib/I18N.West.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib -r mscorlib -r I18N
@@ -8,6 +8,6 @@ LIB_FLAGS = -r corlib -r mscorlib -r I18N
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=
export MONO_PATH_PREFIX = ../../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../../library.make
include $(topdir)/class/library.make
+1 -1
View File
@@ -5,7 +5,7 @@ DIRS = Common West MidEast CJK Other Rare
default: all
all clean:
all clean test:
@for i in $(DIRS) ; do \
if [ -d "$$i" ] && [ -f "$$i/makefile.gnu" ] ; then \
(cd $$i && $(MAKE) -f makefile.gnu $@) || exit 1; \
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../..
LIBRARY = ../lib/Microsoft.VisualBasic.dll
LIBRARY = $(topdir)/class/lib/Microsoft.VisualBasic.dll
LIB_LIST = list
LIB_FLAGS = -r corlib -r System
@@ -8,6 +8,6 @@ LIB_FLAGS = -r corlib -r System
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=./Test*
export MONO_PATH_PREFIX = ../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../library.make
include $(topdir)/class/library.make
@@ -1,311 +0,0 @@
//
// Mono.CSharp.Debugger/AssemblerWriterI386.cs
//
// Author:
// Martin Baulig ([email protected])
//
// IAssemblerWriter implementation for the Intel i386.
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
//
using System;
using System.IO;
namespace Mono.CSharp.Debugger
{
public class AssemblerWriterI386 : IAssemblerWriter
{
public AssemblerWriterI386 (StreamWriter writer) {
this.writer = writer;
writer.WriteLine ("#NOAPP");
}
private StreamWriter writer;
private static int next_anon_label_idx = 0;
private bool in_section = false;
public void WriteLabel (string label)
{
writer.WriteLine (".L_" + label + ":");
}
public int GetNextLabelIndex ()
{
return ++next_anon_label_idx;
}
public int WriteLabel ()
{
int index = ++next_anon_label_idx;
WriteLabel (index);
return index;
}
public void WriteLabel (int index)
{
char[] output = { '.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
':', '\n' };
unchecked {
int value = (int) index;
output [3] = hex [(value & 0xf00000) >> 20];
output [4] = hex [(value & 0x0f0000) >> 16];
output [5] = hex [(value & 0x00f000) >> 12];
output [6] = hex [(value & 0x000f00) >> 8];
output [7] = hex [(value & 0x0000f0) >> 4];
output [8] = hex [(value & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
private static readonly char[] hex = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
public void WriteUInt8 (bool value)
{
WriteUInt8 (value ? 1 : 0);
}
public void WriteUInt8 (int value)
{
char[] output = { '\t', '.', 'b', 'y', 't', 'e', ' ',
'0', 'x', '\0', '\0',
'\n' };
unchecked {
output [9] = hex [(value & 0xf0) >> 4];
output [10] = hex [value & 0x0f];
}
writer.Write (output, 0, output.Length);
}
public void WriteInt8 (int value)
{
char[] output = { '\t', '.', 'b', 'y', 't', 'e', ' ',
'0', 'x', '\0', '\0',
'\n' };
unchecked {
uint uvalue = (uint) value;
output [9] = hex [(uvalue & 0xf0) >> 4];
output [10] = hex [uvalue & 0x0f];
}
writer.Write (output, 0, output.Length);
}
public void Write2Bytes (int a, int b)
{
char[] output = { '\t', '.', 'b', 'y', 't', 'e', ' ',
'0', 'x', '\0', '\0', ',', ' ',
'0', 'x', '\0', '\0',
'\n' };
unchecked {
uint ua = (uint) a;
uint ub = (uint) b;
output [9] = hex [(ua & 0xf0) >> 4];
output [10] = hex [ua & 0x0f];
output [15] = hex [(ub & 0xf0) >> 4];
output [16] = hex [ub & 0x0f];
}
writer.Write (output, 0, output.Length);
}
public void WriteUInt16 (int value)
{
writer.WriteLine ("\t.word " + value);
}
public void WriteInt16 (int value)
{
writer.WriteLine ("\t.word " + value);
}
public void WriteUInt32 (int value)
{
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', ' ',
'0', 'x', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\n' };
unchecked {
output [9] = hex [(value & 0xf0000000) >> 28];
output [10] = hex [(value & 0x0f000000) >> 24];
output [11] = hex [(value & 0x00f00000) >> 20];
output [12] = hex [(value & 0x000f0000) >> 16];
output [13] = hex [(value & 0x0000f000) >> 12];
output [14] = hex [(value & 0x00000f00) >> 8];
output [15] = hex [(value & 0x000000f0) >> 4];
output [16] = hex [(value & 0x0000000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteInt32 (int value)
{
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', ' ',
'0', 'x', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\n' };
unchecked {
uint uvalue = (uint) value;
output [9] = hex [(uvalue & 0xf0000000) >> 28];
output [10] = hex [(uvalue & 0x0f000000) >> 24];
output [11] = hex [(uvalue & 0x00f00000) >> 20];
output [12] = hex [(uvalue & 0x000f0000) >> 16];
output [13] = hex [(uvalue & 0x0000f000) >> 12];
output [14] = hex [(uvalue & 0x00000f00) >> 8];
output [15] = hex [(uvalue & 0x000000f0) >> 4];
output [16] = hex [(uvalue & 0x0000000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteSLeb128 (int value)
{
writer.WriteLine ("\t.sleb128 " + value);
}
public void WriteULeb128 (int value)
{
writer.WriteLine ("\t.uleb128 " + value);
}
public void WriteAddress (int value)
{
if (value == 0)
writer.WriteLine ("\t.long 0");
else
writer.WriteLine ("\t.long " + value);
}
public void WriteString (string value)
{
writer.WriteLine ("\t.string \"" + value + "\"");
}
public void WriteSectionStart (String section)
{
if (in_section)
throw new Exception ();
in_section = true;
writer.WriteLine ("\t.section ." + section);
}
public void WriteSectionEnd ()
{
in_section = false;
}
public void WriteRelativeOffset (int start_label, int end_label)
{
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', ' ',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
' ', '-', ' ',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
'\n' };
unchecked {
output [10] = hex [(end_label & 0xf00000) >> 20];
output [11] = hex [(end_label & 0x0f0000) >> 16];
output [12] = hex [(end_label & 0x00f000) >> 12];
output [13] = hex [(end_label & 0x000f00) >> 8];
output [14] = hex [(end_label & 0x0000f0) >> 4];
output [15] = hex [(end_label & 0x00000f)];
output [22] = hex [(start_label & 0xf00000) >> 20];
output [23] = hex [(start_label & 0x0f0000) >> 16];
output [24] = hex [(start_label & 0x00f000) >> 12];
output [25] = hex [(start_label & 0x000f00) >> 8];
output [26] = hex [(start_label & 0x0000f0) >> 4];
output [27] = hex [(start_label & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteShortRelativeOffset (int start_label, int end_label)
{
char[] output = { '\t', '.', 'b', 'y', 't', 'e', ' ',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
' ', '-', ' ',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
'\n' };
unchecked {
output [10] = hex [(end_label & 0xf00000) >> 20];
output [11] = hex [(end_label & 0x0f0000) >> 16];
output [12] = hex [(end_label & 0x00f000) >> 12];
output [13] = hex [(end_label & 0x000f00) >> 8];
output [14] = hex [(end_label & 0x0000f0) >> 4];
output [15] = hex [(end_label & 0x00000f)];
output [22] = hex [(start_label & 0xf00000) >> 20];
output [23] = hex [(start_label & 0x0f0000) >> 16];
output [24] = hex [(start_label & 0x00f000) >> 12];
output [25] = hex [(start_label & 0x000f00) >> 8];
output [26] = hex [(start_label & 0x0000f0) >> 4];
output [27] = hex [(start_label & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteAbsoluteOffset (string label)
{
writer.WriteLine ("\t.long .L_" + label);
}
public void WriteAbsoluteOffset (int index)
{
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', ' ',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
'\n' };
unchecked {
output [10] = hex [(index & 0xf00000) >> 20];
output [11] = hex [(index & 0x0f0000) >> 16];
output [12] = hex [(index & 0x00f000) >> 12];
output [13] = hex [(index & 0x000f00) >> 8];
output [14] = hex [(index & 0x0000f0) >> 4];
output [15] = hex [(index & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
public object StartSubsectionWithSize ()
{
int start_index = ++next_anon_label_idx;
int end_index = ++next_anon_label_idx;
WriteRelativeOffset (start_index, end_index);
WriteLabel (start_index);
return end_index;
}
public object StartSubsectionWithShortSize ()
{
int start_index = ++next_anon_label_idx;
int end_index = ++next_anon_label_idx;
WriteShortRelativeOffset (start_index, end_index);
WriteLabel (start_index);
return end_index;
}
public void EndSubsection (object end_index)
{
WriteLabel ((int) end_index);
}
}
}
+101
View File
@@ -1,3 +1,104 @@
2002-09-21 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 26. Removed all the dynamic
stuff, this library now just deals with the compiler generated symbol table.
The dynamic stuff is private between the JIT and the debugger.
2002-09-21 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 25. Added information about
local variables.
2002-09-20 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 24. Added a type index
table. Write the type of a local variable or a parameter as an index
into this table.
2002-09-20 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs: Remove all the unused interfaces.
2002-09-20 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 23, include the size
of a variable.
2002-09-20 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 22. Provide information
about parameters and local variables.
2002-09-20 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs: Use fullly qualified name for
System.Diagnostics.SymbolStore.ISymbolWriter rather than `using' this
namespace. This allows us to use the name `ISymbolWriter' in our own
code.
2002-09-18 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 21. Encode the source file
as a 4-byte length field followed by the UTF8 encoded string.
2002-09-18 Martin Baulig <[email protected]>
* IMonoBinaryReader.cs: New interface.
* MonoSymbolTable.cs: Use IMonoBinaryReader instead of binary reader.
2002-09-16 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Set version number to 20.
2002-09-14 Martin Baulig <[email protected]>
* MonoSymbolWriter.cs, IMonoSymbolWriter.cs, MonoSymbolTableWriter.cs:
Make all classes and interfaces which don't need to be public internal.
2002-09-14 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Use only CLS-compliant types here, bumped version
number to 19.
* MonoSymbolTableReader.cs: Removed, this is now in the debugger.
2002-09-03 Martin Baulig <[email protected]>
* AssemblerWriterI386.cs, IAssemblerWriter.cs, MonoDwarfFileWriter.cs,
README, README.relocation-table, csharp-lang.[ch], gdb-csharp-support.patch,
gdb-variable-scopes.patch: Removed.
2002-09-03 Martin Baulig <[email protected]>
* MonoSymbolTableReader.cs (MonoSymbolTableReader.ImageFile): New
public property.
* MonoSymbolTable.cs: Bumped version number to 18.
2002-08-27 Martin Baulig <[email protected]>
* MonoSymbolTable.cs (MethodAddress): Removed `TrampolineAddress'.
2002-08-27 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Changed the file format in a way that allows us
open it read-only and to use a specially malloced area for all the
dynamic data.
2002-08-25 Martin Baulig <[email protected]>
* MonoSymbolTableReader.cs: New file. This is the reader for the
new symbol file format.
2002-08-24 Martin Baulig <[email protected]>
* MonoSymbolTable.cs, MonoSymbolTableWriter.cs: New files. This
creates a binary application.dbg file which will be used by the
JIT to display source lines for exceptions.
* list.unix: Disabled the dwarf file writer in the build.
2002-08-23 Martin Baulig <[email protected]>
* MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Added
@@ -1,70 +0,0 @@
//
// Mono.CSharp.Debugger/IAssemblerWriter.cs
//
// Author:
// Martin Baulig ([email protected])
//
// This is a platform and assembler independent assembler output interface.
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
//
using System;
using System.Collections;
using System.IO;
namespace Mono.CSharp.Debugger
{
public interface IAssemblerWriter
{
int GetNextLabelIndex ();
void WriteLabel (int index);
void WriteLabel (string label);
int WriteLabel ();
void WriteUInt8 (bool value);
void WriteUInt8 (int value);
void WriteInt8 (int value);
void Write2Bytes (int a, int b);
void WriteUInt16 (int value);
void WriteInt16 (int value);
void WriteUInt32 (int value);
void WriteInt32 (int value);
void WriteSLeb128 (int value);
void WriteULeb128 (int value);
void WriteAddress (int value);
void WriteString (string value);
void WriteSectionStart (String section);
void WriteSectionEnd ();
void WriteRelativeOffset (int start_label, int end_label);
void WriteShortRelativeOffset (int start_label, int end_label);
void WriteAbsoluteOffset (int index);
void WriteAbsoluteOffset (string label);
object StartSubsectionWithSize ();
object StartSubsectionWithShortSize ();
void EndSubsection (object end_index);
}
}
@@ -0,0 +1,26 @@
//
// System.Diagnostics.SymbolStore/IMonoBinaryReader.cs
//
// Author:
// Martin Baulig ([email protected])
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
//
using System;
namespace Mono.CSharp.Debugger
{
public interface IMonoBinaryReader
{
long Position {
get; set;
}
int ReadInt32 ();
long ReadInt64 ();
byte[] ReadBuffer (int size);
}
}
@@ -12,122 +12,17 @@
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Diagnostics.SymbolStore;
using System.Collections;
using System.IO;
namespace Mono.CSharp.Debugger
{
public interface IMonoSymbolWriter : ISymbolWriter
public interface IMonoSymbolWriter : System.Diagnostics.SymbolStore.ISymbolWriter
{
ISourceMethod[] Methods {
get;
}
ISourceFile[] Sources {
get;
}
void Initialize (string assembly_filename, string filename, string[] args);
}
public interface ISourceFile
{
string FileName {
get;
}
ISourceMethod[] Methods {
get;
}
void AddMethod (ISourceMethod method);
}
public interface ISourceMethod
{
ISourceLine[] Lines {
get;
}
void AddLine (ISourceLine line);
ISourceBlock[] Blocks {
get;
}
ILocalVariable[] Locals {
get;
}
void AddLocal (ILocalVariable local);
ISourceLine Start {
get;
}
ISourceLine End {
get;
}
string FullName {
get;
}
int Token {
get;
}
Type ReturnType {
get;
}
ParameterInfo[] Parameters {
get;
}
MethodBase MethodBase {
get;
}
ISourceFile SourceFile {
get;
}
}
public interface ISourceBlock
{
ISourceMethod SourceMethod {
get;
}
ILocalVariable[] Locals {
get;
}
void AddLocal (ILocalVariable local);
ISourceBlock[] Blocks {
get;
}
void AddBlock (ISourceBlock block);
ISourceLine Start {
get;
}
ISourceLine End {
get;
}
int ID {
get;
}
}
public enum SourceOffsetType
internal enum SourceOffsetType
{
OFFSET_NONE,
OFFSET_IL,
@@ -135,26 +30,7 @@ namespace Mono.CSharp.Debugger
OFFSET_PARAMETER
}
public interface ISourceLine
{
SourceOffsetType OffsetType {
get;
}
int Offset {
get;
}
int Row {
get;
}
int Column {
get;
}
}
public interface ITypeHandle
internal interface ITypeHandle
{
string Name {
get;
@@ -168,33 +44,4 @@ namespace Mono.CSharp.Debugger
get;
}
}
public interface IVariable
{
string Name {
get;
}
ISourceLine Line {
get;
}
ITypeHandle TypeHandle {
get;
}
ISourceMethod Method {
get;
}
int Index {
get;
}
}
public interface ILocalVariable : IVariable
{ }
public interface IMethodParameter : IVariable
{ }
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,280 @@
//
// System.Diagnostics.SymbolStore/MonoSymbolTable.cs
//
// Author:
// Martin Baulig ([email protected])
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
//
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Collections;
using System.Text;
using System.IO;
namespace Mono.CSharp.Debugger
{
public struct OffsetTable
{
public const int Version = 26;
public const long Magic = 0x45e82623fd7fa614;
public int total_file_size;
public int source_table_offset;
public int source_table_size;
public int method_count;
public int method_table_offset;
public int method_table_size;
public int line_number_table_offset;
public int line_number_table_size;
public int local_variable_table_offset;
public int local_variable_table_size;
public int type_count;
public int type_index_table_offset;
public int type_index_table_size;
public OffsetTable (IMonoBinaryReader reader)
{
total_file_size = reader.ReadInt32 ();
source_table_offset = reader.ReadInt32 ();
source_table_size = reader.ReadInt32 ();
method_count = reader.ReadInt32 ();
method_table_offset = reader.ReadInt32 ();
method_table_size = reader.ReadInt32 ();
line_number_table_offset = reader.ReadInt32 ();
line_number_table_size = reader.ReadInt32 ();
local_variable_table_offset = reader.ReadInt32 ();
local_variable_table_size = reader.ReadInt32 ();
type_count = reader.ReadInt32 ();
type_index_table_offset = reader.ReadInt32 ();
type_index_table_size = reader.ReadInt32 ();
}
public void Write (BinaryWriter bw)
{
bw.Write (total_file_size);
bw.Write (source_table_offset);
bw.Write (source_table_size);
bw.Write (method_count);
bw.Write (method_table_offset);
bw.Write (method_table_size);
bw.Write (line_number_table_offset);
bw.Write (line_number_table_size);
bw.Write (local_variable_table_offset);
bw.Write (local_variable_table_size);
bw.Write (type_count);
bw.Write (type_index_table_offset);
bw.Write (type_index_table_size);
}
}
public struct LineNumberEntry
{
public readonly int Row;
public readonly int Offset;
public LineNumberEntry (int row, int offset)
{
this.Row = row;
this.Offset = offset;
}
internal LineNumberEntry (SourceLine line)
: this (line.Row, line.Offset)
{ }
public LineNumberEntry (IMonoBinaryReader reader)
{
Row = reader.ReadInt32 ();
Offset = reader.ReadInt32 ();
}
internal void Write (BinaryWriter bw)
{
bw.Write (Row);
bw.Write (Offset);
}
public override string ToString ()
{
return String.Format ("[Line {0}:{1}]", Row, Offset);
}
}
public struct LocalVariableEntry
{
public readonly string Name;
public readonly FieldAttributes Attributes;
public readonly byte[] Signature;
public LocalVariableEntry (string Name, FieldAttributes Attributes, byte[] Signature)
{
this.Name = Name;
this.Attributes = Attributes;
this.Signature = Signature;
}
public LocalVariableEntry (IMonoBinaryReader reader)
{
int name_length = reader.ReadInt32 ();
byte[] name = reader.ReadBuffer (name_length);
Name = Encoding.UTF8.GetString (name);
Attributes = (FieldAttributes) reader.ReadInt32 ();
int sig_length = reader.ReadInt32 ();
Signature = reader.ReadBuffer (sig_length);
}
internal void Write (BinaryWriter bw)
{
byte[] name = Encoding.UTF8.GetBytes (Name);
bw.Write ((int) name.Length);
bw.Write (name);
bw.Write ((int) Attributes);
bw.Write ((int) Signature.Length);
bw.Write (Signature);
}
public override string ToString ()
{
return String.Format ("[LocalVariable {0}:{1}]", Name, Attributes);
}
}
public class MethodEntry
{
public readonly int Token;
public readonly int StartRow;
public readonly int EndRow;
public readonly int NumLineNumbers;
public readonly int ThisTypeIndex;
public readonly int NumParameters;
public readonly int NumLocals;
public int TypeIndexTableOffset;
public int LocalVariableTableOffset;
public readonly int SourceFileOffset;
public readonly int LineNumberTableOffset;
public readonly string SourceFile = null;
public readonly LineNumberEntry[] LineNumbers = null;
public readonly int[] ParamTypeIndices = null;
public readonly int[] LocalTypeIndices = null;
public readonly LocalVariableEntry[] Locals = null;
public static int Size
{
get {
return 44;
}
}
public MethodEntry (IMonoBinaryReader reader)
{
Token = reader.ReadInt32 ();
StartRow = reader.ReadInt32 ();
EndRow = reader.ReadInt32 ();
ThisTypeIndex = reader.ReadInt32 ();
NumParameters = reader.ReadInt32 ();
NumLocals = reader.ReadInt32 ();
NumLineNumbers = reader.ReadInt32 ();
TypeIndexTableOffset = reader.ReadInt32 ();
LocalVariableTableOffset = reader.ReadInt32 ();
SourceFileOffset = reader.ReadInt32 ();
LineNumberTableOffset = reader.ReadInt32 ();
if (SourceFileOffset != 0) {
long old_pos = reader.Position;
reader.Position = SourceFileOffset;
int source_file_length = reader.ReadInt32 ();
byte[] source_file = reader.ReadBuffer (source_file_length);
SourceFile = Encoding.UTF8.GetString (source_file);
reader.Position = old_pos;
}
if (LineNumberTableOffset != 0) {
long old_pos = reader.Position;
reader.Position = LineNumberTableOffset;
LineNumbers = new LineNumberEntry [NumLineNumbers];
for (int i = 0; i < NumLineNumbers; i++)
LineNumbers [i] = new LineNumberEntry (reader);
reader.Position = old_pos;
}
if (LocalVariableTableOffset != 0) {
long old_pos = reader.Position;
reader.Position = LocalVariableTableOffset;
Locals = new LocalVariableEntry [NumLocals];
for (int i = 0; i < NumLocals; i++)
Locals [i] = new LocalVariableEntry (reader);
reader.Position = old_pos;
}
if (TypeIndexTableOffset != 0) {
long old_pos = reader.Position;
reader.Position = TypeIndexTableOffset;
ParamTypeIndices = new int [NumParameters];
LocalTypeIndices = new int [NumLocals];
for (int i = 0; i < NumParameters; i++)
ParamTypeIndices [i] = reader.ReadInt32 ();
for (int i = 0; i < NumLocals; i++)
LocalTypeIndices [i] = reader.ReadInt32 ();
reader.Position = old_pos;
}
}
internal MethodEntry (int token, int sf_offset, string source_file,
int this_type_index, int[] param_type_indices,
int[] local_type_indices, LocalVariableEntry[] locals,
LineNumberEntry[] lines, int lnt_offset,
int start_row, int end_row)
{
this.Token = token;
this.StartRow = start_row;
this.EndRow = end_row;
this.NumLineNumbers = lines.Length;
this.ThisTypeIndex = this_type_index;
this.NumParameters = param_type_indices.Length;
this.NumLocals = local_type_indices.Length;
this.ParamTypeIndices = param_type_indices;
this.LocalTypeIndices = local_type_indices;
this.Locals = locals;
this.SourceFileOffset = sf_offset;
this.LineNumberTableOffset = lnt_offset;
this.SourceFile = source_file;
this.LineNumbers = lines;
}
internal void Write (BinaryWriter bw)
{
bw.Write (Token);
bw.Write (StartRow);
bw.Write (EndRow);
bw.Write (ThisTypeIndex);
bw.Write (NumParameters);
bw.Write (NumLocals);
bw.Write (NumLineNumbers);
bw.Write (TypeIndexTableOffset);
bw.Write (LocalVariableTableOffset);
bw.Write (SourceFileOffset);
bw.Write (LineNumberTableOffset);
}
public override string ToString ()
{
return String.Format ("[Method {0}:{1}:{2}:{3}:{4} - {5}:{6}]",
Token, SourceFile, StartRow, EndRow,
NumLineNumbers, SourceFileOffset, LineNumberTableOffset);
}
}
}
@@ -0,0 +1,192 @@
//
// System.Diagnostics.SymbolStore/MonoSymbolTableWriter.cs
//
// Author:
// Martin Baulig ([email protected])
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
//
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Collections;
using System.Text;
using System.IO;
namespace Mono.CSharp.Debugger
{
internal class MonoSymbolTableWriter : IDisposable
{
BinaryWriter bw;
Hashtable type_hash;
int last_type_index;
public MonoSymbolTableWriter (string output_filename)
{
FileStream stream = new FileStream (output_filename, FileMode.Create);
bw = new BinaryWriter (stream);
type_hash = new Hashtable ();
}
int GetTypeIndex (Type type)
{
if (type_hash.Contains (type))
return (int) type_hash [type];
int index = ++last_type_index;
type_hash.Add (type, index);
return index;
}
public void WriteSymbolTable (MonoSymbolWriter symwriter)
{
// Magic number and file version.
bw.Write (OffsetTable.Magic);
bw.Write (OffsetTable.Version);
OffsetTable ot = new OffsetTable ();
//
// Offsets of file sections; we must write this after we're done
// writing the whole file, so we just reserve the space for it here.
//
long offset_table_offset = bw.BaseStream.Position;
ot.Write (bw);
//
// Write source file table.
//
Hashtable sources = new Hashtable ();
ot.source_table_offset = (int) bw.BaseStream.Position;
foreach (SourceFile source in symwriter.Sources) {
if (sources.ContainsKey (source))
continue;
sources.Add (source, (int) bw.BaseStream.Position);
byte[] file_name = Encoding.UTF8.GetBytes (source.FileName);
bw.Write ((int) file_name.Length);
bw.Write (file_name);
}
ot.source_table_size = (int) bw.BaseStream.Position - ot.source_table_offset;
//
// Write line number table
//
ArrayList methods = new ArrayList ();
int num_methods = 0;
ot.line_number_table_offset = (int) bw.BaseStream.Position;
foreach (SourceMethod method in symwriter.Methods) {
if (method.Start == null || method.Start.Row == 0)
continue;
int count = method.Lines.Length;
LineNumberEntry[] lines = new LineNumberEntry [count];
int pos = (int) bw.BaseStream.Position;
int num_params = method.Parameters.Length;
int[] param_type_indices = new int [num_params];
for (int i = 0; i < num_params; i++) {
Type type = method.Parameters [i].ParameterType;
param_type_indices [i] = GetTypeIndex (type);
}
int num_locals = method.Locals.Length;
int[] local_type_indices = new int [num_locals];
for (int i = 0; i < num_locals; i++)
local_type_indices [i] = ++last_type_index;
int type_index_table_offset = ot.type_index_table_size;
ot.type_index_table_size += 4 * (num_params + num_locals);
int this_type_index = 0;
if (!method.MethodBase.IsStatic)
this_type_index = GetTypeIndex (method.MethodBase.ReflectedType);
for (int i = 0; i < count; i++) {
lines [i] = new LineNumberEntry (method.Lines [i]);
lines [i].Write (bw);
}
MethodEntry entry = new MethodEntry (
(int) method.Token, (int) sources [method.SourceFile],
method.SourceFile.FileName, this_type_index,
param_type_indices, local_type_indices, method.Locals, lines, pos,
(int) method.Start.Row, (int) method.End.Row);
methods.Add (entry);
}
ot.line_number_table_size = (int) bw.BaseStream.Position -
ot.line_number_table_offset;
//
// Write type index table.
//
ot.type_index_table_offset = (int) bw.BaseStream.Position;
for (int i = 0; i < methods.Count; i++) {
MethodEntry entry = (MethodEntry) methods [i];
entry.TypeIndexTableOffset = (int) bw.BaseStream.Position;
for (int j = 0; j < entry.NumParameters; j++)
bw.Write (entry.ParamTypeIndices [j]);
for (int j = 0; j < entry.NumLocals; j++)
bw.Write (entry.LocalTypeIndices [j]);
}
ot.type_index_table_size = (int) bw.BaseStream.Position -
ot.type_index_table_offset;
//
// Write local variable table.
//
ot.local_variable_table_offset = (int) bw.BaseStream.Position;
for (int i = 0; i < methods.Count; i++) {
MethodEntry entry = (MethodEntry) methods [i];
entry.LocalVariableTableOffset = (int) bw.BaseStream.Position;
for (int j = 0; j < entry.NumLocals; j++)
entry.Locals [j].Write (bw);
}
ot.local_variable_table_size = (int) bw.BaseStream.Position -
ot.local_variable_table_offset;
//
// Write method table
//
ot.method_count = methods.Count;
ot.method_table_offset = (int) bw.BaseStream.Position;
foreach (MethodEntry entry in methods)
entry.Write (bw);
ot.method_table_size = (int) bw.BaseStream.Position - ot.method_table_offset;
ot.type_count = last_type_index;
//
// Write offset table
//
ot.total_file_size = (int) bw.BaseStream.Position;
bw.Seek ((int) offset_table_offset, SeekOrigin.Begin);
ot.Write (bw);
bw.Seek (0, SeekOrigin.End);
}
void IDisposable.Dispose() {
Dispose (true);
}
protected virtual void Dispose (bool disposing)
{
if (disposing)
{
bw.Close ();
}
}
}
}
@@ -20,7 +20,7 @@ using System.IO;
namespace Mono.CSharp.Debugger
{
public class SourceFile : ISourceFile
internal class SourceFile
{
private ArrayList _methods = new ArrayList ();
private string _file_name;
@@ -35,34 +35,32 @@ namespace Mono.CSharp.Debugger
return _file_name;
}
// interface ISourceFile
public string FileName {
get {
return _file_name;
}
}
public ISourceMethod[] Methods {
public SourceMethod[] Methods {
get {
ISourceMethod[] retval = new ISourceMethod [_methods.Count];
SourceMethod[] retval = new SourceMethod [_methods.Count];
_methods.CopyTo (retval);
return retval;
}
}
public void AddMethod (ISourceMethod method)
public void AddMethod (SourceMethod method)
{
_methods.Add (method);
}
}
public class SourceBlock : ISourceBlock
internal class SourceBlock
{
static private int next_index;
private readonly int _index;
public SourceBlock (ISourceMethod method, ISourceLine start, ISourceLine end)
public SourceBlock (SourceMethod method, SourceLine start, SourceLine end)
{
this._method = method;
this._start = start;
@@ -70,7 +68,7 @@ namespace Mono.CSharp.Debugger
this._index = ++next_index;
}
internal SourceBlock (ISourceMethod method, int startOffset)
internal SourceBlock (SourceMethod method, int startOffset)
{
this._method = method;
this._start = new SourceLine (startOffset);
@@ -82,39 +80,39 @@ namespace Mono.CSharp.Debugger
return "SourceBlock #" + ID + " (" + Start + " - " + End + ")";
}
private readonly ISourceMethod _method;
private readonly SourceMethod _method;
private ArrayList _blocks = new ArrayList ();
internal ISourceLine _start;
internal ISourceLine _end;
internal SourceLine _start;
internal SourceLine _end;
private ArrayList _locals = new ArrayList ();
public ISourceMethod SourceMethod {
public SourceMethod SourceMethod {
get {
return _method;
}
}
public ISourceBlock[] Blocks {
public SourceBlock[] Blocks {
get {
ISourceBlock[] retval = new ISourceBlock [_blocks.Count];
SourceBlock[] retval = new SourceBlock [_blocks.Count];
_blocks.CopyTo (retval);
return retval;
}
}
public void AddBlock (ISourceBlock block)
public void AddBlock (SourceBlock block)
{
_blocks.Add (block);
}
public ISourceLine Start {
public SourceLine Start {
get {
return _start;
}
}
public ISourceLine End {
public SourceLine End {
get {
return _end;
}
@@ -126,21 +124,21 @@ namespace Mono.CSharp.Debugger
}
}
public ILocalVariable[] Locals {
public LocalVariableEntry[] Locals {
get {
ILocalVariable[] retval = new ILocalVariable [_locals.Count];
LocalVariableEntry[] retval = new LocalVariableEntry [_locals.Count];
_locals.CopyTo (retval);
return retval;
}
}
public void AddLocal (ILocalVariable local)
public void AddLocal (LocalVariableEntry local)
{
_locals.Add (local);
}
}
public class SourceLine : ISourceLine
internal class SourceLine
{
public SourceLine (int row, int column)
: this (0, row, column)
@@ -170,7 +168,7 @@ namespace Mono.CSharp.Debugger
internal int _row;
internal int _column;
// interface ISourceLine
// interface SourceLine
public SourceOffsetType OffsetType {
get {
@@ -197,96 +195,7 @@ namespace Mono.CSharp.Debugger
}
}
public class Variable : IVariable
{
public Variable (string name, ITypeHandle handle, ISourceMethod method, int index)
: this (name, handle, method, index, null)
{ }
public Variable (string name, ITypeHandle handle, ISourceMethod method,
int index, ISourceLine line)
{
this._name = name;
this._handle = handle;
this._method = method;
this._line = line;
this._index = index;
}
private readonly string _name;
private readonly ITypeHandle _handle;
private readonly ISourceMethod _method;
private readonly ISourceLine _line;
private readonly int _index;
// interface IVariable
public string Name {
get {
return _name;
}
}
public ISourceMethod Method {
get {
return _method;
}
}
public int Index {
get {
return _index;
}
}
public ITypeHandle TypeHandle {
get {
return _handle;
}
}
public ISourceLine Line {
get {
return _line;
}
}
}
public class LocalVariable : Variable, ILocalVariable
{
public LocalVariable (string name, ITypeHandle handle, ISourceMethod method,
int index, ISourceLine line)
: base (name, handle, method, index, line)
{ }
public override string ToString ()
{
return "LocalVariable (" + Index + "," + Name + ")";
}
}
public class MethodParameter : Variable, IMethodParameter
{
private static int get_index (ISourceMethod method, ParameterInfo param)
{
return method.MethodBase.IsStatic ? param.Position - 1 :
param.Position;
}
public MethodParameter (DwarfFileWriter writer, ISourceMethod method,
ParameterInfo param)
: base (param.Name, writer.RegisterType (param.ParameterType),
method, get_index (method, param))
{
this._method = method;
this._param = param;
}
private readonly ISourceMethod _method;
private readonly ParameterInfo _param;
}
public class SourceMethod : ISourceMethod
internal class SourceMethod
{
private ArrayList _lines = new ArrayList ();
private ArrayList _blocks = new ArrayList ();
@@ -294,12 +203,12 @@ namespace Mono.CSharp.Debugger
private Stack _block_stack = new Stack ();
internal readonly MethodBase _method_base;
internal ISourceFile _source_file;
internal SourceFile _source_file;
internal int _token;
private SourceBlock _implicit_block;
public SourceMethod (MethodBase method_base, ISourceFile source_file)
public SourceMethod (MethodBase method_base, SourceFile source_file)
: this (method_base)
{
this._source_file = source_file;
@@ -312,7 +221,7 @@ namespace Mono.CSharp.Debugger
this._implicit_block = new SourceBlock (this, 0);
}
public void SetSourceRange (ISourceFile sourceFile,
public void SetSourceRange (SourceFile sourceFile,
int startLine, int startColumn,
int endLine, int endColumn)
{
@@ -322,7 +231,7 @@ namespace Mono.CSharp.Debugger
}
public void StartBlock (ISourceBlock block)
public void StartBlock (SourceBlock block)
{
_block_stack.Push (block);
}
@@ -333,7 +242,7 @@ namespace Mono.CSharp.Debugger
block._end = new SourceLine (endOffset);
if (_block_stack.Count > 0) {
ISourceBlock parent = (ISourceBlock) _block_stack.Peek ();
SourceBlock parent = (SourceBlock) _block_stack.Peek ();
parent.AddBlock (block);
} else
@@ -349,45 +258,43 @@ namespace Mono.CSharp.Debugger
((SourceLine) block.End)._offset = endOffset;
}
public ISourceBlock CurrentBlock {
public SourceBlock CurrentBlock {
get {
if (_block_stack.Count > 0)
return (ISourceBlock) _block_stack.Peek ();
return (SourceBlock) _block_stack.Peek ();
else
return _implicit_block;
}
}
// interface ISourceMethod
public ISourceLine[] Lines {
public SourceLine[] Lines {
get {
ISourceLine[] retval = new ISourceLine [_lines.Count];
SourceLine[] retval = new SourceLine [_lines.Count];
_lines.CopyTo (retval);
return retval;
}
}
public void AddLine (ISourceLine line)
public void AddLine (SourceLine line)
{
_lines.Add (line);
}
public ISourceBlock[] Blocks {
public SourceBlock[] Blocks {
get {
ISourceBlock[] retval = new ISourceBlock [_blocks.Count];
SourceBlock[] retval = new SourceBlock [_blocks.Count];
_blocks.CopyTo (retval);
return retval;
}
}
public ILocalVariable[] Locals {
public LocalVariableEntry[] Locals {
get {
return _implicit_block.Locals;
}
}
public void AddLocal (ILocalVariable local)
public void AddLocal (LocalVariableEntry local)
{
_implicit_block.AddLocal (local);
}
@@ -428,7 +335,7 @@ namespace Mono.CSharp.Debugger
}
}
public ISourceFile SourceFile {
public SourceFile SourceFile {
get {
return _source_file;
}
@@ -443,13 +350,13 @@ namespace Mono.CSharp.Debugger
}
}
public ISourceLine Start {
public SourceLine Start {
get {
return _implicit_block.Start;
}
}
public ISourceLine End {
public SourceLine End {
get {
return _implicit_block.End;
}
@@ -464,33 +371,27 @@ namespace Mono.CSharp.Debugger
protected ArrayList orphant_methods = null;
protected ArrayList methods = null;
protected Hashtable sources = null;
protected DwarfFileWriter writer = null;
private ArrayList mbuilder_array = null;
public ISourceMethod[] Methods {
internal SourceMethod[] Methods {
get {
ISourceMethod[] retval = new ISourceMethod [methods.Count];
SourceMethod[] retval = new SourceMethod [methods.Count];
methods.CopyTo (retval);
return retval;
}
}
public ISourceFile[] Sources {
internal SourceFile[] Sources {
get {
ISourceFile[] retval = new ISourceFile [sources.Count];
SourceFile[] retval = new SourceFile [sources.Count];
sources.Values.CopyTo (retval, 0);
return retval;
}
}
public DwarfFileWriter DwarfFileWriter {
get {
return writer;
}
}
protected SourceMethod current_method = null;
private SourceMethod current_method = null;
private string assembly_filename = null;
private string output_filename = null;
//
// Interface IMonoSymbolWriter
@@ -513,7 +414,7 @@ namespace Mono.CSharp.Debugger
DoFixups (assembly);
CreateDwarfFile (assembly);
CreateOutput (assembly);
}
public void CloseNamespace () {
@@ -538,6 +439,7 @@ namespace Mono.CSharp.Debugger
int addr2,
int addr3)
{
throw new NotSupportedException ();
}
public void DefineGlobalVariable (
@@ -549,6 +451,7 @@ namespace Mono.CSharp.Debugger
int addr2,
int addr3)
{
throw new NotSupportedException ();
}
public void DefineLocalVariable (string name,
@@ -560,30 +463,13 @@ namespace Mono.CSharp.Debugger
int addr3,
int startOffset,
int endOffset)
{
throw new NotSupportedException ();
}
public void DefineLocalVariable (string name,
LocalBuilder local,
FieldAttributes attributes,
int position,
int startOffset,
int endOffset)
{
if (current_method == null)
return;
ITypeHandle type = writer.RegisterType (local.LocalType);
LocalVariable local_info = new LocalVariable (name, type, current_method,
position, null);
current_method.CurrentBlock.AddLocal (local_info);
locals.Add (local_info);
current_method.AddLocal (new LocalVariableEntry (name, attributes, signature));
}
public void DefineParameter (string name,
ParameterAttributes attributes,
int sequence,
@@ -602,6 +488,9 @@ namespace Mono.CSharp.Debugger
int[] endLines,
int[] endColumns)
{
if (current_method == null)
return;
SourceLine source_line = new SourceLine (offsets [0], lines [0], columns [0]);
if (current_method != null)
@@ -615,7 +504,7 @@ namespace Mono.CSharp.Debugger
public void Initialize (string assembly_filename, string filename, string[] args)
{
this.writer = new DwarfFileWriter (filename, args);
this.output_filename = filename;
this.assembly_filename = assembly_filename;
}
@@ -675,6 +564,7 @@ namespace Mono.CSharp.Debugger
public void OpenNamespace (string name)
{
throw new NotSupportedException ();
}
public int OpenScope (int startOffset)
@@ -682,7 +572,7 @@ namespace Mono.CSharp.Debugger
if (current_method == null)
return 0;
ISourceBlock block = new SourceBlock (current_method, startOffset);
SourceBlock block = new SourceBlock (current_method, startOffset);
current_method.StartBlock (block);
return block.ID;
@@ -705,6 +595,7 @@ namespace Mono.CSharp.Debugger
public void SetSymAttribute (SymbolToken parent, string name, byte[] data)
{
throw new NotSupportedException ();
}
public void SetUnderlyingWriter (IntPtr underlyingWriter)
@@ -714,60 +605,17 @@ namespace Mono.CSharp.Debugger
public void SetUserEntryPoint (SymbolToken entryMethod)
{
throw new NotSupportedException ();
}
public void UsingNamespace (string fullName)
{
throw new NotSupportedException ();
}
//
// MonoSymbolWriter implementation
//
protected void WriteLocal (DwarfFileWriter.Die parent_die, ILocalVariable local)
{
DwarfFileWriter.DieMethodVariable die;
die = new DwarfFileWriter.DieMethodVariable (parent_die, local);
}
protected void WriteBlock (DwarfFileWriter.Die parent_die, ISourceBlock block)
{
DwarfFileWriter.DieLexicalBlock die;
die = new DwarfFileWriter.DieLexicalBlock (parent_die, block);
foreach (ILocalVariable local in block.Locals)
WriteLocal (die, local);
foreach (ISourceBlock subblock in block.Blocks)
WriteBlock (die, subblock);
}
protected void WriteMethod (ISourceMethod method)
{
DwarfFileWriter.DieCompileUnit parent_die = writer.DieGlobalCompileUnit;
DwarfFileWriter.TypeHandle declaring_type;
DwarfFileWriter.DieSubProgram die;
DwarfFileWriter.Die defining_die;
declaring_type = DwarfFileWriter.RegisterType (method.MethodBase.DeclaringType);
die = new DwarfFileWriter.DieSubProgram (declaring_type.TypeDie, method);
defining_die = new DwarfFileWriter.DieSubProgram (parent_die, die, method);
foreach (ILocalVariable local in method.Locals)
WriteLocal (defining_die, local);
foreach (ISourceBlock block in method.Blocks)
WriteBlock (defining_die, block);
}
protected void WriteSource (DwarfFileWriter writer, ISourceFile source)
{
foreach (ISourceMethod method in source.Methods)
WriteMethod (method);
}
protected void DoFixups (Assembly assembly)
{
foreach (SourceMethod method in methods) {
@@ -785,27 +633,10 @@ namespace Mono.CSharp.Debugger
}
}
protected void CreateDwarfFile (Assembly assembly)
protected void CreateOutput (Assembly assembly)
{
foreach (ISourceFile source in sources.Values)
WriteSource (writer, source);
if (orphant_methods.Count > 0) {
SourceFile source = new SourceFile ("<unknown>");
foreach (SourceMethod orphant in orphant_methods) {
orphant._source_file = source;
source.AddMethod (orphant);
}
WriteSource (writer, source);
}
writer.WriteSymbolTable (this);
writer.WriteLineNumberTable (this);
writer.Close ();
using (MonoSymbolTableWriter writer = new MonoSymbolTableWriter (output_filename))
writer.WriteSymbolTable (this);
}
}
}
-43
View File
@@ -1,43 +0,0 @@
This is an implementation of the System.Diagnostics.SymbolStore.ISymbolWriter
interface which writes a dwarf debugging information file.
Unfortunately there are several major problems with this interface and I'm
unsure how to solve them:
1.) The interface contains a constructor method `Initialize' which has an
'IntPtr' emitter argument which seems to be a pointer to the actual
symbol writer which resides in a proprietary, undocumented DLL (I spent
almost 3 hours browsing the ".NET Framework SDK Documentation" and
msdn.microsoft.com - without success.
A short test showed me that mscorlib doesn't like passing zero, this
won't give you the system's default implementation.
To solve this problem, I created a derived interface IMonoSymbolWriter
which contains an additional constructor which only takes the name of
the symbol file as argument.
void Initialize (string filename);
2.) You seem to get an instance of a class implementing this interface by
creating a new instance of System.Reflection.Emit.ModuleBuilder (with the
`bool createSymbolFile' argument) and then calling GetSymWriter() on
the returned object.
So far so good, but how does this method find out which symbol writer
to use ?
3.) According to the documentation, some of the methods of
System.Reflection.Emit.ILGenerator and System.Reflection.Emit.LocalBuilder
seem to use the symbol writer to emit symbol debugging information.
But again, how do these objects get the symbol writer ?
Currently, there are two ways to use this assembly:
a.) Fix the problems outlined above and dynamically load this assembly
(Mono.CSharp.Debugger.dll) when a new symbol writer is created.
b.) Reference this assembly in your application and manually create the
symbol writer using the constructor.
@@ -1,100 +0,0 @@
This is an implementation of the System.Diagnostics.SymbolStore.ISymbolWriter
interface which writes a symbol file in the dwarf format.
The output is an assembler input file containing dwarf data with an
additional ELF section called ".mono_reloc_table". This section is
read by the JIT engine to map IL offsets and such to machine
addresses.
The mono relocation table contains of
1. A 2-byte unsigned integer containing a version number, currently 2.
2. A 1-byte unsigned integer containing a flag specifying whether the
object file containing this section has already been relocated.
The symbol writer sets this flag to zero, you must change it to 1
if you write the relocated file back to disk.
3. A 4-byte unsigned integer containing the total size of the
relocation table, but not including the size field itself.
4. One or more relocation entries.
Each entry in the relocation table has the following form:
1. A 1-byte unsigned integer specifying the type of this entry.
2. A 4-byte unsigned integer containing the size of this entry, but
not including the size field itself.
3. A 1-byte unsigned integer specifying the ELF section of this entry.
4. A 4-byte unsigned offset from the beginning of the ELF section to
the location which needs to be relocated. This is called the target.
5. Optional additional data depending on the type of the entry.
The following entry types are currently defined:
a) TARGET_ADDRESS_SIZE - 0x01
The target is a 1-byte unsigned integer containing the size in
bytes of an address on the target machine.
b) IL_OFFSET - 0x02
The target is an integer of appropriate size to hold an address on
the target machine (the assembler ensures that the object has the
correct size) and contains an IL offset from the beginning of the
current method which needs to be replaced with the corresponding
machine address.
This entry has a 4-byte unsigned integer argument containing the
metadata token of the current method and a 4-byte unsigned integer
argument containing the IL offset.
c) METHOD_START_ADDRESS - 0x03
d) METHOD_END_ADDRESS - 0x04
The target is an integer of appropriate size to hold an address on
the target machine (the assembler ensures that the object has the
correct size).
This entry has a 4-byte unsigned integer argument containing the
metadata token of the current method.
To use the generated object file, the JIT must:
* Check whether the file contains a ".mono_reloc_table" section.
If not, the file cannot be used (you need to change the address size
field in each compilation unit header).
* Check whether the flag field of the relocation table (the 3rd byte
of the relocation table) is zero. If it is 1, the file has already
been relocated. In this case, it's best to reject the file.
* Set the flag field to 1.
* Process all relocation entries.
* Write the modified file back to disk.
To do the relocation, the JIT can assume that:
1.) All the relevant ELF sections are physically contiguous
(a requirement from the DWARF 2 specification).
2.) All relocation targets holding addresses are suitable of holding
an address on the target machine.
This means that you can do something like
* (void **) ptr = map_to_machine (* (void **) ptr)
3.) There are no other changes needed in the object file - so you can
just write it back to disk once you're done with the relocation.
Last changed March 19th, 2002
Martin Baulig <[email protected]>
@@ -1,330 +0,0 @@
/* -*- mode: C; c-basic-offset: 2 -*-
C# language support for Mono.
Copyright 2002 Ximian, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "expression.h"
#include "value.h"
#include "valprint.h"
#include "demangle.h"
#include "parser-defs.h"
#include "language.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdb_string.h"
#include "csharp-lang.h"
#include "c-lang.h"
#include "annotate.h"
#include <ctype.h>
static void csharp_print_value_fields (struct type *type, char *valaddr, CORE_ADDR address,
struct ui_file *stream, int format, int recurse,
enum val_prettyprint pretty);
/* Print the character C on STREAM as part of the contents of a literal
string whose delimiter is QUOTER. Note that that format for printing
characters and strings is language specific. */
void
csharp_emit_char (int c, struct ui_file *stream, int quoter)
{
switch (c)
{
case '\\':
case '\'':
fprintf_filtered (stream, "\\%c", c);
break;
case '\b':
fputs_filtered ("\\b", stream);
break;
case '\t':
fputs_filtered ("\\t", stream);
break;
case '\n':
fputs_filtered ("\\n", stream);
break;
case '\f':
fputs_filtered ("\\f", stream);
break;
case '\r':
fputs_filtered ("\\r", stream);
break;
default:
if (isprint (c))
fputc_filtered (c, stream);
else
fprintf_filtered (stream, "\\u%.4x", (unsigned int) c);
break;
}
}
int
csharp_value_print (struct value *val, struct ui_file *stream, int format,
enum val_prettyprint pretty)
{
struct type *type;
CORE_ADDR address;
int i;
char *name;
type = VALUE_TYPE (val);
address = VALUE_ADDRESS (val) + VALUE_OFFSET (val);
CHECK_TYPEDEF (type);
if (TYPE_CODE (type) == TYPE_CODE_PTR)
{
struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
CORE_ADDR addr = unpack_pointer (type, VALUE_CONTENTS (val));
if ((addr != 0) &&
((TYPE_CODE (target_type) == TYPE_CODE_CSHARP_STRING) ||
(TYPE_CODE (target_type) == TYPE_CODE_CSHARP_ARRAY) ||
(TYPE_CODE (target_type) == TYPE_CODE_STRUCT) ||
(TYPE_CODE (target_type) == TYPE_CODE_CLASS)))
{
struct value *newval = value_at (target_type, addr, VALUE_BFD_SECTION (val));
int retval;
retval = val_print (target_type, VALUE_CONTENTS (newval), 0, addr,
stream, format, 1, 0, pretty);
release_value (newval);
return retval;
}
}
return (val_print (type, VALUE_CONTENTS (val), 0, address,
stream, format, 1, 0, pretty));
}
void
csharp_print_type (struct type *type, char *varstring, struct ui_file *stream,
int show, int level)
{
int i;
CHECK_TYPEDEF (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_CSHARP_STRING:
fputs_filtered ("string", stream);
return;
case TYPE_CODE_CSHARP_ARRAY:
csharp_print_type (TYPE_TARGET_TYPE (type), varstring, stream, show, level);
fprintf_filtered (stream, "[");
for (i = 1; i < TYPE_CSHARP_ARRAY_ARRAY_RANK (type); i++)
fprintf_filtered (stream, ",");
fputs_filtered ("]", stream);
return;
case TYPE_CODE_PTR:
if (level == 0)
csharp_print_type (TYPE_TARGET_TYPE (type), varstring, stream,
show, level + 1);
else
c_print_type (type, varstring, stream, show, level);
return;
default:
c_print_type (type, varstring, stream, show, level);
break;
}
}
/* Called by various <lang>_val_print routines to print elements of an
array in the form "<elem1>, <elem2>, <elem3>, ...".
(FIXME?) Assumes array element separator is a comma, which is correct
for all languages currently handled.
(FIXME?) Some languages have a notation for repeated array elements,
perhaps we should try to use that notation when appropriate.
*/
void
csharp_print_array_elements (struct type *type, char *valaddr, CORE_ADDR address,
struct ui_file *stream, int format, int deref_ref,
int recurse, enum val_prettyprint pretty,
unsigned int len, unsigned int i)
{
unsigned int things_printed = 0;
struct type *elttype;
unsigned eltlen;
/* Position of the array element we are examining to see
whether it is repeated. */
unsigned int rep1;
/* Number of repetitions we have detected so far. */
unsigned int reps;
elttype = TYPE_TARGET_TYPE (type);
eltlen = TYPE_LENGTH (check_typedef (elttype));
annotate_array_section_begin (i, elttype);
for (; i < len && things_printed < print_max; i++)
{
if (i != 0)
{
if (prettyprint_arrays)
{
fprintf_filtered (stream, ",\n");
print_spaces_filtered (2 + 2 * recurse, stream);
}
else
{
fprintf_filtered (stream, ", ");
}
}
wrap_here (n_spaces (2 + 2 * recurse));
rep1 = i + 1;
reps = 1;
while ((rep1 < len) &&
!memcmp (valaddr + i * eltlen, valaddr + rep1 * eltlen, eltlen))
{
++reps;
++rep1;
}
if (reps > repeat_count_threshold)
{
val_print (elttype, valaddr + i * eltlen, 0, address + i * eltlen,
stream, format, deref_ref, recurse + 1, pretty);
annotate_elt_rep (reps);
fprintf_filtered (stream, " <repeats %u times>", reps);
annotate_elt_rep_end ();
i = rep1 - 1;
things_printed += repeat_count_threshold;
}
else
{
val_print (elttype, valaddr + i * eltlen, 0, address + i * eltlen,
stream, format, deref_ref, recurse + 1, pretty);
annotate_elt ();
things_printed++;
}
}
annotate_array_section_end ();
if (i < len)
{
fprintf_filtered (stream, "...");
}
}
/* Print data of type TYPE located at VALADDR (within GDB), which came from
the inferior at address ADDRESS, onto stdio stream STREAM according to
FORMAT (a letter or 0 for natural format). The data at VALADDR is in
target byte order.
If the data are a string pointer, returns the number of string characters
printed.
If DEREF_REF is nonzero, then dereference references, otherwise just print
them like pointers.
The PRETTY parameter controls prettyprinting. */
int
csharp_val_print (struct type *type, char *valaddr, int embedded_offset,
CORE_ADDR address, struct ui_file *stream, int format,
int deref_ref, int recurse, enum val_prettyprint pretty)
{
register unsigned int i = 0; /* Number of characters printed */
struct type *target_type;
struct value *newval;
LONGEST length;
CORE_ADDR addr;
CHECK_TYPEDEF (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_CSHARP_STRING:
addr = address + TYPE_CSHARP_ARRAY_LENGTH_OFFSET (type);
length = read_memory_integer (addr, TYPE_CSHARP_ARRAY_LENGTH_BYTESIZE (type));
addr = address + TYPE_CSHARP_ARRAY_DATA_OFFSET (type);
return val_print_string (addr, length, 2, stream);
case TYPE_CODE_CSHARP_ARRAY:
target_type = check_typedef (TYPE_TARGET_TYPE (type));
addr = address + TYPE_CSHARP_ARRAY_LENGTH_OFFSET (type);
length = read_memory_integer (addr, TYPE_CSHARP_ARRAY_LENGTH_BYTESIZE (type));
addr = address + TYPE_CSHARP_ARRAY_DATA_OFFSET (type);
newval = allocate_repeat_value (target_type, length);
VALUE_LVAL (newval) = lval_memory;
VALUE_ADDRESS (newval) = addr;
VALUE_LAZY (newval) = 1;
fprintf_filtered (stream, "{");
csharp_print_array_elements (type, VALUE_CONTENTS (newval), addr, stream,
format, deref_ref, recurse, pretty, length, 0);
fprintf_filtered (stream, "}");
release_value (newval);
return 0;
case TYPE_CODE_PTR:
target_type = check_typedef (TYPE_TARGET_TYPE (type));
addr = unpack_pointer (type, valaddr);
if ((addr != 0) && (TYPE_CODE (target_type) == TYPE_CODE_CSHARP_STRING))
{
struct value *newval = value_at (target_type, addr, NULL);
int retval;
retval = val_print (target_type, VALUE_CONTENTS (newval), 0, addr,
stream, format, 1, 0, pretty);
release_value (newval);
return retval;
}
break;
default:
break;
}
return c_val_print (type, valaddr, embedded_offset, address, stream,
format, deref_ref, recurse, pretty);
}
/* Table mapping opcodes into strings for printing operators
and precedences of the operators. */
const struct op_print csharp_op_print_tab[] =
{
{NULL, 0, 0, 0}
};
@@ -1,38 +0,0 @@
/* -*- mode: C; c-basic-offset: 2 -*-
C# language support for Mono.
Copyright 2002 Ximian, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef CSHARP_LANG_H
#define CSHARP_LANG_H
extern const struct op_print csharp_op_print_tab[];
extern void csharp_emit_char (int c, struct ui_file *stream, int quoter);
extern void csharp_print_type (struct type *type, char *varstring,
struct ui_file *stream, int show, int level);
extern int csharp_val_print (struct type *type, char *valaddr, int embedded_offset,
CORE_ADDR address, struct ui_file *stream, int format,
int deref_ref, int recurse, enum val_prettyprint pretty);
extern int csharp_value_print (struct value *val, struct ui_file *stream, int format,
enum val_prettyprint pretty);
#endif
@@ -1,76 +0,0 @@
/* -*- mode: C; c-basic-offset: 2 -*-
C# language support for Mono.
Copyright 2002 Ximian, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "gdbtypes.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdb_string.h"
#include "value.h"
#include "csharp-lang.h"
#include "c-lang.h"
#include "gdbcore.h"
#include <ctype.h>
/* Local functions */
extern void _initialize_csharp_mono_language (void);
const struct language_defn csharp_mono_language_defn =
{
"csharp-mono", /* Language name */
language_csharp_mono,
c_builtin_types,
range_check_off,
type_check_off,
case_sensitive_on,
c_parse,
c_error,
evaluate_subexp_standard,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
csharp_emit_char, /* Function to print a single character */
c_create_fundamental_type, /* Create fundamental type in this language */
csharp_print_type, /* Print a type using appropriate syntax */
csharp_val_print, /* Print a value using appropriate syntax */
csharp_value_print, /* Print a top-level value */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
csharp_op_print_tab, /* expression operators for printing */
0, /* not c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
LANG_MAGIC
};
void
_initialize_csharp_mono_language (void)
{
add_language (&csharp_mono_language_defn);
}
@@ -1,460 +0,0 @@
diff -ru gdb-5.2.orig/gdb/Makefile.in gdb-5.2/gdb/Makefile.in
--- gdb-5.2.orig/gdb/Makefile.in Mon Feb 25 19:15:52 2002
+++ gdb-5.2/gdb/Makefile.in Thu May 30 22:33:31 2002
@@ -548,7 +548,8 @@
tui/tui-file.h tui/tui-file.c tui/tui-out.c tui/tui-hooks.c \
ui-file.h ui-file.c \
frame.c doublest.c \
- gnu-v2-abi.c gnu-v3-abi.c hpacc-abi.c cp-abi.c
+ gnu-v2-abi.c gnu-v3-abi.c hpacc-abi.c cp-abi.c \
+ csharp-lang.c csharp-mono-lang.c
LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
@@ -670,7 +671,8 @@
vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \
vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \
vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \
- dcache.h remote-utils.h top.h somsolib.h
+ dcache.h remote-utils.h top.h somsolib.h \
+ csharp-lang.h
# Header files that already have srcdir in them, or which are in objdir.
@@ -722,7 +724,8 @@
nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o \
ui-file.o \
frame.o doublest.o \
- gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o
+ gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o \
+ csharp-lang.o csharp-mono-lang.o
OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
diff -ru gdb-5.2.orig/gdb/defs.h gdb-5.2/gdb/defs.h
--- gdb-5.2.orig/gdb/defs.h Mon Mar 25 17:50:20 2002
+++ gdb-5.2/gdb/defs.h Thu May 30 22:32:57 2002
@@ -209,7 +209,8 @@
language_m2, /* Modula-2 */
language_asm, /* Assembly language */
language_scm, /* Scheme / Guile */
- language_pascal /* Pascal */
+ language_pascal, /* Pascal */
+ language_csharp_mono /* C# using Mono */
};
enum precision_type
diff -ru gdb-5.2.orig/gdb/dwarf2read.c gdb-5.2/gdb/dwarf2read.c
--- gdb-5.2.orig/gdb/dwarf2read.c Thu Feb 28 12:21:16 2002
+++ gdb-5.2/gdb/dwarf2read.c Fri Jul 5 14:34:25 2002
@@ -733,7 +733,8 @@
static void read_tag_volatile_type (struct die_info *, struct objfile *,
const struct comp_unit_head *);
-static void read_tag_string_type (struct die_info *, struct objfile *);
+static void read_tag_string_type (struct die_info *, struct objfile *,
+ const struct comp_unit_head *);
static void read_subroutine_type (struct die_info *, struct objfile *,
const struct comp_unit_head *);
@@ -1520,7 +1521,7 @@
read_tag_reference_type (die, objfile, cu_header);
break;
case DW_TAG_string_type:
- read_tag_string_type (die, objfile);
+ read_tag_string_type (die, objfile, cu_header);
break;
case DW_TAG_base_type:
read_base_type (die, objfile);
@@ -2510,6 +2511,52 @@
return;
}
+ if (cu_language == language_csharp_mono)
+ {
+ die->type = create_csharp_array_type (NULL, element_type);
+
+ attr = dwarf_attr (die, DW_AT_data_location);
+ if (attr)
+ {
+ TYPE_CSHARP_ARRAY_DATA_OFFSET (die->type) =
+ decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+ }
+
+ child_die = die->next;
+ while (child_die && child_die->tag)
+ {
+ if (child_die->tag != DW_TAG_subrange_type)
+ internal_error (__FILE__, __LINE__,
+ "read_array_type: invalid C# array type");
+
+ ++TYPE_CSHARP_ARRAY_ARRAY_RANK (die->type);
+
+ child_die = sibling_die (child_die);
+ }
+
+ if (TYPE_CSHARP_ARRAY_ARRAY_RANK (die->type) < 2)
+ {
+ attr = dwarf_attr (die->next, DW_AT_count);
+ if (attr)
+ {
+ TYPE_CSHARP_ARRAY_LENGTH_OFFSET (die->type) =
+ decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+ }
+
+ attr = dwarf_attr (die->next, DW_AT_byte_size);
+ if (attr)
+ {
+ TYPE_CSHARP_ARRAY_LENGTH_BYTESIZE (die->type) = DW_UNSND (attr);
+ }
+ }
+
+ TYPE_LENGTH (die->type) = max (TYPE_CSHARP_ARRAY_DATA_OFFSET (die->type),
+ TYPE_CSHARP_ARRAY_LENGTH_OFFSET (die->type)) +
+ TYPE_CSHARP_ARRAY_LENGTH_BYTESIZE (die->type);
+
+ return;
+ }
+
back_to = make_cleanup (null_cleanup, NULL);
child_die = die->next;
while (child_die && child_die->tag)
@@ -2766,7 +2813,8 @@
attribute to reference it. */
static void
-read_tag_string_type (struct die_info *die, struct objfile *objfile)
+read_tag_string_type (struct die_info *die, struct objfile *objfile,
+ const struct comp_unit_head *cu_header)
{
struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr;
@@ -2777,6 +2825,34 @@
return;
}
+ if (cu_language == language_csharp_mono)
+ {
+ type = create_csharp_string_type (NULL, objfile);
+ TYPE_NAME (type) = obsavestring ("string", 6, &objfile->type_obstack);
+
+ attr = dwarf_attr (die, DW_AT_string_length);
+ if (attr)
+ {
+ TYPE_CSHARP_ARRAY_LENGTH_OFFSET (type) = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+ }
+
+ attr = dwarf_attr (die, DW_AT_byte_size);
+ if (attr)
+ {
+ TYPE_CSHARP_ARRAY_LENGTH_BYTESIZE (type) = DW_UNSND (attr);
+ }
+
+ attr = dwarf_attr (die, DW_AT_data_location);
+ if (attr)
+ {
+ TYPE_CSHARP_ARRAY_DATA_OFFSET (type) = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+ }
+
+ die->type = type;
+ return;
+ }
+
+
attr = dwarf_attr (die, DW_AT_string_length);
if (attr)
{
@@ -3822,6 +3898,9 @@
case DW_LANG_Java:
cu_language = language_java;
break;
+ case DW_LANG_CSharp_Mono:
+ cu_language = language_csharp_mono;
+ break;
case DW_LANG_Ada83:
case DW_LANG_Cobol74:
case DW_LANG_Cobol85:
@@ -4288,6 +4367,19 @@
add_symbol_to_list (sym, list_in_scope);
break;
}
+ attr = dwarf_attr (die, DW_AT_start_scope);
+ attr2 = dwarf_attr (die, DW_AT_end_scope);
+ if (attr && attr2)
+ {
+ struct range_list *r = (struct range_list *)
+ obstack_alloc (&objfile->type_obstack,
+ sizeof (struct range_list));
+
+ r->start = DW_ADDR (attr);
+ r->end = DW_ADDR (attr2);
+
+ SYMBOL_RANGES (sym) = r;
+ }
attr = dwarf_attr (die, DW_AT_location);
if (attr)
{
@@ -4701,7 +4793,7 @@
read_tag_volatile_type (die, objfile, cu_header);
break;
case DW_TAG_string_type:
- read_tag_string_type (die, objfile);
+ read_tag_string_type (die, objfile, cu_header);
break;
case DW_TAG_typedef:
read_typedef (die, objfile, cu_header);
diff -ru gdb-5.2.orig/gdb/findvar.c gdb-5.2/gdb/findvar.c
--- gdb-5.2.orig/gdb/findvar.c Sun Feb 10 03:47:11 2002
+++ gdb-5.2/gdb/findvar.c Fri May 31 01:14:10 2002
@@ -411,9 +411,11 @@
read_var_value (register struct symbol *var, struct frame_info *frame)
{
register struct value *v;
+ register struct range_list *r;
struct type *type = SYMBOL_TYPE (var);
CORE_ADDR addr;
register int len;
+ int range_ok = 0;
v = allocate_value (type);
VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
@@ -423,6 +425,23 @@
if (frame == NULL)
frame = selected_frame;
+
+ if (!SYMBOL_RANGES (var))
+ range_ok = 1;
+ else
+ {
+ for (r = SYMBOL_RANGES (var); r; r = r->next)
+ {
+ if (r->start <= frame->pc && r->end >= frame->pc)
+ {
+ range_ok = 1;
+ break;
+ }
+ }
+ }
+
+ if (!range_ok)
+ return NULL;
switch (SYMBOL_CLASS (var))
{
diff -ru gdb-5.2.orig/gdb/gdbtypes.c gdb-5.2/gdb/gdbtypes.c
--- gdb-5.2.orig/gdb/gdbtypes.c Fri Feb 8 18:34:33 2002
+++ gdb-5.2/gdb/gdbtypes.c Fri Jul 5 14:32:54 2002
@@ -726,6 +726,26 @@
return (result_type);
}
+struct type *
+create_csharp_array_type (struct type *result_type, struct type *element_type)
+{
+ LONGEST low_bound, high_bound;
+
+ if (result_type == NULL)
+ {
+ result_type = alloc_type (TYPE_OBJFILE (element_type));
+ }
+ TYPE_CODE (result_type) = TYPE_CODE_CSHARP_ARRAY;
+ TYPE_TARGET_TYPE (result_type) = element_type;
+
+ CHECK_TYPEDEF (element_type);
+
+ TYPE_CSHARP_ARRAY (result_type) = (struct csharp_array_type *)
+ TYPE_ALLOC (result_type, sizeof (struct csharp_array_type));
+
+ return (result_type);
+}
+
/* Create a string type using either a blank type supplied in RESULT_TYPE,
or creating a new type. String types are similar enough to array of
char types that we can use create_array_type to build the basic type
@@ -744,6 +764,18 @@
*current_language->string_char_type,
range_type);
TYPE_CODE (result_type) = TYPE_CODE_STRING;
+ return (result_type);
+}
+
+struct type *
+create_csharp_string_type (struct type *result_type, struct objfile *objfile)
+{
+ result_type = alloc_type (objfile);
+ TYPE_CODE (result_type) = TYPE_CODE_CSHARP_STRING;
+
+ TYPE_CSHARP_ARRAY (result_type) = (struct csharp_array_type *)
+ TYPE_ALLOC (result_type, sizeof (struct csharp_array_type));
+
return (result_type);
}
diff -ru gdb-5.2.orig/gdb/gdbtypes.h gdb-5.2/gdb/gdbtypes.h
--- gdb-5.2.orig/gdb/gdbtypes.h Sun Feb 3 23:57:56 2002
+++ gdb-5.2/gdb/gdbtypes.h Fri Jul 5 00:16:16 2002
@@ -130,7 +130,10 @@
TYPE_CODE_TYPEDEF,
TYPE_CODE_TEMPLATE, /* C++ template */
- TYPE_CODE_TEMPLATE_ARG /* C++ template arg */
+ TYPE_CODE_TEMPLATE_ARG, /* C++ template arg */
+
+ TYPE_CODE_CSHARP_STRING, /* C# string */
+ TYPE_CODE_CSHARP_ARRAY /* C# array */
};
@@ -471,6 +474,10 @@
struct cplus_struct_type *cplus_stuff;
+ /* CSHARP_ARRAY is for TYPE_CODE_CSHARP_ARRAY. */
+
+ struct csharp_array_type *csharp_array;
+
/* FLOATFORMAT is for TYPE_CODE_FLT. It is a pointer to the
floatformat object that describes the floating-point value
that resides within the type. */
@@ -704,6 +711,20 @@
*localtype_ptr;
};
+/* C# language-specific information for TYPE_CODE_CSHARP_STRING and
+ * TYPE_CODE_CSHARP_ARRAY nodes. */
+
+struct csharp_array_type
+ {
+ unsigned array_rank;
+
+ unsigned length_offset;
+
+ unsigned length_bytesize;
+
+ unsigned data_offset;
+ };
+
/* Struct used in computing virtual base list */
struct vbase
{
@@ -844,6 +865,14 @@
(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
: B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n)))
+/* C# */
+
+#define TYPE_CSHARP_ARRAY(thistype) (thistype)->type_specific.csharp_array
+#define TYPE_CSHARP_ARRAY_ARRAY_RANK(thistype) TYPE_CSHARP_ARRAY(thistype)->array_rank
+#define TYPE_CSHARP_ARRAY_LENGTH_OFFSET(thistype) TYPE_CSHARP_ARRAY(thistype)->length_offset
+#define TYPE_CSHARP_ARRAY_LENGTH_BYTESIZE(thistype) TYPE_CSHARP_ARRAY(thistype)->length_bytesize
+#define TYPE_CSHARP_ARRAY_DATA_OFFSET(thistype) TYPE_CSHARP_ARRAY(thistype)->data_offset
+
#define TYPE_FIELD_STATIC(thistype, n) ((thistype)->fields[n].bitsize < 0)
#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) ((thistype)->fields[n].bitsize == -2)
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_PHYSNAME(TYPE_FIELD(thistype, n))
@@ -1100,7 +1129,12 @@
extern struct type *create_array_type (struct type *, struct type *,
struct type *);
+extern struct type *create_csharp_array_type (struct type *result_type,
+ struct type *element_type);
+
extern struct type *create_string_type (struct type *, struct type *);
+
+extern struct type *create_csharp_string_type (struct type *, struct objfile *);
extern struct type *create_set_type (struct type *, struct type *);
diff -ru gdb-5.2.orig/gdb/language.c gdb-5.2/gdb/language.c
--- gdb-5.2.orig/gdb/language.c Wed Feb 13 19:49:30 2002
+++ gdb-5.2/gdb/language.c Thu May 30 22:32:57 2002
@@ -865,6 +865,7 @@
case language_chill:
case language_m2:
case language_pascal:
+ case language_csharp_mono:
return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
case language_c:
diff -ru gdb-5.2.orig/gdb/stack.c gdb-5.2/gdb/stack.c
--- gdb-5.2.orig/gdb/stack.c Thu Feb 14 08:24:54 2002
+++ gdb-5.2/gdb/stack.c Fri May 31 01:13:24 2002
@@ -1173,14 +1173,36 @@
case LOC_REGISTER:
case LOC_STATIC:
case LOC_BASEREG:
- values_printed = 1;
- for (j = 0; j < num_tabs; j++)
- fputs_filtered ("\t", stream);
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
- fputs_filtered (" = ", stream);
- print_variable_value (sym, fi, stream);
- fprintf_filtered (stream, "\n");
- break;
+ {
+ struct range_list *r;
+ int range_ok = 0;
+
+ if (!SYMBOL_RANGES (sym))
+ range_ok = 1;
+ else
+ {
+ for (r = SYMBOL_RANGES (sym); r; r = r->next)
+ {
+ if (r->start <= fi->pc && r->end >= fi->pc)
+ {
+ range_ok = 1;
+ break;
+ }
+ }
+ }
+
+ if (range_ok)
+ {
+ values_printed = 1;
+ for (j = 0; j < num_tabs; j++)
+ fputs_filtered ("\t", stream);
+ fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
+ fputs_filtered (" = ", stream);
+ print_variable_value (sym, fi, stream);
+ fprintf_filtered (stream, "\n");
+ }
+ break;
+ }
default:
/* Ignore symbols which are not locals. */
diff -ru gdb-5.2.orig/include/elf/ChangeLog gdb-5.2/include/elf/ChangeLog
--- gdb-5.2.orig/include/elf/ChangeLog Wed Feb 13 19:14:48 2002
+++ gdb-5.2/include/elf/ChangeLog Fri May 31 00:25:33 2002
@@ -1,3 +1,7 @@
+2002-04-12 Martin Baulig <[email protected]>
+
+ * dwarf2.h (DW_AT_end_scope): Added as GNU extension.
+
2002-02-13 Matt Fredette <[email protected]>
* m68k.h (EF_M68000): Define.
diff -ru gdb-5.2.orig/include/elf/dwarf2.h gdb-5.2/include/elf/dwarf2.h
--- gdb-5.2.orig/include/elf/dwarf2.h Tue Jan 29 00:26:53 2002
+++ gdb-5.2/include/elf/dwarf2.h Fri May 31 00:25:33 2002
@@ -328,6 +328,8 @@
DW_AT_src_coords = 0x2104,
DW_AT_body_begin = 0x2105,
DW_AT_body_end = 0x2106,
+ DW_AT_end_scope = 0x2121,
+
/* VMS Extensions. */
DW_AT_VMS_rtnbeg_pd_address = 0x2201
};
@@ -675,7 +677,8 @@
DW_LANG_Ada95 = 0x000d,
DW_LANG_Fortran95 = 0x000e,
/* MIPS. */
- DW_LANG_Mips_Assembler = 0x8001
+ DW_LANG_Mips_Assembler = 0x8001,
+ DW_LANG_CSharp_Mono = 0x9001
};
@@ -1,175 +0,0 @@
Index: include/elf/ChangeLog
===================================================================
RCS file: /cvs/src/src/include/elf/ChangeLog,v
retrieving revision 1.121
diff -u -u -p -r1.121 ChangeLog
--- include/elf/ChangeLog 13 Feb 2002 18:14:48 -0000 1.121
+++ include/elf/ChangeLog 12 Apr 2002 19:50:31 -0000
@@ -1,3 +1,7 @@
+2002-04-12 Martin Baulig <[email protected]>
+
+ * dwarf2.h (DW_AT_end_scope): Added as GNU extension.
+
2002-02-13 Matt Fredette <[email protected]>
* m68k.h (EF_M68000): Define.
Index: include/elf/dwarf2.h
===================================================================
RCS file: /cvs/src/src/include/elf/dwarf2.h,v
retrieving revision 1.8
diff -u -u -p -r1.8 dwarf2.h
--- include/elf/dwarf2.h 28 Jan 2002 23:26:53 -0000 1.8
+++ include/elf/dwarf2.h 12 Apr 2002 19:50:32 -0000
@@ -328,6 +328,8 @@ enum dwarf_attribute
DW_AT_src_coords = 0x2104,
DW_AT_body_begin = 0x2105,
DW_AT_body_end = 0x2106,
+ DW_AT_end_scope = 0x2121,
+
/* VMS Extensions. */
DW_AT_VMS_rtnbeg_pd_address = 0x2201
};
Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2421
diff -u -u -p -r1.2421 ChangeLog
--- gdb/ChangeLog 12 Apr 2002 07:37:17 -0000 1.2421
+++ gdb/ChangeLog 12 Apr 2002 19:50:38 -0000
@@ -1,3 +1,14 @@
+2002-04-12 Martin Baulig <[email protected]>
+
+ * dwarf2read.c (new_symbol): If DW_AT_start_scope and DW_AT_end_scope
+ are specified, set SYMBOL_RANGES().
+
+ * findvar.c (read_var_value): Check whether the current PC is within
+ the SYMBOL_RANGES(), return NULL if not.
+
+ * stack.c (print_block_frame_locals): Only print vars if the current PC
+ is in their SYMBOL_RANGES().
+
2002-04-12 Kevin Buettner <[email protected]>
From Jimi X <[email protected]>:
Index: gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.52
diff -u -u -p -r1.52 dwarf2read.c
--- gdb/dwarf2read.c 4 Apr 2002 22:26:43 -0000 1.52
+++ gdb/dwarf2read.c 12 Apr 2002 19:50:44 -0000
@@ -4394,6 +4394,19 @@ new_symbol (struct die_info *die, struct
add_symbol_to_list (sym, list_in_scope);
break;
}
+ attr = dwarf_attr (die, DW_AT_start_scope);
+ attr2 = dwarf_attr (die, DW_AT_end_scope);
+ if (attr && attr2)
+ {
+ struct range_list *r = (struct range_list *)
+ obstack_alloc (&objfile->type_obstack,
+ sizeof (struct range_list));
+
+ r->start = DW_ADDR (attr);
+ r->end = DW_ADDR (attr2);
+
+ SYMBOL_RANGES (sym) = r;
+ }
attr = dwarf_attr (die, DW_AT_location);
if (attr)
{
Index: gdb/findvar.c
===================================================================
RCS file: /cvs/src/src/gdb/findvar.c,v
retrieving revision 1.31
diff -u -u -p -r1.31 findvar.c
--- gdb/findvar.c 9 Apr 2002 03:06:13 -0000 1.31
+++ gdb/findvar.c 12 Apr 2002 19:50:45 -0000
@@ -417,9 +417,11 @@ struct value *
read_var_value (register struct symbol *var, struct frame_info *frame)
{
register struct value *v;
+ register struct range_list *r;
struct type *type = SYMBOL_TYPE (var);
CORE_ADDR addr;
register int len;
+ int range_ok = 0;
v = allocate_value (type);
VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
@@ -429,6 +431,23 @@ read_var_value (register struct symbol *
if (frame == NULL)
frame = selected_frame;
+
+ if (!SYMBOL_RANGES (var))
+ range_ok = 1;
+ else
+ {
+ for (r = SYMBOL_RANGES (var); r; r = r->next)
+ {
+ if (r->start <= frame->pc && r->end > frame->pc)
+ {
+ range_ok = 1;
+ break;
+ }
+ }
+ }
+
+ if (!range_ok)
+ return NULL;
switch (SYMBOL_CLASS (var))
{
Index: gdb/stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.33
diff -u -u -p -r1.33 stack.c
--- gdb/stack.c 10 Apr 2002 23:32:33 -0000 1.33
+++ gdb/stack.c 12 Apr 2002 19:50:47 -0000
@@ -1173,14 +1173,36 @@ print_block_frame_locals (struct block *
case LOC_REGISTER:
case LOC_STATIC:
case LOC_BASEREG:
- values_printed = 1;
- for (j = 0; j < num_tabs; j++)
- fputs_filtered ("\t", stream);
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
- fputs_filtered (" = ", stream);
- print_variable_value (sym, fi, stream);
- fprintf_filtered (stream, "\n");
- break;
+ {
+ struct range_list *r;
+ int range_ok = 0;
+
+ if (!SYMBOL_RANGES (sym))
+ range_ok = 1;
+ else
+ {
+ for (r = SYMBOL_RANGES (sym); r; r = r->next)
+ {
+ if (r->start <= fi->pc && r->end > fi->pc)
+ {
+ range_ok = 1;
+ break;
+ }
+ }
+ }
+
+ if (range_ok)
+ {
+ values_printed = 1;
+ for (j = 0; j < num_tabs; j++)
+ fputs_filtered ("\t", stream);
+ fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
+ fputs_filtered (" = ", stream);
+ print_variable_value (sym, fi, stream);
+ fprintf_filtered (stream, "\n");
+ }
+ break;
+ }
default:
/* Ignore symbols which are not locals. */
+3 -3
View File
@@ -1,6 +1,6 @@
AssemblerWriterI386.cs
IAssemblerWriter.cs
IMonoSymbolWriter.cs
MonoDwarfFileWriter.cs
MonoSymbolDocumentWriter.cs
MonoSymbolWriter.cs
MonoSymbolTable.cs
MonoSymbolTableWriter.cs
IMonoBinaryReader.cs
+3 -3
View File
@@ -1,6 +1,6 @@
topdir = ../..
LIBRARY = ../lib/Mono.CSharp.Debugger.dll
LIBRARY = $(topdir)/class/lib/Mono.CSharp.Debugger.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib
@@ -8,6 +8,6 @@ LIB_FLAGS = -r corlib
SOURCES_INCLUDE=*.cs
export MONO_PATH_PREFIX = ../lib:
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include ../library.make
include $(topdir)/class/library.make
Whitespace-only changes.
@@ -0,0 +1,141 @@
//
// Mono.Directory.LDAP.LDAP
//
// Author:
// Chris Toshok ([email protected])
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Just enough (for now) LDAP support to get System.DirectoryServices
// working.
using System;
using System.Runtime.InteropServices;
namespace Mono.Directory.LDAP
{
class TimeVal {
public int tv_sec;
public int tv_usec;
public static TimeVal FromTimeSpan (TimeSpan span) {
TimeVal tv = new TimeVal();
long nanoseconds;
/* make sure we're dealing with a positive TimeSpan */
span = span.Duration();
nanoseconds = span.Ticks * 100;
tv.tv_sec = (int)(nanoseconds / 1E+09);
tv.tv_usec = (int)((nanoseconds % 1E+09) / 1000);
return tv;
}
}
public enum SearchScope {
Base = 0x0000,
OneLevel = 0x0001,
SubTree = 0x0002
}
public class LDAP {
/* Search Scopes */
public LDAP (string uri) {
int rv;
rv = ldap_initialize (out ld, uri);
// FIXME throw something here if ldap_initialize returns an error
}
public LDAP (string host, int port) {
ld = ldap_init (host, port);
// FIXME throw something here if ldap_init fails.
}
public int BindSimple (string who, string cred) {
return ldap_simple_bind_s (ld, who, cred);
}
public int StartTLS () {
// FIXME should expose client/server ctrls
return ldap_start_tls_s (ld, (IntPtr)null, (IntPtr)null);
}
public int Search (string base_entry,
SearchScope scope,
string filter,
string[] attrs,
bool attrsonly,
TimeSpan timeOut,
int sizeLimit,
out LDAPMessage res) {
// FIXME should expose client/server ctrls
IntPtr serverctrls = new IntPtr();
IntPtr clientctrls = new IntPtr();
TimeVal tv = TimeVal.FromTimeSpan (timeOut);
IntPtr native_res;
int rv;
rv = ldap_search_ext_s (ld, base_entry, (int) scope, filter,
attrs, attrsonly ? 1 : 0,
serverctrls, clientctrls,
ref tv, sizeLimit, out native_res);
if (native_res != IntPtr.Zero)
res = new LDAPMessage (this, native_res);
else
res = null;
return rv;
}
public void Unbind () {
// FIXME should expose client/server ctrls
ldap_unbind_ext_s (ld, (IntPtr)null, (IntPtr)null);
// FIXME throw something here if ldap_unbind_ext_s returns an error
}
public IntPtr NativeLDAP {
get { return ld; }
}
[DllImport("ldap")]
static extern IntPtr ldap_init(string host, int port);
[DllImport("ldap")]
static extern int ldap_initialize(out IntPtr ld, string uri);
[DllImport("ldap")]
static extern int ldap_simple_bind_s(IntPtr ld,
string who, string cred);
[DllImport("ldap")]
static extern int ldap_start_tls_s (IntPtr ld,
IntPtr serverctrls,
IntPtr clientctrls);
[DllImport("ldap")]
static extern int ldap_search_ext_s (IntPtr ld,
string base_entry,
int scope,
string filter,
string[] attrs,
int attrsonly,
IntPtr serverctrls,
IntPtr clientctrls,
ref TimeVal timeout,
int sizelimit,
out IntPtr res);
[DllImport("ldap")]
static extern int ldap_unbind_ext_s (IntPtr ld,
IntPtr serverctrls,
IntPtr clientctrls);
IntPtr ld;
}
}
@@ -0,0 +1,134 @@
//
// Mono.Directory.LDAP.LDAPMessage
//
// Author:
// Chris Toshok ([email protected])
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Just enough (for now) LDAP support to get System.DirectoryServices
// working.
using System;
using System.Runtime.InteropServices;
namespace Mono.Directory.LDAP
{
public class LDAPMessage {
internal LDAPMessage(LDAP ld, IntPtr ldm) {
this.ld = ld;
this.ldm = ldm;
}
public LDAPMessage FirstMessage () {
IntPtr nm = ldap_first_message (ld.NativeLDAP ,ldm);
if (nm == IntPtr.Zero)
return null;
else
return new LDAPMessage (ld, nm);
}
public LDAPMessage NextMessage () {
IntPtr nm = ldap_next_message (ld.NativeLDAP ,ldm);
if (nm == IntPtr.Zero)
return null;
else
return new LDAPMessage (ld, nm);
}
public int CountMessages () {
return ldap_count_messages (ld.NativeLDAP, ldm);
}
public LDAPMessage FirstEntry() {
IntPtr nm = ldap_first_entry (ld.NativeLDAP ,ldm);
if (nm == IntPtr.Zero)
return null;
else
return new LDAPMessage (ld, nm);
}
public LDAPMessage NextEntry() {
IntPtr nm = ldap_next_entry (ld.NativeLDAP ,ldm);
if (nm == IntPtr.Zero)
return null;
else
return new LDAPMessage (ld, nm);
}
public int CountEntries() {
return ldap_count_entries (ld.NativeLDAP, ldm);
}
public string DN {
get { return ldap_get_dn (ld.NativeLDAP, ldm); }
}
[MonoTODO]
public string[] GetValues (string target) {
throw new NotImplementedException ();
/*
string[] ldap_values;
Console.WriteLine ("calling ldap_get_values ({0})", target);
ldap_values = ldap_get_values (ld.NativeLDAP, ldm, target);
if (ldap_values != null) {
string[] rv;
int i;
rv = new string[ldap_values.Length - 1];
for (i = 0; i < ldap_values.Length - 1; i ++)
rv[i] = ldap_values[i];
return rv;
}
else {
return null;
}
*/
}
[DllImport("ldap")]
extern static string ldap_get_dn (IntPtr ld, IntPtr ldm);
[DllImport("ldap")]
extern static IntPtr ldap_first_message (IntPtr ld, IntPtr ldm);
[DllImport("ldap")]
extern static IntPtr ldap_next_message (IntPtr ld, IntPtr ldm);
[DllImport("ldap")]
extern static int ldap_count_messages (IntPtr ld, IntPtr ldm);
[DllImport("ldap")]
extern static IntPtr ldap_first_entry (IntPtr ld, IntPtr ldm);
[DllImport("ldap")]
extern static IntPtr ldap_next_entry (IntPtr ld, IntPtr ldm);
[DllImport("ldap")]
extern static int ldap_count_entries (IntPtr ld, IntPtr ldm);
[DllImport("ldap")]
extern static string ldap_first_attribute (IntPtr ld, IntPtr ldm, out IntPtr ber);
[DllImport("ldap")]
extern static string ldap_next_attribute (IntPtr ld, IntPtr ldm, IntPtr ber);
/*
[DllImport("ldapglue")]
extern static void ldapsharp_get_values (IntPtr ld, IntPtr ldm, string target,
out string[] values, out int count);
*/
IntPtr ldm;
LDAP ld;
}
}
@@ -0,0 +1,30 @@
//
// MonoTests.System.DirectoryServices.AllTests, System.DirectoryServices.dll
//
// Author:
// Chris Toshok <[email protected]>
//
using NUnit.Framework;
using System;
using MonoTests.Directory.LDAP;
namespace MonoTests.Directory.LDAP {
public class AllTests : TestCase {
public AllTests (string name) : base (name)
{
}
public static ITest Suite {
get {
TestSuite suite = new TestSuite ();
suite.AddTest (BindSimpleTest.Suite);
suite.AddTest (QueryRootDSE.Suite);
return suite;
}
}
}
}
@@ -0,0 +1,43 @@
using NUnit.Framework;
using System;
using Mono.Directory.LDAP;
namespace MonoTests.Directory.LDAP
{
public class BindSimpleTest : TestCase {
public BindSimpleTest () :
base ("[MonoTests.Directory.LDAP.BindSimpleTest]'") {}
public BindSimpleTest (string name) :
base (name) {}
protected override void SetUp () {}
protected override void TearDown () {}
public static ITest Suite
{
get {
return new TestSuite (typeof (BindSimpleTest));
}
}
public void TestStuff() {
string myLDAPPath = "ldap://ldap.toshok.org";
string username = "cn=Manager,dc=toshok,dc=org", passwd = "evotest";
try {
LDAP ld = new LDAP (myLDAPPath);
ld.BindSimple (username, passwd);
Console.WriteLine("Successfully bound {0} at {1}", username, myLDAPPath);
}
catch(Exception e) {
Console.WriteLine("The '" + myLDAPPath + "' path not found.");
Console.WriteLine("Exception : " + e.Message);
}
}
}
}
@@ -0,0 +1,70 @@
using NUnit.Framework;
using System;
using Mono.Directory.LDAP;
namespace MonoTests.Directory.LDAP
{
public class QueryRootDSE : TestCase {
public QueryRootDSE () :
base ("[MonoTests.Directory.LDAP.QueryRootDSE]'") {}
public QueryRootDSE (string name) :
base (name) {}
protected override void SetUp () {}
protected override void TearDown () {}
public static ITest Suite
{
get {
return new TestSuite (typeof (QueryRootDSE));
}
}
public void TestStuff() {
string myLDAPPath = "ldap://ldap.toshok.org";
try {
LDAP ld = new LDAP (myLDAPPath);
LDAPMessage res, entry;
string[] attrs = { "+", null };
/* don't bind, we do this anonymously */
ld.Search ("" /* root dse */,
SearchScope.Base,
"(objectclass=*)",
attrs, false,
TimeSpan.FromSeconds(10), 0 /* no size limit */,
out res);
if (res == null) {
Console.WriteLine ("the search failed");
}
Console.WriteLine ("There are {0} entries", res.CountEntries());
entry = res.FirstEntry();
if (entry == null)
Console.WriteLine ("null returned from res.FirstEntry");
string[] extensions = entry.GetValues ("supportedExtension");
if (extensions != null) {
foreach( String e in extensions )
Console.WriteLine ("Supported Extension: {0}\n", e);
}
else {
Console.WriteLine ("null returned from entry.GetValues\n");
}
}
catch(Exception e) {
Console.WriteLine("The '" + myLDAPPath + "' path not found.");
Console.WriteLine("Exception : " + e.Message);
Console.WriteLine(e.StackTrace);
}
}
}
}
Whitespace-only changes.
@@ -0,0 +1,10 @@
--target library
-o dslib_linux_test.dll
--noconfig
-r ../../lib/Mono.Directory.LDAP.dll
-r ../../lib/corlib.dll
-r ../../lib/System.dll
-r ../../../nunit/NUnitCore_mono.dll
Mono.Directory.LDAP/BindSimpleTest.cs
Mono.Directory.LDAP/QueryRootDSE.cs
Mono.Directory.LDAP/AllTests.cs
@@ -0,0 +1,23 @@
topdir = ../../..
LIBRARY = dslib_linux_test.dll
LIB_LIST = dslib_linux_test.args
LIB_FLAGS = -r ../../lib/Mono.Directory.LDAP.dll -r ../../lib/corlib.dll -r ../../lib/System.dll \
-r $(topdir)/nunit/src/NUnitCore/NUnitCore_mono.dll
include ../../library.make
MCS_FLAGS = --target library --noconfig
TEST_SUITE_PREFIX = MonoTests.Directory.LDAP.
TEST_SUITE = AllTests
NUNITCONSOLE=$(topdir)/nunit/src/NUnitConsole/NUnitConsole_mono.exe
NUNIT_MONO_PATH=$(topdir)/nunit/src/NUnitCore:.
test: $(LIBRARY) run_test
.PHONY: run_test
run_test:
MONO_PATH=$(NUNIT_MONO_PATH) mono $(NUNITCONSOLE) $(TEST_SUITE_PREFIX)$(TEST_SUITE),dslib_linux_test.dll
+2
View File
@@ -0,0 +1,2 @@
Mono.Directory.LDAP/LDAP.cs
Mono.Directory.LDAP/LDAPMessage.cs
@@ -0,0 +1,14 @@
topdir = ../..
LIBRARY = ../lib/Mono.Directory.LDAP.dll
LIB_LIST = list
LIB_FLAGS = -r corlib -r System -r System.Data -r mscorlib
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=\
./Test*
export MONO_PATH_PREFIX = ../lib:
include ../library.make
@@ -0,0 +1,29 @@
//
// AboutAttribute.cs
//
// Author: Rafael Teixeira ([email protected])
//
// (C) 2002 Rafael Teixeira
//
using System;
namespace Mono
{
[AttributeUsage(AttributeTargets.Assembly)]
public class AboutAttribute : System.Attribute
{
public string Details;
public AboutAttribute(string details)
{
Details = details;
}
public override string ToString()
{
return Details;
}
}
}
@@ -0,0 +1,12 @@
using System;
namespace Mono.GetOptions
{
[AttributeUsage(AttributeTargets.Method)]
public class ArgumentProcessorAttribute : Attribute
{
public ArgumentProcessorAttribute() {}
}
}
@@ -0,0 +1,38 @@
//
// AuthorAttribute.cs
//
// Author: Rafael Teixeira ([email protected])
//
// (C) 2002 Rafael Teixeira
//
using System;
namespace Mono
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true)]
public class AuthorAttribute : System.Attribute
{
public string Name;
public string SubProject;
public AuthorAttribute(string name)
{
Name = name;
SubProject = null;
}
public AuthorAttribute(string name, string subProject)
{
Name = name;
SubProject = subProject;
}
public override string ToString()
{
if (SubProject == null)
return Name;
else
return Name + " (" + SubProject + ")";
}
}
}
+11
View File
@@ -0,0 +1,11 @@
2002-09-03 Rafael Teixeira <[email protected]>
* added AboutAttribute.cs, AuthorAttribute.cs, OptionAttribute.cs,
UsageComplementAttribute.cs, OptionDetails.cs, Options.cs.
Now reflection is used to drive de options processing.
* added GetOptTest test subproject
2002-08-30 Juli Mallett <[email protected]>
* list.unix, makefile.gnu: Added build glue for UNIX.
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// 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("GetOptTest")]
[assembly: AssemblyDescription("Mono.GetOptions Test driver")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("(C) 2002 Rafael Teixeira")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: Mono.About("Distributed under the GPL")]
[assembly: Mono.UsageComplement("some strings")]
[assembly: Mono.Author("Rafael Teixeira")]
[assembly: Mono.Author("Dean Scarff")]
//
// 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("1.0.*")]
@@ -0,0 +1,85 @@
using System;
using System.Collections;
using Mono.GetOptions;
namespace GetOptTest
{
class GetOptTestOptions : Options
{
[Option(3, "Just a testing Parameter", 'p')]
public string[] param = new string[] { "Default value" };
[Option("Just a boolean testing parameter", 't')]
public bool turnItOn = false;
private bool verboseOn = false;
[Option("Be verbose", 'v')]
public bool verbose
{
set
{
verboseOn = value;
Console.WriteLine("verbose was set to : " + verboseOn);
}
}
[Option(-1, "Execute a test routine", 's', null)]
public WhatToDoNext simpleProcedure(int dids)
{
Console.WriteLine("Inside simpleProcedure({0})", dids);
return WhatToDoNext.GoAhead;
}
[Option("Show usage syntax", 'u', "usage")]
public override WhatToDoNext DoUsage()
{
base.DoUsage();
return WhatToDoNext.GoAhead;
}
public override WhatToDoNext DoHelp() // uses parent´s OptionAttribute as is
{
base.DoHelp();
return WhatToDoNext.GoAhead;
}
public GetOptTestOptions()
{
this.ParsingMode = OptionsParsingMode.Both;
}
}
/// <summary>
/// Summary description for GetOptTester.
/// </summary>
class GetOptTester
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Console.WriteLine("------------ Original 'args'");
for(int i = 0; i < args.Length; i++)
Console.WriteLine("args[{0}] = \"{1}\"",i,args[i]);
Console.WriteLine("----------------------------------------");
Console.WriteLine("------------ GetOptions Processing");
GetOptTestOptions options = new GetOptTestOptions();
options.ProcessArgs(args);
Console.WriteLine("----------------------------------------");
Console.WriteLine("------------ Results");
if (options.param != null)
{
Console.WriteLine("Parameters supplied for 'param' were:");
foreach (string Parameter in options.param)
Console.WriteLine("\t" + Parameter);
}
for(int i = 0; i < options.RemainingArguments.Length; i++)
Console.WriteLine("remaining args[{0}] = \"{1}\"",i,options.RemainingArguments[i]);
Console.WriteLine("----------------------------------------");
}
}
}
@@ -69,7 +69,7 @@
/>
<Reference
Name = "System.XML"
AssemblyName = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
</References>
@@ -77,7 +77,31 @@
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
RelPath = "AboutAttribute.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ArgumentProcessorAttribute.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "AuthorAttribute.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ChangeLog"
BuildAction = "None"
/>
<File
RelPath = "OptionAttribute.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "OptionDetails.cs"
SubType = "Code"
BuildAction = "Compile"
/>
@@ -86,6 +110,20 @@
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Options.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ToDo"
BuildAction = "Content"
/>
<File
RelPath = "UsageComplementAttribute.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
@@ -0,0 +1,66 @@
using System;
namespace Mono.GetOptions
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)]
public class OptionAttribute : Attribute
{
public string ShortDescription;
public char ShortForm;
public string LongForm;
public int MaxOccurs; // negative means there is no limit
private void SetValues(
string shortDescription,
char shortForm,
string longForm,
int maxOccurs)
{
ShortDescription = shortDescription;
ShortForm = shortForm;
LongForm = longForm;
MaxOccurs = maxOccurs;
}
public OptionAttribute(string shortDescription)
{
SetValues(shortDescription, ' ', string.Empty, 0);
}
public OptionAttribute(string shortDescription, char shortForm)
{
SetValues(shortDescription, shortForm, string.Empty, 0);
}
public OptionAttribute(string shortDescription, char shortForm, string longForm)
{
SetValues(shortDescription, shortForm, longForm, 0);
}
public OptionAttribute(string shortDescription, string longForm)
{
SetValues(shortDescription, ' ', longForm, 0);
}
public OptionAttribute(int maxOccurs, string shortDescription)
{
SetValues(shortDescription, ' ', string.Empty, maxOccurs);
}
public OptionAttribute(int maxOccurs, string shortDescription, char shortForm)
{
SetValues(shortDescription, shortForm, string.Empty, maxOccurs);
}
public OptionAttribute(int maxOccurs, string shortDescription, char shortForm, string longForm)
{
SetValues(shortDescription, shortForm, longForm, maxOccurs);
}
public OptionAttribute(int maxOccurs, string shortDescription, string longForm)
{
SetValues(shortDescription, ' ', longForm, maxOccurs);
}
}
}
+200
View File
@@ -0,0 +1,200 @@
//
// OptionDetails.cs
//
// Author: Rafael Teixeira ([email protected])
//
// (C) 2002 Rafael Teixeira
//
using System;
using System.Collections;
using System.IO;
using System.Reflection;
namespace Mono.GetOptions
{
public enum WhatToDoNext
{
AbandonProgram,
GoAhead
}
internal class OptionDetails : IComparable
{
public char ShortForm;
public string LongForm;
public string ShortDescription;
public bool NeedsParameter;
public int MaxOccurs; // negative means there is no limit
public int Occurs;
public Options OptionBundle;
public MemberInfo MemberInfo;
public ArrayList Values;
public System.Type ParameterType;
public override string ToString()
{
string optionHelp;
// TODO: Yet not that good
optionHelp = " ";
optionHelp += (this.ShortForm != ' ') ? "-"+this.ShortForm+" " : " ";
optionHelp += (this.LongForm != string.Empty && this.LongForm != null) ? "--"+this.LongForm : "";
if (NeedsParameter)
{
if (this.LongForm != string.Empty && this.LongForm != null)
optionHelp += "=PARAM";
else
optionHelp += "PARAM";
}
optionHelp = optionHelp.PadRight(23) + " ";
optionHelp += this.ShortDescription;
return optionHelp;
}
private static System.Type TypeOfMember(MemberInfo memberInfo)
{
if ((memberInfo.MemberType == MemberTypes.Field && memberInfo is FieldInfo))
return ((FieldInfo)memberInfo).FieldType;
if ((memberInfo.MemberType == MemberTypes.Property && memberInfo is PropertyInfo))
return ((PropertyInfo)memberInfo).PropertyType;
if ((memberInfo.MemberType == MemberTypes.Method && memberInfo is MethodInfo))
{
if (((MethodInfo)memberInfo).ReturnType.FullName != typeof(WhatToDoNext).FullName)
throw new NotSupportedException("Option method must return '" + typeof(WhatToDoNext).FullName + "'");
ParameterInfo[] parameters = ((MethodInfo)memberInfo).GetParameters();
if ((parameters == null) || (parameters.Length == 0))
return null;
else
return parameters[0].ParameterType;
}
throw new NotSupportedException("'" + memberInfo.MemberType + "' memberType is not supportted");
}
public OptionDetails(MemberInfo memberInfo, OptionAttribute option, Options optionBundle)
{
this.ShortForm = option.ShortForm;
this.LongForm = (option.LongForm == string.Empty)? memberInfo.Name:option.LongForm;
this.ShortDescription = option.ShortDescription;
this.Occurs = 0;
this.OptionBundle = optionBundle;
this.MemberInfo = memberInfo;
this.NeedsParameter = false;
this.Values = null;
this.MaxOccurs = 1;
this.ParameterType = TypeOfMember(memberInfo);
if (this.ParameterType != null && this.ParameterType.FullName != "System.Boolean")
{
this.NeedsParameter = true;
if (this.ParameterType.IsArray)
{
this.Values = new ArrayList();
this.MaxOccurs = option.MaxOccurs;
}
else
{
if (this.MemberInfo is MethodInfo)
this.MaxOccurs = option.MaxOccurs;
}
}
}
internal string Key
{
get { return ((this.ShortForm != ' ') ? this.ShortForm + "" : "") + this.LongForm; }
}
int IComparable.CompareTo(object other)
{
return Key.CompareTo(((OptionDetails)other).Key);
}
public void TransferValues()
{
if (Values != null)
{
if (MemberInfo is FieldInfo)
{
((FieldInfo)MemberInfo).SetValue(OptionBundle, Values.ToArray(ParameterType.GetElementType()));
return;
}
if (MemberInfo is PropertyInfo)
{
((PropertyInfo)MemberInfo).SetValue(OptionBundle, Values.ToArray(ParameterType.GetElementType()), null);
return;
}
if ((WhatToDoNext)((MethodInfo)MemberInfo).Invoke(OptionBundle, new object[] { Values.ToArray(ParameterType.GetElementType()) }) == WhatToDoNext.AbandonProgram)
System.Environment.Exit(1);
}
}
private void DoIt(string parameter)
{
Occurs++;
if (MaxOccurs > 0 && Occurs > MaxOccurs)
throw new IndexOutOfRangeException("Option " + ShortForm + " can be used at most " + MaxOccurs + " times");
if (!NeedsParameter)
{
if (MemberInfo is FieldInfo)
{
((FieldInfo)MemberInfo).SetValue(OptionBundle, true);
return;
}
if (MemberInfo is PropertyInfo)
{
((PropertyInfo)MemberInfo).SetValue(OptionBundle, true, null);
return;
}
if ((WhatToDoNext)((MethodInfo)MemberInfo).Invoke(OptionBundle, null) == WhatToDoNext.AbandonProgram)
System.Environment.Exit(1);
return;
}
object convertedParameter = null;
if (Values != null && parameter != null)
{
convertedParameter = Convert.ChangeType(parameter, ParameterType.GetElementType());
Values.Add(convertedParameter);
return;
}
if (parameter != null)
convertedParameter = Convert.ChangeType(parameter, ParameterType);
if (MemberInfo is FieldInfo)
{
((FieldInfo)MemberInfo).SetValue(OptionBundle, convertedParameter);
return;
}
if (MemberInfo is PropertyInfo)
{
((PropertyInfo)MemberInfo).SetValue(OptionBundle, convertedParameter, null);
return;
}
if ((WhatToDoNext)((MethodInfo)MemberInfo).Invoke(OptionBundle, new object[] { convertedParameter }) == WhatToDoNext.AbandonProgram)
System.Environment.Exit(1);
}
public bool ProcessArgument(string arg, string nextArg)
{
if (arg == ("-" + ShortForm) || arg == ("--" + LongForm))
{
DoIt(nextArg);
return true;
}
return false;
}
}
}
+268 -110
View File
@@ -1,9 +1,11 @@
//
// OptionList.cs
//
// Author: Rafael Teixeira ([email protected])
// Author: Rafael Teixeira ([email protected]) (original)
// Author: Dean Scarff ([email protected]) (modifications)
//
// (C) 2002 Rafael Teixeira
// Modifications (C) 2002 Dean Scarff, distributed under the Gnu General Public License Version 2 or later
//
using System;
@@ -13,80 +15,62 @@ using System.Reflection;
namespace Mono.GetOptions
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true)]
public class AuthorAttribute : System.Attribute
{
public string Name;
public string SubProject;
public AuthorAttribute(string Name)
{
this.Name = Name;
this.SubProject = null;
}
public AuthorAttribute(string Name, string SubProject)
{
this.Name = Name;
this.SubProject = SubProject;
}
public override string ToString()
{
if (SubProject == null)
return Name;
else
return Name + " (" + SubProject + ")";
}
[Flags]
public enum OptionsParsingMode
{
Linux = 1,
Windows = 2,
Both = 3
}
enum OptionParameterType
{
None,
Integer,
Decimal, // look XML Schemas for better names
String,
Symbol,
FilePath,
FileMask,
AssemblyName,
AssemblyFileName,
AssemblyNameOrFileName
}
public delegate bool OptionFound(object Value);
/// <summary>
/// Summary description for Class1.
/// Option Parsing
/// </summary>
public class OptionList
{
struct OptionDetails
{
public char ShortForm;
public string LongForm;
public string ShortDescription;
public OptionParameterType ParameterType;
public int MinOccurs;
public int MaxOccurs; // negative means there is no limit
public object DefaultValue;
public OptionFound Dispatcher;
}
private Options optionBundle = null;
private OptionsParsingMode parsingMode;
private bool endOptionProcessingWithDoubleDash;
private string appExeName;
private string appVersion;
private string appTitle = "Add a [assembly: AssemblyTitle(\"Here goes the application name\")] to your assembly";
private string appCopyright = "Add a [assembly: AssemblyCopyright(\"(c)200n Here goes the copyright holder name\")] to your assembly";
private string appDescription = "Add a [assembly: AssemblyDescription(\"Here goes the short description\")] to your assembly";
private string appAboutDetails = "Add a [assembly: Mono.About(\"Here goes the short about details\")] to your assembly";
private string appUsageComplement = "Add a [assembly: Mono.UsageComplement(\"Here goes the usage clause complement\")] to your assembly";
private string[] appAuthors;
public readonly string usageFormat;
public readonly string aboutDetails;
private ArrayList list = new ArrayList();
private ArrayList arguments = new ArrayList();
private ArrayList argumentsTail = new ArrayList();
private MethodInfo argumentProcessor = null;
private SortedList list = new SortedList();
public string Usage
{
get
{
return "Usage: " + appExeName + " [options] " + appUsageComplement;
}
}
public string AboutDetails
{
get
{
return appAboutDetails;
}
}
#region Assembly Attributes
Assembly entry;
private object[] GetAssemblyAttributes(Type type)
{
Assembly entry = Assembly.GetEntryAssembly();
return entry.GetCustomAttributes(type, false);
}
@@ -111,99 +95,273 @@ namespace Mono.GetOptions
object[] result = GetAssemblyAttributes(type);
if ((result != null) && (result.Length > 0))
var = (string)(string)type.InvokeMember(propertyName, BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty | BindingFlags.Instance, null, result[0], new object [] {}); ;
var = (string)type.InvokeMember(propertyName, BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty | BindingFlags.Instance, null, result[0], new object [] {}); ;
}
public OptionList(string aboutDetails, string usageFormat)
private void GetAssemblyAttributeValue(Type type, ref string var)
{
this.aboutDetails = aboutDetails;
this.usageFormat = usageFormat;
object[] result = GetAssemblyAttributes(type);
if ((result != null) && (result.Length > 0))
var = result[0].ToString();
}
#endregion
#region Constructors
private void AddArgumentProcessor(MemberInfo memberInfo)
{
if (argumentProcessor != null)
throw new NotSupportedException("More than one argument processor method found");
if ((memberInfo.MemberType == MemberTypes.Method && memberInfo is MethodInfo))
{
if (((MethodInfo)memberInfo).ReturnType.FullName != typeof(void).FullName)
throw new NotSupportedException("Argument processor method must return 'void'");
ParameterInfo[] parameters = ((MethodInfo)memberInfo).GetParameters();
if ((parameters == null) || (parameters.Length != 1) || (parameters[0].ParameterType.FullName != typeof(string).FullName))
throw new NotSupportedException("Argument processor method must have a string parameter");
argumentProcessor = (MethodInfo)memberInfo;
}
else
throw new NotSupportedException("Argument processor marked member isn't a method");
}
private void Initialize(Options optionBundle)
{
if (optionBundle == null)
throw new ArgumentNullException("optionBundle");
entry = Assembly.GetEntryAssembly();
appExeName = entry.GetName().Name;
appVersion = entry.GetName().Version.ToString();
this.optionBundle = optionBundle;
this.parsingMode = optionBundle.ParsingMode ;
this.endOptionProcessingWithDoubleDash = optionBundle.EndOptionProcessingWithDoubleDash;
GetAssemblyAttributeValue(typeof(AssemblyTitleAttribute), "Title", ref appTitle);
GetAssemblyAttributeValue(typeof(AssemblyCopyrightAttribute), "Copyright", ref appCopyright);
GetAssemblyAttributeValue(typeof(AssemblyDescriptionAttribute), "Description", ref appDescription);
GetAssemblyAttributeValue(typeof(Mono.AboutAttribute), ref appAboutDetails);
GetAssemblyAttributeValue(typeof(Mono.UsageComplementAttribute), ref appUsageComplement);
appAuthors = GetAssemblyAttributeStrings(typeof(AuthorAttribute));
if (appAuthors.Length == 0)
{
appAuthors = new String[1];
appAuthors[0] = "Add one or more [assembly: Mono.GetOptions.Author(\"Here goes the author name\")] to your assembly";
}
foreach(MemberInfo mi in optionBundle.GetType().GetMembers())
{
object[] attribs = mi.GetCustomAttributes(typeof(OptionAttribute), true);
if (attribs != null && attribs.Length > 0)
list.Add(new OptionDetails(mi, (OptionAttribute)attribs[0], optionBundle));
else
{
attribs = mi.GetCustomAttributes(typeof(ArgumentProcessorAttribute), true);
if (attribs != null && attribs.Length > 0)
AddArgumentProcessor(mi);
}
}
}
private void AddGenericOption(
char shortForm,
string longForm,
string shortDescription,
OptionParameterType parameterType,
int minOccurs,
int maxOccurs,
object defaultValue,
OptionFound dispatcher)
public OptionList(Options optionBundle)
{
OptionDetails option = new OptionDetails();
option.ShortForm = shortForm;
option.LongForm = longForm;
option.ShortDescription = shortDescription;
option.ParameterType = parameterType;
option.MinOccurs = minOccurs;
option.MaxOccurs = maxOccurs;
option.DefaultValue = defaultValue;
option.Dispatcher = dispatcher;
if (shortForm == ' ')
list.Add(longForm, option);
else
list.Add(shortForm.ToString(), option);
Initialize(optionBundle);
}
public void AddAbout(char shortForm, string longForm, string shortDescription)
{
AddGenericOption(shortForm, longForm, shortDescription, OptionParameterType.None, 0, 1, null, new OptionFound(DoAbout));
}
#endregion
public void AddBooleanSwitch(char shortForm, string longForm, string shortDescription, bool defaultValue, OptionFound switcher)
{
AddGenericOption(shortForm, longForm, shortDescription, OptionParameterType.None, 0, 1, defaultValue, switcher);
}
#region Prebuilt Options
public void ShowAbout()
private void ShowTitleLines()
{
Console.WriteLine(appTitle + " - " + appCopyright);
Console.WriteLine(appTitle + " " + appVersion + " - " + appCopyright);
Console.WriteLine(appDescription);
Console.WriteLine();
Console.WriteLine(aboutDetails);
}
private void ShowAbout()
{
ShowTitleLines();
Console.WriteLine(appAboutDetails);
Console.WriteLine();
Console.WriteLine("Authors:");
foreach(string s in appAuthors)
Console.WriteLine ("\t" + s);
}
private bool DoAbout(object nothing)
private void ShowHelp()
{
ShowAbout();
return true;
ShowTitleLines();
Console.WriteLine(Usage);
Console.WriteLine("Options:");
foreach (OptionDetails option in list)
Console.WriteLine(option);
}
public void ShowUsage()
private void ShowUsage()
{
Console.WriteLine(appTitle + " - " + appCopyright);
Console.Write("Usage: ");
Console.WriteLine(usageFormat);
// TODO: list registered options here
foreach (DictionaryEntry option in list)
Console.WriteLine(option.Value.ToString());
Console.WriteLine(Usage);
Console.Write("Short Options: ");
foreach (OptionDetails option in list)
Console.Write((option.ShortForm != ' ') ? option.ShortForm.ToString() : "");
Console.WriteLine();
}
public void ShowUsage(string errorMessage)
private void ShowUsage(string errorMessage)
{
Console.WriteLine(errorMessage);
Console.WriteLine("ERROR: " + errorMessage.TrimEnd());
ShowUsage();
}
public void ProcessArgs(string[] args)
internal WhatToDoNext DoUsage()
{
ShowUsage();
return WhatToDoNext.AbandonProgram;
}
internal WhatToDoNext DoAbout()
{
ShowAbout();
return WhatToDoNext.GoAhead;
}
internal WhatToDoNext DoHelp()
{
ShowHelp();
return WhatToDoNext.AbandonProgram;
}
#endregion
#region Arguments Processing
public string[] NormalizeArgs(string[] args)
{
bool ParsingOptions = true;
ArrayList result = new ArrayList();
foreach(string arg in args)
{
if (ParsingOptions)
{
if (endOptionProcessingWithDoubleDash && (arg == "--"))
{
ParsingOptions = false;
continue;
}
if ((parsingMode & OptionsParsingMode.Windows) > 0)
{
if ((arg.Length == 2) && (arg[0] == '/')) // Windows options only come in this fashion
{
result.Add("-" + arg[1]); // translate to Linux style
continue;
}
}
if ((parsingMode & OptionsParsingMode.Linux) > 0)
{
if ((arg[0] == '-') && (arg[1] != '-'))
{
foreach(char c in arg.Substring(1)) // many single-letter options
result.Add("-" + c); // expand into individualized options
continue;
}
if (arg.StartsWith("--"))
{
result.AddRange(arg.Split('=')); // put in the same form of one-letter options with a parameter
continue;
}
}
}
else
{
argumentsTail.Add(arg);
continue;
}
// if nothing else matches then it get here
result.Add(arg);
}
return (string[])result.ToArray(typeof(string));
}
public string[] ProcessArgs(string[] args)
{
string arg;
string nextArg;
bool OptionWasProcessed;
list.Sort();
args = NormalizeArgs(args);
try
{
int argc = args.Length;
for(int i = 0; i < argc; i++)
{
arg = args[i];
if (i+1 < argc)
{
nextArg = args[i+1];
if (nextArg.StartsWith("-"))
nextArg = null;
}
else
nextArg = null;
OptionWasProcessed = false;
if (arg.StartsWith("-"))
{
foreach(OptionDetails option in list)
{
if (option.ProcessArgument(arg, nextArg))
{
OptionWasProcessed = true;
if (nextArg != null)
i++;
break;
}
}
}
if (!OptionWasProcessed)
arguments.Add(arg);
}
foreach(OptionDetails option in list)
option.TransferValues();
foreach(string argument in argumentsTail)
arguments.Add(argument);
if (argumentProcessor == null)
return (string[])arguments.ToArray(typeof(string));
foreach(string argument in arguments)
argumentProcessor.Invoke(optionBundle, new object[] { argument });
}
catch (Exception ex)
{
ShowUsage(ex.Message);
System.Environment.Exit(1);
}
return null;
}
#endregion
}
}
+47
View File
@@ -0,0 +1,47 @@
using System;
namespace Mono.GetOptions
{
public class Options
{
public OptionsParsingMode ParsingMode;
public bool EndOptionProcessingWithDoubleDash;
private OptionList optionParser;
public string[] RemainingArguments;
public Options()
{
ParsingMode = OptionsParsingMode.Both;
EndOptionProcessingWithDoubleDash = true;
}
public void ProcessArgs(string[] args)
{
optionParser = new OptionList(this);
RemainingArguments = optionParser.ProcessArgs(args);
}
[Option("Show this help list", '?',"help")]
public virtual WhatToDoNext DoHelp()
{
return optionParser.DoHelp();
}
[Option("Display version and licensing information", 'V',"version")]
public virtual WhatToDoNext DoAbout()
{
return optionParser.DoAbout();
}
[Option("Show usage syntax and exit", ' ',"usage")]
public virtual WhatToDoNext DoUsage()
{
return optionParser.DoUsage();
}
}
}
@@ -0,0 +1,29 @@
//
// UsageComplementAttribute.cs
//
// Author: Rafael Teixeira ([email protected])
//
// (C) 2002 Rafael Teixeira
//
using System;
namespace Mono
{
[AttributeUsage(AttributeTargets.Assembly)]
public class UsageComplementAttribute : System.Attribute
{
public string Details;
public UsageComplementAttribute(string details)
{
Details = details;
}
public override string ToString()
{
return Details;
}
}
}
+8
View File
@@ -0,0 +1,8 @@
AssemblyInfo.cs
AboutAttribute.cs
AuthorAttribute.cs
OptionAttribute.cs
UsageComplementAttribute.cs
OptionList.cs
OptionDetails.cs
Options.cs
+13
View File
@@ -0,0 +1,13 @@
topdir = ../..
LIBRARY = $(topdir)/class/lib/Mono.GetOptions.dll
LIB_LIST = list.unix
LIB_FLAGS = -r System.Data -r System.Xml
SOURCES_INCLUDE=*.cs
export MONO_PATH_PREFIX = $(topdir)/class/lib:
include $(topdir)/class/library.make
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
namespace Mono.PEToolkit {
public class BadImageException : Exception {
public BadImageException() : base()
{
}
public BadImageException(string msg) : base(msg)
{
}
}
}
+159
View File
@@ -0,0 +1,159 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Mono.PEToolkit {
/// <summary>
/// IMAGE_FILE_HEADER
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential)]
public struct COFFHeader {
internal MachineId machine;
internal short sections;
internal uint tdStampRaw;
internal uint symTabPtr;
internal uint numSymbols;
internal short optHeaderSize;
internal Characteristics characteristics;
/// <summary>
/// Machine identifier.
/// </summary>
public MachineId Machine {
get {
return machine;
}
set {
machine = value;
}
}
/// <summary>
/// </summary>
public short NumberOfSections {
get {
return sections;
}
set {
sections = value;
}
}
/// <summary>
/// </summary>
public uint TimeDateStamp {
get {
return tdStampRaw;
}
set {
tdStampRaw = value;
}
}
/// <summary>
/// </summary>
public DateTime TimeStamp {
get {
return (new DateTime(1970, 1, 1) +
TimeSpan.FromSeconds(tdStampRaw)).ToLocalTime();
}
}
/// <summary>
/// </summary>
public uint PointerToSymbolTable {
get {
return symTabPtr;
}
set {
symTabPtr = value;
}
}
/// <summary>
/// </summary>
public uint NumberOfSymbols {
get {
return numSymbols;
}
set {
numSymbols = value;
}
}
/// <summary>
/// </summary>
public short SizeOfOptionalHeader {
get {
return optHeaderSize;
}
set {
optHeaderSize = value;
}
}
/// <summary>
/// </summary>
public Characteristics Characteristics {
get {
return characteristics;
}
set {
characteristics = value;
}
}
/// <summary>
/// </summary>
unsafe public void Read(BinaryReader reader) {
fixed (void* pThis = &this) {
PEUtils.ReadStruct(reader, pThis, sizeof (COFFHeader), typeof (COFFHeader));
}
}
/// <summary>
/// </summary>
/// <param name="writer"></param>
public void Dump(TextWriter writer)
{
writer.WriteLine(
"Machine ID : {0}" + Environment.NewLine +
"Sections : {1}" + Environment.NewLine +
"timestamp : {2}" + Environment.NewLine +
"Characteristics : {3}" + Environment.NewLine,
machine, sections,
TimeStamp + " (" + tdStampRaw.ToString("X") + ")",
characteristics + " (0x" + characteristics.ToString("X") + ")"
);
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString()
{
StringWriter sw = new StringWriter();
Dump(sw);
return sw.ToString();
}
}
}
+165
View File
@@ -0,0 +1,165 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
namespace Mono.PEToolkit {
[Flags]
public enum Characteristics : ushort {
/// <summary>
/// Relocation info stripped from file.
/// </summary>
/// <remarks>
/// IMAGE_FILE_RELOCS_STRIPPED
/// </remarks>
RELOCS_STRIPPED = 0x0001,
/// <summary>
/// File is executable
/// (i.e. file is neither object file nor library file,
/// so there are no unresolved externel references).
/// </summary>
/// <remarks>
/// IMAGE_FILE_EXECUTABLE_IMAGE
/// </remarks>
EXECUTABLE_IMAGE = 0x0002,
/// <summary>
/// Line nunbers stripped from file.
/// </summary>
/// <remarks>
/// IMAGE_FILE_LINE_NUMS_STRIPPED
/// </remarks>
LINE_NUMS_STRIPPED = 0x0004,
/// <summary>
/// Local symbols stripped from file.
/// </summary>
/// <remarks>
/// IMAGE_FILE_LOCAL_SYMS_STRIPPED
/// </remarks>
LOCAL_SYMS_STRIPPED = 0x0008,
/// <summary>
/// Agressively trim working set
/// </summary>
/// <remarks>
/// IMAGE_FILE_AGGRESIVE_WS_TRIM
/// </remarks>
AGGRESIVE_WS_TRIM = 0x0010,
/// <summary>
/// App can handle >2gb addresses
/// </summary>
/// <remarks>
/// IMAGE_FILE_LARGE_ADDRESS_AWARE
/// </remarks>
LARGE_ADDRESS_AWARE = 0x0020,
/// <summary>
/// Bytes of machine word are reversed.
/// </summary>
/// <remarks>
/// IMAGE_FILE_BYTES_REVERSED_LO
/// </remarks>
BYTES_REVERSED_LO = 0x0080,
/// <summary>
/// 32 bit word machine.
/// </summary>
/// <remarks>
/// IMAGE_FILE_32BIT_MACHINE
/// </remarks>
MACHINE_32BIT = 0x0100,
/// <summary>
/// Debugging info stripped from file in .DBG file
/// </summary>
/// <remarks>
/// IMAGE_FILE_DEBUG_STRIPPED
/// </remarks>
DEBUG_STRIPPED = 0x0200,
/// <summary>
/// If Image is on removable media, copy and run from the swap file.
/// </summary>
/// <remarks>
/// IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP
/// </remarks>
REMOVABLE_RUN_FROM_SWAP = 0x0400,
/// <summary>
/// If Image is on Net, copy and run from the swap file.
/// </summary>
/// <remarks>
/// IMAGE_FILE_NET_RUN_FROM_SWAP
/// </remarks>
NET_RUN_FROM_SWAP = 0x0800,
/// <summary>
/// This flag is used to indicate that the file
/// is a system sile, such as device driver.
/// </summary>
/// <remarks>
/// IMAGE_FILE_SYSTEM
/// </remarks>
SYSTEM = 0x1000,
/// <summary>
/// This flag indicates that the file
/// is a dynamic library (DLL).
/// </summary>
/// <remarks>
/// IMAGE_FILE_DLL
/// </remarks>
DLL = 0x2000,
/// <summary>
/// File should only be run on a uni-processor (UP) machine.
/// </summary>
/// <remarks>
/// IMAGE_FILE_UP_SYSTEM_ONLY
/// </remarks>
UP_SYSTEM_ONLY = 0x4000,
/// <summary>
/// Bytes of machine word are reversed.
/// </summary>
/// <remarks>
/// IMAGE_FILE_BYTES_REVERSED_HI
/// </remarks>
BYTES_REVERSED_HI = 0x8000,
/// <summary>
/// Default flags that must be set in CIL-only image.
/// </summary>
/// <remarks>
/// See Partition II, 24.2.2.1
/// </remarks>
CIL_DEFAULT = LINE_NUMS_STRIPPED |
LOCAL_SYMS_STRIPPED |
DEBUG_STRIPPED
}
}
+96
View File
@@ -0,0 +1,96 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
// see http://cvs.winehq.com/cvsweb/wine/dlls/imagehlp/modify.c
// starting from Revision 1.8
using System;
using System.IO;
namespace Mono.PEToolkit {
public sealed class CheckSum {
private CheckSum()
{
// Never instantiated.
}
public static uint Calc(string peFile)
{
uint res = 0;
FileInfo pe = new FileInfo(peFile);
if (!pe.Exists) {
throw new Exception("CheckSum : Invalid file path.");
}
using (BinaryReader reader = new BinaryReader(pe.OpenRead())) {
if (!reader.BaseStream.CanSeek) {
throw new Exception("Can't seek.");
}
DOSHeader dosHdr = new DOSHeader();
COFFHeader coffHdr = new COFFHeader();
PEHeader peHdr = new PEHeader();
dosHdr.Read (reader);
reader.BaseStream.Position = dosHdr.lfanew;
ExeSignature peSig = (ExeSignature) reader.ReadUInt16();
if (peSig != ExeSignature.NT) {
throw new BadImageException("Checksum : Invalid image format, cannot find PE signature.");
}
peSig = (ExeSignature) reader.ReadUInt16();
if (peSig != ExeSignature.NT2) {
throw new BadImageException("Checksum : Invalid image format, cannot find PE signature.");
}
coffHdr.Read(reader);
peHdr.Read(reader);
uint oldSum = peHdr.CheckSum;
reader.BaseStream.Position = 0;
long len = pe.Length;
long whole = len >> 1;
uint sum = 0;
uint hi, lo;
for (long i = whole; --i >= 0;) {
sum += reader.ReadUInt16();
hi = sum >> 16;
if (hi != 0) {
sum = hi + (sum & 0xFFFF);
}
}
if ((len & 1L) != 0) {
sum += (uint) reader.ReadByte();
hi = sum >> 16;
if (hi != 0) {
sum = hi + (sum & 0xFFFF);
}
}
// fix low word of checksum
lo = oldSum & 0xFFFF;
if ((sum & 0xFFFF) >= lo) {
sum -= lo;
} else {
sum = (((sum & 0xFFFF) - lo) & 0xFFFF) - 1;
}
// fix high word of checksum
hi = oldSum >> 16;
if ((sum & 0xFFFF) >= hi) {
sum -= hi;
} else {
sum = (((sum & 0xFFFF) - hi) & 0xFFFF) - 1;
}
}
return res;
}
}
}
+335
View File
@@ -0,0 +1,335 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.IO;
using System.Runtime.InteropServices;
using Mono.PEToolkit.Metadata;
namespace Mono.PEToolkit {
[Flags]
public enum CorFlags : uint {
/// <summary>
/// COMIMAGE_FLAGS_ILONLY
/// </summary>
ILONLY = 0x00000001,
/// <summary>
/// COMIMAGE_FLAGS_32BITREQUIRED
/// </summary>
REQUIRED_32BIT = 0x00000002,
/// <summary>
/// COMIMAGE_FLAGS_IL_LIBRARY
/// </summary>
IL_LIBRARY = 0x00000004,
/// <summary>
/// COMIMAGE_FLAGS_TRACKDEBUGDATA
/// </summary>
TRACKDEBUGDATA = 0x00010000,
}
/// <summary>
/// CLR 2.0 header structure.
/// IMAGE_COR20_HEADER
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential)]
public struct CorHeader {
// Header versioning
internal uint cb;
internal short runtimeMaj;
internal short runtimeMin;
// Symbol table and startup information.
internal DataDir meta;
internal CorFlags flags;
internal uint entryTok;
// Binding information.
internal DataDir rsrc;
internal DataDir strongSig;
// Regular fixup and binding information.
internal DataDir codeManTab;
internal DataDir vtab;
internal DataDir jumps;
// Managed Native Code.
internal DataDir eeInfo;
internal DataDir helper;
internal DataDir dynInfo;
internal DataDir delayInfo;
internal DataDir modImg;
internal DataDir extFixups;
internal DataDir ridMap;
internal DataDir dbgMap;
// obsolete?
internal DataDir ipMap;
//
// Accessors
//
public uint Size {
get {
return cb;
}
set {
cb = value;
}
}
public short MajorRuntimeVersion {
get {
return runtimeMaj;
}
set {
runtimeMaj = value;
}
}
public short MinorRuntimeVersion {
get {
return runtimeMin;
}
set {
runtimeMin = value;
}
}
public string RuntimeVersion {
get {
return String.Format("{0}.{1}", runtimeMaj, runtimeMin);
}
}
public DataDir MetaData {
get {
return meta;
}
set {
meta = value;
}
}
public CorFlags Flags {
get {
return flags;
}
set {
flags = value;
}
}
public MDToken EntryPointToken {
get {
return entryTok;
}
set {
entryTok = value;
}
}
public DataDir Resources {
get {
return rsrc;
}
set {
rsrc = value;
}
}
public DataDir StrongNameSignature {
get {
return strongSig;
}
set {
strongSig = value;
}
}
public DataDir CodeManagerTable {
get {
return codeManTab;
}
set {
codeManTab = value;
}
}
public DataDir VTableFixups {
get {
return vtab;
}
set {
vtab = value;
}
}
public DataDir ExportAddressTableJumps {
get {
return jumps;
}
set {
jumps = value;
}
}
public DataDir EEInfoTable {
get {
return eeInfo;
}
set {
eeInfo = value;
}
}
public DataDir HelperTable {
get {
return helper;
}
set {
helper = value;
}
}
public DataDir DynamicInfo {
get {
return dynInfo;
}
set {
dynInfo = value;
}
}
public DataDir DelayLoadInfo {
get {
return delayInfo;
}
set {
delayInfo = value;
}
}
public DataDir ModuleImage {
get {
return modImg;
}
set {
modImg = value;
}
}
public DataDir ExternalFixups {
get {
return extFixups;
}
set {
extFixups = value;
}
}
public DataDir RidMap {
get {
return ridMap;
}
set {
ridMap = value;
}
}
public DataDir DebugMap {
get {
return dbgMap;
}
set {
dbgMap = value;
}
}
public DataDir IPMap {
get {
return ipMap;
}
set {
ipMap = value;
}
}
unsafe public void Read(BinaryReader reader)
{
// TODO: clear structure before reading to initialize/reset
// unused fields. initblk would be great.
// Read exactly the number of bytes as specified in the header.
// This number is duplicated in PEHeader::CLIHdrDir.
cb = reader.ReadUInt32();
if (cb > sizeof(uint)) {
fixed (void* ptr = &this.runtimeMaj, pThis = &this) {
PEUtils.ReadStruct(reader, ptr, (int)cb - sizeof (uint));
if (!System.BitConverter.IsLittleEndian) {
// fix entries on big-endian machine
// preserving cb
uint oldcb = cb;
PEUtils.ChangeStructEndianess(pThis, typeof (CorHeader));
cb = oldcb;
}
}
}
}
public void Dump(TextWriter writer)
{
writer.WriteLine(String.Format (
"Header Size : {0}" + Environment.NewLine +
"Runtime Version : {1}" + Environment.NewLine +
"MetaData Root : {2}" + Environment.NewLine +
"Flags : {3}" + Environment.NewLine +
"Entry Point Token : {4}" + Environment.NewLine +
"Resources : {5}" + Environment.NewLine +
"Strong Name Signature : {6}" + Environment.NewLine +
"Code Manager Table : {7}" + Environment.NewLine +
"VTable Fixups : {8}" + Environment.NewLine +
"Export Address Table Jumps : {9}" + Environment.NewLine +
"EE Info Table : {10}" + Environment.NewLine +
"Helper Table : {11}" + Environment.NewLine +
"Dynamic Info : {12}" + Environment.NewLine +
"Delay Load Info : {13}" + Environment.NewLine +
"Module Image : {14}" + Environment.NewLine +
"External Fixups : {15}" + Environment.NewLine +
"Rid Map : {16}" + Environment.NewLine +
"Debug Map : {17}" + Environment.NewLine +
"IP Map : {18}" + Environment.NewLine,
cb + String.Format(" (0x{0})", cb.ToString("X")),
RuntimeVersion,
meta, flags, EntryPointToken,
rsrc, strongSig,
codeManTab, vtab, jumps,
eeInfo, helper, dynInfo, delayInfo, modImg, extFixups,
ridMap, dbgMap, ipMap
));
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString() {
StringWriter sw = new StringWriter();
Dump(sw);
return sw.ToString();
}
}
}
+114
View File
@@ -0,0 +1,114 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Mono.PEToolkit {
[StructLayout(LayoutKind.Explicit)]
public struct DOSHeader {
// Magic number (ExeSignature.DOS).
[FieldOffset(0*2)] public ExeSignature magic;
// Bytes on last page of file.
[FieldOffset(1*2)] public short cblp;
// Pages in file.
[FieldOffset(2*2)] public short cp;
// Relocations.
[FieldOffset(3*2)] public short crlc;
// Size of header in paragraphs.
[FieldOffset(4*2)] public short cparhdr;
// Minimum extra paragraphs needed.
[FieldOffset(5*2)] public short minalloc;
// Maximum extra paragraphs needed.
[FieldOffset(6*2)] public short maxalloc;
// Initial (relative) SS value.
[FieldOffset(7*2)] public short ss;
// Initial SP value.
[FieldOffset(8*2)] public short sp;
// Checksum.
[FieldOffset(9*2)] public short csum;
// Initial IP value.
[FieldOffset(10*2)] public short ip;
// Initial (relative) CS value.
[FieldOffset(11*2)] public short cs;
// File address of relocation table.
[FieldOffset(12*2)] public short lfarlc;
// Overlay number.
[FieldOffset(13*2)] public short ovno;
// Reserved words.
// short[4] res;
// OEM identifier (for e_oeminfo).
[FieldOffset(18*2)] public short oemid;
// OEM information; e_oemid specific.
[FieldOffset(19*2)] public short oeminfo;
// Reserved words
// short[10] res2;
// File address of new exe header.
[FieldOffset(30*2)] public uint lfanew;
/// <summary>
/// </summary>
unsafe public void Read(BinaryReader reader)
{
fixed (void* pThis = &this) {
PEUtils.ReadStruct(reader, pThis, sizeof (DOSHeader), typeof (DOSHeader));
}
}
/// <summary>
/// </summary>
/// <param name="writer"></param>
public void Dump(TextWriter writer)
{
writer.WriteLine(
"Number of pages : {0}" + Environment.NewLine +
"Bytes on last pages : {1}" + Environment.NewLine +
"New header offset : {2}" + Environment.NewLine +
"Initial CS:IP : {3}:{4}" + Environment.NewLine +
"Initial SS:SP : {5}:{6}" + Environment.NewLine +
"Overlay number : {7}" + Environment.NewLine,
cp, cblp,
lfanew + " (0x" + lfanew.ToString("X") + ")",
cs.ToString("X"), ip.ToString("X"),
ss.ToString("X"), sp.ToString("X"),
ovno
);
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString()
{
StringWriter sw = new StringWriter();
Dump(sw);
return sw.ToString();
}
}
}
+90
View File
@@ -0,0 +1,90 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.Runtime.InteropServices;
namespace Mono.PEToolkit {
/// <summary>
/// IMAGE_DATA_DIRECTORY.
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential)]
public struct DataDir {
public static readonly DataDir Null;
public RVA virtAddr;
public uint size;
static DataDir ()
{
Null.virtAddr = 0;
Null.size = 0;
}
public RVA VirtualAddress {
get {
return virtAddr;
}
set {
virtAddr = value;
}
}
public uint Size {
get {
return size;
}
set {
size = value;
}
}
public bool IsNull {
get {
return (this == Null);
}
}
public override int GetHashCode()
{
return (virtAddr.GetHashCode() ^ (int)(size << 1));
}
public override bool Equals(object obj)
{
bool res = (obj is DataDir);
if (res) {
DataDir that = (DataDir) obj;
res = (this.virtAddr == that.virtAddr) &&
(this.size == that.size);
}
return res;
}
public static bool operator == (DataDir d1, DataDir d2)
{
return d1.Equals(d2);
}
public static bool operator != (DataDir d1, DataDir d2)
{
return !d1.Equals(d2);
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString()
{
if (this.IsNull) return "NULL";
return String.Format("RVA = {0}, size = 0x{1}", virtAddr, size.ToString("X"));
}
}
}
+58
View File
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
namespace Mono.PEToolkit {
public enum ExeSignature : ushort {
UNKNOWN = 0,
/// <summary>
/// "MZ"
/// </summary>
/// <remarks>
/// IMAGE_DOS_SIGNATURE
/// </remarks>
DOS = 0x5A4D,
/// <summary>
/// "NE"
/// </summary>
/// <remarks>
/// IMAGE_OS2_SIGNATURE
/// </remarks>
OS2 = 0x454E,
/// <summary>
/// "LE"
/// </summary>
/// <remarks>
/// IMAGE_OS2_SIGNATURE_LE
/// </remarks>
OS2_LE = 0x454C,
/// <summary>
/// "LE"
/// </summary>
/// <remarks>
/// IMAGE_VXD_SIGNATURE
/// </remarks>
VXD = OS2_LE,
/// <summary>
/// "PE", the complete signature is "PE\0\0"
/// (that is, NT followed by NT2).
/// </summary>
/// <remarks>
/// IMAGE_NT_SIGNATURE
/// </remarks>
NT = 0x4550,
NT2 = 0
}
}
+239
View File
@@ -0,0 +1,239 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.IO;
using System.Collections;
using System.Runtime.InteropServices;
using Mono.PEToolkit.Metadata;
namespace Mono.PEToolkit {
public class Image : IDisposable {
internal DOSHeader dosHdr;
internal COFFHeader coffHdr;
internal PEHeader peHdr;
internal CorHeader corHdr;
internal Hashtable sections;
// File position right after PEHeader (NT Optional Header).
protected long sectionsPos;
private MetaDataRoot mdRoot;
private string name;
private bool open;
internal BinaryReader reader;
public Image(string name)
{
this.name = name;
open = false;
reader = null;
mdRoot = null;
dosHdr = new DOSHeader();
coffHdr = new COFFHeader();
peHdr = new PEHeader();
corHdr = new CorHeader();
sections = new Hashtable();
sectionsPos = -1;
}
~Image()
{
Close();
}
public Hashtable Sections {
get {
return sections;
}
}
public void Open()
{
lock (this) if (!open) {
FileInfo pe = new FileInfo(name);
if (!pe.Exists) {
throw new Exception("Invalid file path.");
}
reader = new BinaryReader(new BufferedStream(pe.OpenRead()));
if (!reader.BaseStream.CanSeek) {
throw new Exception("Can't seek.");
}
open = true;
}
}
public void Close()
{
lock (this) if (open) {
reader.Close();
open = false;
}
}
// IDisposable
public void Dispose()
{
Close();
}
public bool IsCLI {
get {
return peHdr.IsCLIImage;
}
}
public MetaDataRoot MetadataRoot {
get {
return mdRoot;
}
}
/// <summary>
/// </summary>
public void ReadHeaders()
{
if (!open) {
throw new Exception("You must open image before trying to read it.");
}
dosHdr.Read(reader);
reader.BaseStream.Position = dosHdr.lfanew;
ExeSignature peSig = (ExeSignature) reader.ReadUInt16();
if (peSig != ExeSignature.NT) {
throw new Exception ("Invalid image format: cannot find PE signature.");
}
peSig = (ExeSignature) reader.ReadUInt16();
if (peSig != ExeSignature.NT2) {
throw new Exception ("Invalid image format: cannot find PE signature.");
}
coffHdr.Read(reader);
peHdr.Read(reader);
sectionsPos = reader.BaseStream.Position;
ReadSections();
if (this.IsCLI) {
reader.BaseStream.Position = RVAToVA(peHdr.CLIHdrDir.virtAddr);
corHdr.Read(reader);
mdRoot = new MetaDataRoot(this);
reader.BaseStream.Position = RVAToVA(corHdr.MetaData.virtAddr);
mdRoot.Read(reader);
}
}
/// <summary>
/// </summary>
protected void ReadSections()
{
if (sectionsPos < 0) {
throw new Exception("Read headers first.");
}
reader.BaseStream.Position = sectionsPos;
int n = coffHdr.NumberOfSections;
for (int i = n; --i >=0;) {
Section sect = new Section();
sect.Read(reader);
sections [sect.Name] = sect;
}
}
/// <summary>
/// </summary>
/// <param name="writer"></param>
public void Dump(TextWriter writer)
{
writer.WriteLine (
dosHdr.ToString() + Environment.NewLine +
coffHdr.ToString() + Environment.NewLine +
peHdr.ToString() + Environment.NewLine +
corHdr.ToString()
);
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString()
{
StringWriter sw = new StringWriter();
Dump(sw);
return sw.ToString();
}
/// <summary>
/// Returns name of the section for the given RVA.
/// </summary>
/// <param name="rva"></param>
/// <returns></returns>
public string RVAToSectionName(RVA rva)
{
string res = null;
foreach (Section s in Sections.Values) {
RVA sva = s.VirtualAddress;
if (rva >= sva && rva < sva + s.SizeOfRawData) {
res = s.Name;
break;
}
}
return res;
}
public long RVAToVA(RVA rva)
{
string sectName = RVAToSectionName(rva);
long res = 0;
if (sectName != null) {
Section s = (Section) Sections [sectName];
res = rva + (s.PointerToRawData - s.VirtualAddress);
}
return res;
}
public MetaDataRoot MetaDataRoot {
get {
return mdRoot;
}
}
public void DumpStreamHeader(TextWriter writer, string name)
{
if (mdRoot == null || name == null || name == String.Empty || writer == null) return;
writer.Write(name + " header: ");
MDStream s = MetaDataRoot.Streams[name] as MDStream;
if (s != null) {
writer.WriteLine();
writer.WriteLine(s);
} else {
writer.WriteLine("not present.");
writer.WriteLine();
}
}
public void DumpStreamHeader(string name)
{
DumpStreamHeader(Console.Out, name);
}
}
}
+251
View File
@@ -0,0 +1,251 @@
// Auto-generated file - DO NOT EDIT!
// Please edit bitconverter.xsl if you want to make changes.
using System;
namespace Mono.PEToolkit {
/// <summary>
/// Little-endian bit converter.
/// </summary>
public sealed class LEBitConverter {
internal interface IConverter {
short ToInt16(byte [] val, int idx);
ushort ToUInt16(byte [] val, int idx);
int ToInt32(byte [] val, int idx);
uint ToUInt32(byte [] val, int idx);
long ToInt64(byte [] val, int idx);
ulong ToUInt64(byte [] val, int idx);
}
public static readonly bool Native = System.BitConverter.IsLittleEndian;
private static readonly IConverter impl = System.BitConverter.IsLittleEndian
? new LEConverter() as IConverter
: new BEConverter() as IConverter;
private LEBitConverter()
{
// Never instantiated.
}
///<summary></summary>
unsafe public static short SwapInt16(short x)
{
short* p = stackalloc short [1];
*p = x;
byte* bp = (byte*) p;
byte b = bp [0];
bp [0] = bp [1];
bp [1] = b;
return *p;
}
///<summary></summary>
unsafe public static ushort SwapUInt16(ushort x)
{
ushort* p = stackalloc ushort [1];
*p = x;
byte* bp = (byte*) p;
byte b = bp [0];
bp [0] = bp [1];
bp [1] = b;
return *p;
}
///<summary></summary>
unsafe public static int SwapInt32(int x)
{
int* p = stackalloc int [1];
*p = x;
byte* bp = (byte*) p;
byte b = bp [0];
bp [0] = bp [3];
bp [3] = b;
b = bp [1];
bp [1] = bp [2];
bp [2] = b;
return *p;
}
///<summary></summary>
unsafe public static uint SwapUInt32(uint x)
{
uint* p = stackalloc uint [1];
*p = x;
byte* bp = (byte*) p;
byte b = bp [0];
bp [0] = bp [3];
bp [3] = b;
b = bp [1];
bp [1] = bp [2];
bp [2] = b;
return *p;
}
///<summary></summary>
unsafe public static long SwapInt64(long x)
{
long* p = stackalloc long [1];
*p = x;
byte* bp = (byte*) p;
byte b = bp [0];
bp [0] = bp [7];
bp [7] = b;
b = bp [1];
bp [1] = bp [6];
bp [6] = b;
b = bp [2];
bp [2] = bp [5];
bp [5] = b;
b = bp [3];
bp [3] = bp [4];
bp [4] = b;
return *p;
}
///<summary></summary>
unsafe public static ulong SwapUInt64(ulong x)
{
ulong* p = stackalloc ulong [1];
*p = x;
byte* bp = (byte*) p;
byte b = bp [0];
bp [0] = bp [7];
bp [7] = b;
b = bp [1];
bp [1] = bp [6];
bp [6] = b;
b = bp [2];
bp [2] = bp [5];
bp [5] = b;
b = bp [3];
bp [3] = bp [4];
bp [4] = b;
return *p;
}
internal sealed class LEConverter : IConverter {
///<summary></summary>
public short ToInt16(byte [] val, int idx)
{
return BitConverter.ToInt16(val, idx);
}
///<summary></summary>
public ushort ToUInt16(byte [] val, int idx)
{
return BitConverter.ToUInt16(val, idx);
}
///<summary></summary>
public int ToInt32(byte [] val, int idx)
{
return BitConverter.ToInt32(val, idx);
}
///<summary></summary>
public uint ToUInt32(byte [] val, int idx)
{
return BitConverter.ToUInt32(val, idx);
}
///<summary></summary>
public long ToInt64(byte [] val, int idx)
{
return BitConverter.ToInt64(val, idx);
}
///<summary></summary>
public ulong ToUInt64(byte [] val, int idx)
{
return BitConverter.ToUInt64(val, idx);
}
}
internal sealed class BEConverter : IConverter {
///<summary></summary>
public short ToInt16(byte [] val, int idx)
{
return SwapInt16(BitConverter.ToInt16(val, idx));
}
///<summary></summary>
public ushort ToUInt16(byte [] val, int idx)
{
return SwapUInt16(BitConverter.ToUInt16(val, idx));
}
///<summary></summary>
public int ToInt32(byte [] val, int idx)
{
return SwapInt32(BitConverter.ToInt32(val, idx));
}
///<summary></summary>
public uint ToUInt32(byte [] val, int idx)
{
return SwapUInt32(BitConverter.ToUInt32(val, idx));
}
///<summary></summary>
public long ToInt64(byte [] val, int idx)
{
return SwapInt64(BitConverter.ToInt64(val, idx));
}
///<summary></summary>
public ulong ToUInt64(byte [] val, int idx)
{
return SwapUInt64(BitConverter.ToUInt64(val, idx));
}
}
///<summary></summary>
public static short ToInt16(byte [] val, int idx)
{
return impl.ToInt16(val, idx);
}
///<summary></summary>
public static ushort ToUInt16(byte [] val, int idx)
{
return impl.ToUInt16(val, idx);
}
///<summary></summary>
public static int ToInt32(byte [] val, int idx)
{
return impl.ToInt32(val, idx);
}
///<summary></summary>
public static uint ToUInt32(byte [] val, int idx)
{
return impl.ToUInt32(val, idx);
}
///<summary></summary>
public static long ToInt64(byte [] val, int idx)
{
return impl.ToInt64(val, idx);
}
///<summary></summary>
public static ulong ToUInt64(byte [] val, int idx)
{
return impl.ToUInt64(val, idx);
}
}
}
+257
View File
@@ -0,0 +1,257 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
namespace Mono.PEToolkit {
public enum MachineId : ushort {
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_UNKNOWN
/// </remarks>
UNKNOWN = 0,
/// <summary>
/// Intel 386.
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_I386
/// </remarks>
I386 = 0x014c,
/// <summary>
/// Intel 486.
/// </summary>
/// <remarks>
/// </remarks>
I486 = 0x014d,
/// <summary>
/// Intel Pentium.
/// </summary>
/// <remarks>
/// </remarks>
PENTIUM = 0x014e,
/// <summary>
/// MIPS 3K big-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_R3000
/// </remarks>
R3000_BE = 0x0160,
/// <summary>
/// MIPS 3K little-endian, 0x160 big-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_R3000
/// </remarks>
R3000 = 0x0162,
/// <summary>
/// MIPS 4K little-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_R4000
/// </remarks>
R4000 = 0x0166,
/// <summary>
/// MIPS little-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_R10000
/// </remarks>
R10000 = 0x0168,
/// <summary>
/// MIPS little-endian WCE v2
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_WCEMIPSV2
/// </remarks>
WCEMIPSV2 = 0x0169,
/// <summary>
/// Alpha_AXP
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_ALPHA
/// </remarks>
ALPHA = 0x0184,
/// <summary>
/// SH3 little-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_SH3
/// </remarks>
SH3 = 0x01a2,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_SH3DSP
/// </remarks>
SH3DSP = 0x01a3,
/// <summary>
/// SH3E little-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_SH3E
/// </remarks>
SH3E = 0x01a4,
/// <summary>
/// SH4 little-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_SH4
/// </remarks>
SH4 = 0x01a6,
/// <summary>
/// SH5
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_SH5
/// </remarks>
SH5 = 0x01a8,
/// <summary>
/// ARM Little-Endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_ARM
/// </remarks>
ARM = 0x01c0,
/// <summary>
/// ARM 10 Thumb family CPU.
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_THUMB
/// http://www.arm.com/armtech/ARM10_Thumb?OpenDocument&ExpandSection=2
/// </remarks>
THUMB = 0x01c2,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_AM33
/// </remarks>
AM33 = 0x01d3,
/// <summary>
/// IBM PowerPC Little-Endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_POWERPC
/// </remarks>
POWERPC = 0x01F0,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_POWERPCFP
/// </remarks>
POWERPCFP = 0x01f1,
/// <summary>
/// Intel 64
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_IA64
/// </remarks>
IA64 = 0x0200,
/// <summary>
/// MIPS
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_MIPS16
/// </remarks>
MIPS16 = 0x0266,
/// <summary>
/// ALPHA64
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_ALPHA64
/// </remarks>
ALPHA64 = 0x0284,
/// <summary>
/// MIPS
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_MIPSFPU
/// </remarks>
MIPSFPU = 0x0366,
/// <summary>
/// MIPS
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_MIPSFPU16
/// </remarks>
MIPSFPU16 = 0x0466,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_AXP64
/// </remarks>
AXP64 = ALPHA64,
/// <summary>
/// Infineon
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_TRICORE
/// http://www.infineon.com/tricore
/// </remarks>
TRICORE = 0x0520,
/// <summary>
/// Common Executable Format (Windows CE).
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_CEF
/// </remarks>
CEF = 0x0CEF,
/// <summary>
/// EFI Byte Code
/// </summary>
EBC = 0x0EBC,
/// <summary>
/// AMD64 (K8)
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_AMD64
/// </remarks>
AMD64 = 0x8664,
/// <summary>
/// M32R little-endian
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_M32R
/// </remarks>
M32R = 0x9104,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_FILE_MACHINE_CEE
/// </remarks>
CEE = 0xC0EE,
}
}
+558
View File
@@ -0,0 +1,558 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Mono.PEToolkit {
// IMAGE_OPTIONAL_HEADER
[StructLayoutAttribute(LayoutKind.Sequential)]
public struct PEHeader {
/// <summary>
/// Standard PE/COFF fields.
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential)]
public struct StdFields {
internal short magic; // always 0x10B?
internal byte lMajor;
internal byte lMinor;
internal uint codeSize;
internal uint initDataSize;
internal uint uninitDataSize;
internal RVA entryRVA;
internal RVA codeBase;
internal RVA dataBase;
/// <summary>
/// </summary>
public string LinkerVersion {
get {
return String.Format("{0}.{1}", lMajor, lMinor);
}
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString() {
return String.Format(
"Magic : 0x{0}" + Environment.NewLine +
"Linker ver. : {1}" + Environment.NewLine +
"Size of code : {2}" + Environment.NewLine +
"Size of initialized data : {3}" + Environment.NewLine +
"Size of uinitialized data (BSS) : {4}" + Environment.NewLine,
magic.ToString("X"), LinkerVersion,
codeSize, initDataSize, uninitDataSize
);
}
}
/// <summary>
/// Windows-specific fields.
/// </summary>
/// <remarks>
/// See Partition II, 24.2.3.2
/// </remarks>
[StructLayoutAttribute(LayoutKind.Sequential)]
public struct NTFields {
internal uint imgBase;
internal uint sectAlign;
internal uint fileAlign;
internal short osMaj;
internal short osMin;
internal short imgMaj;
internal short imgMin;
internal short subSysMaj;
internal short subSysMin;
internal int reserved_win32ver;
internal uint imgSize;
internal uint hdrSize;
internal uint chksum;
internal Subsystem subSys;
internal short dllFlags;
internal uint stackRes;
internal uint stackCommit;
internal uint heapRes;
internal uint heapCommit;
internal uint ldrFlags;
internal uint numDirs;
public string OSVersion {
get {
return String.Format("{0}.{1}", osMaj, osMin);
}
}
public string ImageVersion {
get {
return String.Format("{0}.{1}", imgMaj, imgMin);
}
}
public string SubsysVersion {
get {
return String.Format("{0}.{1}", subSysMaj, subSysMin);
}
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString() {
return String.Format(
"Image Base : 0x{0}" + Environment.NewLine +
"Section Alignment : 0x{1}" + Environment.NewLine +
"File Alignment : 0x{2}" + Environment.NewLine +
"OS Version : {3}" + Environment.NewLine +
"Image Version : {4}" + Environment.NewLine +
"Subsystem Version : {5}" + Environment.NewLine +
"Reserved/Win32Ver : {6}" + Environment.NewLine +
"Image Size : {7}" + Environment.NewLine +
"Header Size : {8}" + Environment.NewLine +
"Checksum : 0x{9}" + Environment.NewLine +
"Subsystem : {10}" + Environment.NewLine +
"DLL Flags : {11}" + Environment.NewLine +
"Stack Reserve Size : 0x{12}" + Environment.NewLine +
"Stack Commit Size : 0x{13}" + Environment.NewLine +
"Heap Reserve Size : 0x{14}" + Environment.NewLine +
"Heap Commit Size : 0x{15}" + Environment.NewLine +
"Loader Flags : {16}" + Environment.NewLine +
"Number of Directories : {17}" + Environment.NewLine,
imgBase.ToString("X"), sectAlign.ToString("X"), fileAlign.ToString("X"),
OSVersion, ImageVersion, SubsysVersion,
reserved_win32ver,
imgSize, hdrSize, chksum.ToString("X"), subSys, dllFlags,
stackRes.ToString("X"), stackCommit.ToString("X"), heapRes.ToString("X"), heapCommit.ToString ("X"),
ldrFlags, numDirs
);
}
}
internal StdFields stdFlds;
internal NTFields ntFlds;
internal DataDir exportDir;
internal DataDir importDir;
internal DataDir resourceDir;
internal DataDir exceptionDir;
internal DataDir securityDir;
internal DataDir baseRelocDir;
internal DataDir debugDir;
internal DataDir copyrightDir;
internal DataDir GPDir;
internal DataDir TLSDir;
internal DataDir loadCfgDir;
internal DataDir boundImpDir;
internal DataDir IATDir;
internal DataDir delayImpDir;
internal DataDir CLIHdrDir;
internal DataDir reservedDir;
public bool IsCLIImage {
get {
return (CLIHdrDir.virtAddr.Value != 0);
}
}
//
// Accessors for standard COFF fields.
//
public short Magic {
get {
return stdFlds.magic;
}
set {
stdFlds.magic = value;
}
}
public byte MajorLinkerVersion {
get {
return stdFlds.lMajor;
}
set {
stdFlds.lMajor = value;
}
}
public byte MinorLinkerVersion {
get {
return stdFlds.lMinor;
}
set {
stdFlds.lMinor = value;
}
}
public uint SizeOfCode {
get {
return stdFlds.codeSize;
}
set {
stdFlds.codeSize = value;
}
}
public uint SizeOfInitializedData {
get {
return stdFlds.initDataSize;
}
set {
stdFlds.initDataSize = value;
}
}
public uint SizeOfUninitializedData {
get {
return stdFlds.uninitDataSize;
}
set {
stdFlds.uninitDataSize = value;
}
}
public RVA AddressOfEntryPoint {
get {
return stdFlds.entryRVA;
}
set {
stdFlds.entryRVA.value = value.value;
}
}
public RVA BaseOfCode {
get {
return stdFlds.codeBase;
}
set {
stdFlds.codeBase.value = value.value;
}
}
public RVA BaseOfData {
get {
return stdFlds.dataBase;
}
set {
stdFlds.dataBase.value = value.value;
}
}
//
// Accessors for Windows-specific fields.
//
/// <summary>
/// Preferred address of image when loaded into memory.
/// </summary>
/// <remarks>
/// <para>
/// This is a linear address and not RVA,
/// and must be a multiple of 64K.
/// </para>
/// <para>
/// Table in the Partition II states that for CIL images
/// it must be 0x400000.
/// </para>
/// </remarks>
public uint ImageBase {
get {
return ntFlds.imgBase;
}
set {
ntFlds.imgBase = value;
}
}
/// <summary>
/// Alignment of section when loaded into memory.
/// </summary>
/// <remarks>
/// Must be greater or equal to FileAlignment.
/// Default is the native page size.
/// According to specs for CIL images it must be set to 8K.
/// </remarks>
public uint SectionAlignment {
get {
return ntFlds.sectAlign;
}
set {
ntFlds.sectAlign = value;
}
}
/// <summary>
/// Byte alignment of pages in image file.
/// </summary>
/// <remarks>
/// Valid values are powers of 2 between 512 and 64K.
/// For CIL images it must be either 512 or 4K.
/// </remarks>
public uint FileAlignment {
get {
return ntFlds.fileAlign;
}
set {
ntFlds.fileAlign = value;
}
}
public short MajorOperatingSystemVersion {
get {
return ntFlds.osMaj;
}
set {
ntFlds.osMaj = value;
}
}
public short MinorOperatingSystemVersion {
get {
return ntFlds.osMin;
}
set {
ntFlds.osMin = value;
}
}
public short MajorImageVersion {
get {
return ntFlds.imgMaj;
}
set {
ntFlds.imgMaj = value;
}
}
public short MinorImageVersion {
get {
return ntFlds.imgMin;
}
set {
ntFlds.imgMin = value;
}
}
public short MajorSubsystemVersion {
get {
return ntFlds.subSysMaj;
}
set {
ntFlds.subSysMaj = value;
}
}
public short MinorSubsystemVersion {
get {
return ntFlds.subSysMin;
}
set {
ntFlds.subSysMin = value;
}
}
public int Win32VersionValue {
get {
return ntFlds.reserved_win32ver;
}
set {
ntFlds.reserved_win32ver = value;
}
}
public int Reserved {
get {
return ntFlds.reserved_win32ver;
}
set {
ntFlds.reserved_win32ver = value;
}
}
public uint SizeOfImage {
get {
return ntFlds.imgSize;
}
set {
ntFlds.imgSize = value;
}
}
public uint SizeOfHeaders {
get {
return ntFlds.hdrSize;
}
set {
ntFlds.hdrSize = value;
}
}
public uint CheckSum {
get {
return ntFlds.chksum;
}
set {
ntFlds.chksum = value;
}
}
public Subsystem Subsystem {
get {
return ntFlds.subSys;
}
set {
ntFlds.subSys = value;
}
}
public short DllCharacteristics {
get {
return ntFlds.dllFlags;
}
set {
ntFlds.dllFlags = value;
}
}
public uint SizeOfStackReserve {
get {
return ntFlds.stackRes;
}
set {
ntFlds.stackRes = value;
}
}
public uint SizeOfStackCommit {
get {
return ntFlds.stackCommit;
}
set {
ntFlds.stackCommit = value;
}
}
public uint SizeOfHeapReserve {
get {
return ntFlds.heapRes;
}
set {
ntFlds.heapRes = value;
}
}
public uint SizeOfHeapCommit {
get {
return ntFlds.heapCommit;
}
set {
ntFlds.heapCommit = value;
}
}
public uint LoaderFlags {
get {
return ntFlds.ldrFlags;
}
set {
ntFlds.ldrFlags = value;
}
}
public uint NumberOfRvaAndSizes {
get {
return ntFlds.numDirs;
}
set {
ntFlds.numDirs = value;
}
}
/// <summary>
/// </summary>
unsafe public void Read(BinaryReader reader)
{
fixed (void* pThis = &this) {
int hdrSize = sizeof (StdFields) + sizeof (NTFields);
PEUtils.ReadStruct(reader, pThis, hdrSize);
PEUtils.ReadStruct(reader, (byte*)pThis + hdrSize, (int) NumberOfRvaAndSizes * sizeof (DataDir));
if (!System.BitConverter.IsLittleEndian) {
PEUtils.ChangeStructEndianess(pThis, typeof (PEHeader));
}
}
}
/// <summary>
/// </summary>
public void Dump(TextWriter writer)
{
string dirs = String.Format(
"Export Table : {0}" + Environment.NewLine +
"Import Table : {1}" + Environment.NewLine +
"Win32 Resource Table : {2}" + Environment.NewLine +
"Exception Table : {3}" + Environment.NewLine +
"Certificate Table : {4}" + Environment.NewLine +
"Base Relocation Table : {5}" + Environment.NewLine +
"Debug Table : {6}" + Environment.NewLine +
"Copyright : {7}" + Environment.NewLine +
"MIPS Global Ptr : {8}" + Environment.NewLine +
"TLS Table : {9}" + Environment.NewLine +
"Load Config Table : {10}" + Environment.NewLine +
"Bound Import : {11}" + Environment.NewLine +
"IAT : {12}" + Environment.NewLine +
"Delay Import Descriptor : {13}" + Environment.NewLine +
"CLI Header : {14}" + Environment.NewLine +
"Reserved : {15}" + Environment.NewLine,
exportDir, importDir, resourceDir, exceptionDir,
securityDir, baseRelocDir, debugDir, copyrightDir,
GPDir, TLSDir, loadCfgDir, boundImpDir, IATDir, delayImpDir,
CLIHdrDir, reservedDir
);
writer.WriteLine(
stdFlds.ToString() + Environment.NewLine +
ntFlds.ToString() + Environment.NewLine +
"Directories: "+ Environment.NewLine +
dirs
);
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString()
{
StringWriter sw = new StringWriter();
Dump(sw);
return sw.ToString();
}
}
}
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- NAnt build file for Mono.PEToolkit.dll -->
<project name="Mono.PEToolkit" default="build">
<property name="debug" value="false"/>
<target name="build">
<mkdir dir="../lib"/>
<csc target="library" output="../lib/Mono.PEToolkit.dll" debug="${debug}">
<arg value="/unsafe"/>
<arg value="/noconfig"/> <!-- don't reference ms assemblies -->
<arg value="/lib:../lib/"/>
<sources>
<includes name="**/*.cs"/>
</sources>
</csc>
</target>
<target name="clean">
<delete file="../lib/Mono.PEToolkit.dll" failonerror="false"/>
</target>
</project>
+161
View File
@@ -0,0 +1,161 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
namespace Mono.PEToolkit {
public sealed class PEUtils {
private PEUtils()
{
}
/// <summary>
/// Reads structure from the input stream preserving its endianess.
/// </summary>
/// <param name="reader"></param>
/// <param name="pStruct"></param>
/// <param name="len"></param>
unsafe internal static void ReadStruct(BinaryReader reader, void* pStruct, int len)
{
byte* p = (byte*) pStruct;
if (System.BitConverter.IsLittleEndian) {
// On a little-endian machine read data in 64-bit chunks,
// this won't work on big-endian machine because
// BinaryReader APIs are little-endian while
// memory writes are platform-native.
// This seems faster than ReadBytes/Copy method
// in the "else" clause, especially if used often
// (no extra memory allocation for byte[]?).
int whole = len >> 3;
int rem = len & 7;
for (int i = whole; --i >= 0;) {
long qw = reader.ReadInt64();
Marshal.WriteInt64((IntPtr) p, qw);
p += sizeof (long);
}
for (int i = rem; --i >= 0;) {
*p++ = (byte) reader.ReadByte();
}
} else {
byte [] buff = reader.ReadBytes(len);
Marshal.Copy(buff, 0, (IntPtr) p, len);
}
}
/// <summary>
/// Reads structure from the input stream
/// changing its endianess if required
/// (if running on big-endian hardware).
/// </summary>
/// <param name="reader"></param>
/// <param name="pStruct"></param>
/// <param name="len"></param>
/// <param name="type"></param>
unsafe internal static void ReadStruct(BinaryReader reader, void* pStruct, int len, Type type)
{
ReadStruct(reader, pStruct, len);
if (!System.BitConverter.IsLittleEndian) {
ChangeStructEndianess(pStruct, type);
}
}
unsafe private static int SwapByTypeCode(byte* p, TypeCode tcode)
{
int inc = 0;
switch (tcode) {
case TypeCode.Int16 :
short* sp = (short*) p;
short sx = *sp;
sx = LEBitConverter.SwapInt16(sx);
*sp = sx;
inc = sizeof (short);
break;
case TypeCode.UInt16 :
ushort* usp = (ushort*) p;
ushort usx = *usp;
usx = LEBitConverter.SwapUInt16(usx);
*usp = usx;
inc = sizeof (ushort);
break;
case TypeCode.Int32 :
int* ip = (int*) p;
int ix = *ip;
ix = LEBitConverter.SwapInt32(ix);
*ip = ix;
inc = sizeof (int);
break;
case TypeCode.UInt32 :
uint* uip = (uint*) p;
uint uix = *uip;
uix = LEBitConverter.SwapUInt32(uix);
*uip = uix;
inc = sizeof (uint);
break;
case TypeCode.Int64 :
long* lp = (long*) p;
long lx = *lp;
lx = LEBitConverter.SwapInt64(lx);
*lp = lx;
inc = sizeof (long);
break;
case TypeCode.UInt64 :
ulong* ulp = (ulong*) p;
ulong ulx = *ulp;
ulx = LEBitConverter.SwapUInt64(ulx);
*ulp = ulx;
inc = sizeof (ulong);
break;
case TypeCode.Byte :
case TypeCode.SByte :
inc = sizeof (byte);
break;
default :
break;
}
return inc;
}
unsafe internal static int ChangeStructEndianess(void* pStruct, Type type)
{
if (type == null || !type.IsValueType) return 0;
if (!type.IsLayoutSequential && !type.IsExplicitLayout) {
throw new Exception("Internal error: struct must have explicit or sequential layout.");
}
bool seq = type.IsLayoutSequential;
byte* p = (byte*) pStruct;
int offs = 0;
int inc;
FieldInfo [] fields = type.GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
foreach (FieldInfo fi in fields) {
if (!seq) offs = Marshal.OffsetOf(type, fi.Name).ToInt32 ();
Type ft = fi.FieldType;
TypeCode tcode = Type.GetTypeCode(ft);
if (tcode == TypeCode.Object) {
// not a primitive type, process recursively.
inc = ChangeStructEndianess(p + offs, ft);
} else {
inc = SwapByTypeCode(p + offs, tcode);
}
if (seq) offs += inc;
}
return offs;
}
}
}
+1
View File
@@ -0,0 +1 @@
The PEToolkit was authored by Sergey Chaban ([email protected])
+117
View File
@@ -0,0 +1,117 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
namespace Mono.PEToolkit {
/// <summary>
/// Relative Virtual Address.
/// </summary>
public struct RVA {
public static readonly RVA Null;
public uint value;
static RVA()
{
Null = new RVA(0);
}
public RVA(uint val)
{
value = val;
}
public uint Value {
get {
return value;
}
set {
this.value = value;
}
}
public static implicit operator RVA (uint val)
{
return new RVA(val);
}
public static implicit operator uint (RVA rva)
{
return rva.value;
}
public override int GetHashCode()
{
return (int) value;
}
public override bool Equals(object o)
{
bool res = o is RVA;
if (res) res = (this.value == ((RVA)o).value);
return res;
}
public static bool operator == (RVA rva1, RVA rva2)
{
return rva1.Equals(rva2);
}
public static bool operator != (RVA rva1, RVA rva2)
{
return !rva1.Equals(rva2);
}
public static bool operator < (RVA rva1, RVA rva2)
{
return (rva1.value < rva2.value);
}
public static bool operator > (RVA rva1, RVA rva2) {
return (rva1.value > rva2.value);
}
public static bool operator <= (RVA rva1, RVA rva2)
{
return (rva1.value <= rva2.value);
}
public static bool operator >= (RVA rva1, RVA rva2)
{
return (rva1.value >= rva2.value);
}
public static RVA operator + (RVA rva, uint x)
{
return new RVA (rva.value + x);
}
public static RVA operator - (RVA rva, uint x)
{
return new RVA (rva.value - x);
}
public override string ToString()
{
if (this == Null) return "NULL";
return ("0x" + value.ToString("X"));
}
unsafe public static int Size {
get {
return sizeof (uint);
}
}
}
}
+175
View File
@@ -0,0 +1,175 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;
namespace Mono.PEToolkit {
public class Section {
// IMAGE_SECTION_HEADER
[StructLayoutAttribute(LayoutKind.Sequential)]
public struct Header {
internal uint phAddr_virtSize;
internal RVA virtAddr;
internal uint rawSize;
internal RVA rawDataPtr;
internal RVA relocPtr;
internal RVA lineNumPtr;
internal short relocNum;
internal short linenumNum;
internal SectionCharacteristics flags;
}
private string name;
internal Header hdr;
public readonly static Section Invalid;
static Section()
{
Invalid = new Section();
}
public Section()
{
}
public string Name {
get {
return name;
}
set {
name = value;
}
}
public uint PhysicalAddress {
get {
return hdr.phAddr_virtSize;
}
set {
hdr.phAddr_virtSize = value;
}
}
public uint VirtualSize {
get {
return hdr.phAddr_virtSize;
}
set {
hdr.phAddr_virtSize = value;
}
}
public RVA VirtualAddress {
get {
return hdr.virtAddr;
}
set {
hdr.virtAddr = value;
}
}
public uint SizeOfRawData {
get {
return hdr.rawSize;
}
set {
hdr.rawSize = value;
}
}
public RVA PointerToRawData {
get {
return hdr.rawDataPtr;
}
set {
hdr.rawDataPtr = value;
}
}
public RVA PointerToRelocations {
get {
return hdr.relocPtr;
}
set {
hdr.relocPtr = value;
}
}
public RVA PointerToLinenumbers {
get {
return hdr.lineNumPtr;
}
set {
hdr.lineNumPtr = value;
}
}
public short NumberOfRelocations {
get {
return hdr.relocNum;
}
set {
hdr.relocNum = value;
}
}
public short NumberOfLinenumbers {
get {
return hdr.linenumNum;
}
set {
hdr.linenumNum = value;
}
}
public SectionCharacteristics Characteristics {
get {
return hdr.flags;
}
set {
hdr.flags = value;
}
}
/// <summary>
/// </summary>
unsafe public void Read(BinaryReader reader)
{
sbyte* pName = stackalloc sbyte [8];
sbyte* p = pName;
for (int i = 8; --i >=0;) {
sbyte c = reader.ReadSByte();
if (c == 0) break;
*p++ = c;
}
int len = (int) (p - pName);
if (len != 0) {
name = new string(pName, 0, len, Encoding.ASCII);
} else {
name = String.Empty;
}
reader.BaseStream.Position += 8 - len - 1;
fixed (void* pHdr = &this.hdr) {
PEUtils.ReadStruct(reader, pHdr, sizeof (Header), typeof (Header));
}
}
}
}
@@ -0,0 +1,192 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
using System;
namespace Mono.PEToolkit {
[Flags]
public enum SectionCharacteristics : uint {
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_TYPE_REG = 0x00000000,
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_TYPE_DSECT = 0x00000001,
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_TYPE_NOLOAD = 0x00000002,
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_TYPE_GROUP = 0x00000004,
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_TYPE_NO_PAD = 0x00000008,
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_TYPE_COPY = 0x00000010,
/// <summary>
/// Section contains code.
/// </summary>
IMAGE_SCN_CNT_CODE = 0x00000020,
/// <summary>
/// Section contains initialized data.
/// </summary>
IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,
/// <summary>
/// Section contains uninitialized data.
/// </summary>
IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_LNK_OTHER = 0x00000100,
/// <summary>
/// Section contains comments or some other type of information.
/// </summary>
IMAGE_SCN_LNK_INFO = 0x00000200,
/// <summary>
/// Reserved.
/// </summary>
IMAGE_SCN_TYPE_OVER = 0x00000400,
/// <summary>
/// Section contents will not become part of image.
/// </summary>
IMAGE_SCN_LNK_REMOVE = 0x00000800,
/// <summary>
/// Section contents comdat.
/// </summary>
IMAGE_SCN_LNK_COMDAT = 0x00001000,
/// <summary>
/// Reset speculative exceptions handling bits in the TLB entries for this section.
/// </summary>
/// <remarks>
/// IMAGE_SCN_MEM_PROTECTED - Obsolete.
/// </remarks>
IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000,
/// <summary>
/// Section content can be accessed relative to GP (MIPS).
/// </summary>
IMAGE_SCN_GPREL = 0x00008000,
/// <summary>
/// </summary>
IMAGE_SCN_MEM_FARDATA = 0x00008000,
/// <summary>
/// Obsolete.
/// </summary>
IMAGE_SCN_MEM_PURGEABLE = 0x00020000,
/// <summary>
/// Obsolete.
/// </summary>
IMAGE_SCN_MEM_16BIT = 0x00020000,
/// <summary>
/// Obsolete.
/// </summary>
IMAGE_SCN_MEM_LOCKED = 0x00040000,
/// <summary>
/// Obsolete.
/// </summary>
IMAGE_SCN_MEM_PRELOAD = 0x00080000,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
/// </remarks>
IMAGE_SCN_ALIGN_1BYTES = 0x00100000,
IMAGE_SCN_ALIGN_2BYTES = 0x00200000,
IMAGE_SCN_ALIGN_4BYTES = 0x00300000,
IMAGE_SCN_ALIGN_8BYTES = 0x00400000,
// default alignment
IMAGE_SCN_ALIGN_16BYTES = 0x00500000,
IMAGE_SCN_ALIGN_32BYTES = 0x00600000,
IMAGE_SCN_ALIGN_64BYTES = 0x00700000,
IMAGE_SCN_ALIGN_128BYTES = 0x00800000,
IMAGE_SCN_ALIGN_256BYTES = 0x00900000,
IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,
IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,
IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,
IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,
IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,
IMAGE_SCN_ALIGN_MASK = 0x00F00000,
/// <summary>
/// Section contains extended relocations.
/// </summary>
IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000,
/// <summary>
/// Section can be discarded.
/// </summary>
IMAGE_SCN_MEM_DISCARDABLE = 0x02000000,
/// <summary>
/// Section is not cachable.
/// </summary>
IMAGE_SCN_MEM_NOT_CACHED = 0x04000000,
/// <summary>
/// Section is not pageable.
/// </summary>
IMAGE_SCN_MEM_NOT_PAGED = 0x08000000,
/// <summary>
/// Section is shareable.
/// </summary>
IMAGE_SCN_MEM_SHARED = 0x10000000,
/// <summary>
/// Section is executable.
/// </summary>
IMAGE_SCN_MEM_EXECUTE = 0x20000000,
/// <summary>
/// Section is readable.
/// </summary>
IMAGE_SCN_MEM_READ = 0x40000000,
/// <summary>
/// Section is writeable.
/// </summary>
IMAGE_SCN_MEM_WRITE = 0x80000000,
/// <summary>
/// TLS index is scaled.
/// </summary>
IMAGE_SCN_SCALE_INDEX = 0x00000001,
}
}
+111
View File
@@ -0,0 +1,111 @@
/*
* Copyright (c) 2002 Sergey Chaban <[email protected]>
*/
namespace Mono.PEToolkit {
/// <summary>
/// </summary>
public enum Subsystem : short {
/// <summary>
/// Unknown subsystem.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_UNKNOWN
/// </remarks>
UNKNOWN = 0,
/// <summary>
/// Image doesn't require a subsystem.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_NATIVE
/// </remarks>
NATIVE = 1,
/// <summary>
/// Image runs in the Windows GUI subsystem.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_WINDOWS_GUI
/// </remarks>
WINDOWS_GUI = 2,
/// <summary>
/// Image runs in the Windows character subsystem.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_WINDOWS_CUI
/// </remarks>
WINDOWS_CUI = 3,
/// <summary>
/// Image runs in the OS/2 character subsystem.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_OS2_CUI
/// </remarks>
OS2_CUI = 5,
/// <summary>
/// Image runs in the Posix character subsystem.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_POSIX_CUI
/// </remarks>
POSIX_CUI = 7,
/// <summary>
/// Image is a native Win9x driver.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_NATIVE_WINDOWS
/// </remarks>
NATIVE_WINDOWS = 8,
/// <summary>
/// Image runs in the Windows CE subsystem.
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_WINDOWS_CE_GUI
/// </remarks>
WINDOWS_CE_GUI = 9,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_EFI_APPLICATION
/// </remarks>
EFI_APPLICATION = 10,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER
/// </remarks>
EFI_BOOT_SERVICE_DRIVER = 11,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER
/// </remarks>
EFI_RUNTIME_DRIVER = 12,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_EFI_ROM
/// </remarks>
EFI_ROM = 13,
/// <summary>
/// </summary>
/// <remarks>
/// IMAGE_SUBSYSTEM_XBOX
/// </remarks>
XBOX = 14,
}
}
+60
View File
@@ -0,0 +1,60 @@
using System;
using System.IO;
using Mono.PEToolkit;
using Mono.PEToolkit.Metadata;
public sealed class MDDump {
private MDDump() {}
public static uint Dump (string peFile)
{
using (Image pe = new Image (peFile)) {
pe.Open ();
pe.ReadHeaders ();
Console.WriteLine (pe);
if (pe.IsCLI) {
pe.DumpStreamHeader("#~");
pe.DumpStreamHeader("#-");
pe.DumpStreamHeader("#Strings");
pe.DumpStreamHeader("#US");
pe.DumpStreamHeader("#GUID");
pe.DumpStreamHeader("#Blob");
Console.WriteLine("CLI image detected, dumping metadata tables.");
TablesHeap tabs = pe.MetaDataRoot.TablesHeap;
foreach (MDTable t in tabs.Tables) {
t.Dump (Console.Out);
}
/*
MethodIL il = pe.MetaDataRoot.GetMethodBody(1);
Console.WriteLine(il);
il.DumpHexBytecode(Console.Out);
*/
}
}
return 0;
}
public static void Main (string [] args) {
if (args.Length == 0) {
Console.WriteLine ("mddump <PE file>");
} else {
Dump (args [0]);
}
}
}
+33
View File
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<project name="PET" default="all" basedir=".">
<target name="init">
<tstamp/>
<echo message="Init..."/>
<property name="debug" value="false"/>
<property name="src.dir" value="..\src"/>
<property name="bin.dir" value="..\bin"/>
</target>
<target name="compile" depends="init">
<csc target="library" output="${bin.dir}/pet.dll" debug="${debug}">
<arg value="/unsafe"/>
<sources basedir="..\src\PEToolkit">
<includes name="**/*.cs"/>
</sources>
</csc>
<csc target="exe" output="${bin.dir}/mddump.exe" debug="${debug}">
<sources>
<includes name="mddump.cs"/>
</sources>
<arg value="/reference:..\bin\pet.dll"/>
</csc>
</target>
<target name="all" depends="init,compile">
</target>
</project>
+14
View File
@@ -0,0 +1,14 @@
@echo off
set X=cscript //nologo xslt.wsf /inFile:data\md-schema.xml
: dir /b /on *.cs > common.src
:cscript //nologo xslt.wsf /inFile:bitconv-types.xml /styleFile:bitconverter.xsl
%X% /styleFile:table-id.xsl > code\TableId.cs
%X% /styleFile:coded-id.xsl > code\CodedTokenId.cs
%X% /styleFile:elem-type.xsl > code\ElementType.cs
%X% /styleFile:tabs-decoder.xsl > code\TabsDecoder.cs
%X% /styleFile:tabs-base.xsl > code\TablesHeapBase.cs
%X% /styleFile:rows.xsl > code\Rows.cs
%X% /styleFile:tabs.xsl > code\Tables.cs
Loaded 100 of 1200 files, more files were not shown because too many files have changed in this diff. Show more