diff options
author | Calvin Gagliano <cagaglia@microsoft.com> | 2022-08-19 17:56:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-19 17:56:11 +0300 |
commit | f7085b2d81cdf1acb85189428c149ac5b98b6bbc (patch) | |
tree | aa97ef583c3fd4208f1a1b49100089f9dfd87c79 | |
parent | 2676205d91470e56ff3b7c27864acd8080a66f0a (diff) |
Fix libc.dll not found exception causing breakpoints not to be bound
Not finding libc.dll causes an exception to fire and for us not to fall back to the Path.GetFullPath method.
This fixes it.
System.DllNotFoundException
HResult=0x80131524
Message=Unable to load DLL 'libc': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=Mono.Debugging
StackTrace:
at Mono.Debugging.Client.BreakpointStore.realpath(String path, IntPtr buffer)
at Mono.Debugging.Client.BreakpointStore.ResolveFullPath(String path) in D:\Repos\xamarinDebugVs\external\debugger-libs\Mono.Debugging\Mono.Debugging.Client\BreakpointStore.cs:line 489
This exception was originally thrown at this call stack:
Mono.Debugging.Client.BreakpointStore.ResolveFullPath(string) in BreakpointStore.cs
-rw-r--r-- | Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs index 79ab670..6474786 100644 --- a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs +++ b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs @@ -481,10 +481,17 @@ namespace Mono.Debugging.Client { // If there is no path given, return the same path back if (string.IsNullOrEmpty(path)) - return path; - var result = realpath(path, IntPtr.Zero); - if (result == null) - return Path.GetFullPath(path); + return path; + + string result = null; + try
+ { + result = realpath(path, IntPtr.Zero); + } + catch
+ {
+ result = Path.GetFullPath(path); + } return result; } |