Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

11237 lines (7526 sloc) 373.022 kB
2006-07-18 Wade Berrier <wberrier@novell.com>
* backends/Makefile.am: Remove ModuleManager.cs from EXTRA_DIST
2006-07-18 Martin Baulig <martin@ximian.com>
Released version 0.30 "Koblenz" of the Mono Debugger :-)
2006-07-18 Martin Baulig <martin@ximian.com>
* configure.in: Require Mono >= 1.1.16.
2006-07-17 Martin Baulig <martin@ximian.com>
Kill the System.Data dependency.
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration): Rewrite using System.Xml.
* classes/DebuggerSession.cs
(DebuggerSession): Rewrite using System.Xml; use an `XmlDocument'
instead of a `DataSet'.
* classes/DebuggerConfiguration.xsd: Update the schema to reflect
the new XML file format (we're still using the schema with an
`XmlValidatingReader').
2006-07-13 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(ModuleCommand): New command.
2006-07-13 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs
(DebuggerOptions): Make this a DebuggerMarshalByRefObject.
(DebuggerOptions.Clone): New internal method.
* classes/DebuggerSession.cs
(DebuggerSession.Clone): Added `DebugggerOptions new_options' and
`string new_name' arguments.
* classes/Process.cs
(Process.Session): Get the session from the servant.
* backends/ProcessStart.cs
(ProcessStart.SetupApplication): Clone the options and update them
to the new values.
* frontend/Command.cs
(ShowCommand.ShowArgumentsCommand): Added `show args' command to
show the command line arguments.
2006-07-13 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration): Rewrite to use System.Data with the
DebuggerConfiguration.xsd schema.
2006-07-12 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.xsd: Renamed into
DebuggerConfiguration.xsd.
2006-07-12 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs: New file; split out
`DebuggerOptions' from DebuggerSession.cs.
2006-07-12 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerOptions.ParseCommandLine): New public static method;
moved here from frontend/Main.cs.
2006-07-12 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.MethodHasSource): Don't check
`Module.StepInto' if the method we're stepping into is in the same
module.
2006-07-12 Martin Baulig <martin@ximian.com>
* classes/DebuggerOptions.cs
(DebuggerOptions.Prompt): Removed.
(DebuggerOptions.LoadNativeSymbolTable): Removed.
(DebuggerOptions.JitOptimizations): Default to null.
(DebuggerOptions.WorkingDirectory): Default to null.
(DebuggerSession): Also save/load the `DebuggerOptions'.
2006-07-08 Martin Baulig <martin@ximian.com>
* arch/DwarfReader.cs
(DwarfLocation): New protected class; moved the location reading here.
(DwarfLocation.GetLocation): Correctly handle `DW_OP_fbreg'.
(DieSubprogram): Support the `DW_AT_frame_base' attribute.
(DwarfTargetVariable): Moved the location code into `DwarfLocation'.
2006-07-06 Martin Baulig <martin@ximian.com>
* arch/Architecture_I386.cs
(Architecture_I386.IsSyscallInstruction): Correctly implement
this; also protect with try/catch.
* arch/Architecture_X86_64.cs
(Architecture_X86_64.IsSyscallInstruction): Protect with try/catch.
2006-07-06 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationFinish.IsSourceOperation): Set to `!Native'.
2006-07-06 Martin Baulig <martin@ximian.com>
* backends/server/i386-arch.c (ArchInfo): Use `guint64' for
`dr_control' and `dr_status' since _server_ptrace_get_dr()
operates on guint64.
2006-07-06 Martin Baulig <martin@ximian.com>
* backends/server/x86_64-arch.c
(server_ptrace_insert_hw_breakpoint): Don't deadlock here.
* backends/server/i386-arch.c
(server_ptrace_insert_hw_breakpoint): Don't deadlock here.
2006-07-06 Martin Baulig <martin@ximian.com>
* classes/SourceInfo.cs
(SourceMethod.ClassName): New public property.
* classes/DebuggerSession.cs
(DebuggerSession.Clone): New internal method.
* backends/ProcessServant.cs
(ProcessServant.ChildExecd): Clone the session.
* classes/SourceLocation.cs
(SourceLocation): Make this actually work again.
2006-07-05 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.SessionData): New protected class; moved all the
session data here, we save this to XML when the target exists
while the `DebuggerSession' persists across multiple invocations.
2006-07-05 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.MainProcessReachedMain): Make this public again
and call it from the `Interpreter'; read the FIXME in the source
code.
* frontend/Interpreter.cs
(Interpreter.Start): Call `session.MainProcessReachedMain ()'.
(Interpreter.LoadSession): Likewise.
2006-07-03 Martin Baulig <martin@ximian.com>
* classes/Event.cs
(Event.OnTargetExited): New abstract internal method; an `Event'
may persist across multiple invocations of the target, so we use
this to disable the event when we exit.
* backends/ProcessServant.cs
(ProcessServant.OnProcessExitedEvent): New internal method; save
the session here.
* classes/DebuggerSession.cs
(DebuggerSession.OnProcessExited): Disable all events here.
2006-06-29 Martin Baulig <martin@ximian.com>
The big session-handling cleanup - we now load/save the session to
XML using a DataSet.
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.ModuleGroups): New internal property.
* classes/DebuggerSession.cs
(DebuggerSession): Moved thread groups and events here; load and
save the session from XML using a DataSet.
(DebuggerSession.CreateThreadGroup): Moved here.
(DebuggerSession.DeleteThreadGroup): Moved here.
(DebuggerSession.ThreadGroupExists): Moved here.
(DebuggerSession.ThreadGroups): Moved here.
(DebuggerSession.ThreadGroupByName): Moved here.
(DebuggerSession.MainThreadGroup): Moved here.
(DebuggerSession.Events): Moved here.
(DebuggerSession.GetEvent): Moved here.
(DebuggerSession.AddEvent): Moved here.
(DebuggerSession.DeleteEvent): Moved here.
(DebuggerSession.InsertBreakpoint): Moved here.
(DebuggerSession.SaveSession): New public method to save the
session as XML into a Stream.
(DebuggerSession.ctor): Added a ctor taking a `Stream' to load the
session from XML.
(DebuggerSession.SurrogateSelector): Removed.
* classes/DebuggerSession.xsd: New file.
* classes/Process.cs (Process.Session): New public property.
* classes/Event.cs
(Event.GetSessionData): New internal virtual method taking a
`DataRow' argument.
(Event.GetSessionData, SetSessionData): Removed the old
serialization-based implementation.
(Event.SessionSurrogate): Removed.
* classes/ThreadGroup.cs
(ThreadGroup.SessionSurrogate): Removed.
* classes/Module.cs
(SymbolFile.LookupMethod): New public abstract method.
(ModuleGroup.GetSessionData, SetSessionData): New internal
methods; operate on a `DataRow'.
(Module.LookupMethod): New public abstract method.
(Module.GetSessionData, SetSessionData): New internal methods;
operate on a `DataRow'.
(Module.SessionSurrogate): Removed.
* classes/SourceLocation.cs
(SourceLocation): Don't implement IDeserializationCallback.
(SourceLocation.method): New private field; when loading the
location from XML, we just have a method name and need to do a
method lookup.
* languages/TargetFunctionType.cs
(TargetFunctionType.Name): Don't include the class name here.
(TargetFunctionType.FullName): New public abstract property; this
is class name plus method name.
2006-06-26 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.ModulesChanged): Removed.
* classes/Module.cs
(SymbolFile): Implement IDisposable.
(SymbolFile.Module): New public abstract property.
(SymbolFile.DoDispose): New protected virtual method; call
`Module.UnLoadModule()'.
(Module.UnLoadModule): New internal method.
2006-06-26 Martin Baulig <martin@ximian.com>
* backends/SymbolTableManager.cs
(SymbolTableManager): Completely rewrite and simplify this;
instead of maintaining a `SymbolTableCollection' in a separate
thread, directly implement `ISymbolTable' and iterate over an
array of `SymbolFile's.
* classes/SourceInfo.cs
(SourceFile): Override GetHashCode() and Equals().
* classes/Module.cs
(Module.RegisterLoadHandler): Removed; call it on the `SymbolFile'
instead.
2006-06-26 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.ctor): Added `DebuggerConfiguration' argument.
(DebuggerSession.Config): New public readonly field.
(DebuggerSession): Moved the module management code here from
`ModuleManager'.
* backends/ModuleManager.cs: Removed.
(ModuleManager): Moved all the functionality into
`DebuggerSession'.
2006-06-26 Martin Baulig <martin@ximian.com>
* backends/SymbolTableManager.cs
(SymbolTableManager): Removed all the module code.
(SymbolTableManager.SetModules): Removed.
(SymbolTableManager.Modules): Removed.
2006-06-26 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession): Make this a `DebuggerMarshalByRefObject'.
* classes/Debugger.cs
(Debugger.Run): Take a `DebuggerSession' argument instead of a
`DebuggerOptions' one.
(Debugger.Attach, Debugger.OpenCoreFile): Likewise.
* backends/DebuggerServant.cs
(DebuggerServabt.Run): Take a `DebuggerSession' argument instead
of a `DebuggerOptions' one.
(DebuggerServant.Attach, Debugger.OpenCoreFile): Likewise.
* backends/ProcessServant.cs
(ProcessServant.Session): New public property.
2006-06-26 Martin Baulig <martin@ximian.com>
* classes/Module.cs
(Module.BreakpointsChangedEvent): Removed.
* backends/ModuleManager.cs
(BreakpointChangedHandler): Removed.
(ModuleManager.BreakpointsChanged): Removed.
* backends/ProcessServant.cs
(ProcessServant.BreakpointsChangedEvent): Removed.
2006-06-26 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs: New file.
(DebuggerConfiguration): New public class.
* classes/Debugger.cs
(Debugger.ctor): Added `DebuggerConfiguration' argument.
* classes/Module.cs
(SymbolFile.IsNative): New public property.
(ModuleBase): New public abstract base class.
(Module): Derive from `ModuleBase'.
(Module.ModuleGroup): New public property.
(Module.HideFromUser): New public property.
(ModuleGroup): New public class.
2006-06-12 Martin Baulig <martin@ximian.com>
* classes/TargetVariable.cs
(TargetVariable.IsInScope): New public abstract method.
* classes/Method.cs
(Method.GetVariableByName): Added `TargetAddress address' argument
and check whether the variable is actually in scope.
* classes/StackFrame.cs
(StackFrame.Locals): Use `local.IsInScope()' rather than
`local.IsAlive()'.
2006-06-12 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationRuntimeInvoke.DoProcessEvent): Also push the rti frame
if we hit a breakpoint at the invoke method.
* test/testsuite/TestInvocation.cs: Added testcase for that.
2006-06-01 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine): Correctly handle the THROW_EXCEPTION /
HANDLE_EXCEPTION notification.
2006-06-01 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(BreakCommand): Added `-local' argument; change default behaviour
to `-global'.
2006-06-01 Martin Baulig <martin@ximian.com>
* backends/server/x86_64-arch.c
(server_ptrace_push_registers): Properly align the stack.
(server_ptrace_call_method_*): Likewise.
2006-06-01 Martin Baulig <martin@ximian.com>
* backends/server/server.h
(ServerCommandError): Add `COMMAND_ERROR_INTERNAL_ERROR'.
* classes/TargetException.cs
(TargetError): Added `InternalError'.
2006-05-31 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs: Added error checking.
2006-05-31 Martin Baulig <martin@ximian.com>
* interfaces/ITargetNotification.cs
(TargetState): Don't use all-capital letters.
2006-05-31 Martin Baulig <martin@ximian.com>
* classes/Thread.cs
(Thread): Merge `Finish' and `FinishNative'.
* backends/ThreadServant.cs
(ThreadServant): Merge `Finish' and `FinishNative'.
2006-05-31 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(SteppingCommand.DoStep): Return a `CommandResult'.
* frontend/Interpreter.cs
(Interpreter.Wait): Added overloaded version which takes a
`CommandResult'; check for exceptions.
* backends/SingleSteppingEngine.cs
(CommandResult): Moved to classes/Thread.cs and made public.
* classes/Thread.cs (CommandResult): Moved here from
SingleSteppingEngine.cs and made public.
(Thread.StepInstruction): Return a `CommandResult'.
(Thread.StepNativeInstruction): Likewise.
(Thread.NextInstruction): Likewise.
(Thread.StepLine): Likewise.
(Thread.NextLine): Likewise.
(Thread.Finish): Likewise.
(Thread.FinishNative): Likewise.
(Thread.Continue): Likewise.
(Thread.FinishNative): Likewise.
2006-05-30 Martin Baulig <martin@ximian.com>
* backends/server/x86_64-arch.c
(server_ptrace_push_registers): Don't corrup the red zone.
(server_ptrace_call_method_*): Likewise.
2006-05-24 Martin Baulig <martin@ximian.com>
* doc/GC-issues.txt: Added document describing the interface
between the debugger and the GC.
2006-05-24 Martin Baulig <martin@ximian.com>
Released version 0.20 "Bruxelles" of the Mono Debugger :-)
2006-05-24 Martin Baulig <martin@ximian.com>
* backends/server/library.c
(mono_debugger_server_set_notification): This is no longer a
"static" method - different processes may have different
notification addresses, so we need to make this per-target.
* backends/server/x86-ptrace.c
(InferiorHandle): Added `guint64 nofification_address'; replaces
the static variable in x86_64-arch.c/i386-arch.c.
(server_ptrace_set_notification): Moved here from x86_64-arch.c.
* backends/Inferior.cs
(Inferior.SetNotificationAddress): New internal method; call
mono_debugger_server_set_notification().
* backends/MonoThreadManager.cs
(MonoThreadManager.ThreadCreated): Call SetNotificationAddress()
on each newly created inferior.
2006-05-24 Martin Baulig <martin@ximian.com>
* arch/bfdglue.c
(bfd_glue_get_section_size): Added `raw_size' argument.
(bfd_glue_get_section_contents): Take a pre-alloced buffer as
argument rather than allocating it here.
2006-05-24 Martin Baulig <martin@ximian.com>
* backends/ProcessServant.cs
(ProcessServant.Kill): Don't call Dispose().
* backends/server/x86-linux-ptrace.c
(server_ptrace_initialize_process): Don't use PTRACE_O_TRACEEXIT;
we don't need this.
2006-05-24 Martin Baulig <martin@ximian.com>
* backends/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): Clear the `csharp_language' on
`NofitifactionType.FinalizeManagedCode'.
2006-05-24 Martin Baulig <martin@ximian.com>
* configure.in: Check whether the Mono we're using is recent enough.
2006-05-24 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(BreakCommand.DoResolve): If our base class'es DoResolve() failed,
try resolving the expression as an address.
* frontend/Interpreter.cs
(Interpreter.InsertBreakpoint): Added overloaded version which
takes a `TargetAddress'.
* classes/Process.cs
(Process.InsertBreakpoint): Added overloaded version which takes a
`TargetAddress'.
2006-05-24 Martin Baulig <martin@ximian.com>
* backends/server/server.h
(ServerStatusMessageType): Added `MESSAGE_CHILD_CALLED_EXIT'.
* backends/server/x86-ptrace.c
(server_ptrace_dispatch_event): Use `MESSAGE_CHILD_CALLED_EXIT'
for `PTRACE_EVENT_EXIT'.
2006-05-23 Martin Baulig <martin@ximian.com>
* backends/Inferior.cs
(Inferior.PushRegisters): New public method.
(Inferior.PopRegisters): New public method.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.AcquireThreadLock): Call
inferior.PushRegisters() to push all registers onto the stack so
the GC will see them.
(SingleSteppingEngine.ReleaseThreadLock): Call
inferior.PopRegisters() to remove them from the stack again.
* backends/server/x86-linux-ptrace.c
(server_ptrace_initialize_process): Add `PTRACE_O_TRACEEXIT'.
* backends/server/x86_64-arch.c
(server_ptrace_push_registers): New method.
(server_ptrace_pop_registers): New method.
* backends/server/i386-arch.c
(server_ptrace_push_registers): New method.
(server_ptrace_pop_registers): New method.
* backends/server/library.c
(mono_debugger_server_push_registers): New public method.
(mono_debugger_server_pop_registers): New public method.
2006-05-20 Martin Baulig <martin@ximian.com>
* arch/DwarfReader.cs
(DwarfReader.DwarfTargetVariable.GetLocation): Add support for
location lists.
2006-05-20 Martin Baulig <martin@ximian.com>
* arch/DwarfFrameReader.cs: More 64-bit updates.
2006-05-20 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(SourceCommand.DoResolve): Also lookup native methods.
(BreakCommand): Add `-global' argument as a shortcut for
`-group global'.
2006-05-17 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.InsertHardwareWatchPoint): New public method.
* frontend/Command.cs
(WatchCommand): New command.
* classes/Breakpoint.cs
(BreakpointType): New public enum.
(Breakpoint.Type): New public property.
* classes/Process.cs
(Process.InsertHardwareWatchPoint): New public method.
* backends/ProcessServant.cs
(ProcessServant.InsertHardwareWatchPoint): New public method.
2006-05-17 Martin Baulig <martin@ximian.com>
* backends/Inferior.cs
(Inferior.HardwareBreakpointType): New internal enum.
(Inferior.InsertHardwareWatchPoint): New public method.
* backends/server/x86-linux-ptrace.c
(_server_ptrace_set_dr): Use `guint64' for the `value' arg.
(_server_ptrace_get_dr): Likewise.
(server_ptrace_get_application): Fix compiler warnings.
* backends/server/x86-arch.h
(x86_arch_remove_hardware_breakpoints): New public function.
* backends/server/x86_64-arch.c
(ArchInfo): Use `guint64' for `dr_control' and `dr_status'.
* backends/server/x86-ptrace.cs
(server_ptrace_dispatch_event): Remove all hardware breakpoints if
we stopped the first time.
* backends/server/server.h
(mono_debugger_server_insert_hw_breakpoint): Added `guint32 type'
argument which is a `HardwareBreakpointType'.
* backends/server/breakpoints.h
(HardwareBreakpointType): New enum typedef.
(BreakpointInfo): Added `HardwareBreakpointType type' field to
support hardware watchpoints.
2006-05-15 Martin Baulig <martin@ximian.com>
* classes/SourceLocation.cs
(SourceLocation.HasLine): New public property.
* frontend/Command.cs
(ListCommand.DoExecute): Only display the whole method if we
didn't specify a line.
2006-05-15 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(SetCommand.SetEnvironmentCommand): Added "set env" command to set
environment variables.
* classes/DebuggerSession.cs
(DebuggerOptions.UserEnvironment): New public property.
(DebuggerOptions.SetEnvironment): New public method.
* backends/ProcessStart.cs
(ProcessStart.UserEnvironment): Removed; retrieve it from the
`DebuggerOptions'.
2006-05-12 Martin Baulig <martin@ximian.com>
* backends/server/x86-linux-ptrace.c
(server_ptrace_global_wait): Restart the waiting on `stop_requested'.
(server_ptrace_stop_and_wait): Fix a race condition;
server_ptrace_global_wait() is now automatically restarted; also
return the SIGSTOP which we expect.
* backends/ThreadManager.cs
(ThreadManager.RequestWait): Make this private and protect against
being called multiple times; use RequestWait() everywhere instead
of setting the `wait_event' directly to avoid race conditions.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.child_breakpoint): Call `bpt.CheckBreakpointHit()'
directly rather than using an async handler.
(SingleSteppingEngine.AcquireThreadLock): Don't call
`manager.RequestWait()'.
2006-05-12 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationFinish.DoExecte): Use `do_next_native()', not
`do_step_native().
2006-05-12 Martin Baulig <martin@ximian.com>
* NEWS: Update: we need the latest Mono from SVN; just realized
that 1.1.15 is too old and does not work.
2006-05-12 Martin Baulig <martin@ximian.com>
* frontend/Command.cs (FileCommand): Added error checking.
(SetCommand.SetArgsCommand): Added `set args' command.
(SetCommand.DoResolve): Properly handle the subcommands.
* backends/ProcessStart.cs
(ProcessStart.cs): `Options.InferiorArgs' no longer contains the
target application; use `Options.File' for that.
2006-05-12 Martin Baulig <martin@ximian.com>
* configure.in: Bump version number to 0.20.
* NEWS: Updated NEWS.
2006-05-11 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(PointerDereferenceExpression): Allow dereferencing arbitrary
pointer expressions.
2006-05-11 Martin Baulig <martin@ximian.com>
* backends/ThreadManager.cs
(ThreadManager.WaitTimeout): Increase to 5 seconds.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.OnThreadExited): Use `TargetExited' and not
`TargetSignaled' if we were previously Kill()ed.
* backends/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): Kill the target on
`NotificationType.MainExited'.
2006-05-11 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.Start): Properly handle errors.
(Interpreter.Attach): Likewise.
(Interpreter.OpenCoreFile): Likewise.
* frontend/Main.cs
(CommandLineInterpreter.RunMainLoop): Properly handle errors.
2006-05-11 Martin Baulig <martin@ximian.com>
* backends/server/remoting.[ch]: Removed.
2006-05-11 Martin Baulig <martin@ximian.com>
* arch/Architecture.cs
(Architecture.AdjustReturnAddress): New protected method; adjust
the return address, so we report the line of the call and not the
return address in stack traces.
(Architecture.CreateFrame): Call AdjustReturnAddress().
* test/testsuite/TestException.cs: Added test case for it.
2006-05-10 Martin Baulig <martin@ximian.com>
* classes/DebuggerMarshalByRefObject.cs
(DebuggerMarshalByRefObject): New public class; we now use this
everywhere instead of `MarshalByRefObject'.
(DebuggerMarshalByRefObject.InitializeLifeTimeService): Override
this and return null.
2006-05-10 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs (BinaryOperator): Make this work again.
* frontend/CSharpExpressionParser.jay: Add support for binary
operators.
2006-05-10 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerOptions.JitArguments): New public field.
* frontend/Main.cs: Add `-jit-arg' command line argument to pass
additional arguments to the inferior `mono'.
2006-05-10 Martin Baulig <martin@ximian.com>
* backends/server/x86_64-arch.c: Use proper alignment when calling
methods.
2006-05-09 Martin Baulig <martin@ximian.com>
The big method lookup cleanup :-)
* frontend/Expression.cs (LocationType): Added `Constructor'.
(Expression.EvaluateSource): Removed.
(Expression.DoEvaluateSource): Removed.
(Expression.ResolveMethod): Added a `LocationType' argument and
return a `MethodExpression'.
(Expression.DoResolveMethod): Likewise; return null by default.
(SimpleNameExpression.DoResolveMethod): Handle all the different
kinds of method lookups here.
(MethodExpression): New public abstract class.
(MethodExpression.EvaluateSource): New public abstract method; use
this instead of `Expression.EvaluateSource()'.
(MethodGroupExpression): Derive from `MethodExpression'.
(MethodGroupExpression.DoResolveMethod): Add support for the
different LocationType's here.
(InvocationExpression): Derive from `MethodExpression'.
* frontend/Command.cs
(SourceCommand.Ctor): Added `-ctor' argument to lookup ctors.
(SourceCommand.DoResolve): We now use `Expression.ResolveMethod()'
to get a `MethodExpression' and then call EvaluateSource() on it.
* test/src/testsuite/TestMethodLookup.cs: New test. This test is
really huge and should cover all the cases.
2006-05-05 Martin Baulig <martin@ximian.com>
* languages/TargetFunctionType.cs
(TargetFunctionType.IsConstructor): New public property.
* frontend/Expression.cs
(InvocationExpression.DoInvoke): Make invoking ctors work.
2006-05-05 Martin Baulig <martin@ximian.com>
* languages/TargetFunctionType.cs
(TargetFunctionType.IsStatic): New public property.
* frontend/Expression.cs
(InvocationExpression.DoResolve): Use `method_expr.ResolveMethod()'
since we may be called from SourceLocation.DoResolve()'.
(InvocationExpression.DoInvoke): Don't allow invoking instance
methods with a type reference.
2006-05-05 Martin Baulig <martin@ximian.com>
* classes/SourceLocation.cs
(SourceLocation.HasMethod): New public property.
(SourceLocation.Function): New public property.
(SourceLocation.ctor): Add a ctor taking a `SourceFile' and a
line number.
* classes/SourceInfo.cs
(SourceInfo.FindLine): Allow line numbers outside methods; return
a `SourceLocation' without a method in this case.
* frontend/Command.cs
(SourceCommand.DoResolve): If the argument is now a valid number,
try parsing it as an expression and create a function location.
(SourceCommand.EvaluateMethod): Removed.
(BreakCommand.DoExecute): If we're a function breakpoint,
`Location.HasFunction' is true.
2006-05-05 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(ScriptingContext.ListSourceCode): Removed; moved the
functionality into `ListCommand'.
* frontend/Command.cs
(SourceCommand.Location): New public property.
(SourceCommand.DoResolve): Make sure we have a valid `Location'.
(ListCommand.DoExecute): Moved the functionality here.
2006-05-03 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs
(Debugger.Kill): Wait for the target to exit before returning.
2006-05-03 Martin Baulig <martin@ximian.com>
* backends/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): Fix a race condition: call
`inferior.InitializeModules ()' before resuming the target.
2006-05-03 Martin Baulig <martin@ximian.com>
* frontend/Command.cs (DebuggerCommand.Execute): Always resolve
the command before executing it; also when repeating it.
2006-05-03 Martin Baulig <martin@ximian.com>
* backends/Inferior.cs (Inferior.Kill): Check errors.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.OnThreadExited): New internal method; we're
called from the ThreadManager when the target exited.
(SingleSteppingEngine.Kill): Correctly implement this.
(SingleSteppingEngine.Dispose): Correctly implement this.
(SingleSteppingEngine.DoDispose): Don't call `inferior.Kill ()'.
* backends/ProcessServant.cs
(ProcessServant.OnThreadExitedEvent): Call OnProcessExited() if
the last thread exited.
(ProcessServant.KillThread): Removed.
* backends/DebuggerServant.cs
(DebuggerServant.OnProcessExitedEvent): Call OnTargetExitedEvent()
if the last process exited.
* backends/server/x86-ptrace.c
(server_ptrace_kill): Don't send a SIGKILL to the target; just use
`ptrace (PTRACE_KILL)'.
2006-05-02 Martin Baulig <martin@ximian.com>
* test/testsuite/NUnit.cs
(DebuggerEvent): New public class.
(DebuggerEventType): New public enum.
(NUnitInterpreter): New public class; derive from `Interpreter'.
(TestSuite): Rewrite the testsuite: instead of parsing the
debugger output we're now listening directly for the events.
2006-05-02 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(Command.Execute): Changed return type from `void' to `object'.
(Command.DoExecute): Likewise.
* frontend/ScriptingContext.cs
(ScriptingContext.Error): Removed; throw a `ScriptingException'
instead.
2006-05-02 Martin Baulig <martin@ximian.com>
* backends/DebuggerServant.cs
(DebuggerServant.OnThreadCreatedEvent): Don't send the event for
daemon threads.
(DebuggerServant.OnThreadExitedEvent): Likewise.
(DebuggerServant.OnTargetEvent): Don't send a `TargetExited' or
`TargetSignaled' event for daemon threads.
2006-04-26 Martin Baulig <martin@ximian.com>
* classes/Report.cs (Report.ReportWriter): Make this field public
and don't initialize it.
* backends/DebuggerServant.cs
(DebuggerServant.ctor): Added `ReportWriter' argument and assign
it to `Report.ReportWriter'.
2006-04-26 Martin Baulig <martin@ximian.com>
* arch/bfdglue.h (BfdGlueSection): Removed.
* arch/bfdglue.c (bfd_glue_get_sections): Removed.
(bfd_glue_get_first_section): New function.
(bfd_glue_get_next_section): New function.
(bfd_glue_get_section_name): New function.
(bfd_glue_get_section_vma): New function.
(bfd_glue_get_section_size): New function.
(bfd_glue_get_section_flags): New function.
* arch/Bfd.cs (Bfd.InternalSection): Removed.
(Bfd.Section): Operate directly on the `asection *' pointer.
2006-04-25 Martin Baulig <martin@ximian.com>
* classes/Process.cs
(Process.SaveSession, Process.LoadSession): Moved the session
handling into the `ProcessServant'.
* classes/Debugger.cs
(Debugger.ctor): Create the `DebuggerServant' in another appdomain.
2006-04-25 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.StartThread): Added `do_attach' argument.
(SingleSteppingEngine.GetThreadID): Removed.
(SingleSteppingEngine.Attached): Removed.
(SingleSteppingEngine.Attach): Removed.
(SingleSteppingEngine.Detach): When detaching from a managed
application, start an `OperationDetach'.
(OperationDetach): New operation.
(OperationGetThreadId): Renamed into `OperationGetCurrentThread'.
* backends/ThreadServant.cs
(ThreadServant.DetachThread): New internal abstract method.
2006-04-25 Martin Baulig <martin@ximian.com>
* backends/BreakpointManager.cs
(BreakpointManager.RemoveAllBreakpoints): New public method.
2006-04-25 Martin Baulig <martin@ximian.com>
* backends/MonoThreadManager.cs
(MonoMetadataInfo): New internal struct; splitted out from
`MonoBuiltinTypeInfo' in MonoLanguageBackend.cs.
2006-04-25 Martin Baulig <martin@ximian.com>
* arch/Architecture.cs
(Architecture.IsSyscallInstruction): New public abstract method.
2006-04-20 Martin Baulig <martin@ximian.com>
* backends/Inferior.cs
(Inferior.Attach): Removed the `is_main' argument.
* backends/server/server.h
(mono_debugger_server_attach): Removed the `is_main' argument.
2006-04-20 Martin Baulig <martin@ximian.com>
* backends/ProcessServant.cs
(ProcessServant.MainThread): Changed type into `ThreadServant'.
(ProcessServant.Initialize): Major code cleanup in here; call
Inferior.InitializeProcess() if we're called the first time.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.ctor): A SingleSteppingEngine is now created
with an operation - it's either executing `OperationStart' or
`OperationRun'; moved the `reached main' magic into `OperationStart'.
(SingleSteppingEngine.OperationStart): New operation.
* backends/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): No longer read the TID from
the notification on `ThreadCreated' and `ThreadExited'; always use
the SingleSteppingEngine which received the notification.
* backends/server/Inferior.cs
(Inferior.InitializeProcess): New method; this needs to be called
the first time the target is stopped.
(Inferior.Initialize): Renamed into InitializeThread().
(Inferior.GlobalStop): Removed.
(Inferior.TID): Removed.
2006-04-20 Martin Baulig <martin@ximian.com>
* backends/server/x86-linux-ptrace.c
(_server_ptrace_setup_inferior): Don't attempt to read the
registers and also don't call do_wait(). We may now be called
before the target is stopped.
(_server_ptrace_setup_thread_manager): Renamed into
server_ptrace_initialize_process(); we're now called from
ProcessServant.Initialize() after the managed `ThreadManager'
received the first event.
(server_ptrace_global_wait): `first_status' and `first_ret' is
gone; don't do anything special if we're called the first time.
* x86-ptrace.c (InferiorHandle): Removed `tid'; no longer attempt
to compute the TID here.
* x86-arch.h (x86_arch_get_tid): Removed.
* backends/server/server.h
(mono_debugger_server_initialize): Renamed into
mono_debugger_server_initialize_process() and removed the `tid'
argument.
(mono_debugger_server_initialize_process): New function.
(mono_debugger_server_attach): Removed the `tid' argument.
(mono_debugger_server_global_stop): Removed.
* backends/server/x86-ptrace.h: New file; replaces i386-ptrace.h
and x86_64-ptrace.h.
2006-04-19 Martin Baulig <martin@ximian.com>
* backends/ThreadServant.cs: New file.
(ThreadServant): New internal abstract class.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine): Derive from `ThreadServant'.
* arch/CoreFile.cs
(CoreFile.CoreFileThread): Derive from `ThreadServant'.
2006-04-19 Martin Baulig <martin@ximian.com>
Split `Process' into `Process' and `ProcessServant'.
* backends/ProcessServant.cs: New file.
(ProcessServant): New internal class.
2006-04-19 Martin Baulig <martin@ximian.com>
Split `Debugger' into `Debugger' and `DebuggerServant'.
* backends/DebuggerServant.cs: New file.
(DebuggerServant): New internal class.
2006-04-19 Martin Baulig <martin@ximian.com>
* test/testsuite/testnativeattach.cs: New test.
2006-04-19 Martin Baulig <martin@ximian.com>
* backends/ThreadManager.cs
(ThreadManager.start_wait_thread): Catch `ThreadAbortException'
and reset the abort. See the comment in the source code.
2006-04-18 Martin Baulig <martin@ximian.com>
* frontend/Command.cs (ProcessCommand): New public abstract class.
(DetachCommand): New command. Note that we can only detach from a
process if we previously attached to it.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.Kill): Send a SIGKILL to the target.
(SingleSteppingEngine.Dispose): Call `inferior.Kill()' if we still
have an inferior.
* classes/TargetException.cs
(TargetError.CannotDetach): New error.
* classes/Debugger.cs
(Debugger.Detach): New public method.
* classes/Process.cs
(Process.Detach): New public method.
* classes/Thread.cs
(Thread.Detach): New public method.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/server/x86-ptrace.cs
(x86_ptrace_kill): Send a SIGKILL to the process before using
`ptrace (PTRACE_KILL)' so we actually kill it.
* backends/ThreadManager.cs
(ThreadManager.Dispose): Call `wait_thread.Abort()' prior to
`wait_thread.Join()'.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs: Moved to ../classes/
* backends/Process.cs: Moved to ../classes/
* backends/Thread.cs: Moved to ../classes/
2006-04-18 Martin Baulig <martin@ximian.com>
* classes/SymbolTableManager.cs: Moved to ../backends/
* classes/ModuleManager.cs: Moved to ../backends/
* backends/Process.cs
(Process.ModuleManager): Make this internal.
(Process.SymbolTableManager): Make this internal.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/classes/*TargetLocation.cs: Moved to languages/
* backends/classes/MonoVariableLocation: Moved to languages/mono/.
* backends/classes/: Removed.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/TargetReader.cs: Moved here from backends/classes/.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/Inferior.cs
(Inferior.GetFileContents): New public static method; obsoletes
the `Utils' class form backends/classes/Utils.cs.
* backends/classes/Utils.cs: Removed.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/EventQueue.cs: New file; merged classes/Threading.cs
and backends/classes/EventQueue.cs here.
* classes/ObjectContainer.cs: Removed.
2006-04-18 Martin Baulig <martin@ximian.com>
* classes/BreakpointHandle.cs: Moved into ../backends/.
* backends/BreakpointHandle.cs: Moved here from ../classes/.
2006-04-18 Martin Baulig <martin@ximian.com>
* arch/Architecture.cs (Architecture): Make this internal.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/TargetMemoryAccess.cs
(TargetMemoryAccess.Architecture): Make this internal.
* backends/Thread.cs
(Thread.PrintRegisters): New public method.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ISourceBuffer.cs: Removed.
(ISourceBuffer): Removed this interface; `SourceBuffer' is the
only class implementing it.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs: Removed.
(ITargetMemoryAccess): Removed.
* backends/TargetMemoryAccess.cs: New file.
(TargetMemoryAccess): New public abstract class.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetInfo): Removed.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryAccess): Removed all the writing methods.
2006-04-18 Martin Baulig <martin@ximian.com>
* classes/TargetBinaryAccess.cs
(TargetInfo): Moved here from ../backends/classes/TargetReader.cs
and made it public.
* backends/TargetAccess.cs
(TargetAccess.TargetInfo): Return a `TargetInfo'.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryInfo): Removed.
* backends/classes/TargetReader.cs
(TargetMemoryInfo): Removed.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/Thread.cs
(Thread.TargetMemoryAccess): Removed; just use `Thread' directly.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryAccess): Only implement `ITargetInfo'.
(ITargetMemoryAccess.TargetMemoryInfo): Removed.
(ITargetMemoryAccess.Architecture): New property.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryInfo.AddressDomain): Moved into `ITargetInfo'.
(ITargetInfo.AddressDomain): Moved here from `ITargetMemoryInfo'.
* backends/classes/TargetReader.cs
(TargetReader): Don't implement `ITargetMemoryInfo'.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/Inferior.cs
(Inferior.GetTargetInfo): New public static method.
* arch/CoreFile.cs: Don't create an Inferior here and make core
files work again.
2006-04-18 Martin Baulig <martin@ximian.com>
* backends/ThreadBase.cs: Renamed into TargetAccess.cs.
(ThreadBase): Renamed into `TargetAccess'.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryInfo): Make this interface internal.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryAccess): Make this interface internal.
2006-04-18 Martin Baulig <martin@ximian.com>
* classes/AddressDomain.cs
(AddressDomain): Make the .ctor internal.
2006-04-18 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryReader): Removed this interface; `TargetReader' is
the only class implementing it.
2006-04-18 Martin Baulig <martin@ximian.com>
* classes/ExceptionCatchPoint.cs
(ExceptionCatchPoint): Make this class sealed and rename
`CheckBreakpointHit' into `CheckException'.
* classes/Event.cs
(Event.CheckBreakpointHit): Moved into the `Breakpoint' class.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.child_breakpoint): Run
`breakpoint.CheckBreakpointHit()' asynchronously.
2006-04-17 Martin Baulig <martin@ximian.com>
Bump version number to 0.14 and require Mono >= 1.1.15.
2006-04-17 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs: Cosmetic cleanups in the
process-related messages.
2006-04-17 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.AcquireGlobalThreadLock): Check the
`stop_event' and don't do anything if we just died.
(SingleSteppingEngine.Start): Set `main_method_stackptr' to the
current stack pointer.
* backends/server/x86_64-arch.c
(server_ptrace_get_frame): Call x86_arch_get_registers() first.
* backends/server/i386-arch.c
(server_ptrace_get_frame): Call x86_arch_get_registers() first.
2006-04-13 Martin Baulig <martin@ximian.com>
* backends/ProcessStart.cs
(ProcessStart.SetupEnvironment): Add a `MONO_INSIDE_MDB'
environment variable; this is required if the target fork()s
another mono process.
2006-04-13 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs: Use the new
`MonoDefaults' offsets.
2006-04-13 Martin Baulig <martin@ximian.com>
* backends/Process.cs
(Process.ChildExecd): Don't create a new process here.
2006-04-12 Martin Baulig <martin@ximian.com>
* test/testsuite/testnativeexec.cs: New test.
2006-04-11 Martin Baulig <martin@ximian.com>
* test/testsuite/TestRestart.cs: New test.
2006-04-11 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(Debugger.ProcessReachedMainEvent): Removed.
* classes/DebuggerSession.cs
(DebuggerSession): We're not a static class anymore.
* frontend/Interpreter.cs: Save the session on exit and load it
when we restart.
2006-04-11 Martin Baulig <martin@ximian.com>
* classes/SimpleBreakpoint.cs: Removed.
* classes/Breakpoint.cs (Breakpoint): Don't make this abstract.
* backends/Process.cs
(Process.InsertBreakpoint): Create and return a new `Breakpoint'.
(Process.InsertExceptionCheckPoint): Likewise.
2006-04-11 Martin Baulig <martin@ximian.com>
* classes/Event.cs (Event): New public abstract class. This
replaces the old `EventHandle' class.
* classes/Breakpoint.cs (Breakpoint): Derive from `Event'.
* classes/ExceptionCatchPoint.cs
(ExceptionCatchPoint): New public class; derives from `Event'.
* classes/EventHandle.cs: Removed.
* classes/CatchpointHandle.cs: Removed.
* classes/SourceLocation.cs
(SourceLocation): We can now also operate on a
`TargetFunctionType'.
(SourceLocation.HasFunction): New public property.
(SourceLocation.InsertBreakpoint): New internal method.
* classes/BreakpointHandle.cs
(BreakpointHandle): This is now private.
2006-04-11 Martin Baulig <martin@ximian.com>
* classes/BreakpointHandle.cs
(BreakpointHandle): Make this internal.
* backends/Process.cs
(Process.InsertBreakpoint): Don't take a `Thread' argument and
don't enable the breakpoint.
* frontend/Interpreter.cs
(Interpreter.InsertBreakpoint): Process.InsertBreakpoint() no
longer enables the breakpoint; do this here.
2006-04-11 Martin Baulig <martin@ximian.com>
* classes/Module.cs (ILoadHandler): New internal interface.
(SymbolFile.RegisterLoadHandler, Module.RegisterLoadHandler):
Return an `ILoadHandler', not an `IDisposable'.
2006-04-11 Martin Baulig <martin@ximian.com>
* classes/SourceLocation.cs
(SourceLocation.SourceBuffer): Removed.
2006-04-11 Martin Baulig <martin@ximian.com>
* backends/Process.cs
(Process.SaveSession, LoadSession): New public methods; moved the
session handling code here from `DebuggerSession'.
(Process.Session): Removed.
* classes/DebuggerSession.cs
(DebuggerSession): Make this a static class for the moment; all
the session handling code is now in `Process'.
2006-04-11 Martin Baulig <martin@ximian.com>
* classes/ThreadGroup.cs
(ThreadGroup.Global, ThreadGroup.System): New public static
properties; the "global" and "system" groups are now static and
immutable.
* backends/BreakpointManager.cs
(BreakpointManager.RemoveBreakpointsAfterFork): Renamed into
InitializeAfterFork().
2006-04-11 Martin Baulig <martin@ximian.com>
* classes/Breakpoint.cs (Breakpoint.Clone): Removed.
* backends/BreakpointManager.cs
(BreakpointManager.RemoveBreakpointsAfterFork): Create a new
`BreakpointHandle' for all global user-defined breakpoints.
2006-04-11 Martin Baulig <martin@ximian.com>
* backends/Process.cs (Process): Moved the breakpoint/event code
here from `DebuggerSession'.
* backends/DebuggerSession.cs (DebuggerSession): Moved the
breakpoint/event code into `Process'.
2006-04-10 Martin Baulig <martin@ximian.com>
* backends/BreakpointManager.cs
(BreakpointManager.RemoveBreakpointsAfterFork): Remove all
non-global breakpoints after a fork().
* backends/Inferior.cs
(Inferior.InitializeAfterFork): Call it here.
* frontend/Interpreter.cs
(Interpreter.GetThreadGroup): Default to `main', not `global'.
2006-04-10 Martin Baulig <martin@ximian.com>
* backends/ILanguageBackend.cs
(NotificationType): Added `ThreadExited'.
* backends/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): If we receive a
`ThreadExited' notification, clear `engine.EndStackAddress'.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.ReleaseThreadLock): Resume the target if we
stopped it.
2006-04-10 Martin Baulig <martin@ximian.com>
* backends/server/x86-ptrace.c
(server_ptrace_dispatch_event): Clear `inferior->last_signal' if
we don't send a `MESSAGE_CHILD_STOPPED'.
2006-04-10 Martin Baulig <martin@ximian.com>
Released version 0.13 "Luxemburg" of the Mono Debugger :-)
2006-04-10 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(Debugger.DebuggerSession): Moved into `Process'.
* backends/Process.cs
(Process.DebuggerSession): Moved here from `Debugger'.
* classes/DebuggerSession.cs
(DebuggerSession): Make this per-process, not per-debugger.
2006-04-09 Martin Baulig <martin@ximian.com>
* test/testsuite/testnativefork.cs: New test.
* test/src/testnativefork.c: Test case for the test.
2006-04-09 Martin Baulig <martin@ximian.com>
* backends/Threadmanager.cs
(ThreadManager.HandleChildEvent): Pass SIGCHLD to the target
without stopping it.
* backends/server/x86-ptrace.c
(server_ptrace_dispatch_event): Return a normal
MESSAGE_CHILD_STOPPED on SIGCHLD.
2006-04-07 Martin Baulig <martin@ximian.com>
* backends/server/x86-ptrace.c (server_ptrace_spawn): Set the
child's core-file limit to zero after forking.
2006-04-07 Martin Baulig <martin@ximian.com>
* backends/server/x86-ptrace.c
(io_thread): Fix a very old race condition: keep our data in a
separate `IOThreadData' structure since the inferior could have
been disposed.
2006-04-07 Martin Baulig <martin@ximian.com>
* test/: Clean up this directory a bit.
* test/mono-debugger.tests/: Removed.
* test/mdb.exp: Removed.
2006-04-06 Martin Baulig <martin@ximian.com>
* frontend/CL.cs (Engine.ctor): Take an `Interpreter' argument.
(Engine.Run): Moved the exception handling here.
* frontend/Command.cs
(Command.Execute): Changed return type to `void'; don't catch any
exceptions here.
(Command.Repeat): Changed return type to `void'.
(Command.Resolve): Don't catch any exceptions here.
2006-04-06 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter): Implement `IDisposable'.
2006-04-05 Martin Baulig <martin@ximian.com>
* wrapper/: Renamed to `build'.
2006-04-05 Martin Baulig <martin@ximian.com>
* frontend/Command.cs (DebuggerEngine.ctor): Register all the
commands here.
* frontend/Interpreter.cs (Interpreter): Make this a sealed class
and add a public .ctor.
* frontend/Main.cs (CommandLineInterpreter): Don't derive from
`Interpreter' anymore.
* frontend/ScriptingContext.cs
(ScriptingContext.PrintObject): Renamed into FormatObject().
(ScriptingContext.PrintType): Renamed into FormatType().
2006-04-05 Martin Baulig <martin@ximian.com>
* test/testsuite/: New directory. Started to migrate the
testsuite to NUnit.
* test/src/: New directory. The test sources will be moved here.
2006-04-04 Martin Baulig <martin@ximian.com>
* backends/server/x86-linux-ptrace.c
(_server_ptrace_setup_inferior): Check whether we're already
stopped before blocking on do_wait().
2006-04-04 Martin Baulig <martin@ximian.com>
* NEWS: Updated NEWS.
2006-04-04 Martin Baulig <martin@ximian.com>
* backends/Process.cs
(Process.AcquireGlobalThreadLock): Moved here from ThreadManager.
(Process.ReleaseGlobalThreadLock): Likewise.
2006-04-03 Martin Baulig <martin@ximian.com>
HEADS UP: The debugger no longer works with the stable Mono from
the 1.1.13 branch, sorry.
* configure.in: Require Mono >= 1.1.14.
2006-04-03 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(Debugger.TargetOutputEvent): Moved here from `Thread'.
2006-04-03 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs: Inform the user about newly created and
exited processes.
2006-04-03 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.MainProcess): Removed.
(Interpreter.CurrentProcess): New public property.
* backends/Debugger.cs
(Debugger.TargetExitedEvent): New public event.
(Debugger.OnProcessExitedEvent): Kill all other processes if the
main process exited.
(Debugger.Kill): New public method.
2006-04-03 Martin Baulig <martin@ximian.com>
* backends/Process.cs
(Process.Initialize): Set `main_thread' and `main_engine' here.
* backends/Debugger.cs
(Debugger.Run): It's now safe to use `process.MainThread' on the
returned Process immediately.
2006-04-03 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.start_event): Removed.
2006-04-03 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.Threads): Removed; we don't keep a separate hash
table here anymore, but use `Process.Threads' instead.
(Interpreter.Processes): New public property.
* frontend/Command.cs
(Show.ShowProcessesCommand): Added `show processes' command.
2006-04-03 Martin Baulig <martin@ximian.com>
* backends/Process.cs
(Process.ID): New public property.
(Process.Threads): New public property.
(Process.TargetApplication): New public property.
(Process.CommandLineArguments): New public property.
2006-04-03 Martin Baulig <martin@ximian.com>
* classes/Breakpoint.cs (Breakpoint): Implement ICloneable.
(Breakpoint.Clone): New public method.
2006-04-03 Martin Baulig <martin@ximian.com>
* backends/server/breakpoints.c
(mono_debugger_breakpoint_manager_clone): New public function.
2006-04-02 Martin Baulig <martin@ximian.com>
* backends/server/breakpoints.h
(BreakpointInfo): Merge this with `X86BreakpointInfo'.
* backends/server/x86-arch.h
(X86BreakpointInfo): Merged into `BreakpointInfo'.
2006-04-02 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs: Correctly dispose the `Debugger', so we
don't hang on exit.
2006-04-01 Martin Baulig <martin@ximian.com>
* backends/Process.cs: Implement follow-fork and follow-exec.
* backends/Debugger.cs
(Debugger.ProcessReachedMainEvent): New public event.
2006-04-01 Martin Baulig <martin@ximian.com>
* backends/server/x86-linux-ptrace.c
(_server_ptrace_setup_thread_manager): Add `PTRACE_O_TRACEFORK',
`PTRACE_O_TRACEVFORK' and `PTRACE_O_TRACEEXEC'.
* backends/server/server.h (ServerStatusMessageType): Added
`MESSAGE_CHILD_FORKED' and `MESSAGE_CHILD_EXECD'.
* backends/server/library.c
(mono_debugger_server_init_after_fork): New public function.
* backends/server/i386-arch.c
(do_disable, do_enable): Don't modify `breakpoint->info.enabled';
this is now done by our caller.
* backends/server/x86_64-arch.c
(do_disable, do_enable): Don't modify `breakpoint->info.enabled';
this is now done by our caller.
2006-04-01 Martin Baulig <martin@ximian.com>
* languages/native/NativeLanguage.cs
(NativeLanguage.StringType): Implemented.
* languages/native/NativePointerObject.cs
(NativePointerObject.Print): Check whether we're a string.
2006-04-01 Martin Baulig <martin@ximian.com>
* backends/ProcessStart.cs
(ProcessStart.SetupEnvironment): Set `MONO_SHARED_HOSTNAME=mdb'.
2006-03-29 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(Debugger.InitializedEvent): Renamed to `ProcessCreatedEvent'.
(Debugger.TargetExitedEvent): Renamed to `ProcessExitedEvent'.
2006-03-29 Martin Baulig <martin@ximian.com>
* backends/remoting/: Removed.
2006-03-29 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs (Debugger): Don't make this abstract and
added a public .ctor.
* backends/DebuggerSession.cs: Take a `Debugger' argument, not a
`DebuggerClient' one.
* backends/remoting/DebuggerClient.cs: Removed.
* backends/remoting/DebuggerServer.cs: Removed.
2006-03-29 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(DebuggerCommand.Execute): Don't create a new `ScriptingContext'
if we're repeating.
2006-03-28 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(DebuggerCommand.Execute): Create a new `ScriptingContext'.
(DebuggerCommand.Resolve): Call DoResolveBase() before
DoResolve().
(ThreadCommand.DoResolveBase): Set `context.CurrentThread' here.
(ThreadCommand.ResolveThread): Removed; use `CurrentThread' instead.
(ThreadCommand.CurrentThread): New public property.
(FrameCommand.DoResolveBase): Set `context.CurrentFrame' here.
(FrameCommand.ResolveFrame): Removed; use `CurrentFrame' instead.
(FrameCommand.CurrentFrame): New public property.
(UpCommand, DownCommand): We now use `backtrace.CurrentFrameIndex'.
2006-03-28 Martin Baulig <martin@ximian.com>
* classes/Backtrace.cs
(Backtrace.CurrentFrame): New public property.
(Backtrace.CurrentFrameIndex): Likewise.
* languages/Language.cs
(Language.Process): New public porperty.
2006-03-14 Martin Baulig <martin@ximian.com>
Released version 0.12 "Portland" of the Mono Debugger :-)
2006-03-14 Martin Baulig <martin@ximian.com>
* configure.in: Require Mono >= 1.1.13.
2006-03-13 Wade Berrier <wberrier@novell.com>
* arch/Makefile.am backends/remoting/Makefile.am backends/Makefile.am:
Update EXTRA_DIST to fix make dist and make distcheck
2006-03-04 Martin Baulig <martin@ximian.com>
* backends/MonoThreadManager.cs
(MonoThreadManager.Initialize): The notification function is not
dynamically allocated at runtime; we need to insert a breakpoint
on the `initialize' function in the `MONO_DEBUGGER_debugger_info'
vtable and read the notification address once we hit that bpt.
2006-02-28 Martin Baulig <martin@ximian.com>
* backends/TargetAccess.cs: Removed.
2006-02-28 Martin Baulig <martin@ximian.com>
* languages/*.cs: Use `Thread' everywhere instead of `TargetAccess'.
2006-02-28 Martin Baulig <martin@ximian.com>
* languages/Language.cs
(Language.CreateObject): Take a `Thread' argument, not a `TargetAccess'.
(Language.CreateInstance): Likewise.
(Language.CreateNullObject): Likewise.
* classes/Breakpoint.cs
(Breakpoint.CheckBreakpointHit): Take a `Thread' argument, not a
`TargetAccess'.
* classes/SimpleBreakpoint.cs
(BreakpointCheckHandler): Take a `Thread' argument, not a `TargetAccess'.
2006-02-28 Martin Baulig <martin@ximian.com>
* backends/TargetAccess.cs
(TargetAccess.DisassembleInstruction): Removed.
(TargetAccess.DisassembleMethod): Removed.
2006-02-28 Martin Baulig <martin@ximian.com>
* backends/TargetAccess.cs
(TargetAccess.InsertBreakpoint): Removed.
(TargetAccess.RemoveBreakpoint): Removed.
(TargetAccess.AddEventHandler): Removed.
(TargetAccess.RemoveEventHandler): Removed.
* backends/Debugger.cs
(Debugger.InsertBreakpoint): Removed.
(Debugger.InsertExceptionCatchpoint): Removed.
* backends/BreakpointHandle.cs
(BreakpointHandle): We now operate directly on the `Thread'
instead of the `TargetAccess'.
* classes/DebuggerSession.cs
(DebuggerSession.InsertBreakpoint): Take a `Thread' argument
instead of a `TargetAccess'.
(DebuggerSession.InsertExceptionCatchPoint): Likewise.
2006-02-28 Martin Baulig <martin@ximian.com>
* classes/Breakpoint.cs
(Breakpoint.GetNextBreakpointIndex): New internal static method.
* classes/EventHandle.cs (EventHandle..ctor): We now take an
`index' argument; we use `Breakpoint.Index' for breakpoints and
generate a new unique index for catchpoints.
2006-02-28 Martin Baulig <martin@ximian.com>
* backends/remoting/DebuggerContext.cs: Removed.
* backends/remoting/DebuggerManager.cs: Removed.
2006-02-28 Martin Baulig <martin@ximian.com>
* backends/TargetAccess.cs (ClientTargetAccess): Removed.
(TargetAccessHelper): Removed; we now share the same
`TargetAccess' between client and server.
* backends/remoting/DebuggerContext.cs
(DebuggerContext.GetTargetAccess): Removed.
2006-02-28 Martin Baulig <martin@ximian.com>
* backends/Process.cs
(Process): Manage thread groups here and not in `DebuggerManager'.
* backends/remoting/DebuggerManager.cs
(DebuggerManager): Moved all the thread groups related code into
the new `Process' class.
2006-02-28 Martin Baulig <martin@ximian.com>
* backends/Process.cs: New file.
(Process): New internal class. This class holds all the
information about one instance of a target application; ie. the
target application's threads, breakpoints, modules and symbol
tables.
* backends/ThreadManager.cs
(ThreadManager): The `ThreadManager' can now persist across
multiple invocations of a target application; all the state is in
the new `Process' class.
2006-02-24 Martin Baulig <martin@ximian.com>
The big `Process' -> `Thread' rename.
* backends/Process.cs: Renamed to Thread.cs
(Process): Renamed to Thread.
* frontend/Command.cs
(ProcessCommand): Renamed to `ThreadCommand'.
(ThreadCommand.ResolveProcess): Renamed to `ResolveThread'.
(FrameCommand.Process): Renamed the property to `Thread'.
(SelectProcessCommand): Renamed to `SelectThreadCommand'.
(BackgroundProcessCommand): Renamed to `SelectThreadCommand'.
(StopProcessCommand): Renamed to `StopThreadCommand'.
* frontend/Main.cs
(CommandLineInterpreter.SetupEngine): Renamed the "process"
command to "thread".
2006-02-24 Martin Baulig <martin@ximian.com>
* backends/Thread.cs: Renamed to ThreadBase.cs.
(Thread): Renamed to `ThreadBase'.
2006-02-23 Martin Baulig <martin@ximian.com>
* backends/Process.cs (Process): Derive from `Thread'.
2006-02-23 Martin Baulig <martin@ximian.com>
* backends/server/library.c
(mono_debugger_server_get_application): Return the currently
running application, its current working directory and command
line arguments; we use this after attaching to a process.
* backends/Inferior.cs (Inferior.GetApplication): New public
method to get the currently running application.
(Inferior.Attach): Call GetApplication() after attaching and setup
the `ProcessStart' accordingly.
* backends/ProcessStart.cs
(ProcessStart.SetupApplication): New public method; we use this
after attaching, so the user doesn't need to specify the application.
2006-02-23 Martin Baulig <martin@ximian.com>
Support multiple appdomains; this is only used when attaching to a
process which is running without `-O=shared'; the API to insert a
breakpoint in another appdomain is intentionally undocumented and
will change in near future.
* classes/SourceInfo.cs (SourceMethod.IsLoaded): Removed.
(SourceMethod.Method): Replaced the property with a new
GetMethod() method which takes a `domain' argument.
(SourceMethod.GetMethod): New public method.
(SourceMethod.Lookup): Removed.
* classes/DebuggerSession.cs
(DebuggerSession.InsertBreakpoint): Added `int domain' argument.
* classes/Module.cs
(SymbolFile.GetMethod): Added `int domain' argument.
* classes/SourceLocation.cs
(SourceLocation.GetAddress): Added `int domain' argument to
support multiple application domains.
* classes/BreakpointHandle.cs: Support multiple appdomains.
* languages/mono/MonoSymbolFile.cs: Support multiple appdomains.
2006-02-08 Martin Baulig <martin@ximian.com>
* backends/server/i386-arch.c: Use `guint32' instead of `long'
everywhere to correctly handle "negative" values.
2006-02-02 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(AttachCommand): New command.
(OpenCoreFileCommand): New command.
* frontend/Interpreter.cs
(Interpreter.Attach): New public method.
(Interpreter.OpenCoreFile): New public method.
2006-02-02 Martin Baulig <martin@ximian.com>
* backends/ProcessStart.cs
(ProcessStart.CoreFile): New public readonly field.
(ProcessStart.PID): New public readonly field
* backends/Debugger.cs
(Debugger.Attach): New public method.
(Debugger.OpenCoreFile): New public method.
2006-02-02 Martin Baulig <martin@ximian.com>
* backends/Thread.cs: New file.
(Mono.Debugger.Backends.Thread): New public abstract class.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine): Derive from `Thread'.
* arch/CoreFile.cs (CoreFile): Derive from `Thread'.
* backends/Process.cs (Process): Use a new `Thread thread' field
to perform non-stepping operations so we can talk both to a
`SingleSteppingEngine' and a `CoreFile'.
2006-02-02 Martin Baulig <martin@ximian.com>
* backends/MonoThreadManager.cs: The big API cleanup.
(MonoDebuggerInfo): Moved this here from MonoLanguageBackend.
* languages/mono/MonoLanguageBackend.cs
(MonoDebuggerInfo): Moved into MonoThreadManager.
2006-02-02 Martin Baulig <martin@ximian.com>
* arch/bfdglue.h (BfdGlueSection): Added `name'.
* arch/bfdglue.c (bfd_glue_core_file_failing_command): New
function.
* arch/Bfd.cs: Added core file support.
* arch/CoreFile.cs: New file.
(Mono.Debugger.Backends.CoreFile): New internal class.
* arch/Architecture.cs (Architecture.CreateFrame): Added
overloaded version taking a `Registers' argument.
2006-02-02 Martin Baulig <martin@ximian.com>
* backends/server/x86-linux-ptrace.c
(server_ptrace_get_threads): New function.
* backends/server/x86-ptrace.c
(server_ptrace_initialize): Renamed into `server_ptrace_create_inferior'.
(server_ptrace_attach): Renamed into `server_ptrace_initialize'
and created a new `server_ptrace_attach' to actually attach to a process.
Note that If we "attach" to a thread after receiving a PTRACE_EVENT_CLONE,
we are in fact already attached to that thread and don't need another
PT_ATTACH call.
* backends/server/library.c
(mono_debugger_server_initialize): Use this to "attach" to a new
thread of the application we're already debugging; this is used
after receiving a PTRACE_EVENT_CLONE.
(mono_debugger_server_attach): Use this to actually attach to a
new process.
(mono_debugger_server_get_threads): Get all threads of the process.
2006-01-25 Martin Baulig <martin@ximian.com>
* backends/MonoThreadManager.cs: Started to clean this up; removed
the `thread_hash'.
* backends/Inferior.cs (Inferior.TID): Make this a `long', not `int'.
* backends/Process.cs (Process.TID): Likewise.
* backends/server/library.c
(mono_debugger_server_attach): `tid' is now a `guint64 *'.
(mono_debugger_server_peek_word): `word' is now a `guint64 *'.
* backends/server/x86-arch.h (x86_arch_get_tid): Return a `guint64'.
2006-01-21 Martin Baulig <martin@ximian.com>
The debugger is now using the normal `mono' instead of its own
`mono-debugger-mini-wrapper' to execute managed code. You need to
use the latest SVN version of Mono from either HEAD or the
mono-1-1-13 branch for this.
* frontend/Main.cs: Added `-mono' command line argument to
specify the `mono' which should be used to execute managed code.
* wrapper/Makefile.am: The `mono-debugger-mini-wrapper' is gone.
* wrapper/wrapper.c: Removed.
* wrapper/mono-debugger-jit-wrapper.h: Removed.
2006-01-21 Martin Baulig <martin@ximian.com>
* wrapper/wrapper.c, thread-manager.c: Merge wrapper.c and
thread-manager.c into wrapper.c.
* wrapper/thread-manager.c: Removed.
* wrapper/icall.c: Removed.
2006-01-19 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.do_continue): Only insert the temporary
breakpoint if we're not stepping over a breakpoint; otherwise
OperationStepOverBreakpoint takes care of that.
* tests/mono-debugger.tests/TestBreakpoint.exp: Added some more
test cases; this also addresses the underlying problem of #77056.
2006-01-19 Martin Baulig <martin@ximian.com>
Fix #77056.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.ProcessChildEvent): Don't remove the
temporary breakpoint here unless we actually hit it.
(SingleSteppingEngine.step_over_breakpoint): The `trampoline'
argument is either null or the same than `until'; so change its
type into a `bool'.
(Operation.ResumeOperation): New protected virtual method; we're
called if the operation got interrupted by a non-breaking
breakpoint and we need to resume it.
* backends/server/x86_64-arch.cx
(86_arch_get_registers): Also read `DR_STATUS' here to make
hardware breakpoints actually work.
2006-01-05 Hans Kratz <kratz@omnicore.com>
* backends/ProcessStart.cs: Search for the for the wrapper in
the directory where mscorlib.dll is located instead. This is
used so other clients can work (X-Develop for example).
2005-12-21 Wade Berrier <wberrier@novell.com>
* wrapper/mdb.in: Modify wrapper to match more closly the wrappers in mono
2005-12-15 Martin Baulig <martin@ximian.com>
Released version 0.11 "Guam" of the Mono Debugger :-)
2005-12-14 Martin Baulig <martin@ximian.com>
* wrapper/Mono.Debugger.Cecil.dll: Added this to SVN.
* wrapper/Makefile.am: Don't build Mono.Debugger.Cecil.dll.
2005-12-14 Martin Baulig <martin@ximian.com>
* configure.in: Require Mono 1.1.11.
2005-12-14 Martin Baulig <martin@ximian.com>
* backends/remoting/DebuggerClient.cs
(DebuggerClient.IsRemote): Use another appdomain instead of
another process.
2005-12-11 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(TypeExpr): New public abstract base class for `TypeExpression'.
(PointerExpression): New public class.
(CastExpression.DoEvaluateObject): Allow casting from a pointer
expression of from a non-typesafe pointer to a native pointer.
* frontend/CSharpExpressionParser.jay
(variable_or_type_name): Add `NativeTypeName *' syntax for native
pointers.
2005-12-11 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(Debugger.NativeLanguage): New public property.
2005-12-11 Martin Baulig <martin@ximian.com>
* languages/mono/MonoGenericInstanceType.cs: New file.
(MonoGenericInstanceType): New public class; derives from
`MonoClass'. We still don't have full generics support, we treat
the generic instance just like a normal class.
2005-12-11 Martin Baulig <martin@ximian.com>
* languages/TargetPointerType.cs
(TargetPointerType.GetObject): New public method to create a
pointer from an address.
2005-12-11 Martin Baulig <martin@ximian.com>
* languages/Language.cs
(Language.CreatePointerType): New public method.
2005-12-11 Martin Baulig <martin@ximian.com>
* arch/DwarfReader.cs: Improved the type support.
* arch/BfdContainer.cs
(BfdContainer.LookupType): We now use a type hashtable in the
`BfdContainer' and keep track of incomplete structs: if there's a
typedef entry for the same struct in more than one source file,
return the actual definition.
2005-12-11 Martin Baulig <martin@ximian.com>
* backends/remoting/DebuggerClient.cs
(DebuggerClient.ClientShutdown): New public event.
* frontend/Interpreter.cs
(Interpreter.Exit): Call Environment.Exit() in a `finally'
handler; print, but ignore all exceptions.
(Interpreter.InterpreterEventSink): Connect to the
`DebuggerClient.ClientShutdown' event.
2005-12-07 Martin Baulig <martin@ximian.com>
Reworked the breakpoint code and added session management.
* classes/DebuggerSession.cs
(DebuggerSession): The new session management code.
* classes/SourceFile.cs (SourceFile): Make this [Serializable].
(SourceMethod): Likewise.
* classes/SourceLocation.cs
(SourceLocation): Make this [Serializable].
* classes/EventHandle.cs
(EventHandle): Don't implement `IEventHandle'; killed that
interface.
* arch/Bfd.cs (Bfd): Inherit from `SymbolFile', not `Module'.
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile): Inherit from `SymbolFile', not `Module'.
* classes/CatchpointHandle.cs
(CatchPointHandle): Don't use an `ExceptionCatchPoint' anymore; do
everything in here instead.
* classes/ThreadGroup.cs (ThreadGroup): Moved all the static
methods into DebuggerManager.
* classes/Module.cs
(SymbolFile): New internal abstract class; replaces `ISymbolFile'.
(Module): Don't make this abstract; split out all the
functionality into `SymbolFile'.
* classes/ExceptionCatchPoint.cs: Removed.
* interfaces/IEventHandle.cs: Removed.
* interfaces/ISymbolFile.cs: Removed.
2005-12-03 Martin Baulig <martin@ximian.com>
* classes/ProcessStart.cs: Moved to ../backends/ProcessStart.cs;
moved the `ProcessStart' class into the `Mono.Debugger.Backends'
namespace; moved the `DebuggerOptions' class into the new
DebuggerSession.cs.
* classes/DebuggerSession.cs: New file.
(DebuggerOptions): Moved here from ProcessStart.cs.
2005-12-03 Martin Baulig <martin@ximian.com>
* classes/ProcessStart.cs
(ProcessStart): Make this class internal.
(DebuggerOptions): We're now [Serializable] and not a
MarshalByRefObject anymore.
2005-12-01 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs (ProcessHandle): Removed.
2005-12-01 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(ProcessHandle): Removed some more stuff here and get ready to
kill it.
2005-12-01 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(Command.SteppingCommand): New public abstract class; use this for
all stepping commands.
* frontend/ScriptingContext.cs (ProcessHandle.Step): Removed.
2005-12-01 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs (FrameHandle): Removed.
(BacktraceHandle): Removed.
2005-12-01 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs
(StackFrame.ExceptionObject): New public property.
* frontend/Style.cs
(StyleBase.UnhandledException): Don't take a `TargetObject exc'
argument; it's now part of the `StackFrame'.
(StyleBase.TargetEvent): New public abstract method.
* frontend/ScriptingContext.cs
(FrameHandle.TargetEvent): Removed; we now use `Style.TargetEvent'.
2005-12-01 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(FrameHandle): Removed all the register stuff.
2005-12-01 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(FrameHandle.Disassemble): Removed.
(FrameHandle.DisassembleMethod): Removed.
(FrameHandle.Language): Removed.
(ScriptingContext.CurrentLanguage): New public property.
2005-11-30 Martin Baulig <martin@ximian.com>
* frontend/Style.cs (StyleMartin): Removed.
(StyleBase.PrintFrame): Take a `StackFrame' instead of a
`FrameHandle'.
(StyleBase.TargetStopped): Likewise.
(StyleBase.UnhandledException): Likewise.
2005-11-30 Martin Baulig <martin@ximian.com>
* backends/server/i386-arch.h: Move the hardware breakpoint stuff
to x86-ptrace.h and rename the `I386_DR_*' macros to `X86_DR_*'.
* backends/server/x86_64-arch.c: Implement hardware breakpoints.
2005-11-30 Martin Baulig <martin@ximian.com>
* frontend/Style.cs: Merge `StyleMono' and `StyleNative' into a
new `StyleCLI'.
2005-11-30 Martin Baulig <martin@ximian.com>
* backends/Process.cs (Process.DebuggerOutput): Removed.
* backends/Process.cs (Process.DebuggerError): Removed.
2005-11-30 Martin Baulig <martin@ximian.com>
* backends/server/i386-arch.c
(server_ptrace_call_method_invoke): Make this work again.
2005-11-29 Martin Baulig <martin@ximian.com>
* backends/server/i386-arch.c
(server_ptrace_insert_breakpoint): You cannot have a hardware
breakpoint and a normal breakpoint on the same address.
(server_ptrace_insert_hw_breakpoint): Check whether we already
have a breakpoint on the requested instruction.
2005-11-28 Martin Baulig <martin@ximian.com>
* classes/Report.cs (Report.Print): New public method.
(Report.Error): New public method.
* frontend/Interpreter.cs: Use Report.Print() and Report.Error()
to print things.
2005-11-28 Martin Baulig <martin@ximian.com>
* backends/server/i386-arch.c: Make i386 support work again.
2005-11-11 Martin Baulig <martin@ximian.com>
* languages/native/NativeEnumObject.cs: Removed.
* languages/mono/MonoEnumObject.cs: Removed.
* languages/TargetEnumObject.cs
(TargetEnumObject): Don't make this class abstract.
(TargetEnumObject.Value): Implement this here.
* languages/TargetEnumType.cs
(TargetEnumType.GetValue): New internal method.
2005-11-11 Martin Baulig <martin@ximian.com>
* arch/DwarfReader.cs
(DwarfTargetVariable.GetLocation): Implemented a few more opcodes.
* languages/TargetVariable.cs
(TargetVariable.PrintLocation): New public abstract method.
* frontend/Command.cs
(ShowLocationCommand): Added `show location' command.
2005-11-11 Martin Baulig <martin@ximian.com>
* backends/server/library.c
(mono_debugger_server_initialize): Print a warning that running
mdb as root may be a security risk; see
http://primates.ximian.com/~martin/blog/entry_150.html for details.
2005-11-11 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(Expression.EvaluateVariable): Renamed to `EvaluateObject'.
(Expression.DoEvaluateVariable): Renamed to `DoEvaluateObject'.
2005-11-11 Martin Baulig <martin@ximian.com>
* arch/Architecture.cs
(Architecture.CopyRegisters): New internal abstract method.
* arch/DwarfFrameReader.cs: Use `arch.CopyRegisters()' to copy the
registers; preserve callee saved registers.
* classes/StackFrame.cs (Register.Name): New public field.
2005-11-11 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(Expression.EvaluateLocation): Renamed to `EvaluateSource'.
(Expression.DoEvaluateLocation): Renamed to `DoEvaluateSource'.
2005-11-10 Martin Baulig <martin@ximian.com>
* arch/Architecture.cs
(Architecture.Hack_ReturnNull): You don't wanna use this function.
* arch/BfdContainer.cs: Some minor API cleanups; make sure to set
the newly created Bfd's `MainBfd'.
* classes/Breakpoint.cs
(Breakpoint.BreakpointHandler): New internal function.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.child_breakpoint): Call the new
`bpt.BreakpointHandler()' method before CheckBreakpointHit().
* arch/Bfd.cs
(Bfd.DynlinkBreakpoint): New private class; we use this for the
dynlink breakpoints.
(Bfd.module_loaded): Added big big hack for gnome-vfs: intercept
any calls to `__nptl_setxid()' via the new `SetXidBreakpoint' and
make it return 0.
2005-11-10 Martin Baulig <martin@ximian.com>
* backends/server/library.c
(mono_debugger_server_initialize): Refuse to run as root.
2005-11-09 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs
(TargetClassType.Module): New public abstract property.
* languages/TargetFunctionType.cs
(TargetFunctionType.IsLoaded): New public abstract property.
* classes/BreakpointHandle.cs
(BreakpointHandle.EnableBreakpoint): When inserting a breakpoint
on a function, first check whether that function is loaded and use
a load handler if not.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.ExecuteOperation): New private method; use
this in ProcessOperation() and PushOperation() rather than calling
`operation.Execute (this)' directly; catch exceptions here.
2005-11-08 Martin Baulig <martin@ximian.com>
* languages/Language.cs
(Language.LookupType): Removed the `StackFrame' argument.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.LookupMonoType): Use `LookupType' to lookup a
`Cecil.ITypeReference'.
2005-11-08 Martin Baulig <martin@ximian.com>
* backends/Inferior.cs
(Inferior.CreateThread): Copy all the data to the new Inferior, so
we don't need to call SetupInferior() on it.
(Inferior.Attach): Don't call SetupInferior().
(Inferior.Dispose): Don't dispose the `Bfd' as it's owned by the
BfdContainer and will be disposed by the `Debugger' backend.
2005-11-02 Martin Baulig <martin@ximian.com>
* classes/Report.cs
(Report): Make this a static class and remove everything except
the `Debug' method.
(ReportWriter): New public `MarshalByRefObject' class.
* backends/remoting/DebuggerContext.cs
(DebuggerContext.ReportWriter): New public property; share one
`ReportWriter' instance between client and server so we can
redirect debugging output to a file.
* frontend/Main.cs (Main.ParseOption): The `-debug-flags' command
line argument now takes an optional filename.
2005-11-02 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(CommandAttribute): Removed.
(SingleSteppingEngine.SendCommand): New private method; call
`manager.SendCommand' unless we're in the engine thread.
(SingleSteppingEngine): Use `SendCommand' with an anonymous method
everywhere instead of the [Command] attribute.
2005-10-29 Martin Baulig <martin@ximian.com>
Avoid using the `Process' in the server; instead use the
`TargetAccess' to avoid unneccessary remoting round-trips.
* backends/Process.cs (Process.CallMethod): Removed.
* backends/TargetAccess.cs
(ServerTargetAccess.CallMethod): Implemented.
(TargetAccess.InsertBreakpoint): New internal method.
(TargetAccess.RemoveBreakpoint): New internal method.
(TargetAccess.AddEventHandler): New internal method.
(TargetAccess.RemoveEventHandler): New internal method.
* classes/BreakpointHandle.cs
(BreakpointHandle): Operate on `TargetAccess' and not on
`Process'.
2005-10-29 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(CommandResult): Make this abstract.
(SimpleCommandResult): New internal class.
(Operation.Result): New public readonly field.
(SingleSteppingEngine.operation_completed): Don't call
`process.SendTargetEvent()' anymore; our `current_operation' now
contains a `CommandResult' which has the completed event.
* backends/Process.cs (Process.State): Return the SSE's state.
(Process.SendTargetEvent): Removed.
(Process): When calling methods on the SSE, don't wait on the
`operation_completed_event' directly; use the `CommandResult'.
2005-10-26 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs
(TargetClassType.ResolveClass): Removed.
* languages/TargetFunctionType.cs
(TargetFunctionType.GetVirtualMethod): Removed.
* backends/Process.cs
(Process.RuntimeInvoke): Take a `TargetFunctionType' instead of a
`TargetAddress' and added `bool is_virtual' argument.
* backends/SingleSteppingEngine.cs
(OperationRuntimeInvoke): Cleaned this up; box the instance and
compute the (virtual) method address here.
2005-10-20 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(Convert.ImplicitConversion(Exists)): Add support for implicit
reference conversions from a type to its parent.
* test/mono-debugger.tests/TestInheritance.exp: Added testcase.
2005-10-20 Martin Baulig <martin@ximian.com>
* frontend/Style.cs
(StyleNative.DoFormatObject): Added support for enums.
* languages/TargetEnumType.cs
(TargetEnumType.IsFlagsEnum): New public property.
* languages/TargetMember.cs
(TargetMemberInfo): Make this a MarshalByRefObject.
(TargetFieldInfo.ConstValue): New public property; replaces
GetConstValue().
(TargetFieldInfo.GetConstValue): Removed.
* test/mono-debugger.tests/TestEnum.exp: Added enum test.
2005-10-19 Martin Baulig <martin@ximian.com>
* languages/TargetFunctionType.cs
(TargetFunctionType.GetMethodAddress): New public method.
(TargetFunctionType.GetVirtualMethod): New public method.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.RuntimeInvoke): Take a `TargetAddress'
instead of a `TargetFunctionType'.
(OperationRuntimeInvoke): Don't compute the virtual method and
also don't box the instance here; our caller is now responsible
for doing that.
* backends/Process.cs (Process.RuntimeInvoke): Take a
`TargetAddress' instead of a `TargetFunctionType'.
* frontend/ScriptingContext.cs
(ScriptingContext.RuntimeInvoke): Compute the virtual method and
box/unbox the instance object here.
2005-10-18 Martin Baulig <martin@ximian.com>
* languages/TargetObjectType.cs
(TargetObjectType): New public abstract class.
* languages/TargetObjectObject.cs
(TargetObjectObject): New public abstract class.
* languages/TargetObjectKind.cs
(TargetObjectKind): Added `TargetObjectKind.Object'.
* languages/mono/MonoObjectType.cs
(MonoObjectType): Derive from `TargetObjectType'.
* languages/mono/MonoObjectObject.cs
(MonoObjectObject): Derive from `TargetObjectObject'.
* frontend/Expression.cs
(Convert.ToClassType): New public static method.
(Convert.ToClassObject): Likewise.
2005-10-18 Martin Baulig <martin@ximian.com>
* languages/TargetClassObject.cs
(TargetClassObject.GetCurrentObject): New public abstract method.
* frontend/Expression.cs
(Cast.TryCurrentCast): Make this actually work.
2005-10-18 Martin Baulig <martin@ximian.com>
* backends/server/x86_64-arch.c, i386-arch.c: Save and restore
`inferior->last_signal' across invocations.
2005-10-17 Martin Baulig <martin@ximian.com>
* backends/classes/MonoVariableLocation.cs
(MonoVariableLocation.WriteAddress): Correctly handle `is_byref'.
2005-10-17 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs (VariableAccessExpression.DoAssign): Call
`Convert.ImplicitConversionRequired' on the object to convert it
to the correct type.
2005-10-17 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(MethodGroupExpression.ctor): Take a `TargetFunctionType[]' array
instead of an `ArrayList'.
(PropertyGroupExpression): Removed.
(InvocationExpression.DoResolve): Do overload resolution here.
(InvocationExpression.DoResolveType): Override this.
(InvocationExpression.Invoke): Return `void'.
(ArrayAccessExpression.DoResolveVariable, DoAssign): Use an
`InvocationExpression' to invoke indexers.
2005-10-17 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs (Convert): New public static class.
(Convert.ImplicitConversion): New public method.
(Convert.ImplicitConversionExists): Likewise.
(Convert.ImplicitConversionRequired): Likewise.
(MethodGroupExpression.IsApplicable): New method to check whether
a method is actually applicable.
(MethodGroupExpression.OverloadResolve): Also check whether the
method is applicable if there is just one single method; take a
`TargetType[]' array instead of an `Expression[]' array as
argument.
(MethodGroupExpression.OverloadResolve): Make the overloaded
version taking an `ArrayList candidates' private.
(InvocationExpression.Invoke): Implicitly convert the arguments to
the actual parameter types.
(NewExpression.Invoke): Create an InvocationExpression to avoid
some code duplication.
2005-10-16 Martin Baulig <martin@ximian.com>
* backends/classes/ClientSuppliedTargetLocation.cs
(ClientSuppliedTargetLocation): New internal class.
* languages/TargetFundamentalType.cs
(TargetFundamentalType.CreateInstance): Use the new
`ClientSuppliedTargetLocation' as the object's location rather
than using the heap.
* languages/Language.cs (Language.AllocateMemory): Removed.
* languages/mono/Heap.cs: Removed.
2005-10-16 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationAbortInvocation): New operation to abort a runtime
invoke; this unwinds the stack and calls all `finally' handlers.
(SingleSteppingEngine.AbortInvocation): New function.
2005-10-16 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs (StackFrame.ctor): Don't take a `level'
argument; we compute this automatically when adding the frame to
the Backtrace.
2005-10-16 Martin Baulig <martin@ximian.com>
* test/TestAbort.cs, test/mono-debugger.test/TestAbort.exp: New
test for the stack unwinding and `return'.
2005-10-16 Martin Baulig <martin@ximian.com>
* backends/server/server.c
(mono_debugger_server_abort_invoke): New public method.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.Return): Check whether we're crossing a
runtime invoke boundary and abort the invocation if neccessary.
(SingleSteppingEngine.ProcessChildEvent): We now receive a
`CHILD_CALLBACK_COMPLETED' event when completing a debugging
runtime invoke.
* backends/Inferior.cs
(Inferior.ChildEventType): Added `CHILD_CALLBACK_COMPLETED'.
* backends/server/x86_64-arch.c
(x86_arch_child_stopped): Send `STOP_ACTION_CALLBACK_COMPLETED' if
we completed a debugging runtime invoke.
2005-10-16 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs (StackFrame): Don't implement IDisposable.
(StackFrame.FrameInvalidEvent): Removed.
(ObjectInvalidHandler): Removed.
* classes/Backtrace.cs (Backtrace): Don't implement IDisposable.
(Backtrace.BacktraceInvalidEvent): Removed.
2005-10-16 Martin Baulig <martin@ximian.com>
Added the `return' command to make the current stack frame return.
* wrapper/mono-debugger-jit-wrapper.h
(MonoDebuggerInfo): Added `run_finally'.
* backends/server/server.c
(mono_debugger_server_call_method_2): New public method; invoke a
function which takes a `MonoContext *' (private mini data structure)
argument; we use this to call mono_debugger_run_finally().
* backends/SingleSteppingEngine.cs
(OperationReturn): New operation; run the current frame's
`finally' handlers.
(SingleSteppingEngine.Return): New public method; make the current
stack frame return.
* frontend/Command.cs (ReturnCommand): Added a `return' command to
make the current stack frame return.
2005-10-14 Martin Baulig <martin@ximian.com>
Only use a single AddressDomain per process.
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryInfo.GlobalAddressDomain): Removed; use
`AddressDomain' instead.
(ITargetMemoryAccess.ReadGlobalAddress): Removed; use
`ReadAddress' instead.
2005-10-11 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs (SimpleStackFrame): Removed.
2005-10-11 Martin Baulig <martin@ximian.com>
* arch/Architecture.cs: The stack unwinding methods now operate on
`StackFrame's instead of `SimpleStackFrame's.
2005-10-11 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs
(StackFrame.SourceAddress): Create this lazily.
2005-10-11 Martin Baulig <martin@ximian.com>
* classes/SymbolTableManager.cs
(SymbolTableManager.SymbolTable): Removed.
(SymbolTableManager): Make some API entry points `internal'.
2005-10-11 Martin Baulig <martin@ximian.com>
* interfaces/ISymbolTable.cs (ISimpleSymbolTable): Removed.
* arch/Disassembler.cs (Disassembler.SymbolTable): Removed.
* classes/SimpleSymbolTableCollection.cs: Removed.
* classes/Module.cs (Module.SimpleSymbolTable): Removed.
(Module.SimpleLookup): New public abstract method.
* classes/SymbolTableManager.cs
(SymbolTableManager.Lookup): New public method.
(SymbolTableManager.SimpleLookup): New public method.
(SymbolTableManager.SimpleSymbolTable): Removed.
* backends/Process.cs
(Process.SimpleLookup): Made this public.
(Process.Lookup): New public method.
2005-10-11 Martin Baulig <martin@ximian.com>
* arch/Disassembler.cs
(Disassembler): New internal abstract class; replaces the
`IDisassembler' interface.
* interfaces/IDisassembler.cs: Removed.
2005-10-11 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs
(SimpleStackFrame): Make this `internal', not `public'.
2005-10-11 Martin Baulig <martin@ximian.com>
* classes/MethodBase.cs: Renamed to Method.cs.
(MethodBase): Renamed to `Method'.
* classes/Method.cs (Method): This abstract base class now
replaces the `IMethod' interface.
* interfaces/IMethod.cs: Removed.
2005-10-11 Martin Baulig <martin@ximian.com>
* interfaces/IArchitecture.cs (IArchitecture): Replaced this
interfaces with the abstract class `Architecture'.
* arch/Architecture.cs (Architecture): New public abstract class;
replaces the `IArchitecture' interface. Make a few API entry
points `internal' instead of `public'.
2005-10-11 Martin Baulig <martin@ximian.com>
* arch/Architecture_PowerPC.cs: Removed.
2005-10-11 Martin Baulig <martin@ximian.com>
* arch/*.cs: Removed the `Mono.Debugger.Architecture' namespace;
use `Mono.Debugger.Backends' instead.
2005-10-11 Martin Baulig <martin@ximian.com>
* interfaces/IArchitecture.cs
(IArchitecture.TrySpecialUnwind): New method.
* arch/Architecture_X86_64.cs
(Architecture_X86_64.TrySpecialUnwind): Support sigreturn trampolines.
2005-10-10 Martin Baulig <martin@ximian.com>
* backends/server/x86_64-arch.c
(x86_arch_child_stopped): Send a `CHILD_HIT_BREAKPOINT' event if
we completed a debugging runtime-invoke.
* backends/server/i386-arch.c (x86_arch_child_stopped): Likewise.
* backends/MonoThreadManager.cs
(MonoThreadManager.thread_abort): Don't kill the thread.
* frontend/Expression.cs
(RegisterExpression): Derive from PointerExpression.
2005-10-08 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationRuntimeInvoke): If we're invoking a method from
System.Object or System.ValueType on a valuetype instance, we need
to box it.
2005-10-07 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs
(TargetClassType.GetStaticField): Take a `TargetFieldInfo' instead
of an `int'.
(TargetClassType.SetStaticField): Likewise.
* languages/TargetClassObject.cs
(TargetClassObject.GetField): Take a `TargetFieldInfo' instead of
an `int'.
(TargetClassObject.SetField): Likewise.
2005-10-07 Martin Baulig <martin@ximian.com>
* test/TestToString.cs: New test.
* test/mono-debugger.test/TestToString.exp: New test.
2005-10-07 Martin Baulig <martin@ximian.com>
* languages/TargetObject.cs
(TargetObject.HasAddress): Moved here from TargetPointerObject.
(TargetObject.Address): Likewise.
2005-10-07 Martin Baulig <martin@ximian.com>
* frontend/Command.cs
(Command.PrintCommand.format): Default to `DisplayFormat.Object'.
* languages/Language.cs (Language.ObjectType): New property.
* backends/SingleSteppingEngine.cs
(OperationRuntimeInvoke): Don't call the `GetVirtualMethodFunc' if
our instance is a valuetype.
2005-10-05 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs
(ScriptingContext.PrintObject): Try calling a MonoObject's
"ToString()" method for `DisplayFormat.Object'.
2005-10-05 Martin Baulig <martin@ximian.com>
* classes/Style.cs (DisplayFormat): New public enum.
(Style.FormatObject): Added `DisplayFormat format' argument.
2005-09-29 Martin Baulig <martin@ximian.com>
* languages/TargetEnumType.cs (TargetEnumType.GetMember): Removed.
* languages/Language.cs
(Language.CreateInstance): Removed the overloaded version taking a
`StackFrame' and an `object'; the other one is now taking a
`TargetAccess' and an `object'.
* languages/mono/MonoEnumTypeInfo.cs: Removed.
* languages/mono/MonoEnumType.cs: This is now working again.
* languages/mono/MonoEnumObject.cs: This is now working again.
2005-09-29 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassType.cs
(MonoClassType.ResolveClass): Resolve our parent first.
2005-09-28 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(Expression.ResolveMethod): New method.
(MemberAccessExpression.ResolveMemberAccess): Allow accessing an
instance member in static context if we're doing a method lookup.
* frontend/Command.cs (SourceCommand.EvaluateMethod): use
`expr.ResolveMethod ()' instead of `expr.Resolve ()'.
* tests/mono-debugger.tests/TestBreakpoint.exp: Added test case
for inserting a breakpoint on an instance method.
2005-09-28 Martin Baulig <martin@ximian.com>
* languages/mono/MonoPointerType.cs: New file.
* languages/mono/MonoPointerObject.cs: New file.
* languages/mono/MonoDebuggerSupport.cs
(MonoDebuggerSupport.GetTypeFromSignature): Added support for
`MONO_TYPE_PTR' and `MONO_TYPE_BYREF'.
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.LookupMonoType): Create a `MonoPointerType'
for `byref' types.
2005-09-28 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationRuntimeInvoke.DoProcessEvent): Stop if we're in debug
mode.
2005-09-28 Martin Baulig <martin@ximian.com>
* tests/TestInheritance.cs: Added tests for abstract classes.
2005-09-25 Martin Baulig <martin@ximian.com>
* backends/TargetAccess.cs
(TargetAccess.RuntimeInvoke): Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* backends/ThreadManager.cs
(ThreadManager): Made this `internal'.
(ThreadEventHandler): Moved to Debugger.cs and renamed to
`DebuggerEventHandler'.
(ThreadManager): Moved the `InitializedEvent',
`MainThreadCreatedEvent', `ThreadCreatedEvent',
`ThreadExitedEvent', `TargetExitedEvent' and `TargetEvent' into
the `Debugger' class.
2005-09-25 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(DebuggerBackend): Renamed to `Debugger'.
2005-09-25 Martin Baulig <martin@ximian.com>
* languages/TargetClassObject.cs
(TargetClassObject.Parent): Replaced the property with a
`GetParentObject()' method.
* languages/TargetObject.cs
(TargetObject.GetDynamicSize): Added `TargetAccess' argument.
* backends/classes/TargetLocation.cs
(TargetLocation.TargetAccess): Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* languages/TargetClassObject.cs
(TargetClassObject.GetField): Added `TargetAccess' argument.
(TargetClassObject.SetField): Likewise.
2005-09-25 Martin Baulig <martin@ximian.com>
* languages/TargetPointerObject.cs
(TargetPointerObject.CurrentType): Replaced the property with a
`GetCurrentType()' method.
(TargetPointerObject.DereferencedObject): Replaced the property
with a `GetDereferencedObject()' method.
(TargetPointerObject.DereferencedContents): Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* backends/ptrace/PTrace.cs: Removed.
(PTraceInferior): Merged with `Inferior'.
* backends/Inferior.cs
(Inferior): Don't make this abstract.
2005-09-25 Martin Baulig <martin@ximian.com>
* interfaces/ITargetAccess.cs: Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* interfaces/ILanguage.cs: Removed.
* languages/Language.cs: New file.
2005-09-25 Martin Baulig <martin@ximian.com>
* interfaces/TargetObjectKind.cs: Moved to
languages/TargetObjectKind.
2005-09-25 Martin Baulig <martin@ximian.com>
* interfaces/IVariable.cs: Removed.
* languages/TargetVariable.cs: New file.
2005-09-25 Martin Baulig <martin@ximian.com>
* interfaces/ITargetType.cs: Removed.
* interfaces/ITargetObject.cs: Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* interfaces/ITargetTypeAlias.cs: Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs: New file.
* languages/TargetClassObject.cs: New file.
* interfaces/ITargetStructType.cs: Removed.
* interfaces/ITargetStructObject.cs: Removed.
* interfaces/ITargetClassType.cs: Removed.
* interfaces/ITargetClassObject.cs: Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* languages/TargetEnumType.cs: New file.
* languages/TargetEnumObject.cs: New file.
* interfaces/ITargetEnumType.cs: Removed.
* interfaces/ITargetEnumObject.cs: Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* langauges/TargetMember.cs: New file.
(TargetMemberInfo): New public abstract class.
(TargetFieldInfo): New public abstract class.
(TargetPropertyInfo): New public abstract class.
(TargetEventInfo): New public abstract class.
(TargetMethodInfo): New public abstract class.
* interfaces/ITargetStructType.cs
(ITargetStructType.ITargetMemberInfo): Removed.
(ITargetStructType.ITargetFieldInfo): Removed.
(ITargetStructType.ITargetPropertyInfo): Removed.
(ITargetStructType.ITargetEventInfo): Removed.
(ITargetStructType.ITargetMethodInfo): Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* languages/TargetPointerType.cs: New file.
* languages/TargetPointerObject.cs: New file.
* interfaces/ITargetPointerType.cs: Removed.
* interfaces/ITargetPointerObject.cs: Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFundamentalType.cs: Removed.
* interfaces/ITargetFundamentalObject.cs: Removed.
* interfaces/ITargetFunctionType.cs: Removed.
* interfaces/ITargetArrayType.cs: Removed.
* interfaces/ITargetArrayObject.cs: Removed.
2005-09-25 Martin Baulig <martin@ximian.com>
* languages/TargetArrayType.cs: New file.
* languages/TargetArrayObject.cs: New file.
2005-09-24 Martin Baulig <martin@ximian.com>
* languages/TargetType.cs (TargetType): Made this public.
* languages/TargetObject.cs (TargetObject): Made this public.
(TargetObject.Location): Replaced the `location' field and the
`Location' property with an `internal readonly' field `Location'.
(TargetObject.GetDynamicSize): Made this `internal', not
`protected'.
* languages/TargetFundamentalObject.cs
(TargetFundamentalObject): Made this public.
* languages/TargetFundamentalType.cs
(TargetFundamentalType): Made this public.
* languages/TargetFunctionType.cs
(TargetFunctionType): Made this public.
2005-09-24 Martin Baulig <martin@ximian.com>
* backends/classes/TargetLocation.cs
(TargetLocation.StackFrame): Removed.
* backends/classes/MonoVariableLocation.cs
(MonoVariableLocation..ctor): Take an `ITargeAccess' and a
`Register' argument instead of a `StackFrame'.
2005-09-24 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFundamentalObject.cs
(ITargetFundamentalObject.SetObject): Added `ITargetAccess' arg.
2005-09-24 Martin Baulig <martin@ximian.com>
* interfaces/ITargetPointerObject.cs
(ITargetPointerObject.GetArrayElement): Added `ITargetAccess' arg.
* backends/classes/TargetLocation.cs
(TargetLocation.GetLocationAtOffset): Removed the `bool
dereference' argument.
(TargetLocation.GetDereferencedLocation): New method.
2005-09-24 Martin Baulig <martin@ximian.com>
* interfaces/ITargetArrayObject.cs
(ITargetArrayObject.this): Replaced the indexer with a
`GetElement()' and a `SetElement()' method; both taking an
`ITargetAccess' argument.
2005-09-24 Martin Baulig <martin@ximian.com>
* interfaces/IVariable.cs (IVariable.IsValid): Removed.
* languages/TargetType.cs (TargetType.GetObject): Made this
`internal', not `public'.
2005-09-24 Martin Baulig <martin@ximian.com>
* languages/TargetFunctionType.cs: New file.
2005-09-23 Martin Baulig <martin@ximian.com>
* languages/native/NativeFundamentalType.cs: Removed; use
`TargetFundamentalType' instead.
* languages/native/NativeFundamentalObject.cs: Removed; use
`TargetFundamentalObject' instead.
2005-09-23 Martin Baulig <martin@ximian.com>
* languages/mono/MonoFundamentalType.cs: Moved to
languages/TargetFundamentalType.cs
(MonoFundamentalType): Renamed to `TargetFundamentalType'.
* languages/mono/MonoFundamentalObject.cs: Moved to
languages/TargetFundamentalObject.cs
(MonoFundamentalObject): Renamed to `TargetFundamentalObject'.
2005-09-23 Martin Baulig <martin@ximian.com>
* languages/mono/MonoFundamentalObjectBase.cs
(MonoFundamentalObjectBase): Merged into `MonoFundamentalObject'.
2005-09-23 Martin Baulig <martin@ximian.com>
* languages/native/NativeType.cs: Removed; use `TargetType' instead.
* languages/native/NativeObject.cs: Removed; use `TargetObject' instead.
2005-09-23 Martin Baulig <martin@ximian.com>
* arch/StabsReader.cs: Removed for the moment until someone fully
implements PowerPC support.
* arch/Bfd.cs: Disabled PowerPC support.
2005-09-23 Martin Baulig <martin@ximian.com>
* languages/mono/MonoType.cs: Moved to languages/TargetType.cs.
(MonoType): Renamed to `TargetType'.
* languages/mono/MonoObject.cs: Moved to languages/TargetObject.cs.
(MonoObject): Renamed to `TargetObject'.
2005-09-23 Martin Baulig <martin@ximian.com>
* languages/: New directory.
* backends/mono/: Moved to languages/mono/.
* backends/native/: Moved to languages/native/.
2005-09-23 Martin Baulig <martin@ximian.com>
* backends/mono/MonoFundamentalType.cs
(MonoFundamentalType.ctor): Just take an `ILanguage' instead of a
`MonoSymbolFile'; removed the `klass_address' argument.
* backends/mono/MonoObjectType.cs
(MonoObjectType.ctor): Removed the `klass_address' argument.
* backends/mono/MonoStringType.cs
(MonoStringtype.ctor): Removed the `klass_address' argument.
2005-09-23 Martin Baulig <martin@ximian.com>
* interfaces/ILanguage.cs
(ILanguage.TargetInfo): New property.
2005-09-23 Martin Baulig <martin@ximian.com>
* interfaces/ILanguage.cs
(ILanguage.AllocateMemory): New method.
* backends/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.DataHeap): removed; use AllocateMemory()
instead.
2005-09-23 Martin Baulig <martin@ximian.com>
* interfaces/ITargetType.cs (ITargetType.IsByRef): New property.
* backends/mono/MonoObject.cs
(MonoObject.Type): Return an `ITargetType' instead of a
`MonoType'.
* backends/mono/MonoType.cs
(MonoType.File): Removed.
(MonoType..ctor): Take an `ILanguage' instead of a
`MonoSymbolFile'.
2005-09-23 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFundamentalObject.cs
(ITargetFundamentalObject.HasObject): Removed.
(ITargetFundamentalObject.Object): Replaced the property with a
`GetObject (ITargetAccess target)' method.
2005-09-23 Martin Baulig <martin@ximian.com>
* interfaces/ITargetObject.cs
(ITargetObject.IsValid): Removed.
(ITargetObject.RawContents): Removed.
(ITargetObject.DynamicSize): Removed.
(ITargetObject.GetRawDynamicContents): Removed.
(ITargetObject.Print): Take an `ITargetAccess' argument.
2005-09-23 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationRun): Derive from `Opeartion', not `OperationStepBase'.
(OperationCompileMethod): Killed the nested operation.
(OperationRuntimeInvoke.DoProcessEvent): Step over breakpoints
during runtime-invoke.
* test/mono-debugger.tests/TestBreakpoint.exp: Added test case: we
step over breakpoints during runtime-invoke.
2005-09-22 Martin Baulig <martin@ximian.com>
* interfaces/ITargetStructType.cs
(ITargetStructType.SetStaticField): New method.
* interfaces/ITargetStructObject.cs
(ITargetStructObject.SetField): New method.
* frontend/Expression.cs (MemberExpression): New abstract class.
(MethodGroupExpression): Derive from MemberExpression.
(StructAccessExpression): Derive from MemberExpression.
(StructAccessExpression.FindMember): Big cleanup; take
`bool search_instance' and a `bool search_static' args, save the
`ITargetStructObject instance' as `MemberExpression.InstanceObject'.
2005-09-22 Martin Baulig <martin@ximian.com>
* backends/remoting/DebuggerServer.cs: Big big FIXME; set the
lease timeout to 3 hours to prevent the debugger from dying.
2005-09-22 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationCallback): New operation; this replaces the old
`Callback' mechanism.
(Callback): Removed.
(SingleSteppingEngine.ProcessChildEvent): Correctly emit the
`TargetEventType.TargetHitBreakpoint' event when hitting a
breakpoint instead of just `TargetEventType.TargetStopped'.
(OperationStepOverBreakpoint): Improved and fixed a couple of
problems.
* test/mono-debugger.tests/*.exp: Reflect latest
TargetHitBreakpoint changes.
* test/mono-debugger.tests/TestBreakpoint.exp: Added some more
test cases for stepping over breakpoints.
2005-09-21 Martin Baulig <martin@ximian.com>
* test/TestBreakpoint.cs: New test.
* test/mono-debugger.tests/TestBreakpoint.exp: New test.
2005-09-21 Martin Baulig <martin@ximian.com>
* test/TestProperty.cs: New test.
* test/mono-debugger.tests/TestProperty.exp: New test.
2005-09-20 Martin Baulig <martin@ximian.com>
* interfaces/ITargetStructType.cs
(ITargetStructType.ResolveClass): New method.
* interfaces/ITargetFunctionType.cs
(ITargetFunctionType.DeclaringType): New property.
* backends/mono/MonoLanguageBackend.cs
(MonoDebuggerInfo.LookupClass): New field.
(MonoLanguageBackend.LookupClass): New method.
* wrapper/mono-debugger-jit-wrapper.h
(MonoDebuggerInfo): Added `lookup_class'.
* backends/mono/MonoClassType.cs
(MonoClassType.ResolveClass): If we don't already have a
`type_info', create it via MonoLanguageBackend.LookupClass();
this'll effectively call `mono_class_get (image, token)' in the
target and use the returned `MonoClass *' address.
* frontend/ScriptingContext.cs (ProcessHandle.RuntimeInvoke): Call
`func.DeclaringType.ResolveClass (process.TargetAccess)'.
2005-09-20 Martin Baulig <martin@ximian.com>
* backends/mono/MonoEnumType.cs: Unused; disable for the moment.
* backends/mono/MonoEnumTypeInfo.cs: Likewise.
* backends/mono/MonoEnumObject.cs: Likewise.
* backends/mono/MonoTypeInfo.cs: Removed.
* backends/mono/MonoType.cs
(MonoType.GetTypeInfo): Removed.
(MonoType.DoGetTypeInfo): Removed.
(MonoType.Size): Made this abstract.
(MonoType.GetObject): New public abstract method.
* backends/mono/MonoClassInfo.cs
(MonoClassInfo): Killed the `MonoTypeInfo' base classs; derive
directly from `MarshalByRefObject'.
* backends/mono/MonoObject.cs
(MonoObject): `IMonoTypeInfo' is gone; use the `MonoType' directly.
2005-09-20 Martin Baulig <martin@ximian.com>
* backends/mono/MonoLanguageBackend.cs
(MonoBuiltinTypeInfo): Added some fields.
* backends/mono/MonoArrayTypeInfo.cs: Removed.
* backends/mono/MonoArrayType.cs
(MonoArrayType): Implement IMonoTypeInfo.
* backends/mono/MonoClassType.cs
(MonoClassType.ReadMonoClass): New public static method; reads a
`MonoClass' from the target address space and creates a `MonoType'
for it.
2005-09-19 Martin Baulig <martin@ximian.com>
* interfaces/IArchitecture.cs
(IArchitecture.DwarfFrameRegisterMap): New property.
* arch/DwarfFrameReader.cs: Make this portable and actually work.
* arch/bfdglue.c (bfd_glue_get_symbol): Don't return weak symbols.
* backends/Debugger.cs
(DebuggerBackend.UpdateSymbolTable): Added `ITargetMemoryAccess'
argument; call `MonoLanguage.Update (target)' if it's not null.
2005-09-15 Martin Baulig <martin@ximian.com>
* backends/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.TryFindImage): Don't use reflection here.
2005-09-15 Martin Baulig <martin@ximian.com>
* classes/MonoDebuggerSupport.cs
(MonoDebuggerSupport): Removed the old reflection-based delegates.
2005-09-15 Martin Baulig <martin@ximian.com>
* classes/ProcessStart.cs
(ProcessStart.IsMonoAssembly): New protected method; does a
quick check whether something is an assembly or not.
(ProcessStart..ctor): Don't try to load the assembly; use
IsMonoAssembly() instead.
2005-09-15 Martin Baulig <martin@ximian.com>
* cecil/: When compiling from SVN, you must checkout cecil here to
make things work.
* wrapper/Makefile.am: Build `Mono.Debugger.Cecil.dll' and install
it in the GAC.
2005-09-15 Martin Baulig <martin@ximian.com>
The big Cecil port :-)
* backends/mono/MonoDebuggerSupport.cs: New file.
(MonoDebuggerSupport): Moved here from MonoLanguageBackend.cs.
(MonoDebuggerSupport.GetLocalTypeFromSignature): New method.
* backends/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.LookupMonoType): Take a
`Cecil.ITypeReference' instead of a `Type.
(MonoLanguageBackend.GetFundamentalType): New method.
* backends/mono/MonoSymbolFile.cs
(MonoSymbolFile.LookupMonoType): Take a `Cecil.ITypeReference'
instead of a `Type'.
(MonoSymbolFile.AddCoreType): Take a `Cecil.ITypeDefinition'
instead of a `MonoType'.
(MonoSymbolFile.AddType): Take a `MonoClassType' instead of a
`MonoType'.
(MonoSymbolFile.GetTypeInfo): Take a `Cecil.ITypeDefinition'
instead of a `MonoType'.
* backends/mono/MonoClassType.cs
(MonoClassType.Type): New public property.
* backends/mono/MonoType.cs
(MonoType.Type): Removed; the .ctor also doesn't take a `type'
argument anymore.
(MonoType.Name): Made this abstract.
(MonoType.DoGetTypeInfo): Removed the `TargetBinaryReader' arg.
2005-09-14 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(StructAccessExpression.FindMember): Improved this; also search
for fields in the base class; don't allow accessing static members
through an instance.
2005-09-14 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFunctionType.cs
(ITargetFunctionType.Invoke): Removed.
* interfaces/ITargetStructType.cs
(ITargetStructType.GetStaticProperty): Removed.
* interfaces/ITargetStructObject.cs
(ITargetStructObject.GetProperty): Removed.
2005-09-14 Martin Baulig <martin@ximian.com>
* backends/mono/MonoSymbolFile.cs
(MonoSymbolFile.MonoMethod.get_variables): Use the
`C.LocalVariableEntry's index to point into the MethodAddress.
2005-09-14 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(ArrayAccessExpression.DoEvaluateVariable, DoAssign): Add support
for indexers.
* test/TestIndexer.cs: New test.
* test/mono-debugger.tests/TestIndexer.exp: New test.
2005-09-14 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(ArrayAccessExpression.GetIntIndex): Allow variables as indices.
2005-09-14 Martin Baulig <martin@ximian.com>
* frontend/Command.cs (Command.NeedsProcess): Removed.
(Command.Execute): Protect the whole method in a try...catch
block; handle ScriptingException' separately.
* frontend/Interpreter.cs (Interpreter.CurrentProcess): Removed.
* frontend/ScriptingContext.cs (ScriptingContext.CurrentProcess):
Check whether the process is still alive.
* backends/ThreadManager.cs (ThreadManager): Don't block on Kill().
2005-09-13 Martin Baulig <martin@ximian.com>
Reworked the ThreadManager's event queue to make it more robust
and catch deadlocks.
* interfaces/ITargetAccess.cs (ITargetAccess): Splitted this out
from ITargetMemoryAccess.cs.
* classes/TargetEvent.cs
(TargetEventHandler): Added `ITargetAccess' argument; use this to
access the target inside the event handler.
* backends/Process.cs (Process.TargetEvent): Removed.
* backends/ThreadManager.cs
(ThreadManager.TargetEvent): Moved the event here from `Process'.
(ThreadManager): Reworked the event queue to make it more robust
and catch deadlocks.
* backends/mono/MonoObjectObject.cs
(MonoObjectObject.GetCurrentType): Don't catch exceptions here.
* frontend/Interpreter.cs
(Interpreter.ProcessEventSink): New protected [Serializable]
class; handle the `ThreadManager.TargetEvent' here.
* frontend/ScriptingContext.cs
(FrameHandle.TargetEvent): Moved all the frame-related stuff here
from the `ProcessHandle'.
(ProcessHandle): Moved all the frame-related stuff to the
`FrameHandle'.
2005-09-10 Martin Baulig <martin@ximian.com>
* classes/SourceLocation.cs
(SourceLocation.InsertBreakpoint): Removed; use
DebuggerBackend.InsertBreakpoint() instead.
* classes/EventHandle.cs: New file.
* classes/BreakpointHandle.cs
(BreakpointHandle): Derive from EventHandle.
* backends/Debugger.cs
(DebuggerBackend.InsertBreakpoint): New public method
(DebuggerBackend.InsertBreakpoint): Added overloaded version which
takes an `ITargetFunctionType' instead of a `SourceLocation'.
* backends/Process.cs
(Process.InsertBreakpoint): Added overloaded version which takes
an `ITargetFunctionType'.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.ProcessChildEvent): Also do the normal
frame_changed() stuff if we hit a breakpoint.
(SingleSteppingEngine.InsertBreakpoint): Added overloaded version
which takes an `ITargetFunctionType'.
* frontend/Expression.cs (LocationType): Added `DelegateInvoke'.
(Expression.EvaluateMethod): New abstract method.
(StructAccessExpression.DoEvaluateMethod): Added delegate support.
* frontend/Command.cs (BreakCommand): Started to cleanup the mess
here; use Expression.EvaluateMethod() when evaluating expressions.
* tests/mono-debugger.tests/TestDelegate.exp: Added test case to
set a breakpoint on an event invocation.
2005-09-09 Martin Baulig <martin@ximian.com>
* frontend/Command.cs (BreakCommand): Don't silently fail if we
cannot find the method.
2005-09-09 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationWrapper.DoProcessEvent): Step into non-trampoline
method calls.
* tests/mono-debugger.tests/TestDelegate.exp: Added test case for
that.
2005-09-09 Martin Baulig <martin@ximian.com>
* interfaces/ILanguage.cs
(ILanguage.DelegateType): New property.
(ILanguage.ExceptionType): Changed type from `ITargetType' to
`ITargetClassType'.
* interfaces/ITargetType.cs
(ITargetType.Language): New property.
* frontend/Expression.cs
(CastExpression.TryCast): Make this static method public.
(InvocationExpression.ResolveDelegate): New protected method.
(InvocationExpression.DoResolve): If the `method_expr' did not
resolve to a `MethodGroupExpression', call ResolveDelegate() and
try to resolve it as a delegate.
* tests/mono-debugger.tests/TestDelegate.exp: Added tests for
event invocations.
2005-09-09 Martin Baulig <martin@ximian.com>
* interfaces/ITargetStructObject.cs
(ITargetFunctionObject.GetEvent): Removed.
2005-09-09 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFunctionObject.cs: Removed.
2005-09-09 Martin Baulig <martin@ximian.com>
* interfaces/ITargetStructObject.cs
(ITargetStructObject.GetMethod): Removed.
* interfaces/ITargetStructType.cs
(ITargetStructType.GetMethod): Removed.
(ITargetStructType.GetStaticMethod): Removed.
(ITargetStructType.GetConstructor): Removed.
(ITargetStructType.GetStaticConstructor): Removed.
(ITargetStructType.Invoke): New method.
* interfaces/ITargetMemoryAccess.cs
(ITargetAccess.RuntimeInvoke): Take an `ITargetFunctionType'
instead of an `ITargetFunctionObject'.
* backends/Process.cs (Process.RuntimeInvoke): Take an
`ITargetFunctionType' instead of an `ITargetFunctionObject'.
* frontend/Expression.cs
(MethodGroupExpression.OverloadResolve): Return an
`ITargetFunctionType' instead of an `ITargetMethodInfo'.
2005-09-08 Martin Baulig <martin@ximian.com>
* backends/server/i386-arch.c (server_ptrace_get_target_info):
Make `target_long_size' 4 bytes, not 8.
* backends/classes/TargetReader.cs
(TargetReader.ReadLongInteger): Read either 4 or 8 bytes,
depending on the `TargetLongIntegerSize'.
2005-09-08 Martin Baulig <martin@ximian.com>
* classes/StackFrame.cs (StackFrame): Make this a
MarshalByRefObject; this is required if we want to modify
registers.
* tests/mono-debugger.tests/TestManagedType.exp, TestNull.exp:
Added tests to modify variables.
2005-09-08 Martin Baulig <martin@ximian.com>
* interfaces/ITargetObject.cs
(ITargetObject.IsNull): New property.
* interfaces/ILanguage.cs
(ILanguage.CreateNullObject): New method.
* backends/mono/MonoNullObject.cs: New file.
* backends/mono/MonoVariable.cs (MonoVariable.GetObject): Return a
`MonoNullObject' if the location is null.
* frontend/CSharpExpressionParser.jay (constant): Added `NULL'.
* frontend/Expression.cs (NullExpression): New expression.
* test/TestNull.cs, test/mono-debugger.test/TestNull.exp: Added
tests for `null' handling.
2005-09-08 Martin Baulig <martin@ximian.com>
* interfaces/ITargetArrayObject.cs (ITargetArrayObject.this): Take
an `int[] indices' arguments (not a `params' one) and added setter.
* backends/mono/MonoType.cs (MonoType.SetObject): New method.
* frontend/Expression.cs (ArrayAccessExpression.DoAssign): Support
modifying multi-dimensional arrays.
* tests/mono-debugger.test/TestManagedTypes.exp: Added a bunch of
array modification tests.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetArrayType.cs
(ITargetArrayType.Rank): New property.
(ITargetArrayType.ElementType): Do the right thing here.
* interfaces/ITargetArrayObject.cs
(ITargetArrayObject.LowerBound): Renamed to GetLowerBound(); now
takes a dimension argument.
(ITargetArrayObject.UpperBound): Renamed to GetUpperBound(); now
takes a dimension argument.
(ITargetArrayObject.this): Take a `params int[] indices'.
* frontend/Expression.cs
(ArrayAccessExpression.DoEvaluateVariable): Use C# syntax and
behavior to access multi-dimensial arrays.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetStructType.cs
(ITargetStructType.PrintObject): Removed.
2005-09-07 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.throw_exception): Always ignore the
exception if we're in an OperationRuntimeInvoke.
* backends/server/x86_64-arch.cs (x86_arch_child_stopped): On
runtime invoke, we must read the exception object from the
exception address.
* tests/mono-debugger.tests/TestException.exp: Added testcase.
2005-09-07 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.ProcessChildEvent): Handle exceptions first.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFunctionObject.cs
(ITargetFunctionObject.Invoke): Removed the `bool debug' argument.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetAccess.RuntimeInvoke): Take an `ITargetFunctionObject'
instead of a `TargetAddress'.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFunctionObject.cs
(ITargetFunctionObject.Invoke): Added `ITargetAccess target' and
`ITargetObject instance' arguments.
* interfaces/ITargetStructType.cs
(ITargetStructType.GetStaticProperty): Take an `ITargetAccess',
not a `StackFrame'.
(ITargetStructType.GetStaticConstructor): Likewise.
(ITargetStructType.GetStaticMethod): Likewise.
(ITargetStructType.GetMethod): New method.
(ITargetStructType.GetConstructor): New method.
* interfaces/ITargetFunctionType.cs
(ITargetFunctionType.InvokeStatic): Removed.
* interfaces/ITargetMemoryAccess.cs
(ITargetAccess.RuntimeInvoke): New method.
* backends/Inferior.cs (Inferior.RuntimeInvoke): Take
`MonoObject's as arguments instead of `TargetAddress'es and
marshal the objects here.
* backends/server/library.c
(mono_debugger_server_call_method_invoke): Copy valuetype
arguments on the stack instead of using the heap hack.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetType.cs (ITargetType.GetTypeInfo): Removed.
* interfaces/ITargetTypeInfo.cs: Removed.
(ITargetTypeInfo): This is now an internal implementation detail
and not exposed to the client.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetObject.cs (ITargetObject.TypeInfo): Removed.
(ITargetObject.Type): New property.
2005-09-07 Martin Baulig <martin@ximian.com>
* interfaces/ITargetType.cs
(ITargetType.Size): New property; moved here from ITargetTypeInfo.
(ITargetType.HasFixedSize): Likewise.
2005-09-07 Martin Baulig <martin@ximian.com>
* backends/mono/MonoFunctionType.cs (MonoFunctionType):
Implement IMonoTypeInfo and merged with MonoFunctionTypeInfo.
* backends/mono/MonoFunctionTypeInfo.cs: Removed.
2005-09-07 Martin Baulig <martin@ximian.com>
* backends/mono/MonoFundamentalType.cs (MonoFundamentalType):
Implement IMonoTypeInfo and merged with MonoFundamentalTypeInfo.
* backends/mono/MonoStringType.cs (MonoStringType):
Implement IMonoTypeInfo and merged with MonoStringTypeInfo.
* backends/mono/MonoObjectType.cs (MonoObjectType):
Implement IMonoTypeInfo and merged with MonoObjectTypeInfo.
* backends/mono/MonoFundamentalTypeInfo.cs: Removed.
* backends/mono/MonoStringTypeInfo.cs: Removed.
* backends/mono/MonoObjectTypeInfo.cs: Removed.
2005-09-06 Martin Baulig <martin@ximian.com>
* backends/mono/MonoTypeInfo.cs
(IMonoTypeInfo): New internal interface.
(MonoTypeInfo): Implement IMonoTypeInfo.
* backends/mono/: Use `IMonoTypeInfo' instead of `MonoTypeInfo'
everywhere.
2005-09-06 Martin Baulig <martin@ximian.com>
* classes/TargetLocation.cs: Moved to backends/classes/.
* classes/AbsoluteTargetLocation.cs: Moved to backends/classes/.
* classes/RelativeTargetLocation.cs: Moved to backends/classes/.
2005-09-06 Martin Baulig <martin@ximian.com>
* classes/TargetLocation.cs (TargetLocation): Make this internal
and don't mark it as [Serializable].
* interfaces/ITargetObject.cs (ITargetObject.Location): Removed.
* interfaces/IVariable.cs (IVariable.GetLocation): Removed.
* interfaces/ITargetTypeInfo.cs
(ITargetTypeInfo.GetObject): Removed.
* frontend/Expression.cs
(PointerExpression.EvaluateAddress): Return a `TargetAddress'
instead of a `TargetLocation'.
(VariableAccessExpression): Derive from Expression, not
PointerExpression.
(RegisterExpression): Likewise.
2005-09-06 Martin Baulig <martin@ximian.com>
* interfaces/ITargetFundamentalType.cs
(FundamentalKind): New public enum.
(ITargetFundamentalType.Type): Removed.
(ITargetFundamentalType.FundamentalKind): New property.
2005-09-05 Martin Baulig <martin@ximian.com>
* backends/mono/MonoMember.cs (MonoMember.Position): Removed.
* backends/mono/MonoLanguageBackend.cs
(MonoDebuggerSupport.GetMethodIndex): Removed.
2005-09-05 Martin Baulig <martin@ximian.com>
* backends/mono/MonoLanguageBackend.cs
(MonoDebuggerSupport): Moved here from the symbol writer.
2005-09-05 Martin Baulig <martin@ximian.com>
* interfaces/ITargetType.cs (ITargetType.TypeHandle): Removed.
2005-09-02 Martin Baulig <martin@ximian.com>
* classes/TargetLocation.cs (TargetLocation.IsValid): Removed.
2005-09-02 Martin Baulig <martin@ximian.com>
* classes/TargetLocation.cs
(TargetLocation): Don't implement ICloneable.
(TargetLocation.Clone): Removed.
2005-09-02 Martin Baulig <martin@ximian.com>
* classes/TargetLocation.cs
(TargetLocation): Removed the `offset' - we're now using the
RelativeTargetLocation for this.
(TargetLocation.ctor): Don't take an `offset' argument anymore.
(TargetLocation.Clone): Likewise.
* classes/RelativeTargetLocation.cs (RelativeTargetLocation): This
is now a location with an offset.
2005-09-02 Martin Baulig <martin@ximian.com>
Use a `TargetBlob' instead of an `ITargetMemoryReader' wherever
possible to save serialization costs; this reduces the time to run
the test suite from 35s to 17s!.
* interfaces/ITargetMemoryAccess.cs
(ITargetAccess.TargetInfo): New property.
(ITargetMemoryAccess.ReadMemory): Return a `TargetBlob' instead of
an `ITargetMemoryReader'.
* classes/TargetBinaryAccess.cs
(TargetBlob.GetReader): New public method; returns a
TargetBinaryReader to read this blob.
* classes/TargetLocation.cs (TargetLocation.ReadMemory): Return a
`TargetBlob' instead of an `ITargetMemoryReader'.
* backends/mono/MonoObject.cs (MonoObject.GetDynamicContents):
Return a `TargetBlob' instead of an `ITargetMemoryReader'.
(MonoObject.GetDynamicSize): Take a `TargetBlob' instead of an
`ITargetMemoryReader'.
* backends/mono/MonoFundamentalObjectBase.cs
(MonoFundamentalObjectBase.GetObject): Take a `TargetBlob' instead
of an `ITargetMemoryReader'.
* backends/native/NativeObject.cs (NativeObject.GetDynamicContents):
Return a `TargetBlob' instead of an `ITargetMemoryReader'.
(NativeObject.GetDynamicSize): Take a `TargetBlob' instead of an
`ITargetMemoryReader'.
* backends/native/NativeFundamentalObject.cs
(NativeFundamentalObject.GetObject): Take a `TargetBlob' instead
of an `ITargetMemoryReader'.
2005-09-02 Martin Baulig <martin@ximian.com>
* classes/TargetBinaryAccess.cs
(TargetBlob.TargetInfo): New readonly field; the .ctor now also
takes in ITargetInfo argument.
* backends/TargetAccess.cs
(TargetAccess.TargetInfo): New public property; returns an
ITargetInfo instead of an ITargetMemoryInfo - use this if you
don't need the extra data from the ITargetMemoryInfo to save
serialization costs.
2005-08-31 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(CommandResult): New internal class
(CallMethodData, RuntimeInvokeData): Removed.
* interfaces/ITargetMemoryAccess.cs
(TargetAccessDelegate): New public delegate.
(ITargetAccess.Invoke): New method.
2005-08-31 Martin Baulig <martin@ximian.com>
* backends/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.init_trampolines): Add support for delegate
trampolines.
2005-08-31 Martin Baulig <martin@ximian.com>
* classes/Style.cs: Moved some of frontend/Style.cs here.
(Style): This is now an abstract [Serializable] class and not an
interface. It allows us to do some things in the server's
background thread instead of in the client to avoid unneccessary
remoting round-trips.
* frontend/Style.cs
(StyleBase): New abstract base class for all the user styles.
* interfaces/IMethod.cs (IMethod.GetVariableByName): New method.
* interfaces/ITargetObject.cs: Added some properties from
ITargetType to avoid unneccessary remoting round-trips.
(ITargetObject.TypeName): New property.
(ITargetObject.Kind): New property.
* interfaces/ILanguage.cs (ILanguage.CreateInstance): Added
overloaded version which takes an `ITargetAccess'.
* interfaces/ITargetMemoryAccess (ITargetMemoryAccess.ReadMemory):
Remove the overloaded version which took a `byte[] buffer'.
(ITargetAccess): Don't derive from ITargetMemoryAccess.
* classes/StackFrame.cs (Register): Make it [Serializable].
(Registers, StackFrame): Likewise.
* classes/TargetEvent (TargetEventArgs): Make it [Serializable].
* backends/Inferior.cs (Inferior): Implement ITargetAccess, not
ITargetMemoryAccess.
* backends/Process.cs
(Process): Implement ITargetAccess, not ITargetMemoryAccess.
(Process.PrintObject): New public method. This is now called from
`Style.PrintObject()' to do all the computations in the engine's
background thread.
(Process.PrintType): Likewise.
* backends/SingleSteppingEngine.cs (CommandAttribute): Make this a
public, non-nested class so we can also use this attribute outside
the SingleSteppingEngine.
* backends/TargetAccess.cs (TargetAccess): New public abstract
class; this is now used to access the target in the client and on
the server and it'll know how to "do the right thing".
* tests/mdb.exp (mdb_send_and_expect): New proc which also
measures the time elapsed.
2005-08-25 Martin Baulig <martin@ximian.com>
* interfaces/ITargetMemoryAccess.cs
(ITargetMemoryAcess.TargetMemoryInfo): New property.
* classes/TargetAccess.cs (TargetAccess): Make this
[Serializable], not MarshalByRefObject.
* backends/Process.cs (Process): Maintain a local copy of the
serializable ITargetMemoryInfo and use it instead of doing a
remote invocation on the SingleSteppingEngine.
* backends/SingleSteppingEnginge.cs
(SingleSteppingEngine): Don't implement ITargetMemoryInfo.
2005-08-25 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(DebuggerBackend): Make this class abstract protected.
(DebuggerBackend.ctor): Take a `DebuggerManager' argument.
(DebuggerBackend.DebuggerExit): New protected abstract method.
(DebuggerBackend.DebuggerExitedEvent): Removed.
* backends/ThreadManager.cs
(ThreadManager.Kill): Kill the main thread last.
(ThreadManager.HandleChildEvent): When the main thread exited,
send the `TargetExitedEvent' first, then call Kill(), dispose the
backend and return true.
* backends/remoting/DebuggerServer.cs
(DebuggerServer.ctor): Take a `DebuggerManager' and a
`DebuggerClient' argument.
(DebuggerServer.DebuggerExited): Override this and call
`client.Shutdown()'.
* backends/remoting/DebuggerClient.cs
(DebuggerClient.Shutdown): Mark this as [OneWay].
* backends/remoting/DebuggerManager.cs
(DebuggerManager.TargetExited): Just remove the client from the
hash table, don't call Shutdown().
2005-08-25 Martin Baulig <martin@ximian.com>
* classes/Breakpoint.cs
(BreakpointEventHandler): Removed.
(Breakpoint.HandlerNeedsFrame): Removed.
(Breakpoint.CheckBreakpointHit): Removed the `StackFrame' arg.
(Breakpoint.BreakpointHit): Removed.
* classes/SimpleBreakpoint.cs
(BreakpointHitHandler): Removed.
(BreakpointCheckHandler): Don't take a `StackFrame' arg.
2005-08-25 Martin Baulig <martin@ximian.com>
* interfaces/ILanguage.cs (ILanguage.CreateObject): Take an
`ITargetAccess' instead of a `StackFrame'.
* classes/TargetEvent.cs
(TargetEventHandler): Removed the `object sender' argument.
* backends/Process.cs
(Process.State): Maintain the `target_state' here and not in the
SingleSteppingEngine.
(Process.SendTargetEvent): Merge this with OperationCompleted()
and make it [OneWay].
2005-08-24 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.SyncCommandAttribute): Renamed to
CommandAttribute and also use it for async commands.
(SingleSteppingEngine.SendAsyncCommand): Removed.
2005-08-24 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.Stop): Replaced with the former contents of
the Interrupt() method.
(SingleSteppingEngine.Interrupt): Renamed to Stop().
* backends/Process.cs (ProcessExitedHandler): Removed.
(Process.TargetExitedEvent): Removed.
(Process.ProcessExitedEvent): Removed.
* backends/ThreadManager.cs (ThreadManager.HandleChildEvent): Only
raise a `TargetExitedEvent' if the main thread exited.
2005-08-23 Martin Baulig <martin@ximian.com>
* frontend/libedit/mono-debugger-readline.c
(mono_debugger_readline_static_init): Don't catch SIGINT.
* backends/classes/Semaphore.cs: Moved to classes/Semaphore.cs and
made it a public static class.
* backends/Process.cs (Process.WaitHandle): New public property.
(Process): Removed the `bool wait' argumetns from all async
commands; always return immediately.
* backends/remoting/DebuggerManager.cs
(DebuggerManager.Wait): Wait for a Process'es WaitHandle here.
(DebuggerManager.Interrupt): Interrupt this waiting.
* frontend/Main.cs: Catch SIGINT here, run the mainloop in a
separate thread and abort commands on SIGINT.
2005-08-21 Martin Baulig <martin@ximian.com>
Rewrote the event handling for async commands; the `Process' now
sends the command and waits for its completion.
* backends/Process.cs (Process.SendAsyncCommand): New method;
start all async commands here and also wait here for their
completion.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.StartOperation): Removed.
(SingleSteppingEngine.AbortOperation): Removed.
(SingleSteppingEngine.SendAsyncCommand): Just start the command,
don't wait for its completion.
2005-08-21 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.OperationFinish): Handle both native and
non-native finish here.
2005-08-21 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.Operation): Make this class protected.
(CommandType): Make this serializable and provide an entry for
each operation type.
(Command): Removed the `Operation' field and make it serializable.
2005-08-20 Martin Baulig <martin@ximian.com>
Drop support for not running the debugger out-of-proc.
* classes/ScriptingContext.cs
(FrameHandle, BacktraceHandle): Mark this [Serializable] and not
MarshalByRefObject.
* classes/TargetLocation.cs
(TargetLocation): Mark this [Serializable].
(TargetLocation.LocationInvalidEvent): Removed.
* backends/Process.cs (Process): Don't implement IDisassembler.
(Process.SendTargetEvent): Mark this as [OneWay].
* backends/remoting/DebuggerManager.cs: Make sure we only create
on instance of this.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.SyncCommandAttribute): New attribute.
(SingleSteppingEngine.ProcessCommand): Removed - mark all
synchronous commands with the [SyncCommand] attribute - the
remoting framework will call ThreadManager.SendSyncCommand() for us.
(SingleSteppingEngine.CommandResult): Removed.
* backends/remoting/DebuggerServerDispatchSink.cs
(DebuggerServerDispatchSink.ProcessEvent): Check whether we're
invoking a method with the [SyncCommand] attribute and call
ThreadManager.CallSyncCommand().
* backends/ThreadManager.cs
(ThreadManager.SendSyncCommand): We're now called from the
remoting framework.
2005-08-20 Martin Baulig <martin@ximian.com>
* backends/Process.cs: Moved the implementation of all methods
starting commands to the SingleSteppingEngine, duplicate the API
entry points here and just call the corresponding method there.
2005-08-20 Martin Baulig <martin@ximian.com>
* backends/Process.cs (Process.ctor): Removed the Inferior and
ProcessStart arguments.
* backends/SingleSteppingEngine.cs (SingleSteppingEngine.ctor):
Catch the inferior's TargetOutput, DebuggerOutput and
DebuggerError events here.
2005-08-18 Martin Baulig <martin@ximian.com>
* backends/remoting/DebuggerManager.cs
(DebuggerManager): New public class; this now takes care of our
DebuggerClients and manages them.
* frontend/Interpreter.cs (Interpreter): Don't use a global
`backend' and `modules' anymore; use a global `DebuggerManager'
instead. Moved some stuff into the ScriptingContext.
* frontend/ScriptingContext.cs
(ScriptingContext): Moved some more stuff here from the `Interpreter'.
(ScriptingContext.GetDebuggerBackend): New public method; gets the
backend from our current process.
* backends/remoting/DebuggerServer.cs: Use client activation.
* backends/remoting/DebuggerClient.cs: Moved here from ./backends/.
* backends/Debugger.cs
(Debugger.DebuggerManager): New public property.
2005-08-17 Martin Baulig <martin@ximian.com>
* backends/remoting/Server.cs: Moved to ./wrapper/Server.cs.
* backends/remoting/DebuggerClient.cs: Moved to
./backends/DebuggerClient.cs.
* backends/Debugger.cs (DebuggerBackend): Make the .ctor
protected internal.
* backends/remoting/DebuggerServer.cs (DebuggerServer): Derive
from DebuggerBackend.
* wrapper: Merge Mono.Debugger.Remoting.dll and Mono.Debugger.dll.
2005-08-17 Martin Baulig <martin@ximian.com>
* frontend/Interpreter.cs
(Interpreter.Start): Don't take any arguments; parse the
`InferiorArgs' in our `DebuggerOptions', start the target and
return a `Process'.
(Interpreter.Run): Make this protected.
* classes/ProcessStart.cs
(ProcessStart.ctor): Make the ctors protected.
(ProcessStart.Create): Make this internal.
* backends/Debugger.cs
(DebuggerBackend.Run): Take a `DebuggerOptions' and a `string[]'
as arguments; create and return the `ProcessStart' here.
2005-08-15 Martin Baulig <martin@ximian.com>
* backends/remoting/: Update to support multiple connections and
also correctly exit when we're done.
2005-08-15 Martin Baulig <martin@ximian.com>
* backends/Debugger.cs
(DebuggerBackend.TargetExited): Removed this event.
(DebuggerBackend.DebuggerExitedEvent): New event; this is called
from Dispose() when everything is disposed.
2005-08-11 Martin Baulig <martin@ximian.com>
* backends/remoting/DebuggerClient.cs
(DebuggerClient.CreateConnection): Register a lease sponsor and
always renew the lease for another 5 minutes.
2005-08-11 Martin Baulig <martin@ximian.com>
* backends/remoting/mono-debugger-remoting.[ch]: Renamed to
backends/server/remoting.[ch] and include it in the
libmonodebuggerserver.la.
2005-08-11 Martin Baulig <martin@ximian.com>
* backends/ThreadManager.cs
(ThreadManager.OnTargetExitedEvent): Call `backend.Dispose()' here.
* frontend/Interpreter.cs
(Interpreter.TargetExited): Don't call `backend.Dispose()' here.
* classes/Threading.cs
(DebuggerWaitHandle.CurrentThread): Include the pid.
* backends/server/library.c
(mono_debugger_server_get_current_pid): New function.
2005-08-11 Martin Baulig <martin@ximian.com>
* classes/ProcessStart.cs (DebuggerOptions.IsRemote): New option.
* frontend/Main.cs
(CommandLineInterpreter.ParseOption): Added `-remote' option.
* frontend/Interpreter.cs
(Interpreter): Make this a MarshalByRefObject.
(Interpreter.InterpreterEventSink): New protected class; moved all
the event handling in here.
(Interpreter.Initialize): Use `DebuggerClient.CreateConnection ()'
if `options.IsRemote' is set.
* frontend/ScriptingContext.cs
(FrameHandle, BacktraceHandle, ProcessHandle, ScriptingContext):
Make them MarshalByRefObject's.
* backends/remoting/: New directory.
* wrapper/Makefile.am: Create `Mono.Debugger.Remoting.Dll' and
`mdb-server.exe'.
2005-08-11 Martin Baulig <martin@ximian.com>
* backends/mono/MonoLanguageBackend.cs
(MonoLanguageBackend): Make this a MarshalByRefObject.
* arch/Architecture_I386.cs
(Architecture_I386): Make this a MarshalByRefObject.
* arch/Architecture_X86_64.cs
(Architecture_X86_64): Make this a MarshalByRefObject.
2005-08-11 Martin Baulig <martin@ximian.com>
* classes/SourceBuffer.cs (SourceBuffer): Mark [Serializable].
* classes/AssemblerMethod.cs (AssemblerLine): Mark [Serializable].
* classes/ThreadGroup.cs (ThreadGroup): Mark [Serializable].
* classes/TargetException.cs (TargetException): Mark [Serializable].
* classes/Module.cs (Module): Make this a MarshalByRefObject.
2005-07-28 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs
(OperationWrapper.TrampolineHandler): Allow `DelegateInvocation'
wrappers inside the wrapper.
2005-07-28 Martin Baulig <martin@ximian.com>
* interfaces/IMethod.cs (WrapperType): New public enum.
(IMethod.IsWrapper, IMethod.WrapperAddress): Removed.
(IMethod.WrapperType): New property.
* classes/Module.cs
(Module.DebuggerBackend): New public abstract property.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.TrampolineHandler): New internal delegate.
(SingleSteppingEngine.method_has_source): Renamed to `MethodHasSource'
and made it static and protected.
(SingleSteppingEngine.do_trampoline): Added `TrampolineHandler'
argument; this callback tells us whether or not we should enter
the trampoline.
(OperationStepBase.CheckTrampoline): Moved here from OperationStep.
(OperationWrapper): New operation.
2005-07-27 Martin Baulig <martin@ximian.com>
* classes/MethodSource.cs (MethodSource.Lookup): Improved this;
don't check `address >= method_end' anymore since the JIT may put
code after the `ret' instruction.
2005-07-26 Martin Baulig <martin@ximian.com>
Added support for stepping into interncalls and wrappers (like
delegate invocations, for example).
* classes/MethodSource.cs
(MethodSource.Module): New public property.
(MethodSource.Lookup): Make this work for methods with just one
single source line.
* classes/SourceAddress.cs (SourceAddress.Location): This is now
also supported for dynamic methods.
* classes/SourceLocation.cs
(SourceLocation.HasSourceFile): New public property.
(SourceLocation.SourceBuffer): New public property.
(SourceLocation.ctor): Added a .ctor taking a `Module', an
`ISourceBuffer' and an `int' for dynamic methods.
* backends/Debugger.cs
(DebuggerBackend.MonoLanguage): Removed.
(DebuggerBackend.AddLanguage): New public function.
(DebuggerBackend.Languages): New public property.
* arch/BfdContainer.cs
(BfdContainer.AddFile): Call `backend.AddLanguage (bfd)' to
register the language with the backend.
* wrapper/mono-debugger-jit-wrapper.h
(MonoDebuggerInfo): Replaced the `guint8
**generic_trampoline_code' with `guint8 ***mono_trampoline_code' -
which is pointing to the new `mono_trampoline_address' array.
* backends/mono/MonoSymbolFile.cs
(MonoSymbolFile.AddWrapperEntry): New public method.
(MonoSymbolFile.WrapperEntry): New private class; deal with
wrappers here.
* backends/mono/MonoLanguageBackend.cs
(MonoDebuggerInfo.GenericTrampolineCode): Replaced with
`MonoTrampolineCode', which is now pointing to the new
`mono_trampoline_address' array.
* backends/ILanguageBackend.cs
(ILanguageBackend): Implement `IDisposable'.
* backends/SingleSteppingEngine.cs
(OperationStep.CheckTrampoline): New protected method; check for
trampolines here. We now check in all registered languages for
trampolines.
* frontend/ScriptingContext.cs (ScriptingContext.ListSourceCode):
Support dynamic source locations.
2005-07-26 Martin Baulig <martin@ximian.com>
* arch/Architecture_X86_64.cs
(Architecture_X86_64.GetCallTarget): Added support for the new
call opcodes.
2005-07-23 Martin Baulig <martin@ximian.com>
* frontend/Main.cs (CommandLineInterpreter.ReadInput): Don't use
readline if we're executing a script.
2005-07-23 Martin Baulig <martin@ximian.com>
* glue/mono-debugger-readline.[ch]: Moved to frontend/libedit/.
* configure.in: Don't check for readline anymore; we now use the
included libedit. Only check for termcap.
2005-07-23 Martin Baulig <martin@ximian.com>
* frontend/libedit/: Imported libedit from NetBSD 2.0.2.
* configure.in: Added `termcap.h' and `termcap/termcap.h' checks.
2005-07-23 Martin Baulig <martin@ximian.com>
* arch/opcodes/Makefile.am (arch_cflags): Add `-DBFD64' on x86_64.
2005-07-22 Martin Baulig <martin@ximian.com>
* backends/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.GetTrampoline): Implemented.
2005-07-22 Martin Baulig <martin@ximian.com>
* backends/ThreadManager.cs
(ThreadManager.start_wait_thread): Reap all children before exiting.
(ThreadManager.NextProcessID): New internal property.
(Process.ctor): Set the process ID on a per-thread manager basis,
so we start counting at 1 after restarting the target.
2005-07-22 Martin Baulig <martin@ximian.com>
* interfaces/ITargetNotification.cs
(ITargetNotification): Remove the `TargetExited' event.
* backends/SingleSteppingEngine.cs (SingleSteppingEngine.Dispose):
Don't set `process = null'.
2005-07-21 Martin Baulig <martin@ximian.com>
* classes/TargetLocation.cs
(TargetLocation.Print): New public abstract method; provides a
human-readable description of the location.
* frontend/Command.cs
(Show.ShowLocationCommand): Added `show location' command to
display the location of an expression.
* frontend/Expression.cs
(AddressOfExpression.DoEvaluateVariable): Check whether we
actually have an address before trying to use it.
(AddressOfExpression.EvaluateAddress): Allow address-less
expressions here.
2005-07-21 Martin Baulig <martin@ximian.com>
* backends/mono/MonoArrayTypeInfo.cs (MonoArrayTypeInfo.ctor): Use
`4 x TargetAddressSize' to get proper alignment.
2005-07-19 Martin Baulig <martin@ximian.com>
* backends/server/x86-ptrace.c
(io_thread): Don't abort if we get an EINTR.
2005-07-19 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs (handle_exception): Correctly
step over exceptions; check all catchpoints, not just the first one.
* classes/ExceptionCatchPoint.cs
(ExceptionCatchPoint.CheckBreakpointHit): Call `exception.GetTypeInfo()'
before trying to create the object.
* tests/TestException.cs: New tests.
* tests/mono-debugger.tests/TestException.exp: Added testcase.
* tests/mdb.exp (mdb_expect_catchpoint): New proc.
(mdb_expect_exception): New proc.
2005-07-19 Martin Baulig <martin@ximian.com>
* backends/server/x86_64-arch.c
(server_ptrace_call_method_invoke): Correctly marshal the
parameters.
* backends/server/i386-arch.c (server_ptrace_call_method_invoke):
Don't leak memory here.
2005-07-19 Martin Baulig <martin@ximian.com>
* backends/SingleSteppingEngine.cs (Operation): Make this class
abstract and nest it inside the `SingleSteppingEngine'.
(SingleSteppingEngine.Operation): We're now an abstract class.
(SingleSteppingEngine.OperationStepOverBreakpoint): Move the "step
over breakpoint" code here; clean it up and check for trampolines.
(SingleSteppingEngine.step_over_breakpoint): Check whether the
breakpoint is actually enabled.
(SingleSteppingEngine.DoStep): Moved into `OperationStep.Step()'.
(OperationType): Removed.
* backends/StepFrame.cs (StepMode): Added `NativeInstruction',
`SourceLine' and `NextLine'.
* backends/BreakpointManager.cs
(BreakpointManager.LookupBreakpoint): Added `out bool is_enabled'.
* backends/server/breakpoints.c
(mono_debugger_breakpoint_info_get_is_enabled): New public function.
2005-07-19 Martin Baulig <martin@ximian.com>
* classes/ObjectCache.cs (ObjectCache.Shutdown): New method; this
is some kind of a "static finalizer", it kills the timer just
before exiting.
* backends/Debugger.cs
(DebuggerBackend.Dispose): Call ObjectCache.Shutdown().
2005-07-18 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs (NumberExpression.Value): Allow `val' to
be `uint' or `ulong'.
2005-07-18 Martin Baulig <martin@ximian.com>
* ThreadManager.cs
(ThreadManager.Kill): New private method; kill all threads here.
(ThreadManager.HandleChildEvent): Call Kill() before
OnTargetExitedEvent().
(ThreadManager.ctor): Use `DebugFlags.Wait' for the `command_mutex'.
2005-07-15 Chris Toshok <toshok@ximian.com>
* classes/StackFrame.cs (Register, Registers, StackFrame):
subclass from MarshalByRefObject.
(SimpleStackFrame): make [Serializable]
* classes/TargetEvent.cs classes/AddressDomain.cs
classes/MethodBase.cs classes/SourceAddress.cs
classes/MethodSource.cs classes/ProcessStart,
classes/Backtrace.cs, classes/SourceInfo.cs,
backends/mono/MonoObject.cs, backends/mono/MonoType.cs,
backends/mono/MonoTypeInfo.cs, backends/mono/MonoVariable.cs,
backends/ThreadManager.cs, backends/Debugger.cs: subclass from
MarshalByRefObject.
* classes/TargetAddress: make [Serializable]
* backends/mono/MonoSymbolFile.cs (MonoSymbolFile.Dispose): only
dispose File if it's non-null.
* backends/SingleSteppingEngine.cs
(SingleSteppingEngine.send_target_event): only send the target
event if the proc != null.
* backends/Process.cs: subclass from MarshalByRefObject.
2005-07-14 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(MemberAccessExpression.ResolveMemberAccess): If `left' resolves
to a type, use it as a type.
* backends/mono/MonoClassType.cs: Correctly index the methods and
static methods if we have a parent class.
* backends/mono/MonoClassInfo.cs
(MonoClassInfo.GetParentObject): New internal method.
* backends/mono/MonoClassObject.cs
(MonoClassObject.Parent): Implement this again, using
MonoClassInfo.GetParentObject().
2005-07-13 Martin Baulig <martin@ximian.com>
* backends/server/x86-ptrace.c
(server_ptrace_finalize):