Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
c1af09e0
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,发现更多精彩内容 >>
提交
c1af09e0
编写于
3月 08, 2017
作者:
T
Tomas Matousek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Comments and rename
上级
d6324501
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
10 deletion
+50
-10
src/Compilers/Core/CodeAnalysisTest/Emit/CustomDebugInfoTests.cs
...pilers/Core/CodeAnalysisTest/Emit/CustomDebugInfoTests.cs
+1
-1
src/Compilers/Core/Portable/PEWriter/CustomDebugInfoWriter.cs
...Compilers/Core/Portable/PEWriter/CustomDebugInfoWriter.cs
+2
-2
src/Dependencies/CodeAnalysis.Metadata/CustomDebugInfoEncoder.cs
...endencies/CodeAnalysis.Metadata/CustomDebugInfoEncoder.cs
+4
-4
src/Dependencies/CodeAnalysis.Metadata/CustomDebugInfoKind.cs
...Dependencies/CodeAnalysis.Metadata/CustomDebugInfoKind.cs
+41
-1
src/Test/PdbUtilities/Pdb/PdbToXml.cs
src/Test/PdbUtilities/Pdb/PdbToXml.cs
+2
-2
未找到文件。
src/Compilers/Core/CodeAnalysisTest/Emit/CustomDebugInfoTests.cs
浏览文件 @
c1af09e0
...
...
@@ -411,7 +411,7 @@ public void UsingInfo2()
0x01
,
0x00
,
// using count #1
0x02
,
0x00
,
// using count #2
0x03
,
0x00
,
// using count #3
0x04
,
0x00
,
// using count #
3
0x04
,
0x00
,
// using count #
4
0x00
,
0x00
// alignment
},
cdi
);
}
...
...
src/Compilers/Core/Portable/PEWriter/CustomDebugInfoWriter.cs
浏览文件 @
c1af09e0
...
...
@@ -84,7 +84,7 @@ public byte[] SerializeMethodDebugInfo(EmitContext context, IMethodBody methodBo
var
encoder
=
new
CustomDebugInfoEncoder
(
pooledBuilder
);
// NOTE: This is an attempt to match Dev10's apparent behavior. For iterator methods (i.e. the method
// that appears in source, not the synthesized ones), Dev10 only emits the
ForwardIterator and IteratorLocal
// that appears in source, not the synthesized ones), Dev10 only emits the
StateMachineTypeName
// custom debug info (e.g. there will be no information about the usings that were in scope).
// NOTE: There seems to be an unusual behavior in ISymUnmanagedWriter where, if all the methods in a type are
// iterator methods, no custom debug info is emitted for any method. Adding a single non-iterator
...
...
@@ -93,7 +93,7 @@ public byte[] SerializeMethodDebugInfo(EmitContext context, IMethodBody methodBo
// is not a regression).
if
(
methodBody
.
StateMachineTypeName
!=
null
)
{
encoder
.
Add
ForwardIteratorInfo
(
methodBody
.
StateMachineTypeName
);
encoder
.
Add
StateMachineTypeName
(
methodBody
.
StateMachineTypeName
);
}
else
{
...
...
src/Dependencies/CodeAnalysis.Metadata/CustomDebugInfoEncoder.cs
浏览文件 @
c1af09e0
...
...
@@ -48,13 +48,13 @@ public byte[] ToArray()
return
Builder
.
ToArray
();
}
public
void
Add
ForwardIteratorInfo
(
string
iteratorClass
Name
)
public
void
Add
StateMachineTypeName
(
string
type
Name
)
{
Debug
.
Assert
(
iteratorClass
Name
!=
null
);
Debug
.
Assert
(
type
Name
!=
null
);
AddRecord
(
CustomDebugInfoKind
.
ForwardIteratorInfo
,
iteratorClass
Name
,
CustomDebugInfoKind
.
StateMachineTypeName
,
type
Name
,
(
name
,
builder
)
=>
{
builder
.
WriteUTF16
(
name
);
...
...
src/Dependencies/CodeAnalysis.Metadata/CustomDebugInfoKind.cs
浏览文件 @
c1af09e0
...
...
@@ -7,14 +7,54 @@
/// </summary>
internal
enum
CustomDebugInfoKind
:
byte
{
/// <summary>
/// C# only. Encodes the sizes of using groups that are applicable to the method.
/// The actual import strings are stored separately trhu ISymUnmanagedWriter.UsingNamespace.
/// </summary>
UsingGroups
=
0
,
/// <summary>
/// C# only. Indicates that per-method debug information (import strings) is stored on another method,
/// whose token is specified.
/// </summary>
ForwardMethodInfo
=
1
,
/// <summary>
/// C# only. Indicates that per-module debug information (assembly reference aliases) is stored on another method,
/// whose token is specified.
/// </summary>
ForwardModuleInfo
=
2
,
/// <summary>
/// C# only. Specifies local scopes for state machine hoisted local variables.
/// </summary>
StateMachineHoistedLocalScopes
=
3
,
ForwardIteratorInfo
=
4
,
/// <summary>
/// C# and VB. The name of the state machine type. Emitted for async and iterator kick-off methods.
/// </summary>
StateMachineTypeName
=
4
,
/// <summary>
/// C# only. Dynamic flags for local variables and constants.
/// </summary>
DynamicLocals
=
5
,
/// <summary>
/// C# and VB. Encodes EnC local variable slot map.
/// See https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PortablePdb-Metadata.md#EditAndContinueLocalSlotMap.
/// </summary>
EditAndContinueLocalSlotMap
=
6
,
/// <summary>
/// C# and VB. Encodes EnC lambda map.
/// See https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PortablePdb-Metadata.md#EditAndContinueLambdaAndClosureMap.
/// </summary>
EditAndContinueLambdaMap
=
7
,
/// <summary>
/// C# and VB. Tuple element names for local variables and constants.
/// </summary>
TupleElementNames
=
8
,
}
}
src/Test/PdbUtilities/Pdb/PdbToXml.cs
浏览文件 @
c1af09e0
...
...
@@ -290,7 +290,7 @@ private void WriteCustomDebugInfo(byte[] bytes)
case
CustomDebugInfoKind
.
StateMachineHoistedLocalScopes
:
WriteStateMachineHoistedLocalScopesCustomDebugInfo
(
record
);
break
;
case
CustomDebugInfoKind
.
ForwardIteratorInfo
:
case
CustomDebugInfoKind
.
StateMachineTypeName
:
WriteForwardIteratorCustomDebugInfo
(
record
);
break
;
case
CustomDebugInfoKind
.
DynamicLocals
:
...
...
@@ -443,7 +443,7 @@ private void WriteStateMachineHoistedLocalScopesCustomDebugInfo(CustomDebugInfoR
/// </remarks>
private
void
WriteForwardIteratorCustomDebugInfo
(
CustomDebugInfoRecord
record
)
{
Debug
.
Assert
(
record
.
Kind
==
CustomDebugInfoKind
.
ForwardIteratorInfo
);
Debug
.
Assert
(
record
.
Kind
==
CustomDebugInfoKind
.
StateMachineTypeName
);
_writer
.
WriteStartElement
(
"forwardIterator"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录