Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
2007-08-01 Martin Baulig <martin@ximian.com>
Browse files Browse the repository at this point in the history
	Merged the `debugger-dublin' branch.


svn path=/trunk/debugger/; revision=83184
  • Loading branch information
Martin Baulig committed Aug 1, 2007
2 parents 822f20d + d4b57a9 commit 45fd385
Show file tree
Hide file tree
Showing 102 changed files with 4,535 additions and 2,676 deletions.
171 changes: 171 additions & 0 deletions 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> 2007-06-21 Martin Baulig <martin@ximian.com>


* backend/server/x86-linux-ptrace.c * backend/server/x86-linux-ptrace.c
Expand All @@ -16,6 +20,173 @@
`MinDynamicVersion' at 58. The new `debugger-dublin' branch uses `MinDynamicVersion' at 58. The new `debugger-dublin' branch uses
59, but it's backwards-compatible. 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> 2007-05-29 Wade Berrier <wberrier@novell.com>


* classes/Makefile.am: fix make dist (remove MethodSource.cs) * classes/Makefile.am: fix make dist (remove MethodSource.cs)
Expand Down
98 changes: 45 additions & 53 deletions backend/BreakpointHandle.cs
Expand Up @@ -12,6 +12,8 @@ protected BreakpointHandle (Breakpoint breakpoint)
this.Breakpoint = breakpoint; this.Breakpoint = breakpoint;
} }


internal abstract bool Insert (SingleSteppingEngine sse);

public abstract void Insert (Thread target); public abstract void Insert (Thread target);


public abstract void Remove (Thread target); public abstract void Remove (Thread target);
Expand All @@ -27,6 +29,11 @@ internal SimpleBreakpointHandle (Breakpoint breakpoint, int index)
this.index = index; this.index = index;
} }


internal override bool Insert (SingleSteppingEngine sse)
{
throw new InternalError ();
}

public override void Insert (Thread target) public override void Insert (Thread target)
{ {
throw new InternalError (); throw new InternalError ();
Expand All @@ -51,6 +58,12 @@ public AddressBreakpointHandle (Breakpoint breakpoint, TargetAddress address)
this.Address = address; this.Address = address;
} }


internal override bool Insert (SingleSteppingEngine sse)
{
index = sse.Inferior.InsertBreakpoint (Breakpoint, Address);
return false;
}

public override void Insert (Thread target) public override void Insert (Thread target)
{ {
index = target.InsertBreakpoint (Breakpoint, Address); index = target.InsertBreakpoint (Breakpoint, Address);
Expand All @@ -66,87 +79,54 @@ public override void Remove (Thread target)


internal class FunctionBreakpointHandle : BreakpointHandle internal class FunctionBreakpointHandle : BreakpointHandle
{ {
ILoadHandler load_handler;
TargetFunctionType function; TargetFunctionType function;
SourceMethod source; bool has_load_handler;
int line = -1; int line = -1;
int index = -1; int index = -1;
int domain; int domain;


public FunctionBreakpointHandle (Breakpoint bpt, int domain, SourceMethod source) public FunctionBreakpointHandle (Breakpoint bpt, int domain,
TargetFunctionType function, int line)
: base (bpt) : base (bpt)
{ {
this.function = function;
this.domain = domain; this.domain = domain;
this.source = source;
}

public FunctionBreakpointHandle (Breakpoint bpt, int domain,
SourceMethod source, int line)
: this (bpt, domain, source)
{
this.line = line; this.line = line;
} }


public FunctionBreakpointHandle (Breakpoint bpt, int domain, internal TargetFunctionType Function {
TargetFunctionType function) get { return function; }
: this (bpt, domain, function.Source, -1)
{
this.function = function;
} }


public override void Insert (Thread target) internal override bool Insert (SingleSteppingEngine sse)
{ {
if ((load_handler != null) || (index > 0)) if (has_load_handler || (index > 0))
return; return false;

if ((function != null) && function.IsLoaded) {
index = target.InsertBreakpoint (Breakpoint, function);
return;
}


load_handler = source.SourceFile.Module.SymbolFile.RegisterLoadHandler ( throw new InternalError ();
target, source, method_loaded, null);
} }


public override void Remove (Thread target) public override void Insert (Thread target)
{ {
if (index > 0) if (has_load_handler || (index > 0))
target.RemoveBreakpoint (index); return;

if (load_handler != null)
load_handler.Remove ();


load_handler = null; has_load_handler = function.InsertBreakpoint (target, MethodLoaded);
index = -1;
} }


protected TargetAddress GetAddress (int domain) internal void MethodLoaded (TargetMemoryAccess target, Method method)
{ {
Method method = source.GetMethod (domain); TargetAddress address;
if (method == null)
return TargetAddress.Null;

if (line != -1) { if (line != -1) {
if (method.HasLineNumbers) if (method.HasLineNumbers)
return method.LineNumberTable.Lookup (line); address = method.LineNumberTable.Lookup (line);
else else
return TargetAddress.Null; address = TargetAddress.Null;
} else if (method.HasMethodBounds) } else if (method.HasMethodBounds)
return method.MethodStartAddress; address = method.MethodStartAddress;
else 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) if (address.IsNull)
return; return;


Expand All @@ -158,5 +138,17 @@ protected TargetAddress GetAddress (int domain)
index = -1; 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;
}
} }
} }
1 change: 1 addition & 0 deletions backend/DebuggerServant.cs
Expand Up @@ -60,6 +60,7 @@ internal void OnProcessCreatedEvent (ProcessServant process)


internal void OnTargetExitedEvent () internal void OnTargetExitedEvent ()
{ {
MonoLanguageBackend.PrintStatistics ();
client.OnTargetExitedEvent (); client.OnTargetExitedEvent ();
} }


Expand Down
21 changes: 1 addition & 20 deletions backend/ILanguageBackend.cs
Expand Up @@ -34,30 +34,11 @@ internal interface ILanguageBackend : IDisposable
get; get;
} }


TargetAddress RuntimeInvokeFunc {
get;
}

TargetAddress CompileMethodFunc {
get;
}

TargetAddress GetVirtualMethodFunc {
get;
}

TargetAddress GetBoxedObjectFunc {
get;
}

TargetAddress GetTrampolineAddress (TargetMemoryAccess memory, TargetAddress GetTrampolineAddress (TargetMemoryAccess memory,
TargetAddress address, TargetAddress address,
out bool is_start); out bool is_start);


SourceMethod GetTrampoline (TargetMemoryAccess memory, MethodSource GetTrampoline (TargetMemoryAccess memory,
TargetAddress address); TargetAddress address);

void Notification (Inferior inferior, NotificationType type,
TargetAddress data, long arg);
} }
} }

0 comments on commit 45fd385

Please sign in to comment.