Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17007 lines (11456 sloc) 557.446 kB
2010-02-23 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.DoAbortInvocation): Use Thread.Abort() to abort the
invocation if we have runtime support for it.
2010-02-24 Martin Baulig <martin@ximian.com>
* frontend/Main.cs: Don't deadlock when leaving a nested
break state.
* backend/SingleSteppingEngine.cs
(SSE.ProcessEvent): On `ChildEventType.RUNTIME_INVOKE_DONE':
terminate the current operation if it's different from the rti.
* classes/Operation.cs
(OperationCommandResult.Completed): Send the result before
signalling the wait handle.
2010-02-24 Martin Baulig <martin@ximian.com>
* backend/server/x86_64-arch.c
(server_ptrace_call_method_invoke): Set correct return address to
make this work even if the stack is executable.
2010-02-23 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.DoAbortInvocation): Disallow aborting if there are any
non-managed frames on the stack.
2010-02-23 Martin Baulig <martin@ximian.com>
* languages/TargetNullObject.cs: New file.
(TargetNullObject): New public class.
* languages/mono/MonoNullObject.cs: Removed.
(MonoNullObject): Removed; use `TargetNullObject' instead.
2010-02-23 Martin Baulig <martin@ximian.com>
* backend/os/DwarfReader.cs
(DwarfReader): Don't crash, if the .debug_aranges,
.debug_pubnames, .debug_pubtypes or .debug_str section is
missing.
2010-01-08 Martin Baulig <martin@ximian.com>
Fix #559045.
* languages/mono/MonoArrayType.cs
(MonoArrayType.GetElementSize): Add support for enums.
* languages/mono/MonoArrayObject.cs
(MonoArrayObject.GetDynamicSize): Use
MonoArrayTpe.GetElementSize().
2010-01-08 Martin Baulig <martin@ximian.com>
Fix #510995.
* frontend/Expression.cs
(CastExpression.DoCast): Allow `object' -> 'object'.
(Convert.ImplicitConversion): Allow `string' -> `object'.
2009-12-04 Martin Baulig <martin@ximian.com>
* backend/BreakpointHandle.cs
(FunctionBreakpointHandle): Make this class abstract.
* languages/TargetFunctionType.cs
(TargetFunctionType): Replace InsertBreakpoint() and
RemoveBreakpoint() with a new GetBreakpointHandle() API which
returns a `FunctionBreakpointHandle'.
2009-11-29 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.LoadConfigurationFromStream): Use
Report.Error() to report errors instead of throwing an exception.
(DebuggerConfiguration.UserNotifications): New public property.
(DebuggerConfiguration.NotifyUser_ThreadCreation): Mark as obsolete.
(DebuggerConfiguration.UserNotificationType): New public enum.
* frontend/Command.cs
(ConfigCommand): Add `user-notifications' option to modify the new
`DebuggerConfiguration.UserNotifications'.
2009-11-25 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.IsCLI): New public property to check
whether we're running the CLI or a GUI.
* classes/DebuggerSession.cs
(DebuggerSession.ctor): Only auto-insert the
`MainMethodBreakpoint' in the CLI.
2009-11-25 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.GetEvent): Return null if the event doesn't
exist, don't throw any exception.
* frontend/ScriptingContext.cs
(ScriptingContext.ActivatePendingBreakpoint): New internal method;
activate pending breakpoints and wait for its completion.
* frontend/Command.cs
(BreakpointDeleteCommand.ActionDone): Call it here ...
(BreakCommand.DoExecute): ... and here.
* test/testsuite/TestMethodLookup.cs: This fixes a race condition here.
2009-11-25 Martin Baulig <martin@ximian.com>
Hardware breakpoints are per-thread and not per-process; allow
having both a hardware and a regular breakpoint on the same
instruction.
* backend/server/x86_64-arch.c
(ArchInfo): Add `BreakpointManager *hw_bpm'.
(server_ptrace_current_insn_is_bpt): Check both `arch->hw_bpm' and
`handle->bpm'; we may now have both a hardware and a regular
breakpoint on the same instruction.
(lookup_breakpoint): New static function to look in both
`arch->hw_bpm' and `handle->bpm'; use this everywhere instead of
calling mono_debugger_breakpoint_manager_lookup_by_id() directly.
2009-11-25 Martin Baulig <martin@ximian.com>
Don't activate address breakpoints twice.
* classes/AddressBreakpoint.cs
(AddressBreakpoint.NeedsActivation): Overwrite and return `false'.
* frontend/Command.cs
(BreakCommand.DoExecute): Check `Breakpoint.NeedsActivation' before
calling Activate() on it.
2009-10-19 Martin Baulig <martin@ximian.com>
* backend/Inferior.cs
(Inferior.SignalInfo): Add `SIGWINCH'.
(Inferior.Has_SIGWINCH): New public property.
(Inferior.SIGWINCH): New public property.
* backend/server.h
(SignalInfo): Add `sigwinch'.
* backend/ThreadManager.cs
(ThreadManager.HandleChildEvent): Ignore `SIGWINCH'.
2009-10-19 Martin Baulig <martin@ximian.com>
Detach after exec() if we don't have permission to debug the
child; this happens if the exec()d binary is setuid/setgid.
* backend/Inferior.cs
(Inferior.ProcessEvent): Removed child_execd().
(Inferior.InitializeAfterExec): Call GetApplication() and
start.SetupApplication() here.
* backend/ProcessServant.cs
(ProcessServant.ChildExecd): Catch `TargetError.PermissionDenied'
and detach from the process; this happens when exec()ing
setuid/setgid applications.
* classes/TargetException.cs
(TargetError): Add `PermissionDenied'.
* backend/server/x86-linux-ptrace.c
(_server_ptrace_setup_inferior): Check `EACCES' and return
`COMMAND_ERROR_PERMISSION_DENIED'.
2009-10-14 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.OperationMonoTrampoline): Fix bug #544935; the runtime now
supports a new trampoline notification which also gives us the
address of the callsite, so we can detect recursive invocations of
mono_generic_trampoline().
2009-11-05 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.Notification): On `LoadModule': don't crash
if load_symfile() failed.
2009-10-08 Martin Baulig <martin@ximian.com>
* build/mdb: Use the full pathname to invoke mono.
* build/mdb-symbolreader: Likewise.
* backend/ProcessStart.cs
(ProcessStart.SetupEnvironment): Don't set `MONO_GAC_PREFIX',
`MONO_PATH', `LD_LIBRARY_PATH' and `PATH'.
2009-10-08 Martin Baulig <martin@ximian.com>
Improve follow-fork(), allow following exec() without fork()ing
first; shell scripts, for instance, use this technique.
* classes/Thread.cs
(ThreadCommandResult): Use a private `ManualResetEvent'.
* classes/Operation.cs
(OperationCommandResult): Make this class abstract.
(OperationCommandResult.Host): Make this property abstract.
(OperationCommandResult.OnExecd): New internal abstract method.
* backend/Inferior.cs
(Inferior.SetupInferior): Call GetApplication() instead of using
`start.TargetApplication'.
* backend/ProcessStart.cs
(ProcessStart.StopInMain): Add internal setter.
(ProcessStart.SetupApplication): Don't set StopInMain to false.
* backend/ProcessServant.cs
(ProcessServant.ChildForked): Set `StopInMain' to false here ...
(ProcessServant.ChildExecd): ... but not here.
(ProcessServant.ChildExecd): Don't clone the session and reuse the
`OperationCommandResult', only call OnExecd() on it to change its
`Host' if necessary.
* classes/DebuggerSession.cs
(DebuggerSession.OnProcessExecd): New internal method.
(DebuggerSession.OnProcessExited): Unload all modules if we're the
main process.
* backend/ProcessServant.cs
(ProcessServant.ProcessCommandResult): New protected class.
* backend/DebuggerServant.cs
(DebuggerServant.GlobalCommandResult): New protected class.
* test/testsuite/testnativenoforkexec.cs: New test.
* test/src/testnativenoforkexec.c: New test.
* test/testsuite/TestDontFollowFork.cs: Increase timeout.
* test/testsuite/testnativefork.cs: Remove "NotWorking".
2009-10-01 Martin Baulig <martin@ximian.com>
* classes/ProcessStart.cs
(ProcessStart.cctor): Use `BuildInfo.mono' to set `MonoPath'
instead of computing it here.
2009-09-29 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.GetPendingBreakpoints): Small fix; make this work
for native applications.
2009-09-23 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs
(EE.EvaluationResult): Add `NotInitialized'.
* classes/Thread.cs
(RuntimeInvokeResult): Add `TargetException'.
* backend/SingleSteppingEngine.cs
(OperationRuntimeInvoke): Set 'RuntimeInvokeResult.TargetException'
on error.
2009-09-24 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.ctor): Always insert the `MainMethodBreakpoint';
we need it to correctly set the stack pointer.
* backend/SingleSteppingEngine.cs
(SSE.child_breakpoint): Set `main_retaddr' if we're the
`MainMethodBreakpoint'.
2009-09-22 Martin Baulig <martin@ximian.com>
* languages/TargetStructType.cs
(TargetStructType.IsClassInitialized): New public property.
2009-09-22 Martin Baulig <martin@ximian.com>
Fix #528160.
* backend/ThreadManager.cs
(ThreadManager.HasPendingSigstopForNewThread): New internal method.
* backend/Inferior.cs
(Inferior.InitializeThread): Call it here to see whether we
already received the SIGSTOP for the new thread.
2009-09-22 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs: Some more `TargetClassType' ->
`TargetStructType'.
* frontend/Expression.cs: Likewise.
2009-09-17 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs: Renamed `TargetClassType' into
`TargetStructType' and add a new empty `TargetClassType'.
* languages/TargetClassObject.cs: Renamed `TargetClassObject' into
`TargetStructObject' and add a new empty `TargetClassObject'.
2009-09-15 Martin Baulig <martin@ximian.com>
* backend/mono/MonoRuntime.cs: Renamed into MetadataHelper.cs.
(MonoRuntime): Renamed into `MetadataHelper'.
2009-09-15 Martin Baulig <martin@ximian.com>
* backend/mono/: Moved all the Mono Runtime code here.
* backend/MonoThreadManager.cs: Moved to backend/mono/.
* languages/mono/MonoLanguageBackend.cs: Likewise.
* languages/mono/MonoRuntime.cs: Likewise.
2009-09-15 Martin Baulig <martin@ximian.com>
* languages/TargetStructType.cs: Removed.
(TargetStructType): Moved everything into `TargetClassType'.
* languages/TargetStructObject.cs: Removed.
(TargetStructObject): Moved everything into `TargetClassObject'.
* languages/mono/MonoStructType: New file.
2009-09-08 Jonathan Chambers <joncham@gmail.com>
* backend/server/i386-arch.h: Define register access for CONTEXT on Windows.
* backend/server/server.h: Add SERVER_TYPE_WIN32.
* backend/server/x86-windows.c: Merge of work from Unity.
Unity is releasing all the sourcecode that Friedrich Dominicus has
done on the mono debugger, as part of a contracting agreement with
Unity, under the MIT-X11 license.
Joachim Ante, CTO Unity
2009-09-26 Jonathan Chambers <joncham@gmail.com>
* build/mdb.csproj: Add ExpressionParser.cs.
* build/Mono.Debugger.Frontend.csproj: Add ExpressionParser.cs.
Contributed under MIT/X11 license.
2009-08-18 Martin Baulig <martin@ximian.com>
Fix #531062; correctly handle methods in compiler-generated files.
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.GetMethods): Use the compilation unit from the
symbol file as the method's source file.
* classes/SourceInfo.cs
(SourceFile.GetMethod): Check whether the method is in the correct
source file.
2009-08-12 Martin Baulig <martin@ximian.com>
* doc/README.breakpoints: Add documentation about the new
breakpoint API.
2009-08-06 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.ActivateEventAsync): New public method.
(DebuggerSession.DeactivateEventAsync): New public method.
2009-08-06 Martin Baulig <martin@ximian.com>
Don't require the target to be stopped to detach; allow detaching
from any target on Linux.
* backend/server/server.h
(ServerCapabilities): Add `SERVER_CAPABILITIES_CAN_DETACH_ANY'.
* backend/server/x86-linux-ptrace.c
(server_ptrace_get_capabilities): ... and add it here.
* backend/Inferior.cs
(Inferior.CanDetachAny): New public static property.
* backend/ProcessServant.cs
(ProcessServant.CanDetach): New property.
(ProcessServant.Detach): Can `CanDetach', not `IsAttach'.
* backend/SingleSteppingEngine.cs
(SSE.Detach): Don't require the target to be stopped.
* classes/Debugger.cs
(Debugger.CanDetach): New public property.
2009-08-06 Martin Baulig <martin@ximian.com>
* frontend/Command.cs:
(ConfigCommand): Add "redirect-output" here, this was missing.
2009-08-05 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.ManagedCallback): If we found a managed frame, check whether
we can do all the work immediately or whether we need to start an
operation for it.
2009-08-05 Martin Baulig <martin@ximian.com>
Support removing breakpoints while the target is running.
* backend/ProcessServant.cs
(ProcessServant.ExceptionCatchPoints): Removed; the session now
maintains exception catchpoints.
* backend/SingleSteppingEngine.cs
(SSE.ActivatePendingBreakpoints): We now also handle removals.
(SSE.OperationRemoveBreakpoint): New operation to remove a managed
breakpoint.
* classes/Breakpoint.cs
(Breakpoint.NeedsActivation): New public property; event handlers
don't need any activation.
* classes/DebuggerSession.cs
(DebuggerSession.InsertExceptionCatchPoint): Exception catchpoints
don't need to be activated.
(DebuggerSession.ExceptionCatchPoints): The session now maintains
all exception catchpoints; moved here from `ProcessServant'.
(DebuggerSession.RemoveBreakpoint): Immediately remove the
breakpoint from our list, but don't actually delete it - the
target doesn't need to be stopped to call this method, the method
is queued for removal during Process.ActivatePendingBreakpoints().
* classes/Process.cs
(Process.ActivatePendingBreakpoints): Don't block, return a
`CommandResult' you can wait on.
2009-08-05 Martin Baulig <martin@ximian.com>
* backend/server/x86_64-arch.c
(find_code_buffer_slot): Return a different slot each time we're
called until we iterated over the entire buffer; it looks like
there's a very weird race condition somewhere in the kernel which
doesn't always flush the cpu's instruction cache when modifying
the current instruction and then immediately executing it.
(x86_arch_child_stopped): Return `STOP_ACTION_INTERNAL_ERROR' if
we stopped at an unexpected location inside the code buffer.
* backend/server/i386-arch.c
(find_code_buffer_slot): No idea whether we need this here as
well, but it doesn't hurt doing it here as well.
* backend/server/x86-arch.h
(ChildStoppedAction): Added `STOP_ACTION_INTERNAL_ERROR'.
* backend/server/server.h
(ServerStatusMessageType): Added `MESSAGE_INTERNAL_ERROR'.
* backend/Inferior.cs
(Inferior.ChildEventType): Added `INTERNAL_ERROR'.
2009-08-05 Martin Baulig <martin@ximian.com>
Add error checks to enforce managed context for func-eval.
NOTE: This patch intentionally ``breaks'' breakpoints in
MonoDevelop; func-eval cannot be allowed when stopped at random
locations in unmanaged code, the result would be completely
unpredictable.
It looks like there were some misunderstandings about the
debugger's breakpoint API:
-> DebuggerSession.AddEvent() adds an event / breakpoint to the
session, but does not activate it.
-> Event.Activate() activates the event / breakpoint and requires
you to be stopped *in managed code* (the only exception is address
breakpoints which work everywhere).
-> Process.ActivatePendingBreakpoints() is the correct API to
activate breakpoints while the target is running. This is an
expensive operation, so if you have multiple breakpoints, you
should DebuggerSession.AddEvent() them all then then call
Process.ActivatePendingBreakpoints() only once when done.
* classes/TargetException.cs
(TargetError): Added `InvalidContext'.
* backend/SingleSteppingEngine.cs
(SSE): Add enforce_managed_context() calls to all CallMethod()
overloads and to RuntimeInvoke().
2009-08-04 Martin Baulig <martin@ximian.com>
* frontend/ExpressionParser.cs
(ExpressionParser): Rename `MyExpression' -> `Expression' and make
it public; rename `MyExpressionWrapper' -> `ExpressionWrapper' and
make it public; rename `MyAsycResult' -> `AsyncResult' and make it
public.
2009-08-04 Martin Baulig <martin@ximian.com>
* frontend/ExpressionParser.cs: New file.
(ExpressionParser): Moved here from Expression.cs.
(ExpressionParser.GetVariableAccessExpression): Added.
(ExpressionParser.GetMemberAccessExpression): Added.
* frontend/Expression.cs
(StructAccessExpression): Made the .ctor public.
* classes/ExpressionEvaluator.cs
(EE.IExpression): Renamed `EvaluateAsync' -> `Evaluate'.
(EE.IExpression): Added `Assign'.
2009-08-04 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.OperationRuntimeInvokeHelper): Improve error handling.
2009-07-08 Martin Baulig <martin@ximian.com>
Martin's new Threading Model.
* classes/GUIManager.cs
(GUIManager): Made this obsolete, it's now just a tiny wrapper
around the new API.
* classes/Operation.cs: New file.
(ThreadingModel): New public enum.
(CommandResult): New public abstract class.
(OperationHost): New internal interface.
(OperationCommandResult): New public class.
* backend/ThreadServant.cs
(ThreadServant.StepInstruction): Removed, use the new Step() API.
(ThreadServant.StepNativeInstruction): Likewise.
(ThreadServant.NextInstruction): Likewise.
(ThreadServant.StepLine): Likewise.
(ThreadServant.NextLine): Likewise.
(ThreadServant.Finish): Removed, use the new Step() API.
* backend/SingleSteppingEngine.cs
(SSE.OperationStep): Add support for `StepMode.Run'; this
obsoletes `OperationRun'.
(SSE.OperationRun): Removed; use `OperationStep' with `StepMode.Run'.
(SSE.OperationFinish): Removed; use `OperationStep' with
`StepMode.Finish' or `StepMode.FinishNative'.
* backend/StepFrame.cs: Moved to ../classes/StepFrame.cs.
* classes/StepFrame.cs
(StepMode): Made this public.
(StepFrame): Make this public and [Serializable].
(StepMode.Run): Added.
(StepMode.FinishNative): Added.
(StepFrame.Until): New public property; only valid in`
StepMode.Run'.
* classes/Thread.cs
(Thread.Step): New public function.
(Thread.StepInstruction): Obsolete, use the new Step() API.
(Thread.StepNativeInstruction): Likewise.
(Thread.NextInstruction): Likewise.
(Thread.StepLine): Likewise.
(Thread.NextLine): Likewise.
(Thread.Continue): Use `Step (StepMode.Run)'.
(Thread.Background): Obsolete; this was never implemented and
always the same as Continue().
(Thread.Finish): Obsolete, use the new Step() API.
* backend/ThreadServant.cs
(ThreadServant.Step): New public function.
2009-07-13 Jonathan Chambers <joncham@gmail.com>
* backend/Inferior.cs: Add and handle WINDOWS server type.
2009-07-13 Jonathan Chambers <joncham@gmail.com>
* backend/os/PEReader.cs: Add.
* backend/os/WindowsOperatingSystem.cs: Add.
Contributed under MIT/X11 license.
2009-07-03 Jonathan Chambers <joncham@gmail.com>
* build/Mono.Debugger.csproj: Add backend/os directory.
* frontend/CSharpExpressionParser.cs.win: Update.
2009-07-07 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.TargetState): Return `TargetState.Busy' while being thread-locked.
(SSE.StartOperation): Disallow starting any new operation while
being thread-locked.
2009-07-07 Martin Baulig <martin@ximian.com>
Make exception catchpoints per-process and not per-thread.
* classes/Process.cs
(Process.AddExceptionCatchPoint): New public method.
(Process.RemoveExceptionCatchPoint): Likewise.
* classes/Thread.cs
(Thread.AddEventHandler): Removed.
(Thread.RemoveEventHandler): Removed.
* backend/ProcessServant.cs
(ProcessServant.AddExceptionCatchPoint): New internal method.
(ProcessServant.RemoveExceptionCatchPoint): Likewise.
(ProcessServant.ExceptionCatchPoints): New internal property.
* backend/ThreadServant.cs
(ThreadServant.AddEventHandler): Removed.
(ThreadServant.RemoveEventHandler): Removed.
2009-07-01 Martin Baulig <martin@ximian.com>
* languages/mono/MonoRuntime.cs
(MonoRuntime.GetGenericParameter): Check whether the name field is
non-null and use `!0' etc. otherwise.
2009-06-30 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.Kill): Stop the target before killing it; for some reason,
`ptrace (PTRACE_KILL)' doens't work while the target is running.
2009-06-30 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): In
`NotificationType.GcThreadExited', resume the target and ignore
any errors; for some reason, the thread may have died already by
the time we get the notification.
2009-06-30 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs
(Debugger.HasTarget): New public property.
* frontend/Interpreter.cs
(Interpreter.HasTarget): Also check 'debugger.HasTarget'.
2009-06-30 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c
(server_ptrace_kill): Don't call kill(), `ptrace (PTRACE_KILL)'
should be enough.
2009-06-30 Martin Baulig <martin@ximian.com>
* test/testsuite/TestAttach.cs: Removed the `MARTIN_PRIVATE'
conditional for this test and increased the timeout to 10 seconds.
* test/testsuite/testnativeattach.cs: Likewise.
2009-06-30 Martin Baulig <martin@ximian.com>
Officially enable attaching again - we check whether the target
runtime actually supports it and attach in native mode if not.
* configure.in: Check whether the current runtime supports
attaching and enable the attaching tests; note that the check is
only used to determine whether or not to run the tests, not
whether the feature as such is included.
* classes/DebuggerConfiguration.cs: Removed the private
configuration option to enable attaching; attaching is now enabled
by default if the target runtime supports it.
* test/testsuite/TestAttach.cs: Start the child process with
`-O=-gshared'.
* backend/MonoThreadManager.cs
(MonoThreadManager.ctor): Don't call read_thread_table().
(MonoThreadManager.read_thread_table): Renamed into
InitializeThreads() and made it internal.
* backend/ProcessServant.cs
(ProcessServant.InitializeMono): Call
`MonoThreadManager.InitializeThreads()' after our
InitializeThreads().
2009-06-30 Martin Baulig <martin@ximian.com>
Run each test in a separate process to reduce memory requirements
and also be more robust against crashes.
* test/framework/DebuggerTextFixture.cs: Formerly known as
../testsuite/NUnit.cs.
* test/framework/LibGTop.cs: Formerly known as ../misc/LibGTop.cs.
* test/framework/DebuggerTestFixtureAttribute.cs: New file.
* test/framework/DebuggerTestHost.cs: New file.
* test/framework/DebuggerTestServer.cs: New file.
* test/framework/ProxyListener.cs: New file.
* test/framework/RemotingContract.cs: New file.
* test/testsuite/NUnitAddIn.cs: New file; this is an add-in for
nunit which takes care of running the tests.
* test/testsuite/*.cs: Use [DebuggerTestFixture] instead of
[TestSuite]; the attribute takes optional `Timeout' and `Repeat'
arguments.
* build/Makefile.am: Build Mono.Debugger.Test.Framework.dll to
contain the test framework; Mono.Debugger.Test.dll now only
contains the actual test cases.
2009-06-29 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetFields): Don't throw an exception if the class
doesn't have any fields.
2009-06-25 jonas echterhoff <jonas@unity3d.com>
* backend/os/DarwinOperatingSystem.cs
Add support for detecting dynamic library loads on OS X,
will detect dynamically linked libmono.
* backend/os/bfd/mach-o.c
Don't give errors on some load symbols common for OS X
dynamic libraries
2009-06-29 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetFields): Don't throw an exception if the class
doesn't have any fields.
2009-06-22 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetFields): Check whether the class is already
initialized and throw an exception on error.
2009-06-20 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs
(Debugger.ManagedThreadCreatedEvent): New public event.
* frontend/Interpreter.cs
(Interpreter.WaitAll): Wait on all the threads we auto-stopped.
(Interpreter.InterpreterEventSink): Also listen for
`ManagedThreadCreatedEvents'; 'ThreadCreatedEvent' is emitted for
any thread, including native deamon threads.
2009-06-20 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.StartOperation): Fix a regression introduced in r135640:
reset `operation_completed_event' when starting a new operation.
2009-06-20 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs: Reflect latest runtime changes; if
the target runtime is at least 81.3, check the new 'thread_flags'
field in the 'MonoDebuggerThreadInfo' to detect daemon threads.
2009-06-20 Martin Baulig <martin@ximian.com>
Fix attaching support.
* backend/MonoThreadManager.cs
(MonoThreadManager.Initialize): New public static method to create
a new `MonoThreadManager' instance, we do some error checking here
and return null on failure; the .ctor is now private.
(MonoThreadManager.read_thread_table): Moved here from
ProcessServant.cs.
(MonoThreadManager.MonoDebuggerInfo.Create): Return null on
failure instead of throwing an exception.
(MonoThreadManager.MonoDebuggerInfo.CheckRuntimeVersion): New
public method.
* backend/ProcessServant.cs
(ProcessServant.MonoRuntimeFound): New internal property; returns
whether we already found a mono runtime, even if we could not use
this runtime for some reason and are thus running in native mode.
(ProcessServant.ThreadCreated): Added `bool resume_thread'
argument to specify whether the new thread should be resumed or
remain stopped.
(ProcessServant.InitializeMono): Improve error handling.
(ProcessServant.InitializeThreads): This may now be called
multiple times.
(ProcessServant.DropGlobalThreadLock): New internal method;
release the `thread_lock' mutex in SSE.Detach() since disposing
the still-locked mutex would throw an exception.
* backend/SingleSteppingEngine.cs
(SSE.StartThread): Add `bool resume_thread' argument to specify
whether the new thread should be resumed or remain stopped.
(SSE.Detach): Call `process.DropGlobalThreadLock()'.
2009-06-20 Martin Baulig <martin@ximian.com>
* classes/Backtrace.cs
(Backtrace.IsFrameOkForMode): `Mode.Default' defaults to native
unless we're debugging a managed application.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/os/Bfd.cs
(Bfd.ctor): Fix #510031, don't crash when some native library
doesn't contain a '.text' or '.bfd' section.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(server_ptrace_step): Moved into x86-linux-ptrace.c.
(server_ptrace_continue): Likewise.
(server_ptrace_kill): Likewise.
(server_ptrace_write_memory): Likewise.
(server_ptrace_poke_word): Likewise.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/server/server.h
(ServerType): New public enum typedef.
(mono_debugger_server_get_server_type): New global function.
(InferiorVTable): Add `get_server_type'.
* backend/Inferior.cs
(Inferior.CreateOperatingSystemBackend): New public static method;
calls mono_debugger_server_get_type() and creates the appropriate
`OperatingSystemBackend'.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c: Moved some linux-specific code into
x86-linux-ptrace.c.
* backend/server/darwin-ptrace.c: Moved os-specific stuff from
`InferiorHandle' into `OSData'.
2009-06-18 Martin Baulig <martin@ximian.com>
Mac OS X patches from jonas echterhoff <jonas@unity3d.com>.
* backend/ProcessServant.cs: Detect threads on OS X.
* backend/ThreadManager.cs: Detect threads on OS X.
* backend/SingleSteppingEngine.cs
(SSE.SetMainReturnAddress): Reset this when we exit.
* backend/os/Bfd.cs: `LinuxOperatingSystem' -> `OperatingSystemBackend'.
* backend/os/DarwinOperatingSystem.cs: New file.
* backend/server/darwin-ptrace.c
(server_ptrace_get_threads): Implemented.
2009-06-16 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs
(ExpressionParsingException): Removed `ErrorOutput'.
* frontend/CSharpTokenizer.cs
(SyntaxError): Removed.
(Tokenizer): Throw a `yyParser.yyException' instead of returning
`Token.ERROR'; killed `Error'.
* frontend/jay/skeleton.cs: Killed `ErrorOutput', yyerror() now
throws a `yyParser.yyException'.
* frontend/CSharpExpressionParser.jay: Improved error handling.
* frontend/skeleton: Removed.
* frontend/jay/skeleton: Removed.
2009-06-15 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager.EvaluationDone): Invoke the callback directly, don't
queue it as an event - it must be called before signalling the
AsyncResult.
2009-06-10 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(ExpressionParser.EvaluateAsync): Invoke the callback before
signalling the wait handle.
2009-06-10 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager.EvaluateExpressionAsync): Return an
`ExpressionEvaluator.AsyncResult'.
2009-06-08 Martin Baulig <martin@ximian.com>
* backend/ThreadServant.cs
(ThreadServant.WaitHandle): New public abstract property.
* classes/Thread.cs
(Thread.WaitHandle): Use `servant.WaitHandle'.
(Thread.operation_completed_event): Removed; use the SSE's
wait handle instead.
(CommandResult.Completed): Make this internal, not public.
(OperationCommandResult): New public class; derives from
`ThreadCommandResult', but has its own wait handle. This is set
when the operation is completed, which is not necessarily when the
target is stopped.
(RuntimeInvokeResult): Derive from `OperationCommandResult'.
2009-06-08 Martin Baulig <martin@ximian.com>
* backend/ThreadServant.cs
(ThreadServant.GetRuntimeInvokedFunction): New internal function.
* classes/Backtrace.cs
(Backtrace.TryCallback): Print the name of the runtime-invoke'd
function int the backtrace.
* test/testsuite/NUnit/NUnit.cs
(TestSuite.AssertRuntimeInvokeFrame): New public method.
2009-06-08 Martin Baulig <martin@ximian.com>
* test/{testsuite|src}/TestNestedBreakStates.cs: Add new testcase.
2009-06-08 Martin Baulig <martin@ximian.com>
* classes/Process.cs
(ExceptionAction): Make this enum public.
(ExceptionCatchPointHandler): Replaced `out bool stopped' with
`out ExceptionAction action'.
(Process.GenericExceptionCatchPoint): Likewise.
* frontend/Expression.cs
(ExpressionParser.EvaluateAsync): Check the flags and set
`ScriptingFlags.NestedBreakStates' if requested.
(ExpressionParser.DoEvaluate): Catch `InvocationException' here as
well and report `EvaluationResult.Exception'.
(InvocationExpression.DoInvoke): Throw an `InvocationException'
instead of a `ScriptingException' if we received an exception.
* frontend/ScriptingContext.cs
(ScriptingContext.InvocationException): New public exception
class; derives from `ScriptingException'.
2009-06-05 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs:
(OperationMonoTrampoline.ResumeOperation): Resume operation in
case we're interrupted unexpectedly, for instance because of a
module load notification.
* test/testsuite/TestBreakpoint2.cs: New testcase for it.
* test/testsuite/NUnit.cs
(TestSuite:AddSourceFile): New protected method to read automatic
breakpoints in another source file.
2009-06-04 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE): Kill `stop_requested'.
(SSE.AbortInvocation): Stop the target if necessary.
* classes/Thread.cs
* backend/ThreadServant.cs
(ThreadServant.AbortInvocation): Make this internal.
* classes/Thread.cs
(Thread.RuntimeInvoke): Use `operation_completed_event' here as
well, just like we're doing it for stepping operations.
(Thread.AbortInvocation): Make this internal.
(RuntimeInvokeResult): Derive from `ThreadCommandResult'.
(RuntimeInvokeResult.Abort): Call Thread.AbortInvocation() and
wait until it completed.
* frontend/Expression.cs
(ExpressionParser): Renamed Parse() -> ParseInternal() and added a
new Parse() method returning `EE.IExpression'.
(Expression): Don't implement `EE.IExpression'.
* classes/ExpressionEvaluator.cs
(ExpressionParsingException): New public class.
(EE.IExpression.EvaluateAsync): Moved here from `IEvaluator'.
(EE.IEvaluator): Removed.
* classes/DebuggerSession.cs
(IExpressionParser): Renamed Parse() -> ParseLocation().
* frontend/CSharpExpressionParser.jay
(ExpressionParser.Parse): Throw a `ExpressionParsingException' on
error; redirect error output and include it in the exception.
* frontend/Makefile.am: Use `$(srcdir)/jay/skeleton.cs' instead of
`$(srcdir)/skeleton'.
* frontend/ScriptingContext.cs
(ScriptingContext.ParseExpression): New public method; use this to
parse expressions inside the frontend, this throws a
`ScriptingException' with a user-friendly error message.
2009-06-02 Martin Baulig <martin@ximian.com>
Fix #503989.
* backend/server/x86_64-arch.c
(x86_arch_child_stopped): Make this work when the NX-flag is
disabled in the BIOS.
2009-05-28 Martin Baulig <martin@ximian.com>
* backend/os/LinuxOperatingSystem.cs
(LinuxOperatingSystem.CheckForPendingMonoInit): Work around some
dynamic loader madness; see documentation inside for details.
2009-05-28 Martin Baulig <martin@ximian.com>
* backend/ProcessServant.cs
(ProcessServant.LoadLibrary): Disallow loading unmanaged
libraries; this never worked since we obviously don't know their
correct base address.
* backend/os/OperatingSystemBackend.cs
(OperatingSystemBackend.AddExecutableFile): Take an `Inferior'
argument, not `TargetMemoryInfo', so we can do stuff with the
library; we're called while the target is stopped.
* backend/os/LinuxOperatingSystem.cs
(LinuxOperatingSystem.check_loaded_library): New private method;
moved the nptl_setxid() and mono runtime checks here.
(LinuxOperatingSystem.AddExecutableFile): Call check_loaded_library(),
so we check for the mono runtime each time a new shared library is
loaded, unless we're already running managed.
(LinuxOperatingSystem.read_dynamic_info): Call check_loaded_library()
on the main module; this should usually find the mono runtime if
we're not running embedded.
2009-05-28 Martin Baulig <martin@ximian.com>
* backend/ThreadManager.cs
(ThreadManager.CreateProcess): Merged into StartApplication().
(ThreadManager.HandleChildEvent): Don't call
ProcessServant.Initialize() anymore; StartApplication() now takes
care of that.
* backend/ProcessServant.cs
(ProcessServant.WaitForApplication): Removed.
(ProcessServant.Initialize): Removed.
(ProcessServant.StartApplication): New public method.
* backend/SingleSteppingEngine.cs
(SSE): We now have three methods to start things:
StartApplication(), StartThread() and StartForkedChild(); each of
them will start an appropriate operation.
(SSE.OperationStart.DoExecute): Always run until `inferior.EntryPoint'.
(SSE.OperationStart.DoProcessEvent): We should now be stopped at
`inferior.EntryPoint', initialize shared libraries and modules,
then push `OperationRun'.
* backend/Inferior.cs
(Inferior.Run): The target is now stopped when returning from this
method; merged InitializeProcess() into this method.
(Inferior.CreateThread): Add `int pid' and `bool do_attach' args.
* backend/server/x86-ptrace.c
(server_ptrace_spawn): Call _server_ptrace_wait_for_new_thread()
to make sure the target is stopped before returning.
* backend/server/x86-linux-ptrace.c
(_server_ptrace_wait_for_new_thread): Accept SIGTRAP as well.
2009-05-28 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c
(_server_ptrace_setup_inferior): Moved call to
x86_arch_remove_hardware_breakpoints() here.
* backend/server/x86-ptrace.c
(server_ptrace_dispatch_event): Don't call
x86_arch_remove_hardware_breakpoints() when stopping the first time.
2009-05-27 Martin Baulig <martin@ximian.com>
* backend/os/bfdglue.c
(bfd_glue_get_entry_point): New function.
* backend/os/Bfd.cs
(Bfd.EntryPoint): Use the executable's entry point from
bfd_glue_get_entry_point() instead of doing a symbol lookup for
"main". The entry point address is stored in the ELF header, so
this also works on stripped binaries.
* backend/Inferior.cs
(Inferior.MainMethodAddress): Renamed into `EntryPoint' to reflect
the changed semantics.
* backend/SingleSteppingEngine.cs
(SSE.OperationStart): Run until the executable's entry point, then
initialize the shared libraries.
2009-05-27 Martin Baulig <martin@ximian.com>
* backend/os/OperatingSystemBackend.cs: New file.
(OperatingSystemBackend): New internal abstract class.
* backend/os/LinuxOperatingSystem.cs: New file.
(LinuxOperatingSystem): Linux implementation.
* backend/os/Bfd.cs
(Bfd): Moved the dynlink stuff into `LinuxOperatingSystem'.
* languages/native/NativeLanguage.cs
(NativeLanguage): Moved all the symbol file stuff into
`OperatingSystemBackend'.
* backend/SingleSteppingEngine.cs
(SSE.OperationStart): Run until the native "main" method before
initializing shared libraries.
2009-05-26 Martin Baulig <martin@ximian.com>
* languages/native/NativeLanguage.cs
(NativeLanguage): Replace the indexer with a LookupModule() method.
2009-05-26 Martin Baulig <martin@ximian.com>
Moved everything bfd-related from backend/arch to backend/os.
* backend/arch/bfd/: Moved.
* backend/arch/opcodes/: Moved.
* backend/arch/libiberty/: Moved.
* backend/arch/Bfd.cs: Moved.
* backend/arch/BfdDisassembler.cs: Moved.
* backend/arch/DwarfReader.cs: Moved.
* backend/arch/DwarfFrameReader.cs: Moved.
* backend/arch/bfdglue.[ch]: Moved.
* backend/os/bfd/: Moved `opcodes' and `libiberty' inside the
`bfd' directory and build these libraries here.
2009-05-26 Martin Baulig <martin@ximian.com>
* backend/os/NativeExecutableReader.cs: New abstract base class.
* backend/arch/Bfd.cs (Bfd): Derive from `NativeExecutableReader'.
2009-05-26 Martin Baulig <martin@ximian.com>
Merge `BfdContainer' and `NativeLanguage'.
* backend/arch/BfdContainer.cs: Removed.
* backend/arch/Bfd.cs: Replaced `BfdContainer' by `NativeLanguage'.
2009-05-25 jonas echterhoff <jonas@unity3d.com>
Implement debugger for OS X
*darwin-ptrace.c: Added for Darwin specific implementation.
*darwin-thread-db.c: Added for Darwin specific implementation.
*mach-o.c: Added Apple-specific definitions to supress error messages.
*Bfd.cs: Changed to interpret Mach-O binaries.
*i386-arch.c: Added code to make memory executable (needed in OS X).
2009-05-25 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(server_ptrace_sem_*): Moved to x86-linux-ptrace.c.
(sigint_signal_handler): Call server_ptrace_sem_post() instead of
using sem_post() directly.
2009-05-25 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c
(_server_ptrace_make_memory_executable): New static method; this
is a no-op on Linux.
* backend/server/i386-arch.c
(server_ptrace_call_method_*): Call
_server_ptrace_make_memory_executable(), which is required on OSX.
2009-05-25 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.h: Moved function prototypes to
x86-ptrace.h.
2009-05-25 Martin Baulig <martin@ximian.com>
* backend/server/server.h
(ServerCapabilities): New public enum.
(InferiorVTable.get_capabilities): New method.
* backend/server/library.c
(mono_debugger_server_get_capabilities): New public function.
* backend/Inferior.cs
(Inferior.HasThreadEvents): New public static property.
2009-05-25 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.h
(InferiorHandle): Move struct definition here.
(OSData): New typedef; moved `mem_fd' here from `InferiorHandle'.
2009-05-19 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(InvocationExpression.DoInvoke): Add
`RuntimeInvokeFlags.NestedBreakStates'.
2009-05-19 Martin Baulig <martin@ximian.com>
* classes/Thread.cs
(Thread.AbortInvocation): Added `long rti_id' argument.
* backend/SingleSteppingEngine.cs
(SSE.AbortInvocation): Implemented this using `OperationReturn'.
* classes/TargetException.cs
(TargetError): Added `NoInvocation'.
2009-05-19 Martin Baulig <martin@ximian.com>
* backend/Inferior.cs
(Inferior.AbortInvoke): Only take `long rti_id' argument; we now
abort one specific invocation and don't search on the stack.
* backend/server/server.h
(InferiorVTable.abort_invoke): Only take a `guint64 rti_id'
argument, removed the `stack_pointer' and `*aborted_rti' ones.
* backend/server/x86_64-arch.c
(server_ptrace_abort_invoke): Only take a `guint64 rti_id'
argument, removed the `stack_pointer' and `*aborted_rti' ones.
* backend/server/i386-arch.c
(server_ptrace_abort_invoke): Only take a `guint64 rti_id'
argument, removed the `stack_pointer' and `*aborted_rti' ones.
* backend/SingleSteppingEngine.cs
(SSE.AbortRuntimeInvoke): Call `inferior.AbortInvoke()'.
(SSE.Return): Implement `ReturnMode.Invocation'.
(SSE.OperationReturn): Add support for aborting an entire
invocation.
* classes/Backtrace.cs
(Backtrace.TryCallback): Take a `ref StackFrame last_frame'
argument to allow the parent function to do some more checks on it
before adding it.
(Backtrace.TryUnwind): Improve handling of callback frames; also
check `until'.
2009-05-18 Martin Baulig <martin@ximian.com>
* classes/Thread.cs
(ReturnMode): New public enum.
(Thread.Return): Replace the `bool run_finally' with a
`ReturnMode' argument.
* backend/SingleSteppingEngine.cs
(SSE.Return): Start fixing the return mess.
* classes/TargetException.cs
(TargetError): Added `InvalidReturn'.
* frontend/Command.cs
(ReturnCommand): Add `-native' argument to allow returning from
native frames while running managed code.
2009-05-14 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs
(FrameType): New public enum.
(StackFrame.ctor): Take an additional `FrameType' argument.
* classes/Backtrace.cs
(Backtrace.TryCallback): Set `FrameType.Callback' or
`FrameType.RuntimeInvoke' depending on the callback type.
* backend/arch/Architecture.cs
(Architecture.CreateFrame): Take an additional `FrameType' argument.
* backend/Inferior.cs
(Inferior.CallbackFrame): New internal class.
(Inferior.GetCallbackFrame): Return an `Inferior.CallbackFrame'.
* backend/ThreadServant.cs
(ThreadServant.GetCallbackFrame): Return an `Inferior.CallbackFrame'.
* backend/server/server.h
(CallbackInfo): New typedef.
(InferiorVTable.get_callback_frame): Replace `guint64 *registers'
with a `CallbackInfo *info'.
(mono_debugger_server_get_callback_frame): Likewise.
2009-05-14 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoThreadManager.ThreadCreated): We seem to be creating 3 daemon
threads again when using the latest runtime from trunk.
2009-05-02 Jonathan Chambers <joncham@gmail.com>
* README.win32: Update.
2009-05-02 Jonathan Chambers <joncham@gmail.com>
* backend/server/x86-windows.c
(server_win32_spawn): Add CREATE_UNICODE_ENVIRONMENT flag.
(server_win32_get_frame): Add.
(server_win32_initialize_process): Add.
* backend/server/monodebuggerserver.def: Export
mono_debugger_server_get_frame and
mono_debugger_server_initialize_process.
2009-05-02 Jonathan Chambers <joncham@gmail.com>
* backend/Inferior.cs (Run): NULL terminate env
and args arrays when P/Invoking.
2009-05-02 Jonathan Chambers <joncham@gmail.com>
* backend/EventQueue.cs (DebuggerEventQueue): Add timed Wait.
2009-05-02 Martin Baulig <martin@ximian.com>
Don't step into any signal handlers during source-level stepping.
* backend/server/library.c
(mono_debugger_server_get_pending_signal): New public function.
* backend/server/server.h
(InferiorVTable): Added `get_pending_signal'.
* backend/Inferior.cs
(Inferior.GetPendingSignal): New public method.
* backend/SingleSteppingEngine.cs
(SSE.do_next_native): Renamed into `do_next'.
(SSE.do_step): New function; same as do_step_native(), but don't
step into any signal handlers.
(SSE.OperationStep): Use do_step() instead of do_step_native(),
except when doing single-instruction stepping, don't step into any
signal handlers when doing source-level stepping.
2009-05-03 Martin Baulig <martin@ximian.com>
* configure.in: Drop support for older nunit's.
2009-04-30 Martin Baulig <martin@ximian.com>
* classes/Breakpoint.cs
(Breakpoint.OnResolveFailed): New protected internal method.
* backend/SingleSteppingEngine.cs
(SSE.ActivatePendingBreakpoint): Call Breakpoint.OnResolveFailed(),
not OnBreakpointError() if we got a `TargetError.LocationInvalid'.
2009-04-30 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.create_appdomain): Make this work on i386.
2009-04-30 Martin Baulig <martin@ximian.com>
Merge status as of April 29th:
- merged until 133023.
- reverted revisions:
128557, 128559, 132026, 132028, 132029, 132584, 132586.
- broken revisions: 132585.
- jchambers changes which will not be merged:
129763, 129857, 131778, 131779, 132539, 132651, 132674,
132697, 132803.
- monodis and lesspipe have not yet been merged:
130986, 130987, 130988, 130989, 131093.
- experimental code which will not be merged:
132841, 132843
2009-04-29 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoLineNumberTable.Lookup): If the symbol file doesn't contain
any source ranges for the current method, default to traditional
line-based lookup.
2009-04-29 Martin Baulig <martin@ximian.com>
* backend/BreakpointHandle.cs (FunctionBreakpointHandle): Fix a
regression introduced in r132009.
2009-04-27 Jonathan Chambers <joncham@gmail.com>
* build/debugger.sln: Turn on monodebuggerserver project
in AnyCPU target.
* build/monodebuggerserver.vcproj: Copy glib dependencies
to output directory.
2009-04-26 Jonathan Chambers <joncham@gmail.com>
* build/debugger.sln: Build as 32-bit for now.
* build/Mono.Debugger.csproj: Build as 32-bit for now.
* build/Mono.Debugger.SymbolWriter.csproj: Build as 32-bit for now.
* build/mdb.csproj: Build as 32-bit for now.
* build/Mono.Debugger.Frontend.csproj: Build as 32-bit for now.
2009-04-25 Jonathan Chambers <joncham@gmail.com>
* README.win32: Added.
2009-04-25 Jonathan Chambers <joncham@gmail.com>
* frontend/CSharpExpressionParser.cs.win: Update file.
* build/Mono.Debugger.csproj: Add reference to Mono.GetOptions.
* build/AssemblyInfo.cs.win: Add generated file.
* build/Mono.Debugger.SymbolWriter.csproj: Add DEBUGGER_SOURCE
definition. Add reference to Mono.GetOptions. Add prebuild step
for AssemblyInfo.cs.win to AssemblyInfo.cs.
2009-04-24 Jonathan Chambers <joncham@gmail.com>
* configure.in: Add debug output to figure out why nunit
fails to run on buildbots.
2009-04-23 Jonathan Chambers <joncham@gmail.com>
* backend/server/breakpoints.c: Add HAVE_UNISTD_H #ifdef.
* backend/server/library.c: Add HAVE_UNISTD_H check and add Windows
InferiorVTable.
(mono_debugger_server_create_inferior): Access through vtable.
(mono_debugger_server_get_current_pid): Access through vtable.
(mono_debugger_server_get_current_thread): Access through vtable.
(mono_debugger_server_static_init): Access through vtable.
(mono_debugger_server_get_pending_sigint): Access through vtable.
(mono_debugger_server_sem_init): Access through vtable.
(mono_debugger_server_sem_wait): Access through vtable.
(mono_debugger_server_sem_post): Access through vtable.
(mono_debugger_server_sem_get_value): Access through vtable.
* backend/server/monodebuggerserver.def: Add.
* backend/server/mutex.c: Add mono_debugger_cond_timed_wait.
* backend/server/server.h: Add declarations for vtable changes above.
* backend/server/x86-ptrace.c: Implement vtable functions formerly in
library.c.
* backend/server/x86-windows.c: Added.
* build/debugger.sln: Added.
* build/mdb.csproj: Added.
* build/Mono.Debugger.csproj: Added.
* build/Mono.Debugger.Frontend.csproj: Added.
* build/Mono.Debugger.SymbolWriter.csproj: Added.
* build/monodebuggerserver.vcproj: Added.
2009-04-28 Martin Baulig <martin@ximian.com>
* build/ulimit-check.c: New helper program to check `ulimit -v';
we'll add more checks to it later.
* build/runtests.in: Refuse the run the tests if `ulimit-check' fails.
2009-04-17 Martin Baulig <martin@ximian.com>
* classes/LineNumberTable.cs
(LineNumberTable.Lookup): Add overloaded virtual version taking a
`column' argument.
* classes/SourceLocation.cs
(SourceLocation.Column): New public readonly field.
(SourceLocation.ctor): Add overloaded versions taking a `column' arg.
* backend/BreakpointHandle.cs
(FunctionBreakpointHandle): Add `column' field.
2009-04-16 Martin Baulig <martin@ximian.com>
Add support for 'source ranges' - instead of only using line
numbers, we now use a struct containing 'StartLine', 'EndLine',
'StartColumn' and 'EndColumn'.
* classes/Method.cs
(LineEntry.SourceRange): New public field.
* classes/SourceAddress.cs
(SourceAddress.HasSourceRange): New public property.
(SourceAddress.SourceRange): New public property.
(SourceRange): New public struct.
2009-04-15 Martin Baulig <martin@ximian.com>
* classes/SourceAddress.cs
(SourceAddress): Rename `SourceOffset' -> `LineOffset' and
`SourceRange' -> `LineRange'.
2009-04-15 Jonathan Chambers <joncham@gmail.com>
* backend/arch/Architecture.cs: Use Disassembler instead of BfdDisassembler
and only create on non-Windows platforms.
* backend/arch/BfdDisasembler.cs: Override Dispose since base now implements.
* backend/arch/Disasembler.cs: Derive from IDisposable.
* backend/arch/X86_Opcodes.cs: Use Disassembler instead of BfdDisassembler
and only create on non-Windows platforms.
* backend/Inferior.cs
(IsRunningOnWindows): Add.
(mono_debugger_server_get_application): Change out string to out IntPtr.
(GetApplication): Marshal strings manually since on Windows they are freed
via CoTaskMemFree instead of g_free.
2009-04-15 Jonathan Chambers <joncham@gmail.com>
* frontend/CSharpExpressionParser.cs.win: Add generated files for
Windows to build easily in Visual Studio.
2009-04-15 Jonathan Chambers <joncham@gmail.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration): Use Environment.SpecialFolder.Personal
instead of HOME environment variable.
(LoadConfigurationFromStream): Verify file exists before trying to access it.
2009-04-15 Jonathan Chambers <joncham@gmail.com>
* frontend/Style.cs: Add braces to work around bug 478101.
* languages/mono/MonoLanguageBackend.cs: Add braces to work around bug 478101.
2009-04-15 Martin Baulig <martin@ximian.com>
* symbolwriter/MonoSymbolTable.cs
(LineNumberTable.DW_LNE_MONO__extensions_start): New const.
(LineNumberTable.DW_LNE_MONO__extensions_end): New const.
(LineNumberTable.DoRead): Ignore unknown extended opcodes if
they're within the Mono extension range.
2009-04-14 Martin Baulig <martin@ximian.com>
* symbolwriter/ndesk-options.cs: New file; copied
src/NDesk.Options/NDesk.Options/Options.cs from NDesk.Options.
* symbolwriter/MdbSymbolReader.cs: Some more work on printing the
contents of a symbol file instead of just verifying it.
* build/mdb-symbolreader.in: New file; create a `mdb-symbolreader'
wrapper script.
2009-04-06 Martin Baulig <martin@ximian.com>
* test/testsuite/NUnit.cs
(TestSuite.ctor): Set `config.RedirectOutput' since we're
examining it in the tests.
2009-04-06 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.ActivatePendingBreakpoint): Don't use Report.Error() to
report breakpoint failures; `breakpoint.OnBreakpointError()' is
all we need.
2009-04-03 Martin Baulig <martin@ximian.com>
* classes/LineNumberTable.cs
(LineNumberTable.DumpLineNumbers): Added `TextWriter' argument.
2009-04-03 Martin Baulig <martin@ximian.com>
* classes/Utils.cs: New file.
(LessPipe): New public class; derives from `TextWriter' and opens
a pipe to `less'.
2009-04-03 Martin Baulig <martin@ximian.com>
Add `less' command to view a file with `less'.
* frontend/Command.cs
(LessCommand): New command to view a file.
* classes/ThreadManager.cs: Ignore exit events from unknown
children.
2009-04-03 Martin Baulig <martin@ximian.com>
* configure.in: Check for monodis and AC_SUBST() `MONODIS' and
`TARGET_MONODIS'.
* build/AssemblyInfo.cs.in
(BuildInfo.monodis): New public static field.
2009-04-03 Martin Baulig <martin@ximian.com>
* configure.in: Kill the old pre-historic `server_only'.
2009-03-31 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(NotificationType): Added `CreateAppDomain' and `UnloadAppDomain'.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend): Make things work with shadow copied assemblies.
(MonoLanguageBackend.GetShadowCopyLocation): New internal method.
(MonoLanguageBackend.Notification): Add support for
`CreateAppDomain' and `UnloadAppDomain'.
* languages/mono/MonoRuntime.cs
(MonoRuntime.GetAppDomainInfo): New public method.
2009-03-30 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.AddUserModulePath): New public method.
(DebuggerSession.CreateModule): Also check whether the module is
located anywhere in the module paths.
2009-03-27 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(server_ptrace_kill): Do a `kill (SIGKILL)' in addition to the
`ptrace (PTRACE_KILL)'.
2009-03-24 Martin Baulig <martin@ximian.com>
* classes/Event.cs
(Event.IsUserModule): New public property.
* backend/SingleSteppingEngine.cs
(SSE.ActivatePendingBreakpoints): When called during a
module-load, only activate user-breakpoints if we're actually a
user module.
2009-03-23 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.CreateDefaultModuleGroups): Add new module
group `user' for user code.
* classes/DebuggerSession.cs
(DebuggerSession.AddUserModule): New public method.
(DebuggerSession.CreateModule): If the module's file name matches
any of the user modules, use the `user' module group.
* classes/Module.cs
(SymbolFile.CodeBase): New abstract property; this is the absolute
path name of the loaded module.
2009-03-20 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.RedirectOutput): New configuration option.
* classes/DebuggerOptions.cs
(DebuggerOptions.RedirectOutput): Removed.
(DebuggerOptions.ParseCommandLine): Removed `-no-redirect' command
line argument; this is now a configuration option.
2009-03-19 Jonathan Chambers <joncham@gmail.com>
* frontend/Completer.cs: Switch from using GnuReadLine to LineReader.
* frontend/GnuReadLine.cs: Make methods non-static. Now accessed via LineReader.
* frontend/LineReader.cs: Added. Handles both GnuReadLine and ManagedReadLine.
* frontend/Main.cs: Switch from using GnuReadLine to LineReader.
* frontend/ManagedReadLine.cs: Beginning of managed ReadLine implementation.
* classes/DebuggerOptions.cs: Add #if HAVE_XSP around xsp specific
code.
Fixes build.
* build/Makefile.am: Add LineReader.cs and ManagedReadLine.cs.
2009-03-19 Jonathan Chambers <joncham@gmail.com>
* backend/server/i386-arch.h: Wrap include with #ifdef HAVE_SYS_USER_H
* backend/server/x86-ptrace.c: Include config.h.
* configure.in: Add check for sys/user.h.
* winconfig.h: Added. Used to generate config.h on Windows.
2009-03-19 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs
(DebuggerOptions.RedirectOutput): New public property.
(DebuggerOptions.ParseCommandLine): Added `-no-redirect' command
line argument to prevent redirecting stdin and stdout.
* backend/ProcessStart.cs
(ProcessStart.RedirectOutput): New public property.
* backend/server/x86-ptrace.c
(mono_debugger_server_spawn): Added `gboolean redirect_fds'.
2009-03-05 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.GetMethod): Also search in all include files.
2009-03-09 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.InsertExceptionCatchPoint): Add
compatibility overload.
* classes/Thread.cs
(Thread.RuntimeInvoke): Add compatibility overload.
2009-02-28 Martin Baulig <martin@ximian.com>
* backend/arch/BfdContainer.cs
(BfdContainer.GetSectionAddress): New public method.
* backend/ProcessServant.cs
(ProcessServant.get_thread_info): Silently fail if we're not a
managed application.
2009-03-04 Martin Baulig <martin@ximian.com>
Implemented nested break states.
* backend/SingleSteppingEngine.cs
(SSE.ProcessChildEvent): Largely rework this to support nested
break states.
(SSE.Operation.EventResult): Added `SuspendOperation'.
(SSE.Operation.CompletedOperation): New public virtual method.
Compute the new stack frame here and also check for method operations.
(SSE.InterruptibleOperation): New public abstract base class for
operations which may be suspended in a nested break state.
(SSE.OperationRuntimeInvoke): Derive from `InterruptibleOperation'.
Moved all the low-level callbacks into a new private helper
operation `OperationRuntimeInvokeHelper'.
(SSE.OperationException): Return `EventResult.SuspendOperation' on
completion to allow entering a nested break state; CompletedOperation()
will check whether we may actually do that and fall back to a
normal completion otherwise.
* classes/Debugger.cs
(Debugger.EnterNestedBreakStateEvent): New public event.
(Debugger.LeaveNestedBreakStateEvent): New public event.
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.NestedBreakStates): New configuration option.
* classes/ExpressionEvaluator.cs
(EE.EvaluationFlags): New public enum.
(EE.IExpression): New public interface.
(EE.IEvaluator): New public interface.
(EE.EvaluationCallback): New public delegate.
(EE.MonoObjectToString): Add `EvaluationFlags' argument.
(EE.GetProperty): Add `EvaluationFlags' argument.
* classes/TargetEvent.cs
(TargetEventType): Added `RuntimeInvokeDone'. This is only sent
if explicitly requested via `RuntimeInvokeFlags.SendEventOnCompletion'.
* classes/Thread.cs
(RuntimeInvokeFlags): New public enum.
(Thread.RuntimeInvoke): Replaced `is_virtual' and `debug' by
`RuntimeInvokeFlags flags'.
* frontend/Main.cs: Reworked the main loop to support nested break
states.
* frontend/Command.cs
(PrintExpressionCommand): Add `-nested-break' argument.
* backend/Inferior.cs
(Inferior.AbortInvoke): Added `out long aborted_rti' argument.
* backend/server/x86-ptrace.c
(server_ptrace_abort_invoke): Added `guint64 *aborted_rti'.
2009-03-02 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(CatchCommand): Added `-unhandled' argument to only catch
user-unhandled exceptions.
* frontend/Interpreter.cs
(Interpreter.InsertExceptionCatchPoint): Added `bool unhandled'.
* classes/DebuggerSession.cs
(DebuggerSession.InsertExceptionCatchPoint): Added `bool
unhandled'.
* classes/ExceptionCatchPoint.cs
(ExceptionCatchPoint.Unhandled): New public property.
* backend/SingleSteppingEngine.cs: Improve exception handling.
2009-03-04 Martin Baulig <martin@ximian.com>
* test/testsuite/testnativefork.cs: Add `[Category ("NotWorking")]'.
2009-03-03 Martin Baulig <martin@ximian.com>
* test/testsuite/NUnit.cs
(NUnitInterpreter.IgnoreThreadCreation): New public property to
disable tracking of child threads.
* test/testsuite/TestAppDomain.cs: Use it here.
* test/testsuite/TestAppDomain-Module.cs: And here.
2009-03-02 Martin Baulig <martin@ximian.com>
* languages/mono/MonoRuntime.cs
(MonoRuntime.GetGenericClass): Reflect latest runtime changes:
starting with version 81.0, `MonoGenericInst.type_argv' is a tail
array and not a pointer anymore. Check for the runtime version
and support both versions here.
2009-03-02 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoDebuggerInfo): Accept runtime major versions 80 and 81.
(MonoDebuggerInfo.MinorVersion): New public readonly field.
(MonoDebuggerInfo.MajorVersion): New public readonly field.
2009-02-25 Martin Baulig <martin@ximian.com>
* backend/arch/X86_Instruction.cs
(X86_Instruction.DecodeModRM): Correctly identify ip-relative
addressing.
2009-02-09 Martin Baulig <martin@ximian.com>
* classes/Process.cs
(ExceptionCatchPointHandler): New public delegate.
(Process.InstallGenericExceptionCatchPoint): New public method.
(Process.GenericExceptionCatchPoint): New public method.
* backend/SingleSteppingEngine.cs
(SSE.OperationException.DoProcessEvent): Create
`TargetEventArgs(TargetEventType.Exception)' with the exception
object as `TargetClassObject'.
2009-02-09 Martin Baulig <martin@ximian.com>
Fix #466012 and #423518.
* backend/server/x86-linux-ptrace.c
(_server_ptrace_wait_for_new_thread): New static function. Wait
for a newly created thread to stop.
* backend/SingleSteppingEngine.cs
(SSE.StartThread): Added `do_execute' argument and resume the
target when it's true.
(SSE.OperationInitAfterFork.DoExecute): Call `sse.do_continue ()'.
* backend/ProcessServant.cs
(ProcessServant.ThreadCreated): If `do_attach' is false, then the
newly created thread has already stopped, so we tell the SSE to
resume it.
* backend/ThreadManager.cs
(ThreadManager.wait_thread_main): Ignore `SIGSTOP' events for
unknown threads.
2009-01-28 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(ScriptingContext.HandleDebuggerDisplay): Make this method static.
(ScriptingContext.CheckTypeProxy): New public static method.
2009-01-28 Martin Baulig <martin@ximian.com>
* language/TargetStructType.cs
(TargetStructType.ForceClassInitialization): New public method.
* frontend/Expression.cs
(StructAccessExpression.ResolveClass): Force a class init here.
[The user wants something from this class, so it should be ok to
initialize it.]
* frontend/ScriptingContext.cs
(ScriptingContext.GetNamespaces): If we have an `ImplicitInstance',
only check the direct namespaces from the class name, not any
using statements etc.
2009-01-27 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(ScriptingContext.HandleDebuggerDisplay): Improve API: take a
`DebuggerDisplayAttribute' parameter and return both the value and
the type.
2009-01-26 Martin Baulig <martin@ximian.com>
Add support for the [DebuggerTypeProxy] attribute.
* languages/TargetStructType.cs
(TargetStructType.DebuggerTypeProxyAttribute): New public
property.
* frontend/Expression.cs
(TypeProxyExpression): New internal class. This is used to
evaluate a [DebuggerTypeProxy] attribute.
* classes/ScriptingContext.cs
(ScriptingContext.DoFormatObject): Check for [DebuggerTypeProxy].
2009-01-26 Martin Baulig <martin@ximian.com>
Add support for the [DebuggerDisplay] attribute.
* languages/TargetMember.cs
(TargetMemberInfo.DebuggerDisplayAttribute): New public property.
* languages/TargetStructType.cs
(TargetStructType.DebuggerDisplayAttribute): New public property.
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.CheckCustomAttributes): New internal method.
* classes/MethodSource.cs
(MethodSource.GetNamespaces): New public abstract method.
* classes/ExpressionEvaluator.cs
(ExpressionEvaluator.EvaluationResult): Added `InvalidExpression'.
* frontend/ScriptingContext.cs
(ScriptingContext.GetNamespaces): Removed the overloaded version
with a `StackFrame' argument; only keep the parameterless one.
(ScriptingContext.CurrentLanguage): Make this work without a frame.
(ScriptingContext.ImplicitInstance): New public property; this can
be used in expression contexts to implicitly set the `this'.
(ScriptingContext.HandleDebuggerDisplay): New private method.
(ScriptingContext.MonoObjectToString): Call
HandleDebuggerDisplay() to check for the [DebuggerDisplay]
attribute.
2009-01-21 Martin Baulig <martin@ximian.com>
Add support for the [DebuggerBrowsable] attribute.
* languages/TargetMember.cs
(TargetMemberInfo.DebuggerBrowsableState): New public property.
2009-01-21 Martin Baulig <martin@ximian.com>
Add support for nullable types.
* languages/TargetNullableType.cs: New file.
(TargetNullableType): New public abstract class.
* languages/TargetNullableObject.cs: New file.
(TargetNullableObject): New public abstract class.
* languages/mono/MonoNullableType.cs: New file.
* languages/mono/MonoNullableObject.cs: New file.
* languages/TargetObjectKind.cs
(TargetObjectKind): Added `Decimal'.
* frontend/Expression.cs
(Convert.ImplicitConversion): Add nullable conversions.
(StructAccessExpression.DoAssign): Use
Convert.ImplicitConversionRequired() rather than requiring the
types to be identical.
2009-01-21 Martin Baulig <martin@ximian.com>
Add support for decimal.
* languages/TargetFundamentalType.cs
(FundamentalKind): Added `Decimal'.
* languages/mono/MonoLanguageBackend.cs
(MonoBuiltinTypeInfo): Added `DecimalType'.
2009-01-19 Martin Baulig <martin@ximian.com>
* languages/mono/MonoVariable.cs
(MonoVariable.IsInScope): Don't check for `AddressMode.Dead' here.
(MonoVariable.IsAlive): Also check for IsInScope() here.
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetField): Return a `MonoNullObject' instead of `null'
when the location is invalid.
* frontend/ObjectFormatter.cs
(ObjectFormatter.FormatVariable): Properly handle variables which
have been optimized out.
2009-01-15 Martin Baulig <martin@ximian.com>
* backend/server/x86_64-arch.c
(x86_arch_child_stopped): Fix the regression from r120992 (Dec 8th):
Check for callbacks first because we expect to receive a SIGSEGV
on the non-executable stack.
2009-01-15 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs
(DebuggerOptions.ParseOption): Provide more meaningful error
message if unknown `-debug-flags' arguments were given.
2009-01-08 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(BreakCommand.DoResolve): Don't allow any line-only breakpoints
before target has been started.
2008-12-12 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs (Interpreter.WaitAll): Reset
`seen_threads' and `wait_list' after receiving a process event; a
process may have exited.
2008-12-12 Martin Baulig <martin@ximian.com>
* backend/EventQueue.cs (DebuggerWaitHandle): Implement
IDisposable and free unmanaged resources.
* backend/server/mutex.c
(mono_debugger_mutex_free): New function.
(mono_debugger_cond_free): New function.
2008-12-09 Martin Baulig <martin@ximian.com>
* languages/native/NativeLanguage.cs
(NativeLanguage.CreateInstance): Add support for some very basic types.
2008-12-08 Martin Baulig <martin@ximian.com>
* backend/server/i386-arch.c (x86_arch_child_stopped): Send
`STOP_ACTION_STOPPED' without checking for breakpoint if we didn't
receive a SIGTRAP.
* backend/server/x86_64-arch.c (x86_arch_child_stopped): Likewise.
2008-12-06 Martin Baulig <martin@ximian.com>
* mono-debugger-frontend.pc.in: New file.
* configure.in: Create `mono-debugger-frontend.pc' for Visual Studio.
2008-12-03 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs: Add some more error checking.
2008-12-02 Martin Baulig <martin@ximian.com>
* test/testsuite/*.cs: If there is more than one test in one file,
NUnit 2.3 may run them in any random order.
* backend/BreakpointManager.cs
(BreakpointManager.InitializeAfterFork): Remove all non-global
breakpoint, but don't force them to be `SourceBreakpoint's.
2008-12-02 Martin Baulig <martin@ximian.com>
* configure.in: Check which NUnit version we're using.
* build/Makefile.am: Add support for NUnit 2.3.
2008-11-26 Martin Baulig <martin@ximian.com>
* languages/TargetMember.cs
(TargetFieldInfo.IsCompilerGenerated): New public property.
* frontend/ObjectFormatter.cs
(ObjectFormatter.FormatClassObject): Skip compiler-generated
fields.
2008-11-26 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs
(ExpressionEvaluator.MonoObjectToString): Return the `raw'
returned string rather than pretty formatting it.
* frontend/ScriptingContext.cs
(ScriptingContext.MonoObjectToString): Do that here.
2008-11-26 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs
(ExpressionEvaluator.GetProperty): New public method.
* classes/GUIManager.cs
(GUIManager.GetProperty): New public method.
2008-11-22 Martin Baulig <martin@ximian.com>
* backend/server/server.h
(SignalInfo): Add `sigfpe', `sigquit', `sigabrt', `sigsegv',
`sigill' and `sigbus'.
* backend/Inferior.cs
(Inferior.IsManagedSignal): New public method.
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.StopOnManagedSignals): New configuration
option.
* backend/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): Add support for it here.
* classes/GUIManager.cs
(GUIManager.StartGUIManager): Set `StopOnManagedSignals' to false.
2008-11-19 Martin Baulig <martin@ximian.com>
* interface/Report.cs
(DebugFlags.GUI): Add new debug flags.
* classes/ExpressionEvaluator.cs
(ExpressionEvaluator.MonoObjectToString): Abort the invocation if
we stop unexpectedly.
* classes/GUIManager.cs
(GUIManager.MonoObjectToString): New public method; call
ExpressionEvaluator.MonoObjectToString() and suppress sending any
events if we stop unexpectedly.
2008-11-17 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs: New file.
(ExpressionEvaluator): New public static class.
(ExpressionEvaluator.MonoObjectToString): Moved here from
../frontend/Expression.cs.
* frontend/Expression.cs
(ExpressionParser.MonoObjectToString): Moved to
../classes/ExpressionEvaluator.cs
2008-11-17 Martin Baulig <martin@ximian.com>
Released version 2.2 "Sidney" of the Mono Debugger.
* NEWS: Update to 2.2.
* configure.in: Bump version number to 2.2.
2008-11-17 Martin Baulig <martin@ximian.com>
* configure.in: Add -fno-strict-aliasing to CFLAGS.
2008-11-11 Martin Baulig <martin@ximian.com>
* test/testsuite/NUnit.cs
(TestSuite.EvaluateExpression): New public method.
* frontend/Expression.cs
(ExpressionParser.EvaluationResult): New public enum.
(ExpressionParser.MonoObjectToString): New public method.
* test/{src|testsuite}/TestToString2.cs: New tests.
2008-11-10 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture.cs
(Architecture.GetLMF): Added `ref TargetAddress lmf_address'
argument; return the address of the next LMF.
* classes/Backtrace.cs
(Backtrace.TryLMF): Allow multiple LMF frames.
2008-11-08 Martin Baulig <martin@ximian.com>
* interface/Report.cs
(ReportWriter.ctor): Only use `MDB_DEBUG_FLAGS' and parse it like
the `-debug-flags' command line argument; kill `MDB_DEBUG_OUTPUT'.
2008-11-08 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.ManagedCallback): Insert a breakpoint on the last managed
frame to fix a race condition - see the comments in the source code.
2008-11-06 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture.cs
(Architecture.AdjustReturnAddress): Removed. This was a big hack
and there was no guarantee that the "adjusted" return address was
actually correct.
(Architecture.CreateFrame): Removed the `adjust_retaddr' argument.
2008-11-06 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture_X86_64.cs
(Architecture_X86_64.GetLMF): Fixed.
* classes/Backtrace.cs
(Backtrace.TryUnwind): Only check the LMF once.
2008-11-01 Martin Baulig <martin@ximian.com>
* languages/mono/MonoPointerType.cs: Use `*', not '&' (ie. `int*').
2008-10-28 Martin Baulig <martin@ximian.com>
* languages/mono/MonoVariable.cs
(MonoVariable.IsAlive): Check `AddressMode.Dead'.
(MonoVariable.IsInScope): Likewise.
2008-10-25 Martin Baulig <martin@ximian.com>
* languages/mono/MonoPointerObject.cs
(MonoPointerObject.GetDereferencedObject): Dereference the
location if the static type is a TargetPointerType. This fixes
pointer-to-pointer (`int** a', for instance).
2008-10-25 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(VariableInfo.AddressMode): Add `Dead'.
2008-10-24 Martin Baulig <martin@ximian.com>
Fixes the XSP-issue in #423518.
* backend/server/x86-linux-ptrace.c
(server_ptrace_detach_after_fork): Use a non-blocking wait to make
things work in case we already received the SIGSTOP before.
* test/testsuite/TestDontFollowFork.cs: New test.
2008-10-23 Martin Baulig <martin@ximian.com>
* interface/Report.cs
(Report.ParseDebugFlags): New public static method; parse the
debug flags both as integers and as strings.
* classes/DebuggerOptions.cs
(DebuggerOptions.ParseDebugFlags): Call Report.ParseDebugFlags()
to parse the debug flags; we can now also specify debug flags as a
comma separated list of strings.
2008-10-23 Martin Baulig <martin@ximian.com>
Bug #423518.
There is a race condition in the Linux kernel which shows up on >= 2.6.27:
When creating a new thread, the initial stopping event of that thread is sometimes
sent before sending the `PTRACE_EVENT_CLONE' for it.
* backend/server/library.c
(mono_debugger_server_dispatch_simple): New public function. This
function is safe to be called from any thread and only decodes the
event into the basic stopped / signaled / exited etc.
* backend/ThreadManager.cs: Queue stopping events from unknown
threads for 200 seconds to work around the race condition.
2008-10-20 Martin Baulig <martin@ximian.com>
Applying a patch from Cedric Vivier <cedricv@neonux.com>
* classes/Method.cs
(Method.IsInvokeWrapper): New internal property.
* backend/SingleSteppingEngine.cs
(SSE.OperationStep): Enable stepping into method from objects
deriving from MarshalByRefObject.
* test/{testsuite|src}/TestSSE.cs: Added testcase.
2008-10-20 Martin Baulig <martin@ximian.com>
* interface/Report.cs: Include timestamps when writing to a file.
2008-10-19 Martin Baulig <martin@ximian.com>
* test/src/TestManagedTypes.cs
(SimpleTypes): Move this into a separate class and use static
variables, so the JIT can't optimize them away.
2008-10-19 Martin Baulig <martin@ximian.com>
* build/Makefile.am: Small fix from Ian Greenhoe; bug #431771.
2008-10-17 Cedric Vivier <cedricv@neonux.com>
* backend/SingleSteppingEngine.cs
Enable StepInto for RemotingInvoke-wrapped methods.
* classes/Method.cs
(Method.IsInvokeWrapper): New public property.
2008-10-13 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs
(Registers.ImportantRegisters): New public property.
2008-09-15 Martin Baulig <martin@ximian.com>
* languages/TargetObjectKind.cs (TargetObjectKind): Add `Null'.
* languages/TargetObject.cs
(TargetObject.Kind): Make this virtual.
* languages/mono/MonoNullObject.cs
(MonoNullObject.Kind): Override and return `TargetObjectKind.Null'.
2008-09-15 Martin Baulig <martin@ximian.com>
* languages/mono/MonoRuntime.cs
(MonoRuntime.MonoArrayTypeGetBounds): New internal method; check
whether the lower bounds are all zero.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.ReadType): Call it here, only throw an
exception if we have upper bounds or some of the lower bounds are
non-zero.
2008-09-04 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager.ProcessExitedEvent): New public event.
* classes/Process.cs
(Process.Lookup): New public method to lookup a `Method' from a
`TargetAddress'.
2008-08-21 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager.Stop): New public method to stop a thread.
2008-08-21 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager.OnTargetEvent): Ignore `TargetInterrupted' if we are
already in break mode; auto-stop on `Exception' and
`UnhandledException'.
2008-08-19 Martin Baulig <martin@ximian.com>
Fix a race condition: correctly block until
`ActivatePendingBreakpoints' has actually been completed.
* classes/Process.cs
(Process.ActivatePendingBreakpoints): Wait until the command has
been completed.
* backend/ProcessServant.cs
(ProcessServant.ActivatePendingBreakpoints): Take a
`CommandResult' argument, so we can block on the operation.
* backend/SingleSteppingEngine.cs
(SSE.ManagedCallback): Take an additional `CommandResult' argument.
(SSE.OperationManagedCallback): Correctly implement multiple
callbacks; each callback now also have a CommandResult which we need
to set to completed when done.
2008-08-19 Martin Baulig <martin@ximian.com>
* backend/ThreadManager.cs: Fixed a hard to find race condition.
2008-08-14 Martin Baulig <martin@ximian.com>
* symbolwriter/MdbSymbolReader.cs: Add `-verbose' command line
argument and improve the scope variables check.
2008-08-14 Martin Baulig <martin@ximian.com>
* build/Makefile.am
(verify-local): New target. Run the symfile verifier here.
(check-local): Run `verify-local'.
2008-08-14 Martin Baulig <martin@ximian.com>
* test/{src|testsuite}/TestActivateBreakpoints2.cs: New test.
2008-08-14 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(server_ptrace_resume): New method; use this after receiving a
`STOP_ACTION_INTERRUPTED' to resume the previously running
stepi/continue.
* backend/server/library.c
(mono_debugger_server_resume): New public method.
* backend/Inferior.cs
(Inferior.Resume): New public method.
* backend/SingleSteppingEngine.cs
(SSE.ReleaseThreadLock): Call `inferior.Resume()' if we received a
`ChildEventType.CHILD_INTERRUPTED'. This fixes a race condition,
if we are executing a OperationExecuteInstruction, for instance.
2008-08-13 Martin Baulig <martin@ximian.com>
* test/testsuite/TestAttach.cs
(TestAttach.TearDown): Call `child.WaitForExit()' here since
TestAttach.Kill() may not be run if the test is disabled.
* test/testsuite/testnativeattach.cs
(testnativeattach.TearDown): Call `child.WaitForExit()' here since
testnativeattach.Kill() may not be run if the test is disabled.
2008-08-12 Martin Baulig <martin@ximian.com>
* test/{src|testsuite}/TestActivateBreakpoints.cs: New test.
2008-08-11 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(BreakCommand): Add `-gui' option to allow inserting breakpoints
while the target is running.
2008-08-11 Martin Baulig <martin@ximian.com>
* classes/Process.cs
(Process.ActivatePendingBreakpoints): New public method.
* backend/SingleSteppingEngine.cs
(SSE.OnModuleLoaded): Moved functionality into
ActivatePendingBreakpoints().
(SSE.ActivatePendingBreakpoints): New internal method.
(SSE.OperationInsertBreakpoint): Check the return value from the
runtime and pass it to mono.RegisterMethodLoadHandler().
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.RegisterMethodLoadHandler): When called from
the SSE, we now take an additional `TargetAddress argument' which
is the return value from the runtime; call method_from_jit_info()
if necessary.
* backend/ProcessServant.cs
(ProcessServant.ActivatePendingBreakpoints): New method.
2008-08-11 Martin Baulig <martin@ximian.com>
* test/testsuite/testnativefork.cs: Override debugger config; this
test needs "broken-threading = false", "stay-in-thread = true".
2008-08-05 Martin Baulig <martin@ximian.com>
Released version 2.0 "Cologne" of the Mono Debugger :-)
* NEWS: Updated to 2.0.
* configure.in: This is trunk, bump the version number to 2.1.
2008-07-31 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs
(Debugger.ModuleLoadedEvent): New public event.
(Debugger.ModuleUnLoadedEvent): New public event.
2008-07-31 Martin Baulig <martin@ximian.com>
**** The Debugger has been branched for Mono 2.0 ****
2008-07-30 Martin Baulig <martin@ximian.com>
* configure.in: Bump version number to 0.99; we're ready to branch.
2008-07-30 Martin Baulig <martin@ximian.com>
* configure.in (--with-host-mono): New configure option to
override the mono used to run child applications.
* build/Makefile.am: Link against a private copy of the symbol
writer to make things more robust; you may now install the
debugger to run with an older /usr/bin/mono. Create a new
command-line tool called `mdb-symbolreader.exe' which is the
new symbol file verifier.
2008-07-30 Martin Baulig <martin@ximian.com>
* symbolwriter/MdbSymbolReader.cs: New file. This is a symbol
file verifier which reads everything in a symbol file and checks
whether everything is ok. You can run this inside mdb to debug
symbol file bugs.
2008-07-30 Martin Baulig <martin@ximian.com>
* symbolwriter/: Created private copy for the debugger.
* symbolwriter/MonoSymbolWriter.cs: Moved `ISourceFile',
`ICompileUnit' and `IMethodDef' into MonoSymbolFile.cs.
* symbolwriter/MonoSymbolFile.cs
(MonoSymbolFile.AnonymousScopes): New public property.
2008-07-29 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.read_variables): When inside an anonymous method,
only allow accessing `this' if it has been captured.
2008-07-29 Martin Baulig <martin@ximian.com>
* backend/Inferior.cs
(Inferior.HasSignals): New public property.
(Inferior.Kernel_SIGRTMIN): New public property.
* backend/ThreadManager.cs
(ThreadManager.HandleChildEvent): `__SIGRTMIN' and `__SIGRTMIN+1'
are used internally by glibc -> ignore __SIGRTMIN+1.
* backend/server/server.h
(SignalInfo): Add `kernel_sigrtmin'.
2008-07-29 Martin Baulig <martin@ximian.com>
* test/testsuite/testnative*.cs: Add "Native" category.
* build/Makefile.am
(EXCLUDED_TESTS): New variable to select tests which ware excluded
from `make check'; exclude "NotWorking,Attach,Native,Threads,AppDomain"
for everyone and a little bit less for me.
2008-07-28 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.IsExceptionType): Correctly resolve
`type.BaseType'.
* test/testsuite/TestException.cs: Added testcase for user-defined
exception classes.
2008-07-28 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(MemberAccessExpression.ResolveMemberAccess): When resolving an
invocation expression on a value-type, also check `System.Object'.
* test/testsuite/TestManagedTypes.cs: Added testcase.
2008-07-28 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassType.cs
(MonoClassType.HasFixedSize) Set to true:
* test/testsuite/TestManagedTypes.cs: Added testcase.
2008-07-28 Martin Baulig <martin@ximian.com>
* test/testsuite/TestManagedTypes.cs: Added testcases for boxing
valuetypes.
2008-07-25 Martin Baulig <martin@ximian.com>
* configure.in: Disable XSP support by default.
2008-07-25 Martin Baulig <martin@ximian.com>
* languages/Language.cs
(Language.CreateBoxedObject): New public method.
* frontend/Expression.cs
(CastExpression.DoCast): Add support for valuetype -> object.
* backend/Inferior.cs
(Inferior.CallMethod): Added overloaded version taking a `long'
and a `TargetObject' argument; the object will be copied to the
stack if it's stored in a register.
* classes/Thread.cs
(Thread.CallMethod): Added overloaded version taking a
`TargetAddress' and a `TargetObject' argument; the object will be
copied to the stack if it's stored in a register.
* backend/SingleSteppingEngine.cs
(SSE.OperationCallMethod): Add support for the new address /
object marshaller.
* backend/server/server.h
(mono_debugger_server_call_method_3): New public method; added
method-call marshaller for methods taking an address and a
`MonoObject * '.
2008-07-23 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.OperationStepCompilerGenerated): New operation.
(SSE.frame_changed): Check whether we're in compiler-generated
code and keep stepping if necessary.
2008-07-23 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(ShowLocationCommand): Improve `show location' a bit to support
struct fields.
2008-07-19 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(DisassembleCommand): Add `-frame' option to show disassembly for
the current step frame, ie. all code which belongs to the current
source line.
2008-07-19 Martin Baulig <martin@ximian.com>
* configure.in: Require Mono and XSP from the 2.0 branch.
2008-07-11 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.ThreadLockData): New protected class; moved `stopped' and
`stop_event' here from the SSE.
(SSE): Replaced `has_thread_lock' with `ThreadLockData thread_lock'.
(SSE.EventResult): Add `ParentResumed' -> the child operation has
completed, but the target is running (ie. kill the child operation
and then return `EventResult.Running').
(SSE.ManagedCallback): New method; this is private for the moment,
but I'd like to have this in SVN before flying back to Germany.
(SSE.OperationManagedCallback): New operation.
2008-07-10 Martin Baulig <martin@ximian.com>
* backend/ProcessStart.cs
(ProcessStart.SetupEnvironment): Set `MONO_GENERIC_SHARING = none'.
* frontend/Command.cs (Attach): Effective immediately, attaching
is no longer supported and has been disabled.
2008-07-04 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager): New public class; handles stopping / resuming all
threads for a GUI.
* classes/Process.cs
(Process.StartGUIManager): New public method.
2008-07-02 Martin Baulig <martin@ximian.com>
* classes/Breakpoint.cs
(Breakpoint.OnBreakpointBound): New protected internal virtual method.
(Breakpoint.OnBreakpointError): Likewise.
2008-06-30 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.OpaqueFileNames): New public property;
allows us to use Windows file names.
2008-06-18 Martin Baulig <martin@ximian.com>
* backend/MonoThreadVersion.cs
(MonoDebuggerInfo): The stable version is 80.
* configure.in: The stable symbol file version is 50.0.
2008-06-18 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.xsd: Add <DirectoryMaps> section
containing `<Map from="c:/cygwin/home/ichotolot" to="/work/mordor"/>'
entries.
* classes/SourceInfo.cs
(SourceFile.ctor): Added `DebuggerSession' argument; do directory maps.
2008-06-17 Jb Evain <jbevain@novell.com>
* configure.in: detect the internal Cecil library that
comes with Mono.
* build/Makefile.am: use Mono's version of Cecil.
2008-06-17 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoMethod.IsCompilerGenerated): Check the `[DebuggerHidden]' and
`[CompilerGenerated]' custom attributes on the method.
2008-06-15 Martin Baulig <martin@ximian.com>
Fix thread-db for SuSE 11 - we need to return the correct PID in
ps_getpid().
* backend/server/thread-db.h (ThreadDbHandle): Added `pid' field;
we need to store the PID here for ps_getpid().
* backend/server/thread-db.c
(mono_debugger_thread_db_init): Added `pid' argument.
(ps_getpid): Return the stored `pid'.
* backend/ThreadDB.cs
(ThreadDB.Create): Take an `Inferior' instead of a
`TargetMemoryAccess' since we need the target's pid.
2008-06-11 Martin Baulig <martin@ximian.com>
* build/Makefile.am: Merge Mono.Debugger.dll and
Mono.Debugger.Backend.dll into Mono.Debugger.dll.
2008-06-10 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MethodAddress): Check whether prologue_end and epilogue_begin are
non-zero.
2008-06-07 Martin Baulig <martin@ximian.com>
* configure.in: Require the new symbol writer.
2008-06-05 Lluis Sanchez <lluis@novell.com>
* mono-debugger.pc.in: Add Mono.Debugger.Backend.dll to Libs
list. Needed until some types required by the MonoDevelop
add-in are moved to the public API.
2008-06-05 Martin Baulig <martin@ximian.com>
* classes/Method.cs
(Method.IsCompilerGenerated): New public abstract property.
* backend/SingleSteppingEngine.cs
(SSE.MethodHasSource): Also check `method.IsCompilerGenerated'.
2008-06-02 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.OperationStep.IsSourceOperation): Add `StepMode.Finish'.
(SSE.OperationStep.check_method_operation): New protected method;
don't stop inside the method's epilogue code.
(SSE.OperationStep.Step): If we're done stepping, call
check_method_operation() to check whether we stopped inside a
method's epilogue code.
2008-05-28 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs: Reflect latest symbol writer
changes; we now require the latest Mono from SVN HEAD.
2008-05-26 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoMethodLineNumberTable): Compute start and end row here.
2008-05-26 Martin Baulig <martin@ximian.com>
* languages/TargetFunctionType.cs
(TargetFunctionType.GetSourceCode): New public method.
(TargetFunctionType): Removed `HasSourceCode', `SourceFile',
`StartRow' and `EndRow'.
* frontend/Command.cs
(SourceCommand): Allow resolving to a `MethodSource' instead of a
`SourceLocation'.
(ListCommand): If we have a `MethodSource', list the method's
entire source code.
2008-05-26 Martin Baulig <martin@ximian.com>
* classes/SourceInfo.cs
(SourceFile): Made this class abstract.
(SourceFile.IsAutoGenerated): New public property.
(SourceFile.CheckModified): New public method.
* frontend/Command.cs
(ShowSourcesCommand): When used without args: print the sources
from the current stack frame's module.
* frontend/ScriptingContext.cs
(ScriptingContext.ShowSources): Check whether a source file has
been modified; hide auto-generated files when running in xsp mode.
2008-05-19 Martin Baulig <martin@ximian.com>
Kahalo-only.
* classes/DebuggerOptions.cs: -xsp now requires a directory as
argument which is passed to xsp via `--root'.
2008-05-19 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration): Add `NotifyUser_ThreadCreation'.
2008-05-19 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.Start): Use WaitAll(), not Wait() - to make things
work correctly when using `-start' and a thread which is not the
main thread stops first.
(Interpreter.Attach): Likewise.
(Interpreter.LoadSession): Likewise.
2008-05-19 Martin Baulig <martin@ximian.com>
Kill the `MONO_INSIDE_MDB' environment variable.
* backend/MonoThreadManager.cs
(MonoDebuggerInfo.UsingMonoDebugger): New public field.
(MonoThreadManager): Set `UsingMonoDebugger' when starting up and
after exec()'ing.
* backend/ProcessServant.cs
(ProcessServant.Initialize): If we exec()'ed a managed process,
call MonoThreadManager.InitializeAfterExec().
2008-05-19 Martin Baulig <martin@ximian.com>
* backend/ThreadManager.cs
(ThreadManager.HandleChildEvent): Eat SIGCHLD.
* backend/SingleSteppingEngine.cs
(SSE.ProcessEvent): if ThreadManager.HandleChildEvent() told us to
resume the target, try `current_operation.ResumeOperation()' first
before using `inferior.Continue ()'.
2008-05-19 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.WaitAll): Rescan the process/thread list when new
processes/threads have been created while we're waiting.
* test/{src|testsuite}/TestMultiThread2.cs: Add testcase.
2008-05-19 Martin Baulig <martin@ximian.com>
* backend/server/x86_64-arch.c
(x86_arch_child_stopped): Only send `STOP_ACTION_NOTIFICATION' if
`stopsig == SIGTRAP' (we may stop a second time at the notification
address if we received a signal).
* backend/server/i386-arch.c
(x86_arch_child_stopped): Likewise.
2008-05-16 Martin Baulig <martin@ximian.com>
Kahalo-only: Add support for `#line hidden'.
* classes/Method.cs
(LineEntry.IsHidden): New public property.
* languages/mono/MonoSymbolFile.cs
(MonoLineNumberTable.Lookup): Support hidden lines.
* test/{src|testsuite}/TestLineHidden.cs: New testcase.
2008-05-14 Martin Baulig <martin@ximian.com>
Allow executing methods while being stopped at a system call.
* backend/server/x86_64-arch.c
(server_ptrace_call_method*): Set %orig_rax to -1 to prevent the
kernel from restarting a system call.
(server_ptrace_execute_instruction): Likewise.
* backend/server/i386-arch.c
(server_ptrace_call_method*): Set %orig_eax to -1 to prevent the
kernel from restarting a system call.
(server_ptrace_execute_instruction): Likewise.
* backend/SingleSteppingEngine.cs
(SSE.OperationCallMethod): Fix method invocations while being
stopped at a system call. This only works when debugging managed
applications.
2008-05-08 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.OperationStart.HandleException): Don't stop in exceptions
after reaching the managed Main().
2008-05-07 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs: Add new `-xsp' option to start xsp
inside the debugger.
* configure.in: Conditionally depend on XSP when using the
development branch.
2008-05-07 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs
(Debugger.ProcessReachedMainEvent): New public event.
* backend/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): Emit the new
`ProcessReachedMainEvent' from `NotificationType.ReachedMain'.
* backend/ProcessServant.cs
(ProcessServant.Initialize): Emit the new
`ProcessReachedMainEvent' if we're a native process.
2008-05-07 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs: Kill `-args'.
2008-05-07 Martin Baulig <martin@ximian.com>
* backend/ProcessServant.cs
(ProcessServant.ChildForked): Unset `MONO_INSIDE_MDB' if we're not
following forks.
2008-05-06 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(SimpleNameExpression.DoResolve): Also call Process.LookupSymbol()
and return a NumberExpression containing the address on success.
* frontend/Command.cs
(BreakCommand.DoResolve): Also call Process.LookupSymbol() to
allow breakpoints on native methods.
* classes/Process.cs
(Process.LookupSymbol): New public method.
* backend/ProcessServant.cs
(ProcessServant.LookupSymbol): New public method; does a native
symbol lookup via the BfdContainer.
2008-05-06 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(WrapperMethod): Make GetParameters() and GetLocalVariables()
return an empty array instead of null.
2008-05-06 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(ShowCommand.ShowParametersCommand): Don't crash if the current
method doesn't have any parameters.
(ShowCommand.ShowLocalsCommand): Likewise.
2008-05-05 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture_X86_64.cs
(Architecture_X86_64.unwind_method): Use `memory.ReadLongInteger()'
to read the registers from the stack.
2008-04-29 Martin Baulig <martin@ximian.com>
* classes/Method.cs
(LineEntry.File): New public field.
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile): Add support for line numbers from other source
files if we're using the symbol writer from the kahalo branch.
2008-04-29 Martin Baulig <martin@ximian.com>
* configure.in: Enable building with a runtime / symbol writer
from both HEAD and the kahalo branch.
2008-04-24 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(Convert.ExplicitFundamentalConversion): New public method.
(CastExpression): Implement explicit fundamental conversions.
2008-04-24 Martin Baulig <martin@ximian.com>
* test/testsuite/TestManagedTypes.cs: Add some testcases to parse
all kinds of crazy numbers.
2008-04-23 Martin Baulig <martin@ximian.com>
* test/testsuite/NUnit.cs
(TestSuite.Verbose): Set to false.
2008-04-23 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(ShowCommand.ShowSourcesCommand): Fix #345172.
2008-04-23 Martin Baulig <martin@ximian.com>
* build/runtests.in: Use `--debug=mdb-optimizations' so we can
better attach to the process or examine core files.
2008-04-22 Martin Baulig <martin@ximian.com>
Fix an API bug: target output is always per process.
* classes/Debugger.cs
(Debugger.TargetOutputEvent): Moved to `Process'.
* classes/Process.cs
(Process.TargetOutputEvent): Moved here from `Debugger'.
2008-04-22 Martin Baulig <martin@ximian.com>
Fix a race condition causing problems when reading output from a
child process.
* backend/server/x86-ptrace.c
(server_ptrace_io_thread_main): Close the pipes here, not in
server_ptrace_finalize() since we may still be reading.
2008-04-22 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(server_ptrace_dispatch_event): Map SIGCONT => 0.
2008-04-22 Martin Baulig <martin@ximian.com>
* test/misc/libgtop-glue.[ch]: Moved to backend/server/.
* backend/server/Makefile.am
(libmonodebuggerserver_la_SOURCES): Added libgtop-glue.[ch].
2008-04-21 Martin Baulig <martin@ximian.com>
* configure.in: Require runtime version 69.
2008-04-21 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoThreadManager.InitializeAfterAttach): New internal method.
(MonoThreadManager.Detach): New internal method.
* backend/SingleSteppingEngine.cs
(SSE.OperationStart): We don't need to call any methods in the
target anymore when attaching.
(SSE.OperationAttach): Removed.
(SSE.OperationDetach): Removed.
(SSE.OperationGetLMFAddr): Removed.
2008-04-21 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(mono_debugger_server_initialize_code_buffer): New public function.
* backend/MonoThreadManager.cs
(MonoThreadManager.HasCodeBuffer): New internal property.
(MonoThreadManager.InitCodeBuffer): New internal method; allows
delayed initialization of the code buffer.
* backend/SingleSteppingEngine.cs
(SSE.step_over_breakpoint): Also use `OperationExecuteInstruction'
for the nop-case.
(SSE.OperationExecuteInstruction): Check whether the code buffer
has already been initialized and trigger an init if necessary.
(SSE.OperationInitCodeBuffer): New private callback; calls the new
`init_code_buffer' method.
2008-04-19 Martin Baulig <martin@ximian.com>
* backend/arch/Bfd.cs
(Bfd.OnModuleChanged): Always try to load the CFA if available;
also when loading of native symtabs is disabled.
* backend/arch/DwarfFrameReader.cs
(DwarfFrameReader.UnwindStack): Small fix for `.eh_frame'.
2008-04-16 Martin Baulig <martin@ximian.com>
* library.c (mono_debugger_server_get_registers_from_core_file):
New public function.
* backend/arch/CoreFile.cs
(CoreFile.CoreFileThread.read_registers): Read it here to
correctly read the registers.
2008-04-16 Martin Baulig <martin@ximian.com>
* test/misc/libgtop-glue.c: Copy implementation from libgtop so we
can use this on the build machines.
* configure.in: Don't require libgtop anymore.
2008-04-15 Martin Baulig <martin@ximian.com>
* backend/server/server.h
(mono_debugger_server_spawn): Removed the two `ChildOutputHandler's;
return a `IOTheadData *' pointer instead.
(mono_debugger_server_io_thread_main): New public function; we now
start the io thread from managed code and then call this function
with the `IOThreadData *' returned by mono_debugger_server_spawn().
* backend/Inferior.cs
(Inferior.TargetOutput): Removed.
(Inferior.Run): Start the io thread here in managed land and
directly call `process.OnTargetOutput ()'.
2008-04-14 Martin Baulig <martin@ximian.com>
* configure.in: Conditionally check for libgtop; it's only used in
the test suite to display some memory usage statistics.
* test/misc/: New directory; contains a simple managed wrapper
around libgtop to gather some statistics while running the tests.
* build/runtests: New script to run the tests; correctly sets
LD_LIBRARY_PATH so we can run the test suite without doing a `make
install' first.
* test/testsuite/NUnit.cs
(TestSuite.PrintMemoryInfo): New public method; uses libgtop to
print some memory statistics about the current process; only
available if compiled with libgtop support.
2008-04-14 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c
(_server_ptrace_finalize_inferior): New static function.
* backend/server/x86-ptrace.c
(server_ptrace_finalize): Don't leak file descriptors.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.Dispose): Use the `symfile_hash', not the
`symfile_by_index' hash to finalize symbol files.
2008-04-09 Martin Baulig <martin@ximian.com>
* test/{testsuite|src}/TestIterator.cs: Reflect latest gmcs changes.
2008-04-08 Martin Baulig <martin@ximian.com>
* languages/TargetArrayType.cs
(TargetArrayBounds): New public class.
(TargetArrayType.IsByRef): Don't set this here; we need to set
this to `true' for managed arrays and `false' for native ones.
* languages/TargetArrayObject.cs
(TargetArrayObject.GetArrayBounds): New public method returning
the `TargetArrayBounds'; this was formerly a private method.
(TargetArrayObject): Removed GetLowerBound() and GetUpperBound().
* languages/native/NativeArrayType.cs
(NativeArrayType): Improved support for native arrays; we now
support multi-dimensional arrays and unbound arrays.
* test/src/testnativetypes.c: Added tests.
* test/testsuite/testnativetypes.cs: Added tests.
2008-04-08 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs: Swap behavior of `-start' and `-run'
to make it consistent with the `start' and `run' commands.
2008-04-07 Martin Baulig <martin@ximian.com>
Implemented support for native function pointers.
* languages/native/NativeFunctionPointer.cs: New file.
* languages/native/NativeFunctionObject.cs: New file.
* frontend/Expression.cs
(PointerDereferenceExpression): Improved this.
* languages/TargetPointerType.cs
(TargetPointerType.CanDereference): New public abstract property.
* test/src/testnativetypes.c: Added tests.
* test/testsuite/testnativetypes.cs: Added tests.
2008-04-03 Martin Baulig <martin@ximian.com>
* backend/ProcessServant.cs
(ProcessServant.OnManagedThreadExitedEvent): New internal method;
remove the thread from the hash, but don't emit any events.
* backend/SingleSteppingEngine.cs
(SSE.OnManagedThreadExited): Fix a race condition: call
`process.OnManagedThreadExitedEvent()'.
2008-03-24 Wade Berrier <wberrier@novell.com>
* Makefile.am:
* doc/Makefile.am:
Fix EXTRA_DIST (missing files) to fix build
2008-03-15 Martin Baulig <martin@ximian.com>
Released version 0.80 "Terrania City" of the Mono Debugger :-)
* NEWS: Updated to 0.80.
2008-03-15 Martin Baulig <martin@ximian.com>
* frontend/Command.cs: Swap the behavior of `run' and `start':
`run' now stops in main again.
2008-03-15 Martin Baulig <martin@ximian.com>
* build/Makefile.am: Install in $(prefix)/lib/mono/2.0.
2008-03-14 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs: Don't use XmlValidatingReader.
* classes/DebuggerSession.cs: Don't use XmlValidatingReader.
2008-03-14 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile): Make sure it's the correct file format.
2008-03-14 Martin Baulig <martin@ximian.com>
* configure.in: Bump version number to 0.80.
2008-03-14 Martin Baulig <martin@ximian.com>
**** Merged the `terrania' branch of the Mono Debugger ****
2008-03-13 Martin Baulig <martin@ximian.com>
Fix #324557.
* backend/server/x86_64-arch.h: Don't #include <asm/user.h>; use
<sys/user.h> instead which defines `struct user_fpregs_struct'.
* backend/server/i386-arch.h: Likewise.
2008-03-10 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(JitCodeBlockEntry): Removed.
(MonoSymbolFile.MonoCodeBlock): Read the code blocks directly from
the symbol file and compute their start and end addresses from the
line number table.
2008-03-05 Martin Baulig <martin@ximian.com>
* languages/TargetMethodSignature.cs: New file.
(TargetMethodSignature): New public abstract class.
* languages/TargetType.cs
(TargetType.ContainsGenericParameters): New public abstract
property.
* languages/TargetFunctionType.cs
(TargetFunctionType.GetSignature): New public abstract method.
* languages/TargetMember.cs
(TargetMemberAccessibility): New public enum.
(TargetMemberInfo.Accessibility): New public readonly field.
* frontend/Style.cs
(Style.FormatStruct): Sort the members by their accessibility.
2008-02-28 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(ScriptingContext.MonoObjectToString): Operate on
`TargetStructObject' so we can also print generic instances.
2008-02-27 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): Store the return stack
pointer in `NotificationType.ReachedMain'.
2008-02-27 Martin Baulig <martin@ximian.com>
* languages/TargetClass.cs
(TargetClass.GetProperties): New public abstract method.
2008-02-26 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassType.cs
(IMonoStructType.LookupFunction): New interface method.
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.LookupFunction): Moved into `IMonoStructType'.
With generics, we can't just use the `token' as a key, so we need
a separate hash table per class.
2008-02-19 Martin Baulig <martin@ximian.com>
* README.terrania: Updated.
2008-02-19 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs
(TargetClassType.IsCompilerGenerated): New public abstract property.
* frontend/Expression.cs
(Expression.DoEvaluateObject): Don't use the result of
TargetStructObject.GetCurrentObject() if it's a compiler generated
class; this should fix iterators and print the `IEnumerable<T>'
interface instead.
2008-02-19 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.GetMethodName): Use a format which is compatible
with mcs's GetSignatureForError().
2008-02-18 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoMethod.do_read_variables): Support a captured 'this'.
2008-02-18 Martin Baulig <martin@ximian.com>
Improved iterator support and added some tests.
* test/{src|testsuite}/TestIterator.cs: New tests.
2008-02-18 Martin Baulig <martin@ximian.com>
* backend/arch/Instruction_I386.cs
(Instruction_I386.GetMonoTrampoline): Support short 0x6a `push' insns.
2008-02-15 Martin Baulig <martin@ximian.com>
* classes/Block.cs: New file.
(Block): New public abstract class.
(Method.IsIterator): New internal abstract property.
(Method.LookupBlock): New internal abstract method.
* backend/SingleSteppingEngine.cs
(SSE.frame_changed): Use the new Method.LookupBlock() to check
which code block we're in and start an `OperationStepIterator' if
necessary.
(SSE.OperationStepIterator): New operation.
2008-02-15 Martin Baulig <martin@ximian.com>
* test/{testsuite|src}/TestSSE.cs: New tests.
* test/{testsuite|src}/TestAnonymous.cs: Added new tests here.
2008-02-15 Martin Baulig <martin@ximian.com>
* classes/TargetBinaryReader.cs
(TargetBinaryReader): Added ReadSByte() and PeekSByte().
* backend/arch/X86_Instruction.cs: Use ReadSByte(), not ReadByte().
2008-02-08 Martin Baulig <martin@ximian.com>
* languages/TargetStructType.cs
(TargetStructType.BaseName): New public abstract property. This
is the full name (including namespace and generic arity) without
the type arguments.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.RegisterMethodLoadHandler): Use
`TargetStructType.BaseName' to insert the breakpoint.
* test/{testsuite|src}/TestAnonymous.cs: Added new tests here.
2008-02-06 Martin Baulig <martin@ximian.com>
* test/testsuite/NUnit.cs: Also scan for `// @MDB BREAKPOINT: name'
patterns and automatically insert breakpoints.
2008-02-02 Martin Baulig <martin@ximian.com>
HEADS UP: We now require Mono 1.9 with some local changes; see
README.terrania for details.
* README.terrania: New file.
2008-02-02 Martin Baulig <martin@ximian.com>
* languages/mono/CapturedVariable.cs: New file.
* languages/mono/MonoSymbolFile.cs
(MonoMethod.do_read_variables): Support captured variables and
parameters.
2008-02-02 Martin Baulig <martin@ximian.com>
* test/testuite/NUnit.cs: Read the source files and scan for
`// @MDB LINE: name' patterns; automatically compute the line
numbers.
* test/{testsuite|src}/TestAnonymous.cs: New test.
2008-01-30 Martin Baulig <martin@ximian.com>
* classes/Method.cs
(WrapperType): Updated.
(Method.IsWrapper): New public abstract property.
* backend/SingleSteppingEngine.cs
(SSE.OperationStep.TrampolineHandler): Improved; don't step into
compiler-generated .ctor's.
2008-01-30 Martin Baulig <martin@ximian.com>
* languages/TargetClass.cs
(TargetClass.GetMethods): New public abstract method.
(TargetClass.FindMember): New public virtual method.
* languages/TargetFunctionType.cs
(TargetFunctionType.DeclaringType): Changed type from
`TargetClassType' into `TargetStructType'.
* languages/mono/MonoFunctionType.cs
(MonoFunctionType.MonoClass): Removed.
(MonoFunctionType.SymbolFile): New internal property.
(MonoFunctionType.ResolveClass): New internal method.
* languages/mono/MonoMember.cs
(MonoMethodInfo): Operate on `IMonoStructType'.
* frontend/Expression.cs
(StructAccessExpression.FindMember): Search both in the
`TargetClass' and in the `TargetClassType'.
2008-01-25 Martin Baulig <martin@ximian.com>
* test/{testsuite|src}/TestRecursiveGenerics.cs: New test.
2008-01-25 Martin Baulig <martin@ximian.com>
Fix the parent type madness.
* languages/TargetClass.cs
(TargetClass.Type): Changed type into `TargetStructType'.
(TargetClass.RealType): New public property.
* languages/Language.cs
(Language.IsExceptionType): New public method.
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.ReadClassInfo): Create `info.type' here.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.LookupMonoClass): Fix the madness; just call
ReadClassInfo() here and return its `RealType'.
* languages/mono/MonoClassType.cs
(IMonoStructType.ClassInfo): New property.
(IMonoStructType.ResolveClass): Removed the `MonoClassInfo' argument.
(MonoClassType.ResolveClass): Maintain a `resolved' flag instead
of checking whether `class_info' is not null; the `class_info' may
now be set via `IMonoStructType.ClassInfo' without actually
resolving the class. This was necessary to support recursive
generic types like "class Test : Foo<Test>".
2008-01-25 Martin Baulig <martin@ximian.com>
* classes/Thread.cs
(Thread.RuntimeInvoke): Changed type of `object_argument' from
`TargetClassObject' -> `TargetStructObject'.
* backend/ThreadServant.cs
(ThreadServant.RuntimeInvoke): Changed type of `object_argument'
from `TargetClassObject' -> `TargetStructObject'.
* frontend/Interpreter.cs
(Interpreter.RuntimeInvoke): Changed type of `object_argument' from
`TargetClassObject' -> `TargetStructObject'.
2008-01-25 Martin Baulig <martin@ximian.com>
* frontend/CSharpTokenizer.cs
(CSharpTokenizer.ReadGenericArity): New public property.
(CSharpTokenizer.ReadDigit): If `ReadGenericArity' is true, only
read an integer and stop on the first non-digit. This is
necessary to properly tokenize "Foo`1.Data".
2008-01-23 Martin Baulig <martin@ximian.com>
Added `$parent (expr)' and `$parent+N (expr)' syntax.
* frontend/CSharpExpressionParser.jay
(PARENT): New token.
(PARENT opt_parent_level OPAREN expression CPAREN): New rule.
* frontend/CSharpTokenizer.cs: Add `$parent' => `Token.PARENT'.
* frontend/Expression.cs
(ParentExpression): New expression.
* test/testsuite/TestSimpleGenerics.cs: Added tests.
2008-01-23 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.GetMethodName): Include type parameters.
2008-01-23 Martin Baulig <martin@ximian.com>
* languages/TargetStructObject.cs
(TargetStructObject.GetParentObject): Provide the `Thread'
implementation here; made the `TargetMemoryAccess' version
abstract.
(TargetStructObject.GetCurrentObject): Moved here from
`TargetClassObject'; changed return type into
`TargetStructObject'; provide the `Thread' implementation here;
made the `TargetMemoryAccess' version abstract.
2008-01-23 Martin Baulig <martin@ximian.com>
* classes/Method.cs
(Method.GetDeclaringType): Return a `TargetStructType' instead of
a `TargetClassType'.
2008-01-23 Martin Baulig <martin@ximian.com>
* test/{testsuite|src}/TestSimpleGenerics.cs: New test.
2008-01-19 Martin Baulig <martin@ximian.com>
* configure.in: Use gmcs, not mcs.
2008-01-19 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassType.cs
(IMonoStructType): New internal interface.
(MonoClassType): Make things work if our parent class is a
`MonoGenericInstanceType' and not a `MonoClassType'.
2008-01-17 Martin Baulig <martin@ximian.com>
* languages/TargetObjectKind.cs
(TargetObjectKind): Added `GenericParameter' and `GenericInstance'.
* languages/TargetGenericParameterType.cs: New file.
(TargetGenericParameterType): New type.
* languages/TargetGenericInstanceType.cs: New file.
(TargetGenericInstanceType): New type.
* languages/TargetGenericInstanceObject.cs: New file.
(TargetGenericInstanceObject): New file.
* languages/TargetStructObject.cs
(TargetStructObject.GetParentObject): Moved here from
`TargetClassObject' and changed return type into
`TargetStructType'.
* languages/TargetClassObject.cs
(TargetClassObject.GetParentObject): Moved into
`TargetStructObject' and changed return type into
`TargetStructType'.
* languages/mono/MonoGenericInstanceObject.cs: New file.
* languages/mono/MonoGenericParameterType.cs: New file.
2007-12-18 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo): Merge get_fields() and get_field_offsets().
2007-12-18 Martin Baulig <martin@ximian.com>
Released version 0.60 "Madrid" of the Mono Debugger :-)
* configure.in: Require Mono >= 1.2.6.
2007-12-14 Wade Berrier <wberrier@novell.com>
* frontend/Makefile.am:
* test/src/Makefile.am:
* test/testsuite/Makefile.am:
* backend/arch/Makefile.am:
* classes/Makefile.am:
* interface/Makefile.am:
* languages/Makefile.am:
More .cs globbing for EXTRA_DIST
2007-12-10 Martin Baulig <martin@ximian.com>
* languages/TargetClass.cs
(TargetClass.GetField): Take a `TargetStructObject' instead of a
`TargetClassObject'.
(TargetClass.SetField): Likewise.
2007-12-10 Martin Baulig <martin@ximian.com>
* languages/TargetStructType.cs: New file.
(TargetStructType): New public abstract type.
* languages/TargetStructObject.cs: New file.
(TargetStructObject): New public abstract type.
* languages/TargetClassType.cs
(TargetClassType): Derive from `TargetStructType'; removed
`HasParent', `GetClass', `Module' and `ParentType' which are now
provided by `TargetStructType'.
* languages/TargetClassObject.cs
(TargetClassObject): Derive from `TargetClassObject'.
2007-12-10 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs: Added new `-start' command line
argument to stop in Main(); made `-run' run the target without
stopping. This makes the command line arguments consistent with
the `start' and `run' commands.
2007-12-10 Martin Baulig <martin@ximian.com>
Applied a patch from Harald Krapfenbauer <krapfenbauer@ict.tuwien.ac.at>:
* backend/server/i386-arch.c
(x86_arch_get_registers): Store the return value each time to
`result' to check for errors.
* backend/server/x86_64-arch.c
(x86_arch_get_registers): Store the return value each time to
`result' to check for errors.
* backend/server/x86-linux-ptrace.c
(server_ptrace_get_application): Increase size of `buffer' by 1.
2007-12-08 Martin Baulig <martin@ximian.com>
* configure.in: Bumped version number to 0.60.
2007-12-08 Martin Baulig <martin@ximian.com>
Changed default behavior: don't follow fork() by default.
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.FollowFork): Changed default to false.
* test/testsuite/NUnit.cs
(NUnitInterpreter.ctor): Override configuration: enable `FollowFork'.
2007-12-08 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(ConfigCommand): New command.
2007-12-08 Martin Baulig <martin@ximian.com>
* backend/Inferior.cs
(Inferior): Replaced InitializeAfterFork() by DetachAfterFork().
* backend/SingleSteppingEngine.cs
(SSE.InitAfterFork): New method.
(OperationInitializeAfterFork): New operation. To avoid a race
condition, we need to wait until the target stopped the first time
before we can disable the local breakpoints.
* backend/server/server.h
(mono_debugger_server_init_after_fork): Renamed info
mono_debugger_server_detach_after_fork().
* backend/server/x86-arch.h
(x86_arch_enable_breakpoint): Add prototype.
(x86_arch_disable_breakpoint): Add prototype.
* backend/server/i386-arch.c
(do_enable): Renamed into x86_arch_enable_breakpoint().
(do_disable): Renamed into x86_arch_disable_breakpoint().
* backend/server/x86_64-arch.c
(do_enable): Renamed into x86_arch_enable_breakpoint().
(do_disable): Renamed into x86_arch_disable_breakpoint().
2007-12-08 Martin Baulig <martin@ximian.com>
* backend/ProcessServant.cs
(ProcessServant.ChildForked): Implement detach-after-fork, ie. not
following fork(). At the moment, this can only be enabled in the
configuration file
[FIXME: add user-interface option to enable/disable this].
* backend/Inferior.cs
(Inferior.InitializeAfterFork): Added `bool follow_fork' argument.
* backend/server/server.h
(mono_debugger_server_init_after_fork): Added
`gboolean follow_fork' argument; remove all breakpoints if false.
2007-12-08 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.FollowFork): New property. Not yet implemented.
2007-12-08 Martin Baulig <martin@ximian.com>
* backend/ThreadDB.cs
(ThreadDB.GetThreadInfo): Added `TargetMemoryAccess' argument;
operate on that target. This fixes the XSP issue.
2007-12-07 Martin Baulig <martin@ximian.com>
Unify registers on i386 and x86_64.
* backend/arch/X86_Architecture.cs: New file.
(X86_Architecture): New internal abstract class.
(X86_Register): New internal enum.
* backend/arch/Architecture_X86_64.cs
(X86_64_Register): Removed; use `X86_Register' instead.
* backend/arch/Architecture_I386.cs
(I386Register): Removed; use `X86_Register' instead.
* backend/server/x86-arch.h
(DebuggerX86Register): Use an unified register representation on
i386 and x86_64.
2007-12-05 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture_X86_64.cs
(X86_64_Register): Actually sync with backend/arch/x86_64-arch.h.
2007-11-30 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs
(TargetClassType.StaticFields): Merged with `Fields'.
(TargetClassType.StaticProperties): Merged with `Properties'.
(TargetClassType.StaticEvents): Merged with `Events'.
(TargetClassType.StaticMethods): Merged with `Methods'.
(TargetClassType.StaticConstructors): Merged with `Constructors'.
(TargetClassType.FindMember): Provide a virtual implementation here.
2007-11-28 Martin Baulig <martin@ximian.com>
* languages/TargetClass.cs
(TargetClass.GetFields): New public method; this includes both
instance and static fields.
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetFields): Get the field types from the runtime
and not from Cecil.
* frontend/ObjectFormatter.cs
(ObjectFormatter.FormatClassObject): Use the new `TargetClass' to
display fields.
2007-11-28 Martin Baulig <martin@ximian.com>
* languages/TargetClass.cs
(TargetClass): New public abstract class.
* languages/TargetClassType.cs
(TargetClassType.GetClass): New public method.
(TargetClassType): Removed GetStaticField() and SetStaticField(),
they're now in the `TargetClass'.
* languages/TargetClassObject.cs
(TargetClassObject): Removed GetField() and SetField(), they're
now in the `TargetClass'.
2007-11-28 Martin Baulig <martin@ximian.com>
* languages/TargetFunctionType.cs
(TargetFunctionType.GetMethodAddress): Removed.
* languages/mono/MonoClassType.cs
(MonoClassType.HardResolveClass): Removed.
* backend/SingleSteppingEngine.cs
(SingleSteppingEngine.OperationRuntimeInvoke): Call
GetMethodAddress() directly on the `MonoClassInfo'.
2007-11-28 Martin Baulig <martin@ximian.com>
* languages/TargetFundamentalObject.cs
(TargetFundamentalObject.GetObject): Added internal overloaded
version taking a `TargetMemoryAccess'.
* backend/SingleSteppingEngine.cs
(SingleSteppingEngine): Kill some more `sse.Thread' madness.
* backend/Inferior.cs
(Inferior.RuntimeInvoke): Removed the `Thread' argument.
2007-11-28 Martin Baulig <martin@ximian.com>
Renamed `Mono.Debugger.Backends' => `Mono.Debugger.Backend'.
2007-11-28 Martin Baulig <martin@ximian.com>
* backend/arch/X86_Instruction.cs
(X86_Instruction.GetMonoTrampoline): New protected abstract method.
(X86_Instruction.CheckTrampoline): Implement this here.
2007-11-28 Martin Baulig <martin@ximian.com>
* backend/TargetMemoryAccess.cs
(TargetMemoryAccess): Moved `TargetIntegerSize',
`TargetLongIntegerSize', `TargetAddressSize', `IsBigEndian',
`CanWrite' and `Write*' here from `TargetAccess'.
(TargetAccess): Removed everything except `InsertBreakpoint' and
`RemoveBreakpoint'.
* classes/DebuggerSession.cs
(IExpressionParser): Operate on `Thread', not `TargetMemoryAccess'.
(DebuggerSession.ParseLocation): Likewise.
* classes/Thread.cs
(Thread): Don't derive from `TargetAccess'.
* classes/Breakpoint.cs
(Breakpoint.Resolve): Operate on `Thread', not `TargetMemoryAccess'.
* backend/ThreadServant.cs
(ThreadServant): Don't derive from `TargetAccess' or
`TargetMemoryAccess'.
* backend/arch/Architecture.cs
(Architecture): Operate on `TargetMemoryAccess', not `Thread'.
* backend/Inferior.cs
(Inferior): Derive from `TargetAccess', not `TargetMemoryAccess'.
* backend/MonoThreadManager.cs
(MonoMetadataInfo): Moved into ../languages/mono/MonoRuntime.cs.
* languages/Target*Object.cs
(Target*Object): Operate on `Thread', not `TargetMemoryAccess'.
* languages/Target*Type.cs
(Target*Type): Operate on `Thread', not `TargetMemoryAccess'.
2007-11-22 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(OperationDelegateInvoke): New operation; step through a delegate
invocation trampoline.
* backend/arch/Instruction.cs
(Instruction.TrampolineType): Added `DelegateInvoke'.
2007-11-20 Martin Baulig <martin@ximian.com>
* test/testsuite/TestDelegate.cs: Temporarily disable this.
* backend/SingleSteppingEngine.cs
(OperationExecuteInstruction): Make this a separate operation
since we need to resume the target after executing the instruction
if we're not single-stepping.
(OperationActivateBreakpoints): Use the new breakpoint code.
* languages/TargetFunctionType.cs
(TargetFunctionType.InsertBreakpoint): Take a
`FunctionBreakpointHandle' argument, not `MethodLoadedHandler'.
2007-11-19 Martin Baulig <martin@ximian.com>
* frontend/Main.cs
(Main.RunInferiorMainLoop): New public method. This can be used
to run a main loop inside the nunit test suite.
* test/testsuite/NUnit.cs
(TestSuite.MainLoop): New public method; run an inferior main loop
from within the testsuite.
2007-11-06 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture_I386.cs
(Architecture_I386.GetLMF): Make this work again.
2007-11-05 Martin Baulig <martin@ximian.com>
* backend/arch/Instruction.cs
(Instruction.Type): Added `Interpretable'.
* backend/arch/Instruction_I386.cs
(Instruction_I386.InterpretInstruction): Interpret `push %ebp'.
* backend/arch/Instruction_X86_64.cs
(Instruction_I386.InterpretInstruction): Interpret `push %rbp'.
2007-11-05 Martin Baulig <martin@ximian.com>
* backend/arch/Instruction.cs
(Instruction.CanInterpretInstruction): New public property.
* backend/arch/Bfd.cs
(Bfd.DynlinkBreakpoint): Interpret the instruction rather than
stepping over the breakpoint.
2007-11-05 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(mono_debugger_server_finalize_mono_runtime): New public method.
* backend/ProcessServant.cs
(ProcessServant.CanExecuteCode): New internal property.
2007-11-05 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoDebuggerInfo.MinDynamicVersion): Bump to 64 to require SVN HEAD.
* backend/server/x86_64-arch.c: Reflect latest JIT changes.
* backend/server/i386-arch.c: Likewise.
2007-10-31 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture.cs
(Architecture.Opcodes.GenerateNopInstruction): New public property.
* backend/SingleSteppingEngine.cs
(SSE.step_over_breakpoint): Use Opcodes.GenerateNopInstruction()
instead of encoding it here.
* backend/server/server.h
(mono_debugger_server_execute_instruction): Removed the
`original_size' argument; replaced `push_retaddr' by `up
2007-10-31 Martin Baulig <martin@ximian.com>
* backend/arch/Opcodes.cs
(Opcodes.GenerateJumpInstruction): New abstract method.
* backend/arch/X86_Opcodes.cs
(X86_Opcodes): Make this abstract.
* backend/arch/Opcodes_I386.cs: New file.
(Opcodes_I386): i386-specific implementation.
* backend/arch/Opcodes_X86_64.cs: New file.
(Opcodes_X86_64): x86_64-specific implementation.
2007-10-31 Martin Baulig <martin@ximian.com>
Merged the Plophos branch.
* backend/SingleSteppingEngine.cs
(SSE.step_over_breakpoint): Take a `bool singlestep' and a
`TargetAddress until' argument; use the new ExecuteInstruction()
whenever possible.
(SSE): The old GetCallTarget() API is gone; we now use
Architecture.ReadInstruction() which returns an `Instruction'.
(OperationStepOverBreakpoint): We don't need to deal with
trampolines here anymore.
(OperationMonoTrampoline): This is used when stepping into a
trampoline: we enable the `NotificationType.Trampoline'
notification and resume execution.
(OperationCompileMethod): Removed.
(OperationRuntimeClassInit): Removed.
* backend/ProcessServant.cs: Reflect latest runtime changes.
* backend/MonoThreadManager.cs: Reflect latest runtime changes.
* backend/Inferior.cs
(Inferior.ChildEvent): Added public readonly `CallbackData' field.
(Inferior.CallMethod(long,long)): Take a `byte[]' and a `long'
argument instead of two `long' arguments.
(Inferior.ExecuteInstruction): New public method.
(Inferior.ProcessEvent): mono_debugger_server_dispatch_event() may
now pass us an additional byte[] argument.
* backend/server/breakpoints.h
(BreakpointInfo): Added `runtime_table_slot'.
* server.h
(MonoRuntimeInfo): New typedef.
(ServerHandle): Added `MonoRuntimeInfo *mono_runtime'
(InferiorVTable): Added `set_runtime_info' and
`execute_instruction'; removed `set_notification'; `call_method_2'
now takes additional `data_size' and 'data_buffer' arguments.
(mono_debugger_server_set_runtime_info): New function.
(mono_debugger_server_execute_instruction): New function.
(mono_debugger_server_set_notification): Removed.
(mono_debugger_server_initialize_mono_runtime): New function.
* x86-ptrace.c
(InferiorHandle): Removed `notification_address', this is now in
the new `MonoRuntimeInfo'.
* x86_64-arch.c
(runtime_info_enable/disable_breakpoint): New static methods.
* i386-arch.c
(runtime_info_enable/disable_breakpoint): New static methods.
* backend/arch/Architecture.cs
(CallTargetType): Removed.
(Architecture.ReadInstruction): New method.
(Architecture.IsTrampoline): Removed.
(Architecture.IsCall): Removed.
(Architecture.GetCallTarget): Removed.
(Architecture.DoGetMonoTrampoline): Removed.
* backend/arch/Opcodes.cs: New file.
(Opcodes): New abstract internal class.
* backend/arch/X86_Opcodes.cs: New file.
(X86_Opcodes): Implementation for i386 and x86_64.
* backend/arch/Instruction.cs: New file.
(Instruction): New abstract internal class.
* backend/arch/X86_Instruction.cs: New file.
(X86_Instruction): Abstract implementation for i386 and x86_64.
* backend/arch/Instruction_I386.cs: New file.
(Instruction_I386): i386-specific part.
* backend/arch/Instruction_X86_64.cs: New file.
(Instruction_X86_64): x86_64-specific part.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.IsTrampolineAddress): New public method.
(MonoLanguageBackend.GetTrampoline): FIXME: temporarily broken.
2007-10-30 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture.cs
(Architecture.Disassembler): New public property; only create one
single disassembler per process.
* backend/arch/Disassembler.cs
(Disassembler.GetInstructionSize): Added `TargetMemoryAccess' argument.
(Disassembler.DisassembleInstruction): Likewise.
(Disassembler.DisassembleMethod): Likewise.
2007-10-30 Martin Baulig <martin@ximian.com>
* backend/ProcessServant.cs
(ProcessServant.Architecture): New public property; only create
one single `Architecture' instance per process.
2007-10-29 Martin Baulig <martin@ximian.com>
* classes/TargetInfo.cs: New file.
(TargetInfo): Moved here from TargetBinaryAccess.cs.
(TargetMemoryInfo): New public class, derives from `TargetInfo'.
(TargetInfo.AddressDomain): Moved this into `TargetMemoryInfo'.
2007-10-24 Martin Baulig <martin@ximian.com>
* backend/arch/Instruction.cs: New file.
(Instruction): New internal abstract class.
* backend/arch/X86_Instruction.cs: New file.
(X86_Instruction): New internal class; implement `Instruction'
here, we use this for both i386 and x86_64.
* backend/arch/Architecture.cs
(Architecture.DoGetCallTarget): Don't make this abstract;
implement it here using the new `Instruction' class.
2007-10-16 Martin Baulig <martin@ximian.com>
* backend/ILanguageBackend.cs: Removed.
(ILanguageBackend): Removed.
2007-10-16 Martin Baulig <martin@ximian.com>
* backend/ILanguageBackend.cs
(NotificationType): Moved into MonoThreadManager.cs.
* backend/MonoThreadManager.cs
(NotificationType): Moved here from ILanguageBackend.cs.
2007-10-16 Martin Baulig <martin@ximian.com>
* backend/ILanguageBackend.cs
(ILanguageBackend.GetTrampoline): Removed.
2007-10-16 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture.cs
(Architecture.CallTargetType): Add `NativeTrampoline',
`NativeTrampolineStart' and `MonoTrampoline'.
(Architecture.GetCallTarget): Also check for trampolines here.
(Architecture.GetTrampoline): Removed.
* backend/ILanguageBackend.cs
(ILanguageBackend.GetTrampolineAddress): Removed.
2007-10-15 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture.cs
(Architecture.CallTargetType): New internal enum.
(Architecture.GetCallTarget): Merge GetJumpTarget() and
GetCallTarget() into a new GetCallTarget(); we now return a
`CallTargetType'.
2007-10-10 Martin Baulig <martin@ximian.com>
Fix the "field from parent class madness".
* languages/TargetClassObject.cs
(TargetClassObject.GetParentObject): Take a `TargetMemoryAccess'
instead of a `Target' argument.
* languages/mono/MonoClassObject.cs
(MonoClassObject.GetParentObject): Disallow any implicit boxings.
* frontend/Expression.cs
(StructAccessExpression.FindMember): When searching in the parent
class, also use the parent instance.
2007-10-09 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo): Moved the implementations of GetField(),
SetField(), GetStaticField() and SetStaticField() here from
`MonoClassType'.
* languages/mono/MonoClassType.cs
(MonoClassType): Moved all the code dealing with fields into
`MonoClassInfo'.
2007-10-09 Martin Baulig <martin@ximian.com>
* languages/TargetMember.cs
(TargetEnumInfo): New public abstract class.
* languages/TargetEnumType.cs
(TargetEnumType): Changed the type of `Value' and `Members' from
`TargetFieldInfo' info `TargetEnumInfo'.
* languages/mono/MonoClassType.cs
(MonoClassType): No longer include the fields and methods from our
parent class. We now create our parent class on-the-fly when it's
needed.
2007-10-09 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.ClassType): New public property.
(MonoClassInfo.GetParent): New public method; compute the parent
on-the-fly when it's needed.
* languages/mono/MonoClassObject.cs
(MonoClassObject): The .ctor now takes a `MonoClassInfo' argument.
(MonoClassObject.GetParentObject): Implement this here.
2007-10-05 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.LookupClassInfo): Reload the symbol tables if we
can't find the requested type and try again.
2007-10-05 Martin Baulig <martin@ximian.com>
* languages/TargetType.cs
(TargetType.SetObject): `Thread' -> `TargetAccess'.
* languages/TargetFundamentalObject.cs
(TargetFundamentalObject.SetObject): `Thread' -> `TargetAccess'.
* languages/TargetClassObject.cs
(TargetClassObject.SetField): `Thread' -> `TargetAccess'.
* languages/TargetArrayObject.cs
(TargetArrayObject.SetElement): `Thread' -> `TargetAccess'.
2007-10-05 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs
(Register.WriteRegister): `Thread' -> `TargetAccess'.
* languages/TargetLocation.cs
(TargetLocation.WriteBuffer): `Thread' -> `TargetAccess'.
(TargetLocation.WriteAddress): Likewise.
* backends/TargetAccess.cs
(TargetAccess): Move `Mono.Debugger.Backends' -> `Mono.Debugger'.
2007-10-05 Martin Baulig <martin@ximian.com>
* languages/TargetObject.cs
(TargetObject.GetAddress): `Thread' -> `TargetMemoryAccess'.
* languages/TargetFundamentalObject.cs
(TargetFundamentalObject.GetObject): `Thread' -> `TargetMemoryAccess'.
* languages/TargetClassObject.cs
(TargetClassObject.GetField): `Thread' -> `TargetMemoryAccess'.
(TargetClassObject.GetCurrentObject): Likewise.
2007-10-05 Martin Baulig <martin@ximian.com>
* languages/TargetPointerObject.cs
(TargetPointerObject.GetCurrentType): `Thread' -> `TargetMemoryAccess'.
(TargetPointerObject.GetDereferencedObject): Likewise.
(TargetPointerObject.GetArrayElement): Likewise.
* languages/TargetObjectObject.cs
(TargetObjectObject.GetClassObject): `Thread' -> `TargetMemoryAccess'.
2007-10-05 Martin Baulig <martin@ximian.com>
* languages/TargetObject.cs
(TargetObject.GetDynamicSize): `Thread' -> `TargetMemoryAccess'.
* languages/TargetLocation.cs
(TargetLocation.ReadMemory): `Thread' -> `TargetMemoryAccess'.
(TargetLocation.ReadBuffer): Likewise.
2007-10-05 Martin Baulig <martin@ximian.com>
* languages/TargetEnumType.cs
(TargetEnumType.Value): Replaced by a GetValue() method.
* languages/TargetType.cs
(TargetType.GetObject): Added `TargetMemoryAccess' argument.
(TargetType.DoGetObject): Likewise.
2007-10-02 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c
(_server_ptrace_check_errno): New static method; when `errno' is
`ESRCH', check whether the target still exists to distinguish
between `COMMAND_ERROR_NOT_STOPPED' and `COMMAND_ERROR_NO_TARGET'.
2007-10-02 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SingleSteppingEngine.ProcessEvent): Added new `dead' flag which
is set when we receive `CHILD_EXITED' or `CHILD_SIGNALED'.
(SingleSteppingEngine.IsAlive): Also check for `dead' and `killed'.
2007-10-02 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SingleSteppingEngine.Return): Create our own, local backtrace
instead of using `current_backtrace'; limit the maximum number of
frames to 2 since that's all we need here.
* classes/Backtrace.cs
(Backtrace.TryUnwind): Add sanity check to avoid 'loops'.
2007-09-28 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoDebuggerInfo.MinDynamicVersion): Require 61.
* languages/mono/MonoRuntime.cs
(MonoRuntime.ReadMonoMethod): New public static method.
2007-09-28 Martin Baulig <martin@ximian.com>
* languages/mono/MonoType.cs: Renamed into MonoRuntime.cs
(MonoType): Renamed into `MonoRuntime'.
2007-09-28 Martin Baulig <martin@ximian.com>
* backend/arch/DwarfReader.cs
(DwarfReader): Kill the `source_hash'; each source file may be
used multiple times in different compilation units.
2007-09-28 Martin Baulig <martin@ximian.com>
* backend/arch/Architecture_I386.cs
(Architecture_I386.GetLMF): Make this work again.
2007-09-28 Martin Baulig <martin@ximian.com>
* backend/ProcessServant.cs
(ProcessServant.read_thread_table): Truncate the `TID' to 32-bits
on 32-bit machines.
2007-09-27 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.ReadMonoClass): Use
MonoClassInfo.ReadMonoClass() to create the `MonoClassInfo', then
create a `MonoClassType'.
(MonoLanguageBackend.CreateClassInfo): Renamed into
CreateCoreType(); create the MonoClassType here and not inside
MonoClassInfo's .ctor.
* languages/mono/MonoClassType.cs
(MonoClassType.ReadClassType): Removed.
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.ClassType): Removed.
2007-09-27 Martin Baulig <martin@ximian.com>
* languages/mono/MonoObjectType.cs
(MonoObjectType): Replace the public .ctor with a static
Create() method.
* languages/mono/MonoOpaqueType.cs: Renamed into MonoVoidType.cs
(MonoOpaqueType): Renamed into `MonoVoidType'.
2007-09-27 Martin Baulig <martin@ximian.com>
* languages/mono/MonoType.cs
(MonoType.Read): Renamed into ReadType().
(MonoType.ReadMonoClass): New public static method.
* languages/mono/MonoObjectObject.cs
(MonoObjectObject.GetCurrentType): Use MonoType.ReadMonoClass().
2007-09-27 Martin Baulig <martin@ximian.com>
* languages/mono/MonoFundamentalType.cs
(MonoFundamentalType): Replace the public .ctor with a static
Create() method.
* languages/mono/MonoStringType.cs
(MonoStringType): Replace the public .ctor with a static
Create() method.
2007-09-26 Wade Berrier <wberrier@novell.com>
* languages/native/Makefile.am:
* languages/mono/Makefile.am:
Glob .cs for EXTRA_DIST so these don't need updating anymore.
2007-09-26 Martin Baulig <martin@ximian.com>
* languages/mono/MonoFundamentalType.cs
(MonoFundamentalType): The .ctor now takes a `MonoClassInfo'.
* languages/mono/MonoClassType.cs
(MonoClassType): Add a .ctor taking a `MonoClassInfo'; remove the
one taking a `TargetAddress'.
2007-09-26 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo): Read field offsets and methods on-the-fly when
they're needed; this allows us to create a `MonoClassInfo' for
classes which aren't initialized yet.
(MonoClassInfo.FieldOffsets): Replaced by GetFieldOffsets().
(MonoClassInfo.GetMethodAddress): Added `TargetMemoryAccess' arg.
2007-09-26 Martin Baulig <martin@ximian.com>
* languages/TargetFundamentalType.cs
(TargetFundamentalType): Made this class abstract.
(TargetFundamentalType.HasClassType): Don't implement this here.
(TargetFundamentalType.ClassType): Likewise.
* languages/native/NativeFundamentalType.cs: New file.
(NativeFundamentalType): Derive from `TargetFundamentalType'.
* languages/mono/MonoFundamentalType.cs
(MonoFundamentalType): Implement `HasClassType' and `ClassType' here.
2007-09-25 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoTypeTable.ReadDataItem): Create a `token' -> `klass_address'
hash table; don't actually read the class.
(MonoSymbolFile.LookupClassInfo): New internal method; we now
create the `MonoClassInfo' on-the-fly when it's needed.
2007-09-25 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassType.cs
(MonoClassType.ResolveClass): Added `TargetMemoryAccess target'
and `bool fail' arguments.
2007-09-25 Martin Baulig <martin@ximian.com>
* languages/mono/MonoDebuggerSupport.cs
(MonoDebuggerSupport.GetLocalTypeFromSignature): Removed.
2007-09-25 Martin Baulig <martin@ximian.com>
* classes/Method.cs
(Method.DeclaringType): Repaced by GetDeclaringType().
2007-09-25 Martin Baulig <martin@ximian.com>
* languages/mono/MonoSymbolFile.cs
(MonoMethod): Use the new MonoType.Read() to construct the
variable's types from the `MonoType *'s provided by the runtime.
2007-09-25 Martin Baulig <martin@ximian.com>
* languages/mono/MonoType.cs: New file.
(MonoTypeEnum): New static enum.
(MonoType): New internal static class.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.GetClass): Renamed into ReadMonoClass().
2007-09-25 Martin Baulig <martin@ximian.com>
* classes/TargetException.cs
(TargetError): Add `MethodNotLoaded'.
2007-09-25 Martin Baulig <martin@ximian.com>
* classes/Method.cs
(Method): Replace the `This', `Locals' and `Parameters' by methods
which take a `TargetMemoryAccess' argument. This is neccessary
for generics.
(Method.This): Replaced by GetThis().
(Method.Parameters): Replaced by GetParameters().
(Method.Locals): Replaced by GetLocalVariables().
(Method.GetVariableByName): Removed.
* classes/StackFrame.cs
(StackFrame.Locals): Removed.
2007-09-24 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs
(MonoDataTable): Made this abstract; create `DomainDataTable' and
`MonoTypeTable' implementations.
2007-09-24 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs
(MonoDataTable): Formerly known as `MonoLanguageBackend.DataTable'.
(MonoLanguageBackend): Reflect latest runtime changes; we now have
one type table per symbol file.
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.TypeTable): New public property.
2007-09-21 Martin Baulig <martin@ximian.com>
* languages/TargetType.cs
(TargetType.HasClassType): New public abstract property.
(TargetType.ClassType): Likewise.
2007-09-17 Martin Baulig <martin@ximian.com>
* languages/TargetType.cs
(TargetType): Renamed the abstract GetObject() into DoGetObject()
and made it protected; added a new non-abstract GetObject() which
just calls DoGetObject().
* languages/TargetLocation.cs
(TargetLocation): Made this class public; but removed all public
API entry points from it.
(TargetLocation.HasAddress): Made this internal.
(TargetLocation.GetAddress): Likewise.
2007-09-11 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoMetadataInfo): Add `MonoMethodFlagsOffset' and
`MonoMethodInflatedOffset'.
2007-09-04 Martin Baulig <martin@ximian.com>
* frontend/CSharpExpressionParser.jay
(member_name): New rule; support member names with generic arity.
(variable_or_type_name_0): Use `member_name' instead of
`IDENTIFIER' to allow names with generic arity.
* languages/mono/MonoMember.cs
(MonoMethodInfo): Include the generic arity in the method name.
* languages/mono/MonoFunctionType.cs
(MonoFunctionType): Include the generic arity in the method name.
2007-09-04 Martin Baulig <martin@ximian.com>
* backend/BreakpointManager.cs: Kill the `entry_hash'; only use
the `index_hash'.
2007-09-03 Martin Baulig <martin@ximian.com>
*** Milestone: Appdomains are now fully functional ***
2007-09-03 Martin Baulig <martin@ximian.com>
Fix a race condition in the thread-lock code.
* backend/SingleSteppingEngine.cs
(SingleSteppingEngine.ReleaseThreadLock): If we have a `stop_event',
don't process it here while we're called from the ProcessServant;
added a new overloaded version of this function which is now
called from the ThreadManager's event loop.
* backend/ThreadManager.cs
(ThreadManager.AddPendingEvent): New internal method; we're called
from SingleSteppingEngine.ReleaseThreadLock(); just queue the
event and process it next time we run the event loop.
(ThreadManager.engine_thread_main): Check for pending events.
2007-09-03 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.WaitAll): Don't stop if another than the current
thread exited.
2007-09-03 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(SteppingCommand.DoExecute): Only switch threads if the new thread
is alive.
2007-09-03 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(BreakCommand): Add new `lazy' argument to disable error checking.
* test/testsuite/TestAppDomain-Module.cs:
Insert a breakpoint on Hello.World(), which is dynamically loaded.
2007-09-03 Martin Baulig <martin@ximian.com>
User-visible change:
- `run' no longer stops in main
- there's a new `start' command which starts the target and stops
in main.
* frontend/Command.cs
(StartCommand): New command; start the target and stop in main.
(RunCommand): Don't stop in main anymore.
2007-09-03 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SingleSteppingEngine.OnModuleLoaded): New internal method; check
whether we need to activate any breakpoints and start an
`OperationActivateBreakpoints' if neccessary.
(OperationActivateBreakpoints): New operation.
(OperationStart): Don't activate any breakpoints here; just call
sse.OnModuleLoaded() and let the new `OperationActivateBreakpoints'
do the job.