Hello community,
here is the log from the commit of package mono-debugger for openSUSE:Factory
checked in at Wed Mar 17 15:56:30 CET 2010.
--------
--- mono-debugger/mono-debugger.changes 2010-01-26 22:02:26.000000000 +0100
+++ mono-debugger/mono-debugger.changes 2010-03-16 17:34:46.000000000 +0100
@@ -1,0 +2,6 @@
+Tue Mar 16 16:34:02 UTC 2010 - ajorgensen@novell.com
+
+- Update to 2.6.3
+ * http://www.mono-project.com/Release_Notes_Mono_2.6.3
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
mono-debugger-2.6.tar.bz2
New:
----
mono-debugger-2.6.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mono-debugger.spec ++++++
--- /var/tmp/diff_new_pack.ZLnLgJ/_old 2010-03-17 15:55:16.000000000 +0100
+++ /var/tmp/diff_new_pack.ZLnLgJ/_new 2010-03-17 15:55:16.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package mono-debugger (Version 2.6)
+# spec file for package mono-debugger (Version 2.6.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,7 +23,7 @@
Group: Development/Languages/Mono
Summary: Mono Debugger
Url: http://www.mono-project.com/Debugger
-Version: 2.6
+Version: 2.6.3
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
++++++ mono-debugger-2.6.tar.bz2 -> mono-debugger-2.6.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/ChangeLog new/mono-debugger-2.6.3/ChangeLog
--- old/mono-debugger-2.6/ChangeLog 2009-12-04 21:33:40.000000000 +0100
+++ new/mono-debugger-2.6.3/ChangeLog 2010-03-02 15:10:46.000000000 +0100
@@ -1,3 +1,68 @@
+2010-02-23 Martin Baulig
+
+ * backend/SingleSteppingEngine.cs
+ (SSE.DoAbortInvocation): Use Thread.Abort() to abort the
+ invocation if we have runtime support for it.
+
+2010-02-24 Martin Baulig
+
+ * frontend/Main.cs: Don't deadlock when leaving a nested
+ break state.
+
+ * backend/SingleSteppingEngine.cs
+ (SSE.ProcessEvent): On `ChildEventType.RUNTIME_INVOKE_DONE':
+ terminate the current operation if it's different from the rti.
+
+ * classes/Operation.cs
+ (OperationCommandResult.Completed): Send the result before
+ signalling the wait handle.
+
+2010-02-24 Martin Baulig
+
+ * backend/server/x86_64-arch.c
+ (server_ptrace_call_method_invoke): Set correct return address to
+ make this work even if the stack is executable.
+
+2010-02-23 Martin Baulig
+
+ * backend/SingleSteppingEngine.cs
+ (SSE.DoAbortInvocation): Disallow aborting if there are any
+ non-managed frames on the stack.
+
+2010-02-23 Martin Baulig
+
+ * languages/TargetNullObject.cs: New file.
+ (TargetNullObject): New public class.
+
+ * languages/mono/MonoNullObject.cs: Removed.
+ (MonoNullObject): Removed; use `TargetNullObject' instead.
+
+2010-02-23 Martin Baulig
+
+ * backend/os/DwarfReader.cs
+ (DwarfReader): Don't crash, if the .debug_aranges,
+ .debug_pubnames, .debug_pubtypes or .debug_str section is
+ missing.
+
+2010-01-08 Martin Baulig
+
+ Fix #559045.
+
+ * languages/mono/MonoArrayType.cs
+ (MonoArrayType.GetElementSize): Add support for enums.
+
+ * languages/mono/MonoArrayObject.cs
+ (MonoArrayObject.GetDynamicSize): Use
+ MonoArrayTpe.GetElementSize().
+
+2010-01-08 Martin Baulig
+
+ Fix #510995.
+
+ * frontend/Expression.cs
+ (CastExpression.DoCast): Allow `object' -> 'object'.
+ (Convert.ImplicitConversion): Allow `string' -> `object'.
+
2009-12-04 Martin Baulig
* backend/BreakpointHandle.cs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/backend/SingleSteppingEngine.cs new/mono-debugger-2.6.3/backend/SingleSteppingEngine.cs
--- old/mono-debugger-2.6/backend/SingleSteppingEngine.cs 2009-12-04 21:33:40.000000000 +0100
+++ new/mono-debugger-2.6.3/backend/SingleSteppingEngine.cs 2010-03-02 15:10:46.000000000 +0100
@@ -288,8 +288,12 @@
process.Debugger.OnLeaveNestedBreakState (this);
}
- if (current_operation != rti)
+ if (current_operation != rti) {
+ OperationCommandResult result = current_operation.Result as OperationCommandResult;
+ if (result != null)
+ result.Completed (this, null);
current_operation.Result.Completed ();
+ }
current_operation = rti;
TargetEventArgs args = rti.OperationCompleted (current_frame, false);
@@ -572,9 +576,17 @@
abort_rti = abort_requested;
abort_requested = -1;
}
- Report.Debug (DebugFlags.SSE, "{0} operation interrupted: {1} - {2}", this, abort_rti, current_frame);
+ Report.Debug (DebugFlags.SSE, "{0} operation interrupted: {1} - {2} {3}",
+ this, abort_rti, current_operation, current_frame);
if (abort_rti >= 0) {
- DoAbortInvocation (abort_rti);
+ try {
+ DoAbortInvocation (abort_rti);
+ } catch (TargetException ex) {
+ Report.Debug (DebugFlags.SSE, "{0} operation interrupted - exception: {1}",
+ this, ex.Message);
+ if (!current_operation.ResumeOperation ())
+ inferior.Continue ();
+ }
} else {
if (stop_requested)
OperationCompleted (null);
@@ -1367,6 +1379,44 @@
current_frame = new_frame;
}
+ StackFrame compute_frame (TargetAddress address)
+ {
+ var method = Lookup (address);
+
+ var iframe = inferior.GetCurrentFrame ();
+ var registers = inferior.GetRegisters ();
+
+ if ((method != null) && method.HasLineNumbers) {
+ var source = method.LineNumberTable.Lookup (address);
+
+ if (source != null)
+ return new StackFrame (
+ thread, FrameType.Normal, iframe.Address, iframe.StackPointer,
+ iframe.FrameAddress, registers, method, source);
+ else
+ return new StackFrame (
+ thread, FrameType.Normal, iframe.Address, iframe.StackPointer,
+ iframe.FrameAddress, registers, method);
+ } else {
+ if (method != null)
+ return new StackFrame (
+ thread, FrameType.Normal, iframe.Address, iframe.StackPointer,
+ iframe.FrameAddress, registers, method);
+ else {
+ Symbol name;
+ try {
+ name = SimpleLookup (address, false);
+ } catch {
+ name = null;
+ }
+ return new StackFrame (
+ thread, FrameType.Normal, iframe.Address, iframe.StackPointer,
+ iframe.FrameAddress, registers, thread.NativeLanguage,
+ name);
+ }
+ }
+ }
+
TemporaryBreakpointData temp_breakpoint = null;
void insert_temporary_breakpoint (TargetAddress address)
@@ -1875,15 +1925,26 @@
throw new TargetException (TargetError.InvalidReturn, "Not a managed application.");
}
+ CommandResult result = new ThreadCommandResult (thread);
+
Backtrace bt = new Backtrace (current_frame);
if (mode == ReturnMode.Invocation) {
- Inferior.CallbackFrame cframe = inferior.GetCallbackFrame (current_frame.StackPointer, false);
+ var cframe = inferior.GetCallbackFrame (current_frame.StackPointer, false);
if (cframe == null)
throw new TargetException (TargetError.NoInvocation);
+
+ if (MonoDebuggerInfo.HasAbortRuntimeInvoke) {
+ OperationRuntimeInvoke rti = rti_stack.Peek ();
+ if (rti.ID != cframe.ID)
+ throw new TargetException (TargetError.NoInvocation);
+
+ return StartOperation (new OperationAbortRuntimeInvoke (this, result));
+ }
+
bt.GetBacktrace (this, inferior, Backtrace.Mode.Native, cframe.StackPointer, -1);
for (int i = 0; i < bt.Count; i++) {
- if (bt.Frames [i].Type == FrameType.Normal)
+ if ((bt.Frames [i].Type == FrameType.Normal) && bt.Frames [i].IsManaged)
continue;
else if ((bt.Frames [i].Type == FrameType.RuntimeInvoke) && (i + 1 == bt.Count))
break;
@@ -1914,14 +1975,26 @@
throw new TargetException (TargetError.InvalidReturn);
} else if (mode == ReturnMode.Managed) {
bool ok = true;
- if (((current_frame.Type == FrameType.Normal) &&
- ((current_frame.Language == null) || !current_frame.Language.IsManaged)) ||
- ((current_frame.Type != FrameType.RuntimeInvoke) && (current_frame.Type != FrameType.Normal)))
+ if (current_frame.Type == FrameType.Normal) {
+ if (!current_frame.IsManaged)
+ ok = false;
+ } else {
+ if (current_frame.Type == FrameType.RuntimeInvoke)
+ throw new TargetException (TargetError.InvalidReturn,
+ "Cannot return from an invocation.");
ok = false;
- if (((parent_frame.Type == FrameType.Normal) &&
- ((parent_frame.Language == null) || !parent_frame.Language.IsManaged)) ||
- ((parent_frame.Type != FrameType.RuntimeInvoke) && (parent_frame.Type != FrameType.Normal)))
+ }
+
+ if (parent_frame.Type == FrameType.Normal) {
+ if (!parent_frame.IsManaged)
+ ok = false;
+ } else {
+ if (parent_frame.Type == FrameType.RuntimeInvoke)
+ throw new TargetException (TargetError.InvalidReturn,
+ "Cannot return from an invocation.");
ok = false;
+ }
+
if (!ok)
throw new TargetException (TargetError.InvalidReturn,
"Cannot return from a non-managed frame.");
@@ -1936,7 +2009,6 @@
return null;
}
- CommandResult result = new ThreadCommandResult (thread);
return StartOperation (new OperationReturn (this, bt, mode, result));
});
}
@@ -1979,39 +2051,66 @@
bool found = false;
foreach (OperationRuntimeInvoke rti in rti_stack) {
- if (rti.ID == rti_id) {
- found = true;
- break;
- }
+ if (rti.ID != rti_id)
+ continue;
+
+ found = true;
+ if (!rti.RequestAbort ())
+ throw new TargetException (TargetError.NoInvocation);
+ break;
}
- if (!found) {
+ if (!found)
throw new TargetException (TargetError.NoInvocation);
- } else {
- if (cframe == null)
- throw new TargetException (TargetError.InvalidReturn, "No invocation found.");
- else if (cframe.ID != rti_id)
- throw new TargetException (TargetError.InvalidReturn,
- "Requested to abort invocation {0}, but current invocation has id {1}.",
- rti_id, cframe.ID);
+
+ if (cframe == null)
+ throw new TargetException (TargetError.InvalidReturn, "No invocation found.");
+ else if (cframe.ID != rti_id)
+ throw new TargetException (TargetError.InvalidReturn,
+ "Requested to abort invocation {0}, but current invocation has id {1}.",
+ rti_id, cframe.ID);
+
+ CommandResult result = new ThreadCommandResult (thread);
+
+ if (MonoDebuggerInfo.HasAbortRuntimeInvoke) {
+ PushOperation (new OperationAbortRuntimeInvoke (this, result));
+ return;
}
Backtrace bt = new Backtrace (current_frame);
bt.GetBacktrace (this, inferior, Backtrace.Mode.Native, cframe.StackPointer, -1);
+ if (bt.Count < 2)
+ throw new TargetException (TargetError.NoStack);
+
+ //
+ // Walk the stack and check whether we can abort this invocation.
+ //
+
+ bool stack_ok = true;
+
for (int i = 0; i < bt.Count; i++) {
- if (bt.Frames [i].Type == FrameType.Normal)
+ StackFrame frame = bt.Frames [i];
+
+ Report.Debug (DebugFlags.SSE, "{0} do abort invocation - frame {1} ({2}:{3}): {4}",
+ this, i, frame.Type, frame.IsManaged, frame);
+
+ if ((frame.Type == FrameType.Normal) && frame.IsManaged) {
continue;
- else if ((bt.Frames [i].Type == FrameType.RuntimeInvoke) && (i + 1 == bt.Count))
+ } else if ((frame.Type == FrameType.RuntimeInvoke) && (i + 1 == bt.Count))
break;
- throw new TargetException (TargetError.InvalidReturn,
- "Cannot abort an invocation which contains non-managed frames.");
+
+ stack_ok = false;
+ break;
}
- if (bt.Count < 2)
- throw new TargetException (TargetError.NoStack);
+ if (!stack_ok)
+ throw new TargetException (TargetError.InvalidReturn,
+ "Cannot abort an invocation which contains non-managed frames.");
- CommandResult result = new ThreadCommandResult (thread);
+ //
+ // We're all set - the stack only contains managed frames, so we can go ahead here.
+ //
PushOperation (new OperationReturn (this, bt, ReturnMode.Invocation, result));
}
@@ -2241,7 +2340,7 @@
AcquireThreadLock ();
- if (do_managed_callback (data)) {
+ if (is_managed_frame ()) {
//
// We found a managed frame; now let's first check whether we can do
// all the work without starting an operation.
@@ -2258,13 +2357,17 @@
return true;
}
- Report.Debug (DebugFlags.SSE, "{0} managed callback needs thread lock", this);
+ //
+ // Stop all threads and check whether one of them is in managed land.
+ //
+
+ Report.Debug (DebugFlags.SSE, "{0} managed callback needs global thread lock", this);
bool ok = false;
process.AcquireGlobalThreadLock (this);
foreach (SingleSteppingEngine engine in process.ThreadServants) {
try {
- if (engine.do_managed_callback (data)) {
+ if (engine.is_managed_frame ()) {
ok = true;
break;
}
@@ -2274,39 +2377,14 @@
}
if (!ok) {
- TargetAddress lmf_address = inferior.ReadAddress (LMFAddress);
- StackFrame lmf_frame = Architecture.GetLMF (this, inferior, ref lmf_address);
-
- Report.Debug (DebugFlags.SSE, "{0} requesting managed callback: {1}", this, lmf_frame);
- process.MonoManager.AddManagedCallback (inferior, data);
-
- /*
- * Prevent a race condition:
- * If we stopped just before returning from native code,
- * mono_thread_interruption_checkpoint_request() may not be called again
- * before returning back to managed code; it's called next time we're entering
- * native code again.
- *
- * This could lead to problems if the managed code does some CPU-intensive
- * before going unmanaged next time - or even loops forever.
- *
- * I have a test case where an icall contains a sleep() and the managed code
- * contains an infinite loop (`for (;;) ;) immediately after returning from
- * this icall.
- *
- * To prevent this from happening, we insert a breakpoint on the last managed
- * frame.
- */
-
- if (lmf_frame != null)
- insert_lmf_breakpoint (lmf_frame.TargetAddress);
- else {
- Report.Error ("{0} unable to compute LMF for managed callback: {1}",
- this, inferior.CurrentFrame);
- }
+ //
+ // None of the threads is currently in managed land; request a managed
+ // callback.
+ //
+ request_managed_callback (data);
}
- Report.Debug (DebugFlags.SSE, "{0} managed callback releasing thread lock", this);
+ Report.Debug (DebugFlags.SSE, "{0} managed callback releasing global thread lock", this);
process.ReleaseGlobalThreadLock (this);
ReleaseThreadLock ();
@@ -2391,7 +2469,7 @@
lmf_breakpoint = null;
}
- bool do_managed_callback (ManagedCallbackData data)
+ bool is_managed_frame ()
{
Inferior.StackFrame sframe = inferior.GetCurrentFrame ();
Method method = Lookup (inferior.CurrentFrame);
@@ -2408,6 +2486,40 @@
return true;
}
+ void request_managed_callback (ManagedCallbackData data)
+ {
+ TargetAddress lmf_address = inferior.ReadAddress (LMFAddress);
+ StackFrame lmf_frame = Architecture.GetLMF (this, inferior, ref lmf_address);
+
+ Report.Debug (DebugFlags.SSE, "{0} requesting managed callback: {1}", this, lmf_frame);
+ process.MonoManager.AddManagedCallback (inferior, data);
+
+ /*
+ * Prevent a race condition:
+ * If we stopped just before returning from native code,
+ * mono_thread_interruption_checkpoint_request() may not be called again
+ * before returning back to managed code; it's called next time we're entering
+ * native code again.
+ *
+ * This could lead to problems if the managed code does some CPU-intensive
+ * before going unmanaged next time - or even loops forever.
+ *
+ * I have a test case where an icall contains a sleep() and the managed code
+ * contains an infinite loop (`for (;;) ;) immediately after returning from
+ * this icall.
+ *
+ * To prevent this from happening, we insert a breakpoint on the last managed
+ * frame.
+ */
+
+ if (lmf_frame != null)
+ insert_lmf_breakpoint (lmf_frame.TargetAddress);
+ else {
+ Report.Error ("{0} unable to compute LMF for managed callback: {1}",
+ this, inferior.CurrentFrame);
+ }
+ }
+
LMFBreakpointData lmf_breakpoint = null;
internal bool OnManagedCallback (Queue<ManagedCallbackData> callbacks)
@@ -3844,6 +3956,14 @@
public readonly TargetObject[] ParamObjects;
public readonly RuntimeInvokeFlags Flags;
+ public bool HasStarted {
+ get; protected set;
+ }
+
+ public bool AbortRequested {
+ get; protected set;
+ }
+
bool stopped_somewhere;
OperationRuntimeInvokeHelper helper;
@@ -3894,6 +4014,7 @@
throw new InternalError ("{0} rti already has a helper operation", sse);
helper = new OperationRuntimeInvokeHelper (sse, this);
Result.ID = helper.ID;
+ sse.rti_stack.Push (this);
sse.PushOperation (helper);
}
@@ -3996,6 +4117,16 @@
return new TargetEventArgs (TargetEventType.TargetStopped, 0, frame);
}
+ public bool RequestAbort ()
+ {
+ if (!HasStarted) {
+ AbortRequested = true;
+ return false;
+ }
+
+ return true;
+ }
+
public void AbortInvoke ()
{
inferior.AbortInvoke (ID);
@@ -4106,8 +4237,9 @@
}
case Stage.CompiledMethod: {
+ RTI.HasStarted = true;
+
sse.insert_temporary_breakpoint (invoke);
- sse.rti_stack.Push (RTI);
inferior.RuntimeInvoke (
sse.MonoDebuggerInfo.RuntimeInvoke,
@@ -4167,6 +4299,14 @@
protected override EventResult CallbackCompleted (long data1, long data2, out TargetEventArgs args)
{
+ if (RTI.AbortRequested) {
+ CompletedRTI ();
+ RTI.Result.InvocationAborted = true;
+ RestoreStack ();
+ args = null;
+ return EventResult.CompletedCallback;
+ }
+
switch (stage) {
case Stage.Uninitialized: {
TargetAddress klass = new TargetAddress (inferior.AddressDomain, data1);
@@ -4459,7 +4599,7 @@
protected override void DoExecute ()
{
- if (sse.MonoDebuggerInfo.HasNewTrampolineNotification ()) {
+ if (sse.MonoDebuggerInfo.HasNewTrampolineNotification) {
sse.enable_extended_notification (NotificationType.Trampoline);
sse.do_continue (CallSite.Address + CallSite.InstructionSize);
} else {
@@ -4476,7 +4616,7 @@
protected void TrampolineCompiled (TargetAddress mono_method, TargetAddress code)
{
- if (sse.MonoDebuggerInfo.HasNewTrampolineNotification ()) {
+ if (sse.MonoDebuggerInfo.HasNewTrampolineNotification) {
sse.disable_extended_notification (NotificationType.Trampoline);
sse.remove_temporary_breakpoint ();
} else {
@@ -4941,6 +5081,29 @@
}
}
+ protected class OperationAbortRuntimeInvoke : OperationCallback
+ {
+ public OperationAbortRuntimeInvoke (SingleSteppingEngine sse, CommandResult result)
+ : base (sse, result)
+ { }
+
+ protected override void DoExecute ()
+ {
+ Report.Debug (DebugFlags.SSE, "{0} abort runtime invoke", sse);
+ inferior.CallMethod (sse.MonoDebuggerInfo.AbortRuntimeInvoke, null, ID);
+ }
+
+ protected override EventResult CallbackCompleted (long data1, long data2, out TargetEventArgs args)
+ {
+ Report.Debug (DebugFlags.SSE, "{0} abort runtime invoke - callback completed: {1:x}",
+ sse, data1);
+ args = null;
+
+ inferior.Continue ();
+ return EventResult.Running;
+ }
+ }
+
protected abstract class InterruptibleOperation : Operation
{
public bool IsSuspended {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/backend/mono/MonoLanguageBackend.cs new/mono-debugger-2.6.3/backend/mono/MonoLanguageBackend.cs
--- old/mono-debugger-2.6/backend/mono/MonoLanguageBackend.cs 2009-12-04 21:33:40.000000000 +0100
+++ new/mono-debugger-2.6.3/backend/mono/MonoLanguageBackend.cs 2010-02-24 21:21:17.000000000 +0100
@@ -1182,9 +1182,7 @@
public override TargetObject CreateNullObject (Thread target, TargetType type)
{
- TargetLocation location = new AbsoluteTargetLocation (TargetAddress.Null);
-
- return new MonoNullObject ((TargetType) type, location);
+ return new TargetNullObject (type);
}
public override TargetObjectObject CreateBoxedObject (Thread thread, TargetObject value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/backend/mono/MonoThreadManager.cs new/mono-debugger-2.6.3/backend/mono/MonoThreadManager.cs
--- old/mono-debugger-2.6/backend/mono/MonoThreadManager.cs 2009-11-09 13:27:09.000000000 +0100
+++ new/mono-debugger-2.6.3/backend/mono/MonoThreadManager.cs 2010-03-02 15:10:46.000000000 +0100
@@ -537,6 +537,8 @@
public readonly TargetAddress UsingMonoDebugger;
public readonly TargetAddress InterruptionRequest;
+ public readonly TargetAddress AbortRuntimeInvoke = TargetAddress.Null;
+
public static MonoDebuggerInfo Create (TargetMemoryAccess memory, TargetAddress info)
{
TargetBinaryReader header = memory.ReadMemory (info, 24).GetReader ();
@@ -578,9 +580,12 @@
return MinorVersion >= minor;
}
- public bool HasNewTrampolineNotification ()
- {
- return CheckRuntimeVersion (80, 2) || CheckRuntimeVersion (81, 4);
+ public bool HasNewTrampolineNotification {
+ get { return CheckRuntimeVersion (80, 2) || CheckRuntimeVersion (81, 4); }
+ }
+
+ public bool HasAbortRuntimeInvoke {
+ get { return CheckRuntimeVersion (81, 5); }
}
protected MonoDebuggerInfo (TargetMemoryAccess memory, TargetReader reader)
@@ -639,6 +644,9 @@
UsingMonoDebugger = reader.ReadAddress ();
InterruptionRequest = reader.ReadAddress ();
+ if (HasAbortRuntimeInvoke)
+ AbortRuntimeInvoke = reader.ReadAddress ();
+
Report.Debug (DebugFlags.JitSymtab, this);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/backend/os/DwarfReader.cs new/mono-debugger-2.6.3/backend/os/DwarfReader.cs
--- old/mono-debugger-2.6/backend/os/DwarfReader.cs 2009-09-25 17:19:08.000000000 +0200
+++ new/mono-debugger-2.6.3/backend/os/DwarfReader.cs 2010-02-23 17:16:09.000000000 +0100
@@ -126,7 +126,7 @@
this.filename = bfd.FileName;
this.target_info = bfd.TargetMemoryInfo;
- debug_info_reader = create_reader (".debug_info");
+ debug_info_reader = create_reader (".debug_info", false);
DwarfBinaryReader reader = DebugInfoReader;
@@ -143,13 +143,13 @@
throw new DwarfException (
bfd, "Unknown address size: {0}", address_size);
- debug_abbrev_reader = create_reader (".debug_abbrev");
- debug_line_reader = create_reader (".debug_line");
- debug_aranges_reader = create_reader (".debug_aranges");
- debug_pubnames_reader = create_reader (".debug_pubnames");
- debug_pubtypes_reader = create_reader (".debug_pubtypes");
- debug_str_reader = create_reader (".debug_str");
- debug_loc_reader = create_reader (".debug_loc");
+ debug_abbrev_reader = create_reader (".debug_abbrev", false);
+ debug_line_reader = create_reader (".debug_line", false);
+ debug_aranges_reader = create_reader (".debug_aranges", true);
+ debug_pubnames_reader = create_reader (".debug_pubnames", true);
+ debug_pubtypes_reader = create_reader (".debug_pubtypes", true);
+ debug_str_reader = create_reader (".debug_str", true);
+ debug_loc_reader = create_reader (".debug_loc", false);
compile_unit_hash = Hashtable.Synchronized (new Hashtable ());
method_source_hash = Hashtable.Synchronized (new Hashtable ());
@@ -576,10 +576,14 @@
ArrayList read_aranges ()
{
- DwarfBinaryReader reader = DebugArangesReader;
-
ArrayList ranges = new ArrayList ();
+ if (debug_aranges_reader == null)
+ return ranges;
+
+ DwarfBinaryReader reader = new DwarfBinaryReader (
+ bfd, (TargetBlob) debug_aranges_reader.Data, Is64Bit);
+
while (!reader.IsEof) {
long length = reader.ReadInitialLength ();
long stop = reader.Position + length;
@@ -644,13 +648,12 @@
Hashtable read_pubnames ()
{
- DwarfBinaryReader reader = DebugPubnamesReader;
-
- // if the reader comes back null, we just can't look up symbols
- // by name, return null.
- if (reader == null)
+ if (debug_pubnames_reader == null)
return null;
+ DwarfBinaryReader reader = new DwarfBinaryReader (
+ bfd, (TargetBlob) debug_pubnames_reader.Data, Is64Bit);
+
Hashtable names = Hashtable.Synchronized (new Hashtable ());
while (!reader.IsEof) {
@@ -681,13 +684,12 @@
Hashtable read_pubtypes ()
{
- DwarfBinaryReader reader = DebugPubtypesReader;
-
- // if the reader comes back null, we just can't look up types
- // by name, return null.
- if (reader == null)
+ if (debug_pubtypes_reader == null)
return null;
+ DwarfBinaryReader reader = new DwarfBinaryReader (
+ bfd, (TargetBlob) debug_pubtypes_reader.Data, Is64Bit);
+
Hashtable names = Hashtable.Synchronized (new Hashtable ());
while (!reader.IsEof) {
@@ -725,13 +727,19 @@
Report.Debug (DebugFlags.DwarfReader,
"{1} Can't find DWARF 2 debugging info in section `{0}'",
bfd.FileName, (string) user_data);
-
return null;
}
}
- ObjectCache create_reader (string section_name)
+ ObjectCache create_reader (string section_name, bool optional)
{
+ if (!bfd.HasSection (section_name)) {
+ if (optional)
+ return null;
+
+ throw new DwarfException (bfd, "Missing section '{0}'.", section_name);
+ }
+
return new ObjectCache (new ObjectCacheFunc (create_reader_func), section_name, 5);
}
@@ -756,28 +764,6 @@
}
}
- public DwarfBinaryReader DebugPubnamesReader {
- get {
- TargetBlob blob = (TargetBlob) debug_pubnames_reader.Data;
- if (blob == null)
- return null;
- else
- return new DwarfBinaryReader (
- bfd, (TargetBlob) debug_pubnames_reader.Data, Is64Bit);
- }
- }
-
- public DwarfBinaryReader DebugPubtypesReader {
- get {
- TargetBlob blob = (TargetBlob) debug_pubtypes_reader.Data;
- if (blob == null)
- return null;
- else
- return new DwarfBinaryReader (
- bfd, (TargetBlob) debug_pubtypes_reader.Data, Is64Bit);
- }
- }
-
public DwarfBinaryReader DebugLineReader {
get {
return new DwarfBinaryReader (
@@ -785,15 +771,10 @@
}
}
- public DwarfBinaryReader DebugArangesReader {
- get {
- return new DwarfBinaryReader (
- bfd, (TargetBlob) debug_aranges_reader.Data, Is64Bit);
- }
- }
-
public DwarfBinaryReader DebugStrReader {
get {
+ if (debug_str_reader == null)
+ return null;
return new DwarfBinaryReader (
bfd, (TargetBlob) debug_str_reader.Data, Is64Bit);
}
@@ -1656,6 +1637,10 @@
}
case DwarfForm.strp: {
+ if (dwarf.DebugStrReader == null)
+ throw new DwarfException (
+ dwarf.bfd, "Got DW_FORM_strp, but " +
+ "'.debug_str' section is missing.");
long str_offset = reader.PeekOffset (offset, out data_size);
return dwarf.DebugStrReader.PeekString (str_offset);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/backend/server/x86_64-arch.c new/mono-debugger-2.6.3/backend/server/x86_64-arch.c
--- old/mono-debugger-2.6/backend/server/x86_64-arch.c 2009-12-04 21:33:40.000000000 +0100
+++ new/mono-debugger-2.6.3/backend/server/x86_64-arch.c 2010-03-01 20:51:23.000000000 +0100
@@ -1191,13 +1191,13 @@
ptr [i] = param_data [i];
}
- *((guint64 *) code) = new_rsp + static_size - 1;
+ *((guint64 *) code) = new_rsp + 24;
*((guint64 *) (code+8)) = callback_argument;
cdata = g_new0 (CallbackData, 1);
memcpy (&cdata->saved_regs, &arch->current_regs, sizeof (arch->current_regs));
memcpy (&cdata->saved_fpregs, &arch->current_fpregs, sizeof (arch->current_fpregs));
- cdata->call_address = new_rsp + static_size - 1;
+ cdata->call_address = new_rsp + 24;
cdata->stack_pointer = new_rsp + 8;
cdata->exc_address = new_rsp + 16;
cdata->callback_argument = callback_argument;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/classes/Operation.cs new/mono-debugger-2.6.3/classes/Operation.cs
--- old/mono-debugger-2.6/classes/Operation.cs 2009-11-09 13:27:09.000000000 +0100
+++ new/mono-debugger-2.6.3/classes/Operation.cs 2010-03-02 15:10:46.000000000 +0100
@@ -93,9 +93,9 @@
if (!IsCompleted) {
IsCompleted = true;
- Host.OperationCompleted (sse, args, ThreadingModel);
if (args != null)
Host.SendResult (sse, args);
+ Host.OperationCompleted (sse, args, ThreadingModel);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/classes/StackFrame.cs new/mono-debugger-2.6.3/classes/StackFrame.cs
--- old/mono-debugger-2.6/classes/StackFrame.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/classes/StackFrame.cs 2010-03-01 20:51:23.000000000 +0100
@@ -404,6 +404,10 @@
get { return exc_object; }
}
+ public bool IsManaged {
+ get { return (language != null) && language.IsManaged; }
+ }
+
internal void SetExceptionObject (TargetObject exc_object)
{
this.exc_object = exc_object;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/configure new/mono-debugger-2.6.3/configure
--- old/mono-debugger-2.6/configure 2009-12-04 21:34:05.000000000 +0100
+++ new/mono-debugger-2.6.3/configure 2010-03-02 15:10:58.000000000 +0100
@@ -2583,7 +2583,7 @@
# Define the identity of the package.
PACKAGE=mono-debugger
- VERSION=2.6
+ VERSION=2.6.3
cat >>confdefs.h <<_ACEOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/configure.in new/mono-debugger-2.6.3/configure.in
--- old/mono-debugger-2.6/configure.in 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/configure.in 2010-03-01 20:51:23.000000000 +0100
@@ -2,7 +2,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono-debugger, 2.6)
+AM_INIT_AUTOMAKE(mono-debugger, 2.6.3)
AM_MAINTAINER_MODE
AC_CHECK_TOOL(CC, gcc, gcc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/frontend/Expression.cs new/mono-debugger-2.6.3/frontend/Expression.cs
--- old/mono-debugger-2.6/frontend/Expression.cs 2009-09-25 17:19:08.000000000 +0200
+++ new/mono-debugger-2.6.3/frontend/Expression.cs 2010-03-01 20:51:23.000000000 +0100
@@ -2421,6 +2421,9 @@
(source is TargetFundamentalObject))
return target_type.Language.CreateBoxedObject (context.CurrentThread, source);
+ if (source is TargetObjectObject)
+ return source;
+
throw new ScriptingException (
"Cannot box object `{0}': not a value-type", expr.Name);
}
@@ -2694,6 +2697,10 @@
context, (TargetFundamentalType) source,
(TargetFundamentalType) target);
+ if ((source is TargetFundamentalType) && (target is TargetObjectType) &&
+ (((TargetFundamentalType) source).FundamentalKind == FundamentalKind.String))
+ return true;
+
if ((source is TargetClassType) && (target is TargetClassType))
return ImplicitReferenceConversionExists (
context, (TargetClassType) source,
@@ -2713,6 +2720,10 @@
context, (TargetFundamentalObject) obj,
(TargetFundamentalType) type);
+ if ((obj is TargetFundamentalObject) && (type is TargetObjectType) &&
+ (((TargetFundamentalType) obj.Type).FundamentalKind == FundamentalKind.String))
+ return obj.Type.Language.CreateBoxedObject (context.CurrentThread, obj);
+
if ((obj is TargetClassObject) && (type is TargetClassType))
return ImplicitReferenceConversion (
context, (TargetClassObject) obj,
@@ -3059,6 +3070,8 @@
} catch (TargetException ex) {
throw new ScriptingException (
"Invocation of `{0}' raised an exception: {1}", Name, ex.Message);
+ } catch (EvaluationTimeoutException ex) {
+ throw new ScriptingException ("Invocation of `{0}' timed out.", Name);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/frontend/Main.cs new/mono-debugger-2.6.3/frontend/Main.cs
--- old/mono-debugger-2.6/frontend/Main.cs 2009-12-04 21:33:40.000000000 +0100
+++ new/mono-debugger-2.6.3/frontend/Main.cs 2010-03-02 15:10:46.000000000 +0100
@@ -33,8 +33,8 @@
get { return interrupt_event; }
}
- public ST.AutoResetEvent EnterNestedBreakStateEvent {
- get { return enter_nested_break_state_event; }
+ public ST.AutoResetEvent NestedBreakStateEvent {
+ get { return nested_break_state_event; }
}
Interpreter interpreter;
@@ -47,7 +47,7 @@
ST.Thread main_thread;
ST.AutoResetEvent interrupt_event;
- ST.AutoResetEvent enter_nested_break_state_event;
+ ST.AutoResetEvent nested_break_state_event;
Stack main_loop_stack;
@@ -88,7 +88,7 @@
parser = new LineParser (engine);
interrupt_event = new ST.AutoResetEvent (false);
- enter_nested_break_state_event = new ST.AutoResetEvent (false);
+ nested_break_state_event = new ST.AutoResetEvent (false);
main_loop_stack = new Stack<MainLoop> ();
main_loop_stack.Push (new MainLoop (interpreter));
@@ -109,7 +109,7 @@
parser = new LineParser (engine);
interrupt_event = new ST.AutoResetEvent (false);
- enter_nested_break_state_event = new ST.AutoResetEvent (false);
+ nested_break_state_event = new ST.AutoResetEvent (false);
main_loop_stack = new Stack<MainLoop> ();
main_loop_stack.Push (new MainLoop (interpreter));
@@ -178,7 +178,7 @@
Report.Debug (DebugFlags.CLI, "{0} waiting for completion", loop);
ST.WaitHandle[] wait = new ST.WaitHandle[] {
- loop.CompletedEvent, interrupt_event, enter_nested_break_state_event
+ loop.CompletedEvent, interrupt_event, nested_break_state_event
};
int ret = ST.WaitHandle.WaitAny (wait);
@@ -197,7 +197,7 @@
Report.Debug (DebugFlags.CLI, "{0} enter nested break state", loop);
- enter_nested_break_state_event.Set ();
+ nested_break_state_event.Set ();
}
public void LeaveNestedBreakState ()
@@ -206,6 +206,8 @@
nested.Completed = true;
Report.Debug (DebugFlags.CLI, "{0} leave nested break state", nested);
+
+ nested_break_state_event.Set ();
}
void main_thread_main ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/TargetNullObject.cs new/mono-debugger-2.6.3/languages/TargetNullObject.cs
--- old/mono-debugger-2.6/languages/TargetNullObject.cs 1970-01-01 01:00:00.000000000 +0100
+++ new/mono-debugger-2.6.3/languages/TargetNullObject.cs 2010-02-24 21:21:17.000000000 +0100
@@ -0,0 +1,22 @@
+using System;
+
+namespace Mono.Debugger.Languages
+{
+ public class TargetNullObject : TargetObject
+ {
+ public TargetNullObject (TargetType type)
+ : base (type, new AbsoluteTargetLocation (TargetAddress.Null))
+ { }
+
+ public override TargetObjectKind Kind {
+ get { return TargetObjectKind.Null; }
+ }
+
+ internal override long GetDynamicSize (TargetMemoryAccess target, TargetBlob blob,
+ TargetLocation location,
+ out TargetLocation dynamic_location)
+ {
+ throw new InvalidOperationException ();
+ }
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/CapturedVariable.cs new/mono-debugger-2.6.3/languages/mono/CapturedVariable.cs
--- old/mono-debugger-2.6/languages/mono/CapturedVariable.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/CapturedVariable.cs 2010-02-24 21:21:17.000000000 +0100
@@ -78,7 +78,7 @@
string name)
{
TargetObject obj = GetObject (frame, target);
- if ((obj == null) || (obj is MonoNullObject))
+ if ((obj == null) || (obj is TargetNullObject))
return null;
TargetClassObject sobj = (TargetClassObject) obj;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/MonoArrayObject.cs new/mono-debugger-2.6.3/languages/mono/MonoArrayObject.cs
--- old/mono-debugger-2.6/languages/mono/MonoArrayObject.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/MonoArrayObject.cs 2010-02-24 21:21:17.000000000 +0100
@@ -59,7 +59,7 @@
new_loc = new_loc.GetDereferencedLocation ();
if (new_loc.HasAddress && new_loc.GetAddress (target).IsNull)
- return new MonoNullObject (Type.ElementType, new_loc);
+ return new TargetNullObject (Type.ElementType);
return Type.ElementType.GetObject (target, new_loc);
}
@@ -83,21 +83,11 @@
Type.ElementType.SetObject (target, new_loc, obj);
}
- int GetElementSize (TargetInfo info)
- {
- if (Type.ElementType.IsByRef)
- return info.TargetAddressSize;
- else if (Type.ElementType.HasFixedSize)
- return Type.ElementType.Size;
- else
- throw new InvalidOperationException ();
- }
-
internal override long GetDynamicSize (TargetMemoryAccess target, TargetBlob blob,
TargetLocation location,
out TargetLocation dynamic_location)
{
- int element_size = GetElementSize (blob.TargetMemoryInfo);
+ int element_size = Type.GetElementSize (target);
dynamic_location = location.GetLocationAtOffset (Type.Size);
return element_size * GetLength (target);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/MonoArrayType.cs new/mono-debugger-2.6.3/languages/mono/MonoArrayType.cs
--- old/mono-debugger-2.6/languages/mono/MonoArrayType.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/MonoArrayType.cs 2010-02-02 19:23:55.000000000 +0100
@@ -33,7 +33,13 @@
internal override int GetElementSize (TargetMemoryAccess target)
{
- IMonoStructType stype = ElementType as IMonoStructType;
+ TargetType element_type;
+ if (ElementType is MonoEnumType)
+ element_type = ((MonoEnumType) ElementType).ClassType;
+ else
+ element_type = ElementType;
+
+ IMonoStructType stype = element_type as IMonoStructType;
if ((stype == null) || stype.Type.IsByRef)
return base.GetElementSize (target);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/MonoClassInfo.cs new/mono-debugger-2.6.3/languages/mono/MonoClassInfo.cs
--- old/mono-debugger-2.6/languages/mono/MonoClassInfo.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/MonoClassInfo.cs 2010-02-24 21:21:17.000000000 +0100
@@ -207,7 +207,7 @@
TargetAddress addr = field_loc.GetAddress (target);
if (field_loc.HasAddress && field_loc.GetAddress (target).IsNull)
- return new MonoNullObject (type, field_loc);
+ return new TargetNullObject (type);
return type.GetObject (target, field_loc);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/MonoNullObject.cs new/mono-debugger-2.6.3/languages/mono/MonoNullObject.cs
--- old/mono-debugger-2.6/languages/mono/MonoNullObject.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/MonoNullObject.cs 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-using System;
-
-namespace Mono.Debugger.Languages.Mono
-{
- internal class MonoNullObject : TargetObject
- {
- public MonoNullObject (TargetType type, TargetLocation location)
- : base (type, location)
- { }
-
- public override TargetObjectKind Kind {
- get { return TargetObjectKind.Null; }
- }
-
- internal override long GetDynamicSize (TargetMemoryAccess target, TargetBlob blob,
- TargetLocation location,
- out TargetLocation dynamic_location)
- {
- throw new InvalidOperationException ();
- }
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/MonoNullableType.cs new/mono-debugger-2.6.3/languages/mono/MonoNullableType.cs
--- old/mono-debugger-2.6/languages/mono/MonoNullableType.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/MonoNullableType.cs 2010-02-24 21:21:17.000000000 +0100
@@ -15,7 +15,7 @@
TargetLocation flag_loc = location.GetLocationAtOffset (ElementType.Size);
byte[] buffer = new byte [1];
- if (obj is MonoNullObject) {
+ if (obj is TargetNullObject) {
buffer [0] = 0;
flag_loc.WriteBuffer (target, buffer);
return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/MonoVariable.cs new/mono-debugger-2.6.3/languages/mono/MonoVariable.cs
--- old/mono-debugger-2.6/languages/mono/MonoVariable.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/MonoVariable.cs 2010-02-24 21:21:17.000000000 +0100
@@ -137,7 +137,7 @@
if (location.HasAddress && location.GetAddress (target).IsNull) {
TargetLocation null_loc = new AbsoluteTargetLocation (TargetAddress.Null);
- return new MonoNullObject ((TargetType) type, null_loc);
+ return new TargetNullObject (type);
}
return type.GetObject (target, location);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mono-debugger-2.6/languages/mono/Utils.cs new/mono-debugger-2.6.3/languages/mono/Utils.cs
--- old/mono-debugger-2.6/languages/mono/Utils.cs 2009-09-25 17:19:09.000000000 +0200
+++ new/mono-debugger-2.6.3/languages/mono/Utils.cs 2010-01-08 14:40:06.000000000 +0100
@@ -9,6 +9,7 @@
using C = Mono.CompilerServices.SymbolWriter;
using Mono.Debugger.Backend;
+using Mono.Debugger.Backend.Mono;
namespace Mono.Debugger.Languages.Mono
{
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org