Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
0bfa77a6
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0bfa77a6
编写于
1月 11, 2016
作者:
T
Tomáš Matoušek
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7893 from tmat/MdvCdiKind
MetadataVisualizer: Display Kind column of CDI table
上级
786eeffd
3dd30200
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
30 addition
and
8 deletion
+30
-8
src/Test/PdbUtilities/Metadata/MetadataVisualizer.cs
src/Test/PdbUtilities/Metadata/MetadataVisualizer.cs
+27
-8
src/Test/PdbUtilities/PdbUtilities.csproj
src/Test/PdbUtilities/PdbUtilities.csproj
+3
-0
未找到文件。
src/Test/PdbUtilities/Metadata/MetadataVisualizer.cs
浏览文件 @
0bfa77a6
...
...
@@ -138,7 +138,7 @@ public void Visualize(int generation = -1)
// debug tables:
WriteDocument
();
WriteMethod
Body
();
WriteMethod
DebugInformation
();
WriteLocalScope
();
WriteLocalVariable
();
WriteLocalConstant
();
...
...
@@ -331,11 +331,11 @@ private string Literal(GuidHandle handle)
return
Literal
(
handle
,
BlobKind
.
None
,
(
r
,
h
)
=>
"{"
+
r
.
GetGuid
((
GuidHandle
)
h
)
+
"}"
);
}
private
static
Guid
CSharpGuid
=
new
Guid
(
"3f5162f8-07c6-11d3-9053-00c04fa302a1"
);
private
static
Guid
VisualBasicGuid
=
new
Guid
(
"3a12d0b8-c26c-11d0-b442-00a0244a1dd2"
);
private
static
Guid
FSharpGuid
=
new
Guid
(
"ab4f38c9-b6e6-43ba-be3b-58080b2ccce3"
);
private
static
Guid
Sha1Guid
=
new
Guid
(
"ff1816ec-aa5e-4d10-87f7-6f4963833460"
);
private
static
Guid
Sha256Guid
=
new
Guid
(
"8829d00f-11b8-4213-878b-770e8597ac16"
);
private
static
readonly
Guid
CSharpGuid
=
new
Guid
(
"3f5162f8-07c6-11d3-9053-00c04fa302a1"
);
private
static
readonly
Guid
VisualBasicGuid
=
new
Guid
(
"3a12d0b8-c26c-11d0-b442-00a0244a1dd2"
);
private
static
readonly
Guid
FSharpGuid
=
new
Guid
(
"ab4f38c9-b6e6-43ba-be3b-58080b2ccce3"
);
private
static
readonly
Guid
Sha1Guid
=
new
Guid
(
"ff1816ec-aa5e-4d10-87f7-6f4963833460"
);
private
static
readonly
Guid
Sha256Guid
=
new
Guid
(
"8829d00f-11b8-4213-878b-770e8597ac16"
);
private
string
GetLanguage
(
Guid
guid
)
{
...
...
@@ -354,6 +354,18 @@ private string GetHashAlgorithm(Guid guid)
return
"{"
+
guid
+
"}"
;
}
private
string
GetCustomDebugInformationKind
(
Guid
guid
)
{
if
(
guid
==
Microsoft
.
CodeAnalysis
.
PortableCustomDebugInfoKinds
.
AsyncMethodSteppingInformationBlob
)
return
"Async Method Stepping Information"
;
if
(
guid
==
Microsoft
.
CodeAnalysis
.
PortableCustomDebugInfoKinds
.
StateMachineHoistedLocalScopes
)
return
"State Machine Hoisted Local Scopes"
;
if
(
guid
==
Microsoft
.
CodeAnalysis
.
PortableCustomDebugInfoKinds
.
DynamicLocalVariables
)
return
"Dynamic Local Variables"
;
if
(
guid
==
Microsoft
.
CodeAnalysis
.
PortableCustomDebugInfoKinds
.
DefaultNamespace
)
return
"Default Namespace"
;
if
(
guid
==
Microsoft
.
CodeAnalysis
.
PortableCustomDebugInfoKinds
.
EncLocalSlotMap
)
return
"EnC Local Slot Map"
;
if
(
guid
==
Microsoft
.
CodeAnalysis
.
PortableCustomDebugInfoKinds
.
EncLambdaAndClosureMap
)
return
"EnC Lambda and Closure Map"
;
return
"{"
+
guid
+
"}"
;
}
private
string
Language
(
GuidHandle
handle
)
{
return
Literal
(
handle
,
BlobKind
.
None
,
(
r
,
h
)
=>
GetLanguage
(
r
.
GetGuid
((
GuidHandle
)
h
)));
...
...
@@ -364,6 +376,11 @@ private string HashAlgorithm(GuidHandle handle)
return
Literal
(
handle
,
BlobKind
.
None
,
(
r
,
h
)
=>
GetHashAlgorithm
(
r
.
GetGuid
((
GuidHandle
)
h
)));
}
private
string
CustomDebugInformationKind
(
GuidHandle
handle
)
{
return
Literal
(
handle
,
BlobKind
.
None
,
(
r
,
h
)
=>
GetCustomDebugInformationKind
(
r
.
GetGuid
((
GuidHandle
)
h
)));
}
private
string
Literal
(
DocumentNameBlobHandle
handle
)
{
return
Literal
((
BlobHandle
)
handle
,
BlobKind
.
DocumentName
,
(
r
,
h
)
=>
"'"
+
r
.
GetString
((
DocumentNameBlobHandle
)(
BlobHandle
)
h
)
+
"'"
);
...
...
@@ -1463,7 +1480,7 @@ private void WriteDocument()
WriteTableName
(
TableIndex
.
Document
);
}
private
void
WriteMethod
Body
()
private
void
WriteMethod
DebugInformation
()
{
if
(
_reader
.
MethodDebugInformation
.
Count
==
0
)
{
...
...
@@ -1727,6 +1744,7 @@ private void WriteCustomDebugInformation()
{
AddHeader
(
"Parent"
,
"Kind"
,
"Value"
);
...
...
@@ -1736,6 +1754,7 @@ private void WriteCustomDebugInformation()
AddRow
(
Token
(()
=>
entry
.
Parent
),
CustomDebugInformationKind
(
entry
.
Kind
),
Literal
(
entry
.
Value
,
BlobKind
.
CustomDebugInformation
)
);
}
...
...
src/Test/PdbUtilities/PdbUtilities.csproj
浏览文件 @
0bfa77a6
...
...
@@ -73,6 +73,9 @@
<Compile
Include=
"..\..\Compilers\Core\Portable\InternalUtilities\StreamExtensions.cs"
>
<Link>
InternalUtilities\StreamExtensions.cs
</Link>
</Compile>
<Compile
Include=
"..\..\Compilers\Core\Portable\MetadataReader\PortableCustomDebugInfoKinds.cs"
>
<Link>
Shared\PortableCustomDebugInfoKinds.cs
</Link>
</Compile>
<Compile
Include=
"..\..\Compilers\Core\Portable\PEWriter\CustomDebugInfoConstants.cs"
>
<Link>
Shared\CustomDebugInfoConstants.cs
</Link>
</Compile>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录