[mono/monodevelop] 03bbbdf2: [CorDebug] Fixed binding of exceptions.

"Therzok ([email protected])" <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000141e4beff28-60f07963-ce29-42ff-bed6-ab9aff3915ad-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/monodevelop
  Compare: https://github.com/mono/monodevelop/compare/5082d005ef1a...03bbbdf256bc

   Commit: 03bbbdf256bce54112b677c94376d7ec67928713
   Author: Therzok <[email protected]> (Therzok)
     Date: 2013-10-23 09:55:49 GMT
      URL: https://github.com/mono/monodevelop/commit/03bbbdf256bce54112b677c94376d7ec67928713

[CorDebug] Fixed binding of exceptions.

Changed paths:
  M main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerSession.cs

Modified: main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerSession.cs
===================================================================
@@ -655,10 +655,10 @@ protected override BreakEventInfo OnInsertBreakEvent (BreakEvent be)
 		{
 			return MtaThread.Run (delegate
 			{
-				BreakEventInfo binfo = new BreakEventInfo ();
+				var binfo = new BreakEventInfo ();
 
 				lock (documents) {
-					Breakpoint bp = be as Breakpoint;
+					var bp = be as Breakpoint;
 					if (bp != null) {
 						if (bp is FunctionBreakpoint) {
 							// FIXME: implement breaking on function name
@@ -709,6 +709,20 @@ protected override BreakEventInfo OnInsertBreakEvent (BreakEvent be)
 							return binfo;
 						}
 					}
+
+					var cp = be as Catchpoint;
+					if (cp != null) {
+						foreach (ModuleInfo mod in modules.Values) {
+							CorMetadataImport mi = mod.Importer;
+							if (mi != null) {
+								foreach (Type t in mi.DefinedTypes)
+									if (t.FullName == cp.ExceptionName) {
+										binfo.SetStatus (BreakEventStatus.Bound, null);
+										return binfo;
+									}
+							}
+						}
+					}
 				}
 
 				binfo.SetStatus (BreakEventStatus.Invalid, null);



_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.