Permalink
Browse files

2007-08-01 Martin Baulig <martin@ximian.com>

	Merged the `debugger-dublin' branch.


svn path=/trunk/debugger/; revision=83184
  • Loading branch information...
2 parents 822f20d + d4b57a9 commit 45fd38558609854900201fd4f74cbb96e4561cba Martin Baulig committed Aug 1, 2007
Showing with 4,535 additions and 2,676 deletions.
  1. +171 −0 ChangeLog
  2. +45 −53 backend/BreakpointHandle.cs
  3. +1 −0 backend/DebuggerServant.cs
  4. +1 −20 backend/ILanguageBackend.cs
  5. +54 −9 backend/Inferior.cs
  6. +49 −47 backend/MonoThreadManager.cs
  7. +3 −5 backend/ProcessServant.cs
  8. +540 −338 backend/SingleSteppingEngine.cs
  9. +7 −4 backend/ThreadServant.cs
  10. +22 −8 backend/arch/Architecture.cs
  11. +18 −12 backend/arch/Architecture_I386.cs
  12. +63 −54 backend/arch/Architecture_X86_64.cs
  13. +6 −87 backend/arch/Bfd.cs
  14. +2 −4 backend/arch/BfdDisassembler.cs
  15. +9 −4 backend/arch/CoreFile.cs
  16. +1 −1 backend/arch/DwarfFrameReader.cs
  17. +471 −369 backend/arch/DwarfReader.cs
  18. +166 −129 backend/server/i386-arch.c
  19. +26 −5 backend/server/library.c
  20. +24 −3 backend/server/server.h
  21. +4 −1 backend/server/x86-ptrace.c
  22. +170 −124 backend/server/x86_64-arch.c
  23. +2 −1 classes/AddressBreakpoint.cs
  24. +63 −80 classes/AssemblerMethod.cs
  25. +54 −11 classes/Backtrace.cs
  26. +6 −1 classes/Breakpoint.cs
  27. +3 −0 classes/DebuggerConfiguration.xsd
  28. +6 −0 classes/DebuggerOptions.cs
  29. +15 −15 classes/DebuggerSession.cs
  30. +4 −3 classes/ExpressionBreakpoint.cs
  31. +0 −5 classes/ISymbolTable.cs
  32. +3 −197 classes/LineNumberTable.cs
  33. +83 −0 classes/MainMethodBreakpoint.cs
  34. +1 −0 classes/Makefile.am
  35. +5 −11 classes/Method.cs
  36. +60 −0 classes/MethodSource.cs
  37. +7 −20 classes/Module.cs
  38. +1 −1 classes/Process.cs
  39. +14 −24 classes/SourceAddress.cs
  40. +3 −2 classes/SourceBreakpoint.cs
  41. +11 −98 classes/SourceInfo.cs
  42. +43 −91 classes/SourceLocation.cs
  43. +55 −14 classes/StackFrame.cs
  44. +1 −0 classes/TargetException.cs
  45. +5 −5 classes/Thread.cs
  46. +242 −0 doc/debugger-dublin.txt
  47. +66 −35 frontend/Command.cs
  48. +1 −1 frontend/Completer.cs
  49. +56 −50 frontend/Expression.cs
  50. +3 −3 frontend/Interpreter.cs
  51. +2 −2 frontend/ObjectFormatter.cs
  52. +8 −9 frontend/ScriptingContext.cs
  53. +8 −7 frontend/Style.cs
  54. +3 −2 languages/AbsoluteTargetLocation.cs
  55. +3 −4 languages/BitfieldTargetLocation.cs
  56. +3 −2 languages/ClientSuppliedTargetLocation.cs
  57. +37 −0 languages/DereferencedTargetLocation.cs
  58. +5 −7 languages/RelativeTargetLocation.cs
  59. +26 −4 languages/TargetFunctionType.cs
  60. +6 −13 languages/TargetLocation.cs
  61. +5 −15 languages/TargetObject.cs
  62. +1 −1 languages/TargetObjectObject.cs
  63. +1 −1 languages/TargetType.cs
  64. +3 −3 languages/mono/MonoArrayObject.cs
  65. +1 −1 languages/mono/MonoClassInfo.cs
  66. +1 −1 languages/mono/MonoClassObject.cs
  67. +27 −9 languages/mono/MonoClassType.cs
  68. +77 −9 languages/mono/MonoFunctionType.cs
  69. +23 −0 languages/mono/MonoFundamentalType.cs
  70. +222 −115 languages/mono/MonoLanguageBackend.cs
  71. +9 −21 languages/mono/MonoMember.cs
  72. +1 −1 languages/mono/MonoObjectObject.cs
  73. +4 −1 languages/mono/MonoObjectType.cs
  74. +1 −1 languages/mono/MonoPointerObject.cs
  75. +1 −1 languages/mono/MonoStringObject.cs
  76. +6 −4 languages/mono/MonoStringType.cs
  77. +676 −428 languages/mono/MonoSymbolFile.cs
  78. +1 −1 languages/mono/MonoVariable.cs
  79. +5 −6 languages/mono/MonoVariableLocation.cs
  80. +2 −2 languages/native/NativeArrayObject.cs
  81. +30 −6 languages/native/NativeFunctionType.cs
  82. +5 −0 languages/native/NativeLanguage.cs
  83. +4 −3 languages/native/NativePointerObject.cs
  84. +1 −1 languages/native/NativeStringObject.cs
  85. +1 −1 languages/native/NativeStructObject.cs
  86. +2 −2 languages/native/NativeStructType.cs
  87. +6 −3 test/src/Makefile.am
  88. +31 −0 test/src/TestAppDomain.cs
  89. +44 −0 test/src/TestCCtor.cs
  90. +151 −0 test/src/testnativetypes.c
  91. +2 −1 test/testsuite/Makefile.am
  92. +18 −4 test/testsuite/NUnit.cs
  93. +8 −8 test/testsuite/TestAbort.cs
  94. +130 −0 test/testsuite/TestAppDomain.cs
  95. +3 −4 test/testsuite/TestByRef.cs
  96. +134 −0 test/testsuite/TestCCtor.cs
  97. +12 −12 test/testsuite/TestDelegate.cs
  98. +4 −4 test/testsuite/TestExec.cs
  99. +2 −3 test/testsuite/TestInvocation.cs
  100. +5 −1 test/testsuite/TestManagedTypes.cs
  101. +4 −7 test/testsuite/TestMethodLookup.cs
  102. +104 −0 test/testsuite/testnativetypes.cs
View
171 ChangeLog
@@ -1,3 +1,7 @@
+2007-08-01 Martin Baulig <martin@ximian.com>
+
+ Merged the `debugger-dublin' branch.
+
2007-06-21 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c
@@ -16,6 +20,173 @@
`MinDynamicVersion' at 58. The new `debugger-dublin' branch uses
59, but it's backwards-compatible.
+2007-07-31 Martin Baulig <martin@ximian.com>
+
+ * test/src/TestAppDomain.cs: New test.
+ * test/testsuite/TestAppDomain.cs: New test.
+
+2007-07-31 Martin Baulig <martin@ximian.com>
+
+ * backend/arch/Architecture_X86_64.cs
+ (Architecture_X86_64.GetJumpOrCallTarget): New private method; fix
+ and improve GetCallTarget() and also add support for jump
+ instructions.
+
+ * backend/SingleSteppingEngine.cs
+ (SingleSteppingEngine.OperationNativeTrampoline): New operation;
+ keep stepping while we're in the trampoline like `finish -native'.
+
+2007-07-30 Martin Baulig <martin@ximian.com>
+
+ * languages/TargetLocation.cs
+ (TargetLocation.Address): Replaced by GetAddress().
+ (TargetLocation.GetAddress): New public function; replaces the
+ `Address' property.
+ (TargetLocation.GetDereferencedTargetLocation): Removed the
+ `Thread' argument; returns a `DereferencedTargetLocation'.
+
+ * languages/TargetObject.cs
+ (TargetObject.Address): Replaced by GetAddress().
+ (TargetObject.GetAddress): New public function; replaces the
+ `Address' property.
+ (TargetObject.IsNull): Removed.
+
+2007-07-30 Martin Baulig <martin@ximian.com>
+
+ * test/testsuite/testnativetypes.cs: New test.
+ * test/src/testnativetypes.c: New test.
+
+2007-07-30 Martin Baulig <martin@ximian.com>
+
+ * languages/DeferencedTargetLocation.cs: New file.
+
+2007-07-28 Martin Baulig <martin@ximian.com>
+
+ * backend/arch/DwarfReader.cs: Almost completely redesign the line
+ number table; it's no longer based on methods and now also works
+ with newer versions of gcc and g++.
+
+2007-07-28 Martin Baulig <martin@ximian.com>
+
+ * classes/SourceLocation.cs
+ (SourceLocation): Add a .ctor which takes a `SourceFile' in
+ addition to a `MethodSource'.
+
+2007-07-27 Martin Baulig <martin@ximian.com>
+
+ * classes/LineNumberTable.cs
+ (LineNumberTable): Made Lookup() and DumpLineNumbers() abstract;
+ move the actual implementation into MonoSymbolFile.cs and
+ DwarfReader.cs.
+
+2007-07-27 Martin Baulig <martin@ximian.com>
+
+ * classes/LineNumberTable.cs
+ (LineNumberTable.Name): Removed.
+ (LineNumberTable.Module): Removed.
+
+2007-07-27 Martin Baulig <martin@ximian.com>
+
+ * classes/SourceAddress.cs
+ (SourceAddress.Null): Removed.
+ (SourceAddress.LineNumberTable): Removed.
+ (SourceAddress.SourceBuffer): New public property.
+
+ * classes/LineNumberTable.cs
+ (LineNumberTable.IsDynamic): Removed.
+ (LineNumberTable.SourceBuffer): Removed.
+
+2007-07-27 Martin Baulig <martin@ximian.com>
+
+ * classes/MethodSource.cs
+ (MethodSource.IsDynamic): New public property.
+ (MethodSource.HasSourceCode): Renamed into `HasSourceFile'.
+ (MethodSource.HasSourceBuffer): New public property.
+ (MethodSource.SourceBuffer): New public property.
+
+ * classes/AssemblerMethod.cs
+ (AssemblerMethod): Derive from `MethodSource', not
+ `LineNumberTable'.
+
+ * classes/Method.cs
+ (Method.HasSourceFile): Removed.
+ (Method.SourceFile): Removed.
+
+ * languages/mono/MonoSymbolFile.cs
+ (WrapperMethod): Also create a MethodSource for wrappers.
+
+2007-07-26 Martin Baulig <martin@ximian.com>
+
+ * classes/SourceAddress.cs
+ (SourceAddress.Location): Removed.
+ (SourceAddress.SourceFile): New public property.
+
+ * classes/LineNumberTable.cs
+ (LineNumberTable): Removed `MethodSource', `Addresses',
+ `StartRow', `EndRow' and `GetNamespaces()'.
+
+ * classes/Method.cs
+ (Method.HasSource): New public property.
+ (Method.MethodSource): New public property.
+ (Method.GetNamespaces): New public method.
+ (Method): Removed `StartRow' and `EndRow'; get them from the
+ `MethodSource' instead.
+
+2007-07-20 Martin Baulig <martin@ximian.com>
+
+ * languages/mono/MonoFundamentalType.cs: New file.
+ (MonoFundamentalType): New type.
+
+ * languages/mono/MonoStringType.cs
+ (MonoStringType): Derive from `MonoFundamentalType'.
+
+ * languages/mono/MonoObjectType.cs
+ (MonoObjectType): Create the MonoClassType in the .ctor.
+
+ * languages/mono/MonoSymbolFile.cs
+ (MonoSymbolFile.LookupMonoClass): New public method; calls
+ LookupMonoType() and then returns a `MonoClassType', this also
+ works for fundamental types.
+
+ * languages/mono/MonoLanguageBackend.cs
+ (MonoBuiltinTypeInfo): Use the new `MonoFundamentalType'.
+
+2007-06-28 Martin Baulig <martin@ximian.com>
+
+ * backend/MonoThreadManager.cs
+ (MonoDebuggerInfo): Reflect latest runtime changes; add the new
+ `DebuggerVersion' field.
+
+2007-06-04 Martin Baulig <martin@ximian.com>
+
+ * classes/Thread.cs
+ (Thread.CallMethod (long,string)): Added second `long' argument
+ so we can now pass a long value in addition to the string to the
+ target.
+
+ * backends/Inferior.cs
+ (Inferior.CallMethod (long,string)): Added second `long' argument
+ so we can now pass a long value in addition to the string to the
+ target.
+
+ * backends/server/server.h
+ (mono_debugger_server_call_method_1): Added `guint64 data_arg'
+ argument.
+
+2007-06-04 Martin Baulig <martin@ximian.com>
+
+ Replace `SourceMethod' with a new abstract `MethodSource'.
+
+ * classes/MethodSource.cs: New file.
+ (MethodSource): New public abstract class.
+
+ * classes/SourceInfo.cs
+ (SourceMethod): Removed; we now use the new `MethodSource'.
+
+ * classes/Module.cs
+ (Module.LookupMethod): Removed; use FindMethod() instead.
+ (Module.RegisterLoadHandler): Removed.
+
2007-05-29 Wade Berrier <wberrier@novell.com>
* classes/Makefile.am: fix make dist (remove MethodSource.cs)
@@ -12,6 +12,8 @@ protected BreakpointHandle (Breakpoint breakpoint)
this.Breakpoint = breakpoint;
}
+ internal abstract bool Insert (SingleSteppingEngine sse);
+
public abstract void Insert (Thread target);
public abstract void Remove (Thread target);
@@ -27,6 +29,11 @@ internal SimpleBreakpointHandle (Breakpoint breakpoint, int index)
this.index = index;
}
+ internal override bool Insert (SingleSteppingEngine sse)
+ {
+ throw new InternalError ();
+ }
+
public override void Insert (Thread target)
{
throw new InternalError ();
@@ -51,6 +58,12 @@ public AddressBreakpointHandle (Breakpoint breakpoint, TargetAddress address)
this.Address = address;
}
+ internal override bool Insert (SingleSteppingEngine sse)
+ {
+ index = sse.Inferior.InsertBreakpoint (Breakpoint, Address);
+ return false;
+ }
+
public override void Insert (Thread target)
{
index = target.InsertBreakpoint (Breakpoint, Address);
@@ -66,87 +79,54 @@ public override void Remove (Thread target)
internal class FunctionBreakpointHandle : BreakpointHandle
{
- ILoadHandler load_handler;
TargetFunctionType function;
- SourceMethod source;
+ bool has_load_handler;
int line = -1;
int index = -1;
int domain;
- public FunctionBreakpointHandle (Breakpoint bpt, int domain, SourceMethod source)
+ public FunctionBreakpointHandle (Breakpoint bpt, int domain,
+ TargetFunctionType function, int line)
: base (bpt)
{
+ this.function = function;
this.domain = domain;
- this.source = source;
- }
-
- public FunctionBreakpointHandle (Breakpoint bpt, int domain,
- SourceMethod source, int line)
- : this (bpt, domain, source)
- {
this.line = line;
}
- public FunctionBreakpointHandle (Breakpoint bpt, int domain,
- TargetFunctionType function)
- : this (bpt, domain, function.Source, -1)
- {
- this.function = function;
+ internal TargetFunctionType Function {
+ get { return function; }
}
- public override void Insert (Thread target)
+ internal override bool Insert (SingleSteppingEngine sse)
{
- if ((load_handler != null) || (index > 0))
- return;
-
- if ((function != null) && function.IsLoaded) {
- index = target.InsertBreakpoint (Breakpoint, function);
- return;
- }
+ if (has_load_handler || (index > 0))
+ return false;
- load_handler = source.SourceFile.Module.SymbolFile.RegisterLoadHandler (
- target, source, method_loaded, null);
+ throw new InternalError ();
}
- public override void Remove (Thread target)
+ public override void Insert (Thread target)
{
- if (index > 0)
- target.RemoveBreakpoint (index);
-
- if (load_handler != null)
- load_handler.Remove ();
+ if (has_load_handler || (index > 0))
+ return;
- load_handler = null;
- index = -1;
+ has_load_handler = function.InsertBreakpoint (target, MethodLoaded);
}
- protected TargetAddress GetAddress (int domain)
+ internal void MethodLoaded (TargetMemoryAccess target, Method method)
{
- Method method = source.GetMethod (domain);
- if (method == null)
- return TargetAddress.Null;
-
+ TargetAddress address;
if (line != -1) {
if (method.HasLineNumbers)
- return method.LineNumberTable.Lookup (line);
+ address = method.LineNumberTable.Lookup (line);
else
- return TargetAddress.Null;
+ address = TargetAddress.Null;
} else if (method.HasMethodBounds)
- return method.MethodStartAddress;
+ address = method.MethodStartAddress;
else
- return method.StartAddress;
- }
+ address = method.StartAddress;
- // <summary>
- // The method has just been loaded, lookup the breakpoint
- // address and actually insert it.
- // </summary>
- public void method_loaded (TargetMemoryAccess target,
- SourceMethod source, object data)
- {
- load_handler = null;
-
- TargetAddress address = GetAddress (domain);
if (address.IsNull)
return;
@@ -158,5 +138,17 @@ protected TargetAddress GetAddress (int domain)
index = -1;
}
}
+
+ public override void Remove (Thread target)
+ {
+ if (index > 0)
+ target.RemoveBreakpoint (index);
+
+ if (has_load_handler)
+ function.RemoveBreakpoint (target);
+
+ has_load_handler = false;
+ index = -1;
+ }
}
}
@@ -60,6 +60,7 @@ internal void OnProcessCreatedEvent (ProcessServant process)
internal void OnTargetExitedEvent ()
{
+ MonoLanguageBackend.PrintStatistics ();
client.OnTargetExitedEvent ();
}
@@ -34,30 +34,11 @@ internal interface ILanguageBackend : IDisposable
get;
}
- TargetAddress RuntimeInvokeFunc {
- get;
- }
-
- TargetAddress CompileMethodFunc {
- get;
- }
-
- TargetAddress GetVirtualMethodFunc {
- get;
- }
-
- TargetAddress GetBoxedObjectFunc {
- get;
- }
-
TargetAddress GetTrampolineAddress (TargetMemoryAccess memory,
TargetAddress address,
out bool is_start);
- SourceMethod GetTrampoline (TargetMemoryAccess memory,
+ MethodSource GetTrampoline (TargetMemoryAccess memory,
TargetAddress address);
-
- void Notification (Inferior inferior, NotificationType type,
- TargetAddress data, long arg);
}
}
Oops, something went wrong.

0 comments on commit 45fd385

Please sign in to comment.