diff options
author | David Karlaš <david.karlas@xamarin.com> | 2014-05-24 18:05:50 +0400 |
---|---|---|
committer | David Karlaš <david.karlas@xamarin.com> | 2014-05-24 18:24:06 +0400 |
commit | e37f3aaeb7411df7b4eb830feadf0e70f8b1afda (patch) | |
tree | 8e24bd65c599ed74321b51013b82ba671dc5146c /main/src/addins/MonoDevelop.Debugger.Win32 | |
parent | 142fb1064ef210dfdfee112b2ed9bc7b7a4e38bc (diff) |
[DebuggerUnitTest] Added test for GetAllChildren on object
[CorDebugger] Fixed bug to be able to view private properties
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.Win32')
3 files changed, 8 insertions, 8 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs index fd8231a3a6..0230f65180 100644 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs +++ b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs @@ -444,7 +444,7 @@ namespace Microsoft.Samples.Debugging.CorMetadata break;
var prop = new MetadataPropertyInfo (m_importer, methodToken, this);
try {
- MethodInfo mi = prop.GetGetMethod () ?? prop.GetSetMethod ();
+ MethodInfo mi = prop.GetGetMethod (true) ?? prop.GetSetMethod (true);
if (mi == null)
continue;
if (MetadataExtensions.TypeFlagsMatch (mi.IsPublic, mi.IsStatic, bindingAttr))
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorObjectAdaptor.cs b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorObjectAdaptor.cs index 7f09ee686e..57a37558ea 100644 --- a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorObjectAdaptor.cs +++ b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorObjectAdaptor.cs @@ -916,7 +916,7 @@ namespace MonoDevelop.Debugger.Win32 foreach (PropertyInfo prop in type.GetProperties (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
MethodInfo mi = null;
try {
- mi = prop.CanRead ? prop.GetGetMethod () : null;
+ mi = prop.CanRead ? prop.GetGetMethod (true) : null;
}
catch {
// Ignore
@@ -1017,7 +1017,7 @@ namespace MonoDevelop.Debugger.Win32 foreach (PropertyInfo prop in type.GetProperties (bindingFlags)) {
MethodInfo mi = null;
try {
- mi = prop.CanRead ? prop.GetGetMethod () : null;
+ mi = prop.CanRead ? prop.GetGetMethod (true) : null;
} catch {
// Ignore
}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/PropertyReference.cs b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/PropertyReference.cs index f97d9c3683..8ee9ab0dcc 100644 --- a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/PropertyReference.cs +++ b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/PropertyReference.cs @@ -95,14 +95,14 @@ namespace MonoDevelop.Debugger.Win32 CorValue[] args; if (index != null) { args = new CorValue[index.Length]; - ParameterInfo[] metArgs = prop.GetGetMethod ().GetParameters (); + ParameterInfo[] metArgs = prop.GetGetMethod (true).GetParameters (); for (int n = 0; n < index.Length; n++) args[n] = ctx.Adapter.GetBoxedArg (ctx, index[n], metArgs[n].ParameterType).Val; } else args = new CorValue[0]; - MethodInfo mi = prop.GetGetMethod (); + MethodInfo mi = prop.GetGetMethod (true); CorFunction func = module.GetFunctionFromToken (mi.MetadataToken); CorValue val = null; if (declaringType.Type == CorElementType.ELEMENT_TYPE_ARRAY || @@ -115,10 +115,10 @@ namespace MonoDevelop.Debugger.Win32 } set { CorEvaluationContext ctx = (CorEvaluationContext)Context; - CorFunction func = module.GetFunctionFromToken (prop.GetSetMethod ().MetadataToken); + CorFunction func = module.GetFunctionFromToken (prop.GetSetMethod (true).MetadataToken); CorValRef val = (CorValRef) value; CorValue[] args; - ParameterInfo[] metArgs = prop.GetSetMethod ().GetParameters (); + ParameterInfo[] metArgs = prop.GetSetMethod (true).GetParameters (); if (index == null) args = new CorValue[1]; @@ -152,7 +152,7 @@ namespace MonoDevelop.Debugger.Win32 internal static ObjectValueFlags GetFlags (PropertyInfo prop) { ObjectValueFlags flags = ObjectValueFlags.Property; - MethodInfo mi = prop.GetGetMethod () ?? prop.GetSetMethod (); + MethodInfo mi = prop.GetGetMethod (true) ?? prop.GetSetMethod (true); if (prop.GetSetMethod (true) == null) flags |= ObjectValueFlags.ReadOnly; |