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-03-30 16:51:10 +0400
committerJeffrey Stedfast <fejj@gnome.org>2012-03-30 16:51:10 +0400
commit171a2791d6c53d75b573d1288f6a61c78db8187f (patch)
tree46e6f36f95547e095ee4a18439d37083b69ac229
parentae5da81350720c290b7067687a3f01e73040c485 (diff)
[Debugger] Properly handle System.IO.Path.GetFullPath() exceptions
Fixes bug #4137.
-rw-r--r--main/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
index 8fda271dd9..33c95fcff4 100644
--- a/main/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
+++ b/main/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
@@ -172,27 +172,39 @@ namespace Mono.Debugging.Client
public ReadOnlyCollection<Breakpoint> GetBreakpointsAtFile (string filename)
{
- filename = System.IO.Path.GetFullPath (filename);
-
List<Breakpoint> list = new List<Breakpoint> ();
+
+ try {
+ filename = System.IO.Path.GetFullPath (filename);
+ } catch {
+ return list.AsReadOnly ();
+ }
+
foreach (BreakEvent be in breakpoints) {
Breakpoint bp = be as Breakpoint;
if (bp != null && FileNameEquals (bp.FileName, filename))
list.Add (bp);
}
+
return list.AsReadOnly ();
}
public ReadOnlyCollection<Breakpoint> GetBreakpointsAtFileLine (string filename, int line)
{
- filename = System.IO.Path.GetFullPath (filename);
-
List<Breakpoint> list = new List<Breakpoint> ();
+
+ try {
+ filename = System.IO.Path.GetFullPath (filename);
+ } catch {
+ return list.AsReadOnly ();
+ }
+
foreach (BreakEvent be in breakpoints) {
Breakpoint bp = be as Breakpoint;
if (bp != null && FileNameEquals (bp.FileName, filename) && (bp.OriginalLine == line || bp.Line == line))
list.Add (bp);
}
+
return list.AsReadOnly ();
}