зеркало из https://github.com/dotnet/diagnostics.git
Various fixes from master (#554)
Verbose logging for symbol publish Change to stable version (no preview tag) Fix product version string and update docs Remove source link disabling Display internal SOS status with sosstatus command Add dumpvc to dotnet-dump/lldb commands. Remove reductant dotnet-dump error message when SOS command fails. Fixes issues: https://github.com/dotnet/diagnostics/issues/511 https://github.com/dotnet/diagnostics/issues/508 https://github.com/dotnet/diagnostics/issues/509 Change SyncBlk test not to run on xplat. Fallback to portable PDB support if getting the module's metadata importer fails. Both Windows and Portable PDBs are published. Change to Windows PDB for SOS.NETCore.dll in sos symbol zip file Publish Microsoft.Diagnostics.TestHelpers, DebugServices, Repl and RuntimeClient symbols Update symstore to 1.0.50701. Switch to BYOC pools
This commit is contained in:
Родитель
64b4d9fff5
Коммит
0adfc0301b
|
@ -1,11 +1,17 @@
|
|||
phases:
|
||||
trigger:
|
||||
- master
|
||||
- release/*
|
||||
|
||||
pr:
|
||||
- master
|
||||
- release/*
|
||||
|
||||
jobs:
|
||||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Windows
|
||||
agentOs: Windows_NT
|
||||
queue:
|
||||
name: Hosted VS2017
|
||||
parallel: 2
|
||||
osGroup: Windows_NT
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -17,11 +23,9 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: CentOS_7
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
parallel: 2
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -33,10 +37,8 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: MacOS
|
||||
agentOs: Darwin
|
||||
queue:
|
||||
name: Hosted macOS
|
||||
parallel: 2
|
||||
osGroup: MacOS
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
|
|
@ -1,12 +1,21 @@
|
|||
phases:
|
||||
trigger:
|
||||
- master
|
||||
- release/*
|
||||
|
||||
pr:
|
||||
- master
|
||||
- release/*
|
||||
|
||||
jobs:
|
||||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Windows
|
||||
agentOs: Windows_NT
|
||||
queue:
|
||||
name: Hosted VS2017
|
||||
parallel: 4
|
||||
osGroup: Windows_NT
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
_BuildArch: x64
|
||||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
_BuildArch: x64
|
||||
|
@ -23,11 +32,9 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: CentOS_7
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
parallel: 2
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -41,11 +48,10 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Linux_cross
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-cross-1735d26-20190521133857
|
||||
crossrootfsDir: '/crossrootfs/arm'
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
|
@ -55,11 +61,10 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Linux_cross64
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921
|
||||
crossrootfsDir: '/crossrootfs/arm64'
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
|
@ -69,10 +74,9 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Alpine3_6
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.6-WithNode-f4d3fe3-20181220200247
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
|
@ -82,10 +86,8 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: MacOS
|
||||
agentOs: Darwin
|
||||
queue:
|
||||
name: Hosted macOS
|
||||
parallel: 2
|
||||
osGroup: MacOS
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
|
@ -97,12 +99,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Debian_Stretch
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-3e800f1-20190521154431
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -111,12 +112,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Fedora_28
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-09ca40b-20190508143249
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -125,12 +125,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Fedora_29
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -139,12 +138,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: OpenSuse_42_1
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-42.1-c103199-20180628122439
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -153,12 +151,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: OpenSuse_42_3
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-42.3-3e800f1-20190501005344
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -167,12 +164,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Ubuntu_14_04
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-1735d26-20190521133852
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -181,12 +177,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Ubuntu_16_04
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-09ca40b-20190520220842
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -195,12 +190,11 @@ phases:
|
|||
- template: /eng/build.yml
|
||||
parameters:
|
||||
name: Ubuntu_18_04
|
||||
agentOs: Linux
|
||||
osGroup: Linux
|
||||
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-3e800f1-20190508143252
|
||||
dependsOn: CentOS_7
|
||||
testOnly: true
|
||||
queue:
|
||||
name: Hosted Ubuntu 1604
|
||||
strategy:
|
||||
matrix:
|
||||
Build_Debug:
|
||||
_BuildConfig: Debug
|
||||
|
@ -306,6 +300,7 @@ phases:
|
|||
- script: $(Build.SourcesDirectory)\eng\cipack.cmd
|
||||
-configuration Release
|
||||
-prepareMachine
|
||||
-verbosity normal
|
||||
/p:TeamName=$(_TeamName)
|
||||
/p:DotNetSignType=$(SignType)
|
||||
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
||||
|
@ -325,10 +320,10 @@ phases:
|
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet -configuration Release -verbosity detailed
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:BlobBasePath='$(Build.SourcesDirectory)/artifacts/packages/Release/NonShipping'
|
||||
/p:PDBArtifactsDirectory='$(Build.SourcesDirectory)/artifacts/SymStore/**'
|
||||
/p:BlobBasePath='$(Build.SourcesDirectory)/artifacts/packages/Release/**'
|
||||
continueOnError: true
|
||||
condition: and(succeeded(), eq(variables['PublishSymbols'], 'true'))
|
||||
|
||||
# Publish package and log build artifacts
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<!-- Opt-out repo features -->
|
||||
<UsingToolXliff>false</UsingToolXliff>
|
||||
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
|
||||
<UsingToolSymbolUploader>true</UsingToolSymbolUploader>
|
||||
|
||||
<!-- Build tools -->
|
||||
<MicrosoftNetCompilersVersion>3.0.0</MicrosoftNetCompilersVersion>
|
||||
|
@ -22,7 +23,7 @@
|
|||
<MicrosoftWin32PrimitivesVersion>4.3.0</MicrosoftWin32PrimitivesVersion>
|
||||
|
||||
<!-- Other libs -->
|
||||
<MicrosoftSymbolStoreVersion>1.0.41901</MicrosoftSymbolStoreVersion>
|
||||
<MicrosoftSymbolStoreVersion>1.0.50701</MicrosoftSymbolStoreVersion>
|
||||
<MicrosoftDiagnosticsRuntimeVersion>1.1.46104</MicrosoftDiagnosticsRuntimeVersion>
|
||||
<MicrosoftDiaSymReaderNativePackageVersion>1.7.0</MicrosoftDiaSymReaderNativePackageVersion>
|
||||
<MicrosoftDiagnosticsTracingTraceEventVersion>2.0.44</MicrosoftDiagnosticsTracingTraceEventVersion>
|
||||
|
|
220
eng/build.yml
220
eng/build.yml
|
@ -1,106 +1,132 @@
|
|||
# build.yml
|
||||
# Description: Defines the build phase
|
||||
# Parameters:
|
||||
# agentOs: [Windows_NT (default), Linux, OSX] Used in templates to define variables which are OS specific
|
||||
# dockerImage: If defined, specifies docker image to run build steps in
|
||||
# matrix: build matrix
|
||||
# enableTelemetry: send telemetry if build is not a PR or CI build
|
||||
# queue YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#queue
|
||||
# variables YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#phase
|
||||
|
||||
parameters:
|
||||
# Job name
|
||||
name: ''
|
||||
agentOs: Windows_NT
|
||||
dockerImage: ''
|
||||
crossrootfsDir: ''
|
||||
testOnly: false
|
||||
dependsOn: ''
|
||||
# send telemetry
|
||||
enableTelemetry: true
|
||||
# install Microbuild plugin if not a public build
|
||||
enableMicrobuild: true
|
||||
# queue YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#queue
|
||||
queue: {}
|
||||
# variables YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#phase
|
||||
|
||||
# Agent OS (Windows_NT, Linux, MacOS, FreeBSD)
|
||||
osGroup: Windows_NT
|
||||
|
||||
# Additional variables
|
||||
variables: {}
|
||||
|
||||
# Common conditionals: There are a number of common conditionals that are useful. Generally these are used to decide what resources can be accessed,
|
||||
# or what logic should be applied based on the context the build is being run in.
|
||||
# - eq/ne(variables['Agent.Os'], 'Windows_NT') - Running/not running on a windows machine
|
||||
# - eq/ne(variables['System.TeamProject'], 'public') - Running/not running on the dotnet public VSTS project
|
||||
# - and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest') - Not running in public and not a pull request.
|
||||
# - or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest') - Running in public or a pull request.
|
||||
# Build strategy - matrix
|
||||
strategy: ''
|
||||
|
||||
phases:
|
||||
- template: /eng/common/templates/phases/base.yml
|
||||
# Optional: Job timeout
|
||||
timeoutInMinutes: 180
|
||||
|
||||
# Optional: Docker image to use
|
||||
dockerImage: ''
|
||||
|
||||
# Optional: ROOTFS_DIR to use
|
||||
crossrootfsDir: ''
|
||||
|
||||
# Optional: test only job if true
|
||||
testOnly: false
|
||||
|
||||
# Depends on
|
||||
dependsOn: ''
|
||||
|
||||
jobs:
|
||||
- template: /eng/common/templates/job/job.yml
|
||||
parameters:
|
||||
enableTelemetry: ${{ parameters.enableTelemetry }}
|
||||
enableMicrobuild: ${{ parameters.enableMicrobuild }}
|
||||
name: ${{ parameters.name }}
|
||||
agentOs: ${{ parameters.agentOs }}
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
queue: ${{ parameters.queue }}
|
||||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
||||
enableMicrobuild: true
|
||||
enableTelemetry: true
|
||||
helixRepo: dotnet/sdk
|
||||
|
||||
pool:
|
||||
# Public Linux Build Pool
|
||||
${{ if and(eq(parameters.osGroup, 'Linux'), eq(variables['System.TeamProject'], 'public')) }}:
|
||||
name: NetCorePublic-Pool
|
||||
queue: BuildPool.Ubuntu.1604.Amd64.Open
|
||||
|
||||
# Official Build Linux Pool
|
||||
${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}:
|
||||
name: NetCoreInternal-Pool
|
||||
queue: BuildPool.Ubuntu.1604.Amd64
|
||||
|
||||
# FreeBSD builds only in the internal project
|
||||
${{ if and(eq(parameters.osGroup, 'FreeBSD'), ne(variables['System.TeamProject'], 'public')) }}:
|
||||
name: dnceng-freebsd-internal
|
||||
|
||||
# Public OSX Build Pool
|
||||
${{ if and(eq(parameters.osGroup, 'MacOS'), ne(variables['System.TeamProject'], 'public')) }}:
|
||||
name: Hosted Mac Internal
|
||||
|
||||
# Official Build OSX Pool
|
||||
${{ if and(eq(parameters.osGroup, 'MacOS'), eq(variables['System.TeamProject'], 'public')) }}:
|
||||
name: Hosted MacOS
|
||||
|
||||
# Official Build Windows Pool
|
||||
${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(variables['System.TeamProject'], 'public')) }}:
|
||||
name: NetCoreInternal-Pool
|
||||
queue: BuildPool.Windows.10.Amd64.VS2017
|
||||
|
||||
# Public Windows Build Pool
|
||||
${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(variables['System.TeamProject'], 'public')) }}:
|
||||
name: NetCorePublic-Pool
|
||||
queue: BuildPool.Windows.10.Amd64.VS2017.Open
|
||||
|
||||
${{ if ne(parameters.strategy, '') }}:
|
||||
strategy: ${{ parameters.strategy }}
|
||||
|
||||
${{ if ne(parameters.dependsOn, '') }}:
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
variables:
|
||||
${{ insert }}: ${{ parameters.variables }}
|
||||
_PortableLinuxBuild: CentOS_7_$(_BuildArch)_$(_BuildConfig)
|
||||
_DockerImageName: ${{ parameters.dockerImage }}
|
||||
_PhaseName : ${{ parameters.name }}
|
||||
_HelixType: build/product
|
||||
_HelixBuildConfig: $(_BuildConfig)
|
||||
- ${{ insert }}: ${{ parameters.variables }}
|
||||
- _PortableLinuxBuild: CentOS_7_$(_BuildArch)_$(_BuildConfig)
|
||||
- _DockerImageName: ${{ parameters.dockerImage }}
|
||||
- _PhaseName : ${{ parameters.name }}
|
||||
- _HelixType: build/product
|
||||
- _HelixBuildConfig: $(_BuildConfig)
|
||||
|
||||
# Only enable publishing in non-public, non PR scenarios.
|
||||
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
_HelixSource: official/dotnet/arcade/$(Build.SourceBranch)
|
||||
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
_HelixSource: pr/dotnet/arcade/$(Build.SourceBranch)
|
||||
# Only enable publishing in non-public, non PR scenarios.
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- _HelixSource: official/dotnet/arcade/$(Build.SourceBranch)
|
||||
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- _HelixSource: pr/dotnet/arcade/$(Build.SourceBranch)
|
||||
|
||||
${{ if eq(parameters.testOnly, 'true') }}:
|
||||
_LinuxScript: $(Build.SourcesDirectory)/eng/citest.sh
|
||||
${{ if ne(parameters.testOnly, 'true') }}:
|
||||
_LinuxScript: $(Build.SourcesDirectory)/eng/cibuild.sh
|
||||
- ${{ if eq(parameters.testOnly, 'true') }}:
|
||||
- _LinuxScript: $(Build.SourcesDirectory)/eng/citest.sh
|
||||
- ${{ if ne(parameters.testOnly, 'true') }}:
|
||||
- _LinuxScript: $(Build.SourcesDirectory)/eng/cibuild.sh
|
||||
|
||||
${{ if eq(variables['Build.Reason'], 'Schedule') }}:
|
||||
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
||||
_DailyTest: -daily-test
|
||||
${{ if ne(parameters.agentOs, 'Windows_NT') }}:
|
||||
_DailyTest: --daily-test
|
||||
${{ if ne(variables['Build.Reason'], 'Schedule') }}:
|
||||
_DailyTest: ''
|
||||
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
|
||||
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
|
||||
- _DailyTest: -daily-test
|
||||
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
|
||||
- _DailyTest: --daily-test
|
||||
- ${{ if ne(variables['Build.Reason'], 'Schedule') }}:
|
||||
- _DailyTest: ''
|
||||
|
||||
${{ if eq(parameters.crossrootfsDir, '') }}:
|
||||
_RootFs: ''
|
||||
# This is only required for cross builds.
|
||||
${{ if ne(parameters.crossrootfsDir, '') }}:
|
||||
_RootFs: --rootfs ${{ parameters.crossrootfsDir }}
|
||||
# This is only required for cross builds.
|
||||
- ${{ if eq(parameters.crossrootfsDir, '') }}:
|
||||
- _RootFs: ''
|
||||
- ${{ if ne(parameters.crossrootfsDir, '') }}:
|
||||
- _RootFs: --rootfs ${{ parameters.crossrootfsDir }}
|
||||
|
||||
steps:
|
||||
- template: /eng/common/templates/steps/run-on-windows.yml
|
||||
parameters:
|
||||
agentOs: ${{ parameters.agentOs }}
|
||||
steps:
|
||||
- script: $(Build.SourcesDirectory)\eng\cibuild.cmd $(_DailyTest)
|
||||
-configuration $(_BuildConfig)
|
||||
-architecture $(_BuildArch)
|
||||
-prepareMachine
|
||||
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
||||
displayName: Build / Test
|
||||
condition: succeeded()
|
||||
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
|
||||
- script: $(Build.SourcesDirectory)\eng\cibuild.cmd $(_DailyTest)
|
||||
-configuration $(_BuildConfig)
|
||||
-architecture $(_BuildArch)
|
||||
-prepareMachine
|
||||
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
||||
displayName: Build / Test
|
||||
condition: succeeded()
|
||||
|
||||
- ${{ if eq(parameters.agentOs, 'Linux') }}:
|
||||
- ${{ if eq(parameters.osGroup, 'Linux') }}:
|
||||
- ${{ if eq(parameters.testOnly, 'true') }}:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Linux-x64 Artifacts
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Linux Artifacts
|
||||
inputs:
|
||||
artifactName: $(_PortableLinuxBuild)
|
||||
downloadPath: '$(System.ArtifactsDirectory)'
|
||||
condition: succeeded()
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Place Linux-x64 Artifacts
|
||||
inputs:
|
||||
sourceFolder: '$(System.ArtifactsDirectory)/$(_PortableLinuxBuild)'
|
||||
targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.x64.$(_BuildConfig)'
|
||||
targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.$(_BuildArch).$(_BuildConfig)'
|
||||
condition: succeeded()
|
||||
|
||||
- script: $(Build.SourcesDirectory)/eng/docker-build.sh
|
||||
|
@ -116,7 +142,7 @@ phases:
|
|||
displayName: Docker Build / Test
|
||||
condition: succeeded()
|
||||
|
||||
- ${{ if eq(parameters.agentOs, 'Darwin') }}:
|
||||
- ${{ if eq(parameters.osGroup, 'MacOS') }}:
|
||||
- script: $(Build.SourcesDirectory)/eng/cibuild.sh $(_DailyTest)
|
||||
--configuration $(_BuildConfig)
|
||||
--architecture $(_BuildArch)
|
||||
|
@ -126,14 +152,32 @@ phases:
|
|||
condition: succeeded()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Upload Artifacts
|
||||
displayName: Publish Build Artifacts
|
||||
inputs:
|
||||
pathtoPublish: '$(Build.SourcesDirectory)/artifacts/$(_PublishArtifacts)'
|
||||
artifactName: $(_PhaseName)_$(_BuildArch)_$(_BuildConfig)
|
||||
condition: ne(variables['_PublishArtifacts'], '')
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Artifacts on failure
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/bin'
|
||||
PublishLocation: Container
|
||||
ArtifactName: Artifacts_$(_PhaseName)_$(_BuildArch)_$(_BuildConfig)
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Dump Artifacts on failure
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/tmp/$(_BuildConfig)/dumps'
|
||||
PublishLocation: Container
|
||||
ArtifactName: Dumps_$(_PhaseName)_$(_BuildArch)_$(_BuildConfig)
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather Build Logs
|
||||
displayName: Gather Logs
|
||||
inputs:
|
||||
sourceFolder: '$(Build.SourcesDirectory)/artifacts'
|
||||
contents: '?(log|TestResults)/**'
|
||||
|
@ -142,7 +186,7 @@ phases:
|
|||
condition: always()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Logs to VSTS
|
||||
displayName: Publish Logs
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
|
||||
PublishLocation: Container
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<IsShipping>true</IsShipping>
|
||||
<IsShippingAssembly>false</IsShippingAssembly>
|
||||
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
|
||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -5,8 +5,12 @@
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<NoWarn>;1591;1701</NoWarn>
|
||||
<Description>Diagnostics debug services</Description>
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageTags>Diagnostic</PackageTags>
|
||||
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<IsShippingAssembly>true</IsShippingAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,8 +5,12 @@
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<NoWarn>;1591;1701</NoWarn>
|
||||
<Description>Diagnostic utility functions and helpers</Description>
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageTags>Diagnostic</PackageTags>
|
||||
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<IsShippingAssembly>true</IsShippingAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
<Description>Diagnostic test support</Description>
|
||||
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
|
||||
<PackageTags>tests</PackageTags>
|
||||
<DebugType>embedded</DebugType>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<IsShippingAssembly>true</IsShippingAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RootNamespace>Microsoft.Diagnostics.Tools.RuntimeClient</RootNamespace>
|
||||
<Description>.NET Core Diagnostics Runtime Client</Description>
|
||||
<IsPackable>True</IsPackable>
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageTags>Diagnostic</PackageTags>
|
||||
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<IsShippingAssembly>true</IsShippingAssembly>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -318,7 +318,7 @@ namespace SOS
|
|||
int result = commandFunc(_interface, arguments ?? "");
|
||||
if (result != 0)
|
||||
{
|
||||
throw new InvalidOperationException($"SOS command FAILED 0x{result:X8}");
|
||||
Trace.TraceError($"SOS command FAILED 0x{result:X8}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -669,9 +669,27 @@ namespace SOS
|
|||
uint* index,
|
||||
ulong* baseAddress)
|
||||
{
|
||||
Write(index);
|
||||
Write(baseAddress);
|
||||
return E_NOTIMPL;
|
||||
Debug.Assert(startIndex == 0);
|
||||
|
||||
// This causes way too many problems on Linux because of various
|
||||
// bugs in the CLRMD ELF dump reader module enumeration and isn't
|
||||
// necessary on linux anyway.
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
// Find the module that contains the offset.
|
||||
uint i = 0;
|
||||
foreach (ModuleInfo module in DataReader.EnumerateModules())
|
||||
{
|
||||
if (offset >= module.ImageBase && offset < (module.ImageBase + module.FileSize))
|
||||
{
|
||||
Write(index, i);
|
||||
Write(baseAddress, module.ImageBase);
|
||||
return S_OK;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
internal unsafe int GetModuleNames(
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<NoWarn>;1591;1701</NoWarn>
|
||||
<Description>.NET Core SOS</Description>
|
||||
<IsShippingAssembly>true</IsShippingAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<PropertyGroup>
|
||||
<GalleryDir>$(ArtifactsBinDir)\gallery</GalleryDir>
|
||||
<GallerySubDir>$(GalleryDir)\$(FileVersion)</GallerySubDir>
|
||||
<SOSNETCorePath>$(ArtifactsBinDir)\SOS.NETCore\$(Configuration)\netstandard2.0\publish</SOSNETCorePath>
|
||||
<SOSNETCorePath>$(ArtifactsBinDir)\SOS.NETCore\$(Configuration)\$(TargetFramework)\publish</SOSNETCorePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -120,11 +120,10 @@
|
|||
<Target Name="GenerateSymbolsZip">
|
||||
<PropertyGroup>
|
||||
<SymbolsDir>$(ArtifactsBinDir)\symbols</SymbolsDir>
|
||||
<SOSNETCorePath>$(ArtifactsBinDir)\SOS.NETCore\$(Configuration)\netstandard2.0\publish</SOSNETCorePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ZipSymbolFiles Include="$(SOSNETCorePath)\*.pdb">
|
||||
<ZipSymbolFiles Include="$(ArtifactsSymStoreDirectory)\SOS.NETCore\$(TargetFramework)\*.pdb">
|
||||
<TargetPath>$(SymbolsDir)</TargetPath>
|
||||
</ZipSymbolFiles>
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include <coreclrhost.h>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <mach-o/dyld.h>
|
||||
|
@ -231,7 +230,7 @@ static bool GetEntrypointExecutableAbsolutePath(std::string& entrypointExecutabl
|
|||
/**********************************************************************\
|
||||
* Returns the coreclr module/runtime directory of the target.
|
||||
\**********************************************************************/
|
||||
static HRESULT GetCoreClrDirectory(std::string& coreClrDirectory)
|
||||
HRESULT GetCoreClrDirectory(std::string& coreClrDirectory)
|
||||
{
|
||||
#ifdef FEATURE_PAL
|
||||
LPCSTR directory = g_ExtServices->GetCoreClrDirectory();
|
||||
|
@ -1112,6 +1111,9 @@ HRESULT SymbolReader::LoadSymbolsForWindowsPDB(___in IMetaDataImport* pMD, ___in
|
|||
if (m_pSymReader != NULL)
|
||||
return S_OK;
|
||||
|
||||
if (pMD == nullptr)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (g_pSymBinder == nullptr)
|
||||
{
|
||||
// Ignore errors to be able to run under a managed host (dotnet-dump).
|
||||
|
|
|
@ -60,9 +60,13 @@ static const char *MetadataHelperClassName = "SOS.MetadataHelper";
|
|||
|
||||
extern HMODULE g_hInstance;
|
||||
extern LPCSTR g_hostRuntimeDirectory;
|
||||
extern LPCSTR g_dacFilePath;
|
||||
extern LPCSTR g_dbiFilePath;
|
||||
extern LPCSTR g_tmpPath;
|
||||
extern SOSNetCoreCallbacks g_SOSNetCoreCallbacks;
|
||||
|
||||
extern HRESULT GetCoreClrDirectory(LPWSTR modulePath, int modulePathSize);
|
||||
extern HRESULT GetCoreClrDirectory(std::string& coreClrDirectory);
|
||||
extern LPCSTR GetDacFilePath();
|
||||
extern LPCSTR GetDbiFilePath();
|
||||
extern BOOL IsHostingInitialized();
|
||||
|
|
|
@ -212,6 +212,8 @@ EXPORTS
|
|||
pathto=PathTo
|
||||
ProcInfo
|
||||
procinfo=ProcInfo
|
||||
SOSStatus
|
||||
sosstatus=SOSStatus
|
||||
VerifyStackTrace
|
||||
WatsonBuckets
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ StopOnCatch
|
|||
SetHostRuntime
|
||||
SetSymbolServer
|
||||
SOSFlush
|
||||
SOSStatus
|
||||
SyncBlk
|
||||
Threads
|
||||
ThreadState
|
||||
|
|
|
@ -7293,7 +7293,7 @@ public:
|
|||
IfFailRet(g_sos->GetModule(mod, &pModule));
|
||||
|
||||
ToRelease<IMetaDataImport> pMDImport = NULL;
|
||||
IfFailRet(pModule->QueryInterface(IID_IMetaDataImport, (LPVOID *) &pMDImport));
|
||||
pModule->QueryInterface(IID_IMetaDataImport, (LPVOID *) &pMDImport);
|
||||
|
||||
IfFailRet(pSymbolReader->LoadSymbols(pMDImport, pModule));
|
||||
|
||||
|
@ -10037,10 +10037,10 @@ DECLARE_API(DumpGCData)
|
|||
* Routine Description: *
|
||||
* *
|
||||
* This function is called to dump the build number and type of the *
|
||||
* mscoree.dll *
|
||||
* runtime and SOS. *
|
||||
* *
|
||||
\**********************************************************************/
|
||||
DECLARE_API (EEVersion)
|
||||
DECLARE_API(EEVersion)
|
||||
{
|
||||
INIT_API();
|
||||
|
||||
|
@ -10054,23 +10054,27 @@ DECLARE_API (EEVersion)
|
|||
VS_FIXEDFILEINFO version;
|
||||
|
||||
BOOL ret = GetEEVersion(&version, fileVersionBuffer.GetPtr(), fileVersionBufferSize);
|
||||
if (ret)
|
||||
if (ret)
|
||||
{
|
||||
if (version.dwFileVersionMS != (DWORD)-1)
|
||||
{
|
||||
ExtOut("%u.%u.%u.%u",
|
||||
HIWORD(version.dwFileVersionMS),
|
||||
LOWORD(version.dwFileVersionMS),
|
||||
HIWORD(version.dwFileVersionLS),
|
||||
LOWORD(version.dwFileVersionLS));
|
||||
HIWORD(version.dwFileVersionMS),
|
||||
LOWORD(version.dwFileVersionMS),
|
||||
HIWORD(version.dwFileVersionLS),
|
||||
LOWORD(version.dwFileVersionLS));
|
||||
|
||||
if (IsRuntimeVersion(version, 3)) {
|
||||
ExtOut(" (3.x runtime)");
|
||||
}
|
||||
|
||||
#ifndef FEATURE_PAL
|
||||
if (version.dwFileFlags & VS_FF_DEBUG)
|
||||
{
|
||||
if (version.dwFileFlags & VS_FF_DEBUG) {
|
||||
ExtOut(" checked or debug build");
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL fRet = IsRetailBuild ((size_t)g_moduleInfo[eef].baseAddr);
|
||||
{
|
||||
BOOL fRet = IsRetailBuild((size_t)g_moduleInfo[eef].baseAddr);
|
||||
if (fRet)
|
||||
ExtOut(" retail");
|
||||
else
|
||||
|
@ -10079,22 +10083,20 @@ DECLARE_API (EEVersion)
|
|||
#endif
|
||||
ExtOut("\n");
|
||||
|
||||
if (fileVersionBuffer[0] != '\0')
|
||||
{
|
||||
if (fileVersionBuffer[0] != '\0') {
|
||||
ExtOut("%s\n", fileVersionBuffer.GetPtr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!InitializeHeapData ())
|
||||
|
||||
if (!InitializeHeapData())
|
||||
ExtOut("GC Heap not initialized, so GC mode is not determined yet.\n");
|
||||
else if (IsServerBuild())
|
||||
ExtOut("Server mode with %d gc heaps\n", GetGcHeapCount());
|
||||
else if (IsServerBuild())
|
||||
ExtOut("Server mode with %d gc heaps\n", GetGcHeapCount());
|
||||
else
|
||||
ExtOut("Workstation mode\n");
|
||||
|
||||
if (!GetGcStructuresValid())
|
||||
{
|
||||
if (!GetGcStructuresValid()) {
|
||||
ExtOut("In plan phase of garbage collection\n");
|
||||
}
|
||||
|
||||
|
@ -10106,18 +10108,16 @@ DECLARE_API (EEVersion)
|
|||
if (sosVersion.dwFileVersionMS != (DWORD)-1)
|
||||
{
|
||||
ExtOut("SOS Version: %u.%u.%u.%u",
|
||||
HIWORD(sosVersion.dwFileVersionMS),
|
||||
LOWORD(sosVersion.dwFileVersionMS),
|
||||
HIWORD(sosVersion.dwFileVersionLS),
|
||||
LOWORD(sosVersion.dwFileVersionLS));
|
||||
HIWORD(sosVersion.dwFileVersionMS),
|
||||
LOWORD(sosVersion.dwFileVersionMS),
|
||||
HIWORD(sosVersion.dwFileVersionLS),
|
||||
LOWORD(sosVersion.dwFileVersionLS));
|
||||
|
||||
if (sosVersion.dwFileFlags & VS_FF_DEBUG)
|
||||
{
|
||||
ExtOut(" debug build");
|
||||
if (sosVersion.dwFileFlags & VS_FF_DEBUG) {
|
||||
ExtOut(" debug build");
|
||||
}
|
||||
else
|
||||
{
|
||||
ExtOut(" retail build");
|
||||
else {
|
||||
ExtOut(" retail build");
|
||||
}
|
||||
ExtOut("\n");
|
||||
}
|
||||
|
@ -10126,6 +10126,40 @@ DECLARE_API (EEVersion)
|
|||
return Status;
|
||||
}
|
||||
|
||||
/**********************************************************************\
|
||||
* Routine Description: *
|
||||
* *
|
||||
* This function the global SOS status *
|
||||
* *
|
||||
\**********************************************************************/
|
||||
DECLARE_API(SOSStatus)
|
||||
{
|
||||
INIT_API_NOEE();
|
||||
|
||||
if (g_targetMachine != nullptr) {
|
||||
ExtOut("Target platform: %04x Context size %04x\n", g_targetMachine->GetPlatform(), g_targetMachine->GetContextSize());
|
||||
}
|
||||
if (g_tmpPath != nullptr) {
|
||||
ExtOut("Temp path: %s\n", g_tmpPath);
|
||||
}
|
||||
if (g_dacFilePath != nullptr) {
|
||||
ExtOut("DAC file path: %s\n", g_dacFilePath);
|
||||
}
|
||||
if (g_dbiFilePath != nullptr) {
|
||||
ExtOut("DBI file path: %s\n", g_dbiFilePath);
|
||||
}
|
||||
if (g_hostRuntimeDirectory != nullptr) {
|
||||
ExtOut("Host runtime path: %s\n", g_hostRuntimeDirectory);
|
||||
}
|
||||
std::string coreclrDirectory;
|
||||
if (SUCCEEDED(GetCoreClrDirectory(coreclrDirectory))) {
|
||||
ExtOut("Runtime path: %s\n", coreclrDirectory.c_str());
|
||||
}
|
||||
DisplaySymbolStore();
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_PAL
|
||||
/**********************************************************************\
|
||||
* Routine Description: *
|
||||
|
|
|
@ -63,6 +63,7 @@ const char * const CorElementTypeNamespace[ELEMENT_TYPE_MAX]=
|
|||
|
||||
IXCLRDataProcess *g_clrData = NULL;
|
||||
ISOSDacInterface *g_sos = NULL;
|
||||
IXCLRDataProcess *g_clrDataProcess = NULL;
|
||||
ICorDebugProcess *g_pCorDebugProcess = NULL;
|
||||
|
||||
#ifndef IfFailRet
|
||||
|
@ -3315,16 +3316,22 @@ bool IsRuntimeVersion(DWORD major)
|
|||
VS_FIXEDFILEINFO fileInfo;
|
||||
if (GetEEVersion(&fileInfo, nullptr, 0))
|
||||
{
|
||||
switch (major)
|
||||
{
|
||||
case 5:
|
||||
return HIWORD(fileInfo.dwFileVersionMS) == 5;
|
||||
case 3:
|
||||
return HIWORD(fileInfo.dwFileVersionMS) == 4 && LOWORD(fileInfo.dwFileVersionMS) == 700;
|
||||
default:
|
||||
_ASSERTE(FALSE);
|
||||
break;
|
||||
}
|
||||
return IsRuntimeVersion(fileInfo, major);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsRuntimeVersion(VS_FIXEDFILEINFO& fileInfo, DWORD major)
|
||||
{
|
||||
switch (major)
|
||||
{
|
||||
case 5:
|
||||
return HIWORD(fileInfo.dwFileVersionMS) == 5;
|
||||
case 3:
|
||||
return HIWORD(fileInfo.dwFileVersionMS) == 4 && LOWORD(fileInfo.dwFileVersionMS) == 700;
|
||||
default:
|
||||
_ASSERTE(FALSE);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -3872,10 +3879,9 @@ void ResetGlobals(void)
|
|||
|
||||
static HRESULT GetClrDataProcess()
|
||||
{
|
||||
static IXCLRDataProcess* clrDataProcess = NULL;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
if (clrDataProcess == NULL)
|
||||
if (g_clrDataProcess == NULL)
|
||||
{
|
||||
LPCSTR dacFilePath = GetDacFilePath();
|
||||
if (dacFilePath == nullptr)
|
||||
|
@ -3894,18 +3900,18 @@ static HRESULT GetClrDataProcess()
|
|||
return CORDBG_E_MISSING_DEBUGGER_EXPORTS;
|
||||
}
|
||||
ICLRDataTarget *target = new DataTarget();
|
||||
hr = pfnCLRDataCreateInstance(__uuidof(IXCLRDataProcess), target, (void**)&clrDataProcess);
|
||||
hr = pfnCLRDataCreateInstance(__uuidof(IXCLRDataProcess), target, (void**)&g_clrDataProcess);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
clrDataProcess = NULL;
|
||||
g_clrDataProcess = NULL;
|
||||
return hr;
|
||||
}
|
||||
ULONG32 flags = 0;
|
||||
clrDataProcess->GetOtherNotificationFlags(&flags);
|
||||
g_clrDataProcess->GetOtherNotificationFlags(&flags);
|
||||
flags |= (CLRDATA_NOTIFY_ON_MODULE_LOAD | CLRDATA_NOTIFY_ON_MODULE_UNLOAD | CLRDATA_NOTIFY_ON_EXCEPTION);
|
||||
clrDataProcess->SetOtherNotificationFlags(flags);
|
||||
g_clrDataProcess->SetOtherNotificationFlags(flags);
|
||||
}
|
||||
g_clrData = clrDataProcess;
|
||||
g_clrData = g_clrDataProcess;
|
||||
g_clrData->AddRef();
|
||||
g_clrData->Flush();
|
||||
|
||||
|
@ -3921,7 +3927,6 @@ static HRESULT GetClrDataProcess()
|
|||
//
|
||||
HRESULT LoadClrDebugDll(void)
|
||||
{
|
||||
static IXCLRDataProcess* clrDataProcess = NULL;
|
||||
HRESULT hr = GetClrDataProcess();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
@ -3929,23 +3934,20 @@ HRESULT LoadClrDebugDll(void)
|
|||
return hr;
|
||||
#else
|
||||
// Fail if ExtensionApis wasn't initialized because we are hosted under dotnet-dump
|
||||
if (Ioctl == nullptr)
|
||||
{
|
||||
if (Ioctl == nullptr) {
|
||||
return hr;
|
||||
}
|
||||
// Try getting the DAC interface from dbgeng if the above fails on Windows
|
||||
WDBGEXTS_CLR_DATA_INTERFACE Query;
|
||||
|
||||
Query.Iid = &__uuidof(IXCLRDataProcess);
|
||||
if (!Ioctl(IG_GET_CLR_DATA_INTERFACE, &Query, sizeof(Query)))
|
||||
{
|
||||
if (!Ioctl(IG_GET_CLR_DATA_INTERFACE, &Query, sizeof(Query))) {
|
||||
return hr;
|
||||
}
|
||||
g_clrData = (IXCLRDataProcess*)Query.Iface;
|
||||
g_clrData->Flush();
|
||||
#endif
|
||||
}
|
||||
|
||||
hr = g_clrData->QueryInterface(__uuidof(ISOSDacInterface), (void**)&g_sos);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
@ -5487,7 +5489,7 @@ GetLineByOffset(
|
|||
IfFailRet(ConvertNativeToIlOffset(offset, &pModule, &methodToken, &methodOffs));
|
||||
|
||||
ToRelease<IMetaDataImport> pMDImport(NULL);
|
||||
IfFailRet(pModule->QueryInterface(IID_IMetaDataImport, (LPVOID *) &pMDImport));
|
||||
pModule->QueryInterface(IID_IMetaDataImport, (LPVOID *) &pMDImport);
|
||||
|
||||
SymbolReader symbolReader;
|
||||
IfFailRet(symbolReader.LoadSymbols(pMDImport, pModule));
|
||||
|
|
|
@ -36,6 +36,7 @@ inline void RestoreSOToleranceState() {}
|
|||
|
||||
#include "cordebug.h"
|
||||
#include "static_assert.h"
|
||||
#include <string>
|
||||
#include "hostcoreclr.h"
|
||||
|
||||
typedef LPCSTR LPCUTF8;
|
||||
|
@ -1558,6 +1559,7 @@ HRESULT InitCorDebugInterface();
|
|||
VOID UninitCorDebugInterface();
|
||||
BOOL GetEEVersion(VS_FIXEDFILEINFO* pFileInfo, char* fileVersionBuffer, int fileVersionBufferSizeInBytes);
|
||||
bool IsRuntimeVersion(DWORD major);
|
||||
bool IsRuntimeVersion(VS_FIXEDFILEINFO& fileInfo, DWORD major);
|
||||
#ifndef FEATURE_PAL
|
||||
BOOL IsRetailBuild (size_t base);
|
||||
BOOL GetSOSVersion(VS_FIXEDFILEINFO *pFileInfo);
|
||||
|
|
|
@ -147,6 +147,7 @@ sosCommandInitialize(lldb::SBDebugger debugger)
|
|||
interpreter.AddCommand("dumpmodule", new sosCommand("DumpModule"), "Displays information about a EE module structure at the specified address.");
|
||||
interpreter.AddCommand("dumpmt", new sosCommand("DumpMT"), "Displays information about a method table at the specified address.");
|
||||
interpreter.AddCommand("dumpobj", new sosCommand("DumpObj"), "Displays info about an object at the specified address.");
|
||||
interpreter.AddCommand("dumpvc", new sosCommand("DumpVC"), "Displays info about the fields of a value class.");
|
||||
interpreter.AddCommand("dumpstack", new sosCommand("DumpStack"), "Displays a native and managed stack trace.");
|
||||
interpreter.AddCommand("dso", new sosCommand("DumpStackObjects"), "Displays all managed objects found within the bounds of the current stack.");
|
||||
interpreter.AddCommand("eeheap", new sosCommand("EEHeap"), "Displays info about process memory consumed by internal runtime data structures.");
|
||||
|
@ -169,5 +170,6 @@ sosCommandInitialize(lldb::SBDebugger debugger)
|
|||
interpreter.AddCommand("setsymbolserver", new sosCommand("SetSymbolServer"), "Enables the symbol server support ");
|
||||
interpreter.AddCommand("sympath", new sosCommand("SetSymbolServer", "-sympath"), "Add server, cache and directory paths in the Windows symbol path format.");
|
||||
interpreter.AddCommand("soshelp", new sosCommand("Help"), "Displays all available commands when no parameter is specified, or displays detailed help information about the specified command. soshelp <command>");
|
||||
interpreter.AddCommand("sosstatus", new sosCommand("SOSStatus"), "Displays the global SOS status.");
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace Microsoft.Diagnostics.Tools.Dump
|
|||
[Command(Name = "dumpmodule", AliasExpansion = "DumpModule", Help = "Displays information about a EE module structure at the specified address.")]
|
||||
[Command(Name = "dumpmt", AliasExpansion = "DumpMT", Help = "Displays information about a method table at the specified address.")]
|
||||
[Command(Name = "dumpobj", AliasExpansion = "DumpObj", Help = "Displays info about an object at the specified address.")]
|
||||
[Command(Name = "dumpvc", AliasExpansion = "DumpVC", Help = "Displays info about the fields of a value class.")]
|
||||
[Command(Name = "dumpstackobjects", AliasExpansion = "DumpStackObjects", Help = "Displays all managed objects found within the bounds of the current stack.")]
|
||||
[CommandAlias(Name = "dso")]
|
||||
[Command(Name = "eeheap", AliasExpansion = "EEHeap", Help = "Displays info about process memory consumed by internal runtime data structures.")]
|
||||
|
@ -38,6 +39,7 @@ namespace Microsoft.Diagnostics.Tools.Dump
|
|||
[Command(Name = "name2ee", AliasExpansion = "Name2EE", Help = "Displays the MethodTable structure and EEClass structure for the specified type or method in the specified module.")]
|
||||
[Command(Name = "printexception", AliasExpansion = "PrintException", Help = "Displays and formats fields of any object derived from the Exception class at the specified address.")]
|
||||
[CommandAlias(Name = "pe")]
|
||||
[Command(Name = "sosstatus", AliasExpansion = "SOSStatus", Help = "Displays the global SOS status.")]
|
||||
[Command(Name = "syncblk", AliasExpansion = "SyncBlk", Help = "Displays the SyncBlock holder info.")]
|
||||
[Command(Name = "histclear", AliasExpansion = "HistClear", Help = "Releases any resources used by the family of Hist commands.")]
|
||||
[Command(Name = "histinit", AliasExpansion = "HistInit", Help = "Initializes the SOS structures from the stress log saved in the debuggee.")]
|
||||
|
|
Загрузка…
Ссылка в новой задаче