-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathSymUnmanagedExtensions.Variable.cs
More file actions
48 lines (40 loc) · 1.35 KB
/
SymUnmanagedExtensions.Variable.cs
File metadata and controls
48 lines (40 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the License.txt file in the project root for more information.
using System;
namespace Microsoft.DiaSymReader
{
using static InteropUtilities;
partial class SymUnmanagedExtensions
{
public static int GetSlot(this ISymUnmanagedVariable local)
{
if (local == null)
{
throw new ArgumentNullException(nameof(local));
}
int result;
ThrowExceptionForHR(local.GetAddressField1(out result));
return result;
}
public static int GetAttributes(this ISymUnmanagedVariable local)
{
if (local == null)
{
throw new ArgumentNullException(nameof(local));
}
int result;
ThrowExceptionForHR(local.GetAttributes(out result));
return result;
}
public static string GetName(this ISymUnmanagedVariable local)
{
if (local == null)
{
throw new ArgumentNullException(nameof(local));
}
return BufferToString(GetItems(local,
(ISymUnmanagedVariable a, int b, out int c, char[] d) => a.GetName(b, out c, d))!);
}
}
}