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

Commit

Permalink
**** Merged from HEAD ****
Browse files Browse the repository at this point in the history
2007-09-17  Martin Baulig  <martin@ximian.com>

	* languages/TargetType.cs
	(TargetType): Renamed the abstract GetObject() into DoGetObject()
	and made it protected; added a new non-abstract GetObject() which
	just calls DoGetObject().

	* languages/TargetLocation.cs
	(TargetLocation): Made this class public; but removed all public
	API entry points from it.
	(TargetLocation.HasAddress): Made this internal.
	(TargetLocation.GetAddress): Likewise.


svn path=/branches/martin/debugger-generics/; revision=85872
  • Loading branch information
Martin Baulig committed Sep 17, 2007
1 parent cc10354 commit 534a098
Show file tree
Hide file tree
Showing 27 changed files with 52 additions and 34 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2007-09-17 Martin Baulig <martin@ximian.com>

* languages/TargetType.cs
(TargetType): Renamed the abstract GetObject() into DoGetObject()
and made it protected; added a new non-abstract GetObject() which
just calls DoGetObject().

* languages/TargetLocation.cs
(TargetLocation): Made this class public; but removed all public
API entry points from it.
(TargetLocation.HasAddress): Made this internal.
(TargetLocation.GetAddress): Likewise.

2007-09-04 Martin Baulig <martin@ximian.com>

* frontend/CSharpExpressionParser.jay
Expand Down
4 changes: 2 additions & 2 deletions languages/AbsoluteTargetLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public AbsoluteTargetLocation (TargetAddress address)
this.address = address;
}

public override bool HasAddress {
internal override bool HasAddress {
get { return true; }
}

public override TargetAddress GetAddress (TargetMemoryAccess target)
internal override TargetAddress GetAddress (TargetMemoryAccess target)
{
return address;
}
Expand Down
4 changes: 2 additions & 2 deletions languages/BitfieldTargetLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public BitfieldTargetLocation (TargetLocation relative_to, int offset, int size)
this.bit_size = size;
}

public override bool HasAddress {
internal override bool HasAddress {
get { return false; }
}

public override TargetAddress GetAddress (TargetMemoryAccess target)
internal override TargetAddress GetAddress (TargetMemoryAccess target)
{
throw new InvalidOperationException ();
}
Expand Down
4 changes: 2 additions & 2 deletions languages/ClientSuppliedTargetLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public ClientSuppliedTargetLocation (TargetBlob blob)
this.blob = blob;
}

public override bool HasAddress {
internal override bool HasAddress {
get { return false; }
}

public override TargetAddress GetAddress (TargetMemoryAccess target)
internal override TargetAddress GetAddress (TargetMemoryAccess target)
{
throw new InvalidOperationException ();
}
Expand Down
4 changes: 2 additions & 2 deletions languages/DereferencedTargetLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public DereferencedTargetLocation (TargetLocation reference)
this.reference = reference;
}

public override bool HasAddress {
internal override bool HasAddress {
get { return reference.HasAddress; }
}

public override TargetAddress GetAddress (TargetMemoryAccess target)
internal override TargetAddress GetAddress (TargetMemoryAccess target)
{
TargetAddress address = reference.GetAddress (target);
if (address.IsNull)
Expand Down
4 changes: 2 additions & 2 deletions languages/RelativeTargetLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public RelativeTargetLocation (TargetLocation relative_to, long offset)
this.offset = offset;
}

public override bool HasAddress {
internal override bool HasAddress {
get { return relative_to.HasAddress; }
}

public override TargetAddress GetAddress (TargetMemoryAccess target)
internal override TargetAddress GetAddress (TargetMemoryAccess target)
{
return relative_to.GetAddress (target) + offset;
}
Expand Down
2 changes: 1 addition & 1 deletion languages/TargetEnumType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal TargetObject GetValue (TargetLocation location)
return Value.Type.GetObject (location);
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new TargetEnumObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/TargetFundamentalType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public override int Size {
get { return size; }
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new TargetFundamentalObject (this, location);
}
Expand Down
6 changes: 3 additions & 3 deletions languages/TargetLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ namespace Mono.Debugger.Languages
// not always have an address for a variable (for instance if it's stored in a
// register) and that an addresses lifetime may be limited.
// </summary>
internal abstract class TargetLocation
public abstract class TargetLocation
{
// <summary>
// Whether this variable has an address. A variable may not have an
// address, for instance if it's stored in a register.
// </summary>
public abstract bool HasAddress {
internal abstract bool HasAddress {
get;
}

public abstract TargetAddress GetAddress (TargetMemoryAccess target);
internal abstract TargetAddress GetAddress (TargetMemoryAccess target);

internal virtual TargetBlob ReadMemory (Thread target, int size)
{
Expand Down
7 changes: 6 additions & 1 deletion languages/TargetType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ internal void SetObject (Thread target, TargetLocation location,
location.WriteBuffer (target, contents);
}

internal abstract TargetObject GetObject (TargetLocation location);
internal TargetObject GetObject (TargetLocation location)
{
return DoGetObject (location);
}

protected abstract TargetObject DoGetObject (TargetLocation location);

public virtual bool ContainsGenericParameters {
get { return false; }
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoArrayType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected override TargetType DoInflateType (MonoGenericContext context)
return new MonoArrayType (ElementType.InflateType (context), Rank);
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new MonoArrayObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoClassType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ internal MonoClassInfo ClassResolved (Thread target, TargetAddress klass)
return type_info;
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new MonoClassObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoFunctionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public override TargetAddress GetMethodAddress (Thread target)
return klass.MonoClassInfo.GetMethodAddress (Token);
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
throw new InvalidOperationException ();
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoGenericInstanceType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override TargetFieldInfo[] Fields {
}
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
Console.WriteLine ("GENERIC INST GET OBJECT: {0}", this);
return new MonoClassObject (this, location);
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoGenericParameterType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public int Position {
get { return pos; }
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
throw new NotImplementedException ();
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoObjectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override TargetClassType ClassType {
get { return class_type; }
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new MonoObjectObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoOpaqueType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override int Size {
get { return 0; }
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
throw new TargetException (TargetError.LocationInvalid,
"Cannot access variables of type `{0}'", Name);
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoPointerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override TargetType StaticType {
get { return element_type; }
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new MonoPointerObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/mono/MonoStringType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal override TargetFundamentalObject CreateInstance (Thread target, object
return new MonoStringObject (this, location);
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new MonoStringObject (this, location);
}
Expand Down
4 changes: 2 additions & 2 deletions languages/mono/MonoVariableLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ void update (Thread target)
is_valid = true;
}

public override bool HasAddress {
internal override bool HasAddress {
get { return is_regoffset || is_byref; }
}

public override TargetAddress GetAddress (TargetMemoryAccess target)
internal override TargetAddress GetAddress (TargetMemoryAccess target)
{
if (!is_valid)
throw new LocationInvalidException ();
Expand Down
2 changes: 1 addition & 1 deletion languages/native/NativeArrayType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override bool HasFixedSize {
get { return true; }
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new NativeArrayObject (this, location, lower_bound, upper_bound);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/native/NativeFunctionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public override TargetClassType DeclaringType {
}
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
throw new NotSupportedException ();
}
Expand Down
2 changes: 1 addition & 1 deletion languages/native/NativeOpaqueType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public override bool IsByRef {
}
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new NativeOpaqueObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/native/NativePointerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public override TargetType StaticType {
}
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new NativePointerObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/native/NativeStringType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static int MaximumStringLength {
}
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new NativeStringObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/native/NativeStructType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public override TargetMethodInfo[] StaticConstructors {
}
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
return new NativeStructObject (this, location);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/native/NativeTypeAlias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public TargetType TargetType {
set { target_type = value; }
}

internal override TargetObject GetObject (TargetLocation location)
protected override TargetObject DoGetObject (TargetLocation location)
{
if (target_type == null)
target_type = language.LookupType (target_name);
Expand Down

0 comments on commit 534a098

Please sign in to comment.