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

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace MonoNullObject' with TargetNullObject'.
2010-02-23  Martin Baulig  <martin@ximian.com>

	* languages/TargetNullObject.cs: New file.
	(TargetNullObject): New public class.

	* languages/mono/MonoNullObject.cs: Removed.
	(MonoNullObject): Removed; use `TargetNullObject' instead.

svn path=/trunk/debugger/; revision=152394
  • Loading branch information
Martin Baulig committed Feb 24, 2010
1 parent 19aa50f commit 4c4f667
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
2010-02-23 Martin Baulig <martin@ximian.com>

* languages/TargetNullObject.cs: New file.
(TargetNullObject): New public class.

* languages/mono/MonoNullObject.cs: Removed.
(MonoNullObject): Removed; use `TargetNullObject' instead.

2010-02-23 Martin Baulig <martin@ximian.com>

* backend/os/DwarfReader.cs
Expand Down
4 changes: 1 addition & 3 deletions backend/mono/MonoLanguageBackend.cs
Expand Up @@ -1182,9 +1182,7 @@ internal TargetObject CreateObject (TargetMemoryAccess target, TargetAddress add

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)
Expand Down
@@ -1,11 +1,11 @@
using System;

namespace Mono.Debugger.Languages.Mono
namespace Mono.Debugger.Languages
{
internal class MonoNullObject : TargetObject
public class TargetNullObject : TargetObject
{
public MonoNullObject (TargetType type, TargetLocation location)
: base (type, location)
public TargetNullObject (TargetType type)
: base (type, new AbsoluteTargetLocation (TargetAddress.Null))
{ }

public override TargetObjectKind Kind {
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/CapturedVariable.cs
Expand Up @@ -78,7 +78,7 @@ public TargetFieldInfo GetField (TargetMemoryAccess target, string name)
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;
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoArrayObject.cs
Expand Up @@ -59,7 +59,7 @@ internal override TargetObject GetElement (TargetMemoryAccess target, int[] indi
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);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoClassInfo.cs
Expand Up @@ -207,7 +207,7 @@ public override TargetFieldInfo[] GetFields (Thread thread)
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);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoNullableType.cs
Expand Up @@ -15,7 +15,7 @@ public MonoNullableType (TargetType element_type)
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;
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoVariable.cs
Expand Up @@ -137,7 +137,7 @@ public override string PrintLocation (StackFrame frame)

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);
Expand Down

0 comments on commit 4c4f667

Please sign in to comment.