Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
29969836
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,发现更多精彩内容 >>
提交
29969836
编写于
10月 12, 2015
作者:
N
Nick Guerrera
提交者:
Tomas Matousek
10月 13, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adapt to Enumerator -> Enumerable S.R.Metadata API change
上级
2aa9cb09
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
16 addition
and
25 deletion
+16
-25
src/Compilers/CSharp/Test/Emit/PDB/PortablePdbTests.cs
src/Compilers/CSharp/Test/Emit/PDB/PortablePdbTests.cs
+1
-4
src/Debugging/Microsoft.DiaSymReader.PortablePdb/MethodMap.cs
...Debugging/Microsoft.DiaSymReader.PortablePdb/MethodMap.cs
+7
-8
src/Debugging/Microsoft.DiaSymReader.PortablePdb/SymDocument.cs
...bugging/Microsoft.DiaSymReader.PortablePdb/SymDocument.cs
+3
-5
src/Debugging/Microsoft.DiaSymReader.PortablePdb/SymMethod.cs
...Debugging/Microsoft.DiaSymReader.PortablePdb/SymMethod.cs
+2
-2
src/Test/PdbUtilities/Metadata/MetadataVisualizer.cs
src/Test/PdbUtilities/Metadata/MetadataVisualizer.cs
+3
-6
未找到文件。
src/Compilers/CSharp/Test/Emit/PDB/PortablePdbTests.cs
浏览文件 @
29969836
...
...
@@ -49,12 +49,9 @@ public static void Main()
var
name
=
mdReader
.
GetString
(
method
.
Name
);
var
spReader
=
methodDebugInfo
.
GetSequencePointEnumerator
();
TextWriter
writer
=
new
StringWriter
();
while
(
spReader
.
MoveNext
())
foreach
(
var
sp
in
methodDebugInfo
.
GetSequencePoints
())
{
var
sp
=
spReader
.
Current
;
if
(
sp
.
IsHidden
)
{
writer
.
WriteLine
(
$"
{
sp
.
Offset
}
: <hidden>"
);
...
...
src/Debugging/Microsoft.DiaSymReader.PortablePdb/MethodMap.cs
浏览文件 @
29969836
...
...
@@ -179,26 +179,25 @@ private static ImmutableArray<ImmutableArray<MethodLineExtent>> PartitionToNonOv
}
// sequence points:
var
spReader
=
methodBody
.
GetSequencePointEnumerator
();
DocumentHandle
currentDocument
=
methodBody
.
Document
;
int
minLine
=
int
.
MaxValue
;
int
maxLine
=
int
.
MinValue
;
while
(
spReader
.
MoveNext
())
foreach
(
var
sequencePoint
in
methodBody
.
GetSequencePoints
())
{
if
(
s
pReader
.
Curre
nt
.
IsHidden
)
if
(
s
equencePoi
nt
.
IsHidden
)
{
continue
;
}
int
startLine
=
s
pReader
.
Curre
nt
.
StartLine
;
int
endLine
=
s
pReader
.
Curre
nt
.
EndLine
;
int
startLine
=
s
equencePoi
nt
.
StartLine
;
int
endLine
=
s
equencePoi
nt
.
EndLine
;
if
(
s
pReader
.
Curre
nt
.
Document
!=
currentDocument
)
if
(
s
equencePoi
nt
.
Document
!=
currentDocument
)
{
yield
return
KeyValuePair
.
Create
(
currentDocument
,
new
MethodLineExtent
(
methodDebugHandle
,
minLine
,
maxLine
));
currentDocument
=
s
pReader
.
Curre
nt
.
Document
;
currentDocument
=
s
equencePoi
nt
.
Document
;
minLine
=
startLine
;
maxLine
=
endLine
;
}
...
...
src/Debugging/Microsoft.DiaSymReader.PortablePdb/SymDocument.cs
浏览文件 @
29969836
...
...
@@ -50,16 +50,14 @@ public int FindClosestLine(int line, out int closestLine)
// enumerate method sequence points:
var
body
=
mdReader
.
GetMethodDebugInformation
(
extent
.
Method
);
var
spReader
=
body
.
GetSequencePointEnumerator
();
while
(
spReader
.
MoveNext
())
foreach
(
var
sequencePoint
in
body
.
GetSequencePoints
())
{
if
(
s
pReader
.
Current
.
IsHidden
||
spReader
.
Curre
nt
.
Document
!=
Handle
)
if
(
s
equencePoint
.
IsHidden
||
sequencePoi
nt
.
Document
!=
Handle
)
{
continue
;
}
int
startLine
=
s
pReader
.
Curre
nt
.
StartLine
;
int
startLine
=
s
equencePoi
nt
.
StartLine
;
if
(
startLine
>=
line
&&
startLine
<
result
)
{
result
=
startLine
;
...
...
src/Debugging/Microsoft.DiaSymReader.PortablePdb/SymMethod.cs
浏览文件 @
29969836
...
...
@@ -33,9 +33,9 @@ internal SymMethod(SymReader symReader, MethodDebugInformationHandle handle)
DebugHandle
=
handle
;
}
private
SequencePointEnumerator
GetSequencePointEnumerator
()
private
SequencePoint
Collection
.
Enumerator
GetSequencePointEnumerator
()
{
return
SymReader
.
MetadataReader
.
GetMethodDebugInformation
(
DebugHandle
).
GetSequencePointEnumerator
();
return
SymReader
.
MetadataReader
.
GetMethodDebugInformation
(
DebugHandle
).
GetSequencePoint
s
().
Get
Enumerator
();
}
private
RootScopeData
GetRootScopeData
()
...
...
src/Test/PdbUtilities/Metadata/MetadataVisualizer.cs
浏览文件 @
29969836
...
...
@@ -545,15 +545,13 @@ private string FormatImports(ImportScope scope)
var
sb
=
new
StringBuilder
();
var
importsReader
=
scope
.
GetImportDefinitionEnumerator
();
while
(
importsReader
.
MoveNext
())
foreach
(
var
import
in
scope
.
GetImports
())
{
if
(
sb
.
Length
>
0
)
{
sb
.
Append
(
", "
);
}
var
import
=
importsReader
.
Current
;
switch
(
import
.
Kind
)
{
case
ImportDefinitionKind
.
ImportNamespace
:
...
...
@@ -1517,11 +1515,10 @@ private void WriteMethodBody()
try
{
var
spReader
=
entry
.
GetSequencePointEnumerator
();
while
(
spReader
.
MoveNext
())
foreach
(
var
sequencePoint
in
entry
.
GetSequencePoints
())
{
_writer
.
Write
(
" "
);
_writer
.
WriteLine
(
SequencePoint
(
spReader
.
Current
)
);
_writer
.
WriteLine
(
sequencePoint
);
}
}
catch
(
BadImageFormatException
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录