Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@gnome.org>2012-08-03 18:04:36 +0400
committerJeffrey Stedfast <fejj@gnome.org>2012-08-03 18:04:36 +0400
commit7df01a4db69cea98e16a0442611387ea34c6fa98 (patch)
treefc62cdb84eebdf49a8aec555dc27e8f31fba63a0 /main/contrib
parentf34568c5be2f1c59d1d2e0e9059581d851ee405e (diff)
[Debugger] Hide methods in the callstack marked with DebuggerHiddenAttribute
Fixes bug #401
Diffstat (limited to 'main/contrib')
-rw-r--r--main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs32
-rw-r--r--main/contrib/Mono.Debugger.Soft/mono-git-revision2
2 files changed, 33 insertions, 1 deletions
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 85cf83d8dd..0b2ddaf5f6 100644
--- a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
+++ b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
@@ -14,6 +14,7 @@ namespace Mono.Debugger.Soft
TypeMirror declaring_type;
DebugInfo debug_info;
C.MethodDefinition meta;
+ CustomAttributeDataMirror[] cattrs;
ParameterInfoMirror[] param_info;
ParameterInfoMirror ret_param;
LocalVariable[] locals;
@@ -72,6 +73,37 @@ 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.
+ */
+ public CustomAttributeDataMirror[] GetCustomAttributes (bool inherit) {
+ return GetCAttrs (null, inherit);
+ }
+
+ public CustomAttributeDataMirror[] GetCustomAttributes (TypeMirror attributeType, bool inherit) {
+ if (attributeType == null)
+ throw new ArgumentNullException ("attributeType");
+ return GetCAttrs (attributeType, inherit);
+ }
+
+ CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
+ if (cattrs == null && Metadata != null && !Metadata.HasCustomAttributes)
+ cattrs = new CustomAttributeDataMirror [0];
+
+ // FIXME: Handle inherit
+ if (cattrs == null) {
+ CattrInfo[] info = vm.conn.Type_GetCustomAttributes (id, 0, false);
+ cattrs = CustomAttributeDataMirror.Create (vm, info);
+ }
+ var res = new List<CustomAttributeDataMirror> ();
+ foreach (var attr in cattrs)
+ if (type == null || attr.Constructor.DeclaringType == type)
+ res.Add (attr);
+ return res.ToArray ();
+ }
+
MethodInfo GetInfo () {
if (info == null)
info = vm.conn.Method_GetInfo (id);
diff --git a/main/contrib/Mono.Debugger.Soft/mono-git-revision b/main/contrib/Mono.Debugger.Soft/mono-git-revision
index 44b907a147..e72e0482c6 100644
--- a/main/contrib/Mono.Debugger.Soft/mono-git-revision
+++ b/main/contrib/Mono.Debugger.Soft/mono-git-revision
@@ -1 +1 @@
-174030f7e67f9c4d905a4403e3f514fe9f0b85bf
+b38abd8131e8f089fd68f95a6c6275ed8e53f187