diff options
author | Jeffrey Stedfast <jeff@xamarin.com> | 2012-08-07 01:04:41 +0400 |
---|---|---|
committer | Jeffrey Stedfast <jeff@xamarin.com> | 2012-08-07 01:04:41 +0400 |
commit | 202ab6156ae30941851dd68fe64747a1db81cf25 (patch) | |
tree | 4e738f9e194a0ed49edb871fffdd76411e3ad753 /main/contrib | |
parent | 8d2c22ca696f64eb258e57a2aa3c0468ff330148 (diff) |
[Mono.Debugger.Soft] Updated to get MethodMirror.GetCustomAttributes()
Diffstat (limited to 'main/contrib')
3 files changed, 13 insertions, 5 deletions
diff --git a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 319a92bfdf..942c08366c 100644 --- a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -395,7 +395,7 @@ namespace Mono.Debugger.Soft * with newer runtimes, and vice versa. */ internal const int MAJOR_VERSION = 2; - internal const int MINOR_VERSION = 20; + internal const int MINOR_VERSION = 21; enum WPSuspendPolicy { NONE = 0, @@ -517,7 +517,8 @@ namespace Mono.Debugger.Soft GET_LOCALS_INFO = 5, GET_INFO = 6, GET_BODY = 7, - RESOLVE_TOKEN = 8 + RESOLVE_TOKEN = 8, + GET_CATTRS = 9 } enum CmdType { @@ -1824,6 +1825,11 @@ namespace Mono.Debugger.Soft } } + internal CattrInfo[] Method_GetCustomAttributes (long id, long attr_type_id, bool inherit) { + PacketReader r = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_CATTRS, new PacketWriter ().WriteId (id).WriteId (attr_type_id)); + return ReadCattrs (r); + } + /* * THREAD */ diff --git a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs index 0b2ddaf5f6..a7a698dfdc 100644 --- a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs +++ b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs @@ -77,11 +77,13 @@ namespace Mono.Debugger.Soft * Creating the custom attributes themselves could modify the behavior of the * debuggee, so we return objects similar to the CustomAttributeData objects * used by the reflection-only functionality on .net. + * Since protocol version 2.21 */ public CustomAttributeDataMirror[] GetCustomAttributes (bool inherit) { return GetCAttrs (null, inherit); } + /* Since protocol version 2.21 */ public CustomAttributeDataMirror[] GetCustomAttributes (TypeMirror attributeType, bool inherit) { if (attributeType == null) throw new ArgumentNullException ("attributeType"); @@ -89,12 +91,12 @@ namespace Mono.Debugger.Soft } CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) { - if (cattrs == null && Metadata != null && !Metadata.HasCustomAttributes) + if (cattrs == null && meta != null && !Metadata.HasCustomAttributes) cattrs = new CustomAttributeDataMirror [0]; // FIXME: Handle inherit if (cattrs == null) { - CattrInfo[] info = vm.conn.Type_GetCustomAttributes (id, 0, false); + CattrInfo[] info = vm.conn.Method_GetCustomAttributes (id, 0, false); cattrs = CustomAttributeDataMirror.Create (vm, info); } var res = new List<CustomAttributeDataMirror> (); diff --git a/main/contrib/Mono.Debugger.Soft/mono-git-revision b/main/contrib/Mono.Debugger.Soft/mono-git-revision index e72e0482c6..f9bc9925ac 100644 --- a/main/contrib/Mono.Debugger.Soft/mono-git-revision +++ b/main/contrib/Mono.Debugger.Soft/mono-git-revision @@ -1 +1 @@ -b38abd8131e8f089fd68f95a6c6275ed8e53f187 +bfdb8242d92017f0c1c34da9c976622c959b2da1 |