From ef685ada8a2515dbce02e46b1741b9d1c36cca0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Fri, 8 Nov 2024 10:05:34 +0100 Subject: [PATCH] [mono] Check in offsets files used for AOT cross compilers (#109612) This allows us to remove a join point in the VMR build. Instead of generating the offsets during the AOT cross compiler build we use the checked in files and change the existing CI job to validate that the generated file matches the checked in ones. Fixes https://github.com/dotnet/source-build/issues/3701 --- eng/pipelines/common/global-build-job.yml | 7 - .../build-runtime-tests-and-send-to-helix.yml | 1 - .../templates/runtimes/run-test-job.yml | 1 - eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +- eng/pipelines/coreclr/perf_slow.yml | 2 +- eng/pipelines/runtime-official.yml | 76 +--- eng/pipelines/runtime.yml | 50 +-- src/mono/CMakeLists.txt | 6 - src/mono/mono.proj | 34 +- src/mono/mono/metadata/abi-details.h | 2 +- .../offsets-tool => offsets}/.gitignore | 0 .../{tools/offsets-tool => offsets}/README.md | 0 .../mono/offsets/aarch64-apple-darwin10.h | 326 +++++++++++++++++ .../mono/offsets/aarch64-apple-maccatalyst.h | 326 +++++++++++++++++ .../mono/offsets/aarch64-v8a-linux-android.h | 326 +++++++++++++++++ .../offsets/armv7-none-linux-androideabi.h | 334 ++++++++++++++++++ .../mono/offsets/i686-none-linux-android.h | 325 +++++++++++++++++ .../offsets-tool => offsets}/offsets-tool.py | 36 +- src/mono/mono/offsets/wasm32-unknown-none.h | 297 ++++++++++++++++ src/mono/mono/offsets/wasm32-unknown-wasip2.h | 297 ++++++++++++++++ src/mono/mono/offsets/x86_64-apple-darwin10.h | 323 +++++++++++++++++ .../mono/offsets/x86_64-apple-maccatalyst.h | 325 +++++++++++++++++ .../mono/offsets/x86_64-none-linux-android.h | 325 +++++++++++++++++ src/mono/monoaotcross.proj | 7 +- 24 files changed, 3274 insertions(+), 154 deletions(-) rename src/mono/mono/{tools/offsets-tool => offsets}/.gitignore (100%) rename src/mono/mono/{tools/offsets-tool => offsets}/README.md (100%) create mode 100644 src/mono/mono/offsets/aarch64-apple-darwin10.h create mode 100644 src/mono/mono/offsets/aarch64-apple-maccatalyst.h create mode 100644 src/mono/mono/offsets/aarch64-v8a-linux-android.h create mode 100644 src/mono/mono/offsets/armv7-none-linux-androideabi.h create mode 100644 src/mono/mono/offsets/i686-none-linux-android.h rename src/mono/mono/{tools/offsets-tool => offsets}/offsets-tool.py (93%) create mode 100644 src/mono/mono/offsets/wasm32-unknown-none.h create mode 100644 src/mono/mono/offsets/wasm32-unknown-wasip2.h create mode 100644 src/mono/mono/offsets/x86_64-apple-darwin10.h create mode 100644 src/mono/mono/offsets/x86_64-apple-maccatalyst.h create mode 100644 src/mono/mono/offsets/x86_64-none-linux-android.h diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 19bbde9e381aa..6bdd96038acf7 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -193,13 +193,6 @@ jobs: # credential provider is installed. - task: NuGetAuthenticate@1 - - ${{ each monoCrossAOTTargetOS in parameters.monoCrossAOTTargetOS }}: - - task: DownloadPipelineArtifact@2 - displayName: Download ${{monoCrossAOTTargetOS}} AOT offset files - inputs: - artifact: Mono_Offsets_${{monoCrossAOTTargetOS}} - path: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles' - - ${{ if in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator') }}: - script: $(Build.SourcesDirectory)/eng/common/native/install-dependencies.sh ${{ parameters.osGroup }} displayName: Install Build Dependencies diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index 55cbd0e577365..db0ab302b4354 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -59,7 +59,6 @@ steps: -arch ${{ parameters.archType }} /p:BuildMonoAotCrossCompiler=true /p:BuildMonoAotCrossCompilerOnly=true - /p:MonoLibClang="/usr/local/lib/libclang.so.16" /p:MonoAOTEnableLLVM=true /p:CrossBuild=true displayName: "Build Mono LLVM AOT cross compiler" diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index d31c473908df6..08b70e59f69c8 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -256,7 +256,6 @@ jobs: -arch $(archType) /p:BuildMonoAotCrossCompiler=true /p:BuildMonoAotCrossCompilerOnly=true - /p:MonoLibClang="/usr/local/lib/libclang.so.16" /p:MonoAOTEnableLLVM=true displayName: "Build Mono LLVM AOT cross compiler" diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml index 78b035fa0228e..81f20c32cd076 100644 --- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml +++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml @@ -39,7 +39,7 @@ jobs: platforms: - linux_x64 jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:MonoLibClang="/usr/local/lib/libclang.so.16" /p:AotHostArchitecture=x64 /p:AotHostOS=linux + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:AotHostArchitecture=x64 /p:AotHostOS=linux nameSuffix: AOT isOfficialBuild: false postBuildSteps: diff --git a/eng/pipelines/coreclr/perf_slow.yml b/eng/pipelines/coreclr/perf_slow.yml index f9a6895efacb4..468b5459f7c8e 100644 --- a/eng/pipelines/coreclr/perf_slow.yml +++ b/eng/pipelines/coreclr/perf_slow.yml @@ -146,7 +146,7 @@ extends: platforms: - linux_arm64 jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:MonoLibClang="/usr/local/lib/libclang.so" /p:AotHostArchitecture=arm64 /p:AotHostOS=linux + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:AotHostArchitecture=arm64 /p:AotHostOS=linux nameSuffix: AOT isOfficialBuild: false postBuildSteps: diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 55021be6e29ed..f587339e54f4f 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -382,46 +382,6 @@ extends: parameters: name: MonoRuntimePacks - - # Build Mono AOT offset headers once, for consumption elsewhere - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - android_x64 - - browser_wasm - - wasi_wasm - - tvos_arm64 - - ios_arm64 - - maccatalyst_x64 - variables: - - name: _osParameter - value: -os linux - - name: _archParameter - value: -arch x64 - jobParameters: - templatePath: 'templates-official' - nameSuffix: MonoAOTOffsets - buildArgs: -s mono.aotcross -c $(_BuildConfig) /p:MonoGenerateOffsetsOSGroups=$(osGroup) - postBuildSteps: - # Upload offset files - - task: CopyFiles@2 - displayName: Collect offset files - inputs: - sourceFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/' - contents: '**/offsets-*.h' - targetFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles/' - - templateContext: - outputs: - - output: pipelineArtifact - displayName: 'Publish Mono AOT offsets' - condition: succeeded() - targetPath: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles' - artifactName: 'Mono_Offsets_$(osGroup)$(osSubGroup)' - # # Build Mono release AOT cross-compilers # @@ -438,17 +398,9 @@ extends: jobParameters: templatePath: 'templates-official' buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser+wasi /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot - dependsOn: - - build_android_x64_release_MonoAOTOffsets - - build_browser_wasm_linux_release_MonoAOTOffsets - - build_wasi_wasm_linux_release_MonoAOTOffsets - monoCrossAOTTargetOS: - - android - - browser - - wasi isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml @@ -466,17 +418,9 @@ extends: jobParameters: templatePath: 'templates-official' buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser+wasi /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot - dependsOn: - - build_android_x64_release_MonoAOTOffsets - - build_browser_wasm_linux_release_MonoAOTOffsets - - build_wasi_wasm_linux_release_MonoAOTOffsets - monoCrossAOTTargetOS: - - android - - browser - - wasi isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml @@ -494,23 +438,9 @@ extends: jobParameters: templatePath: 'templates-official' buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser+wasi+tvos+ios+maccatalyst /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi+tvos+ios+maccatalyst /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot - dependsOn: - - build_android_x64_release_MonoAOTOffsets - - build_browser_wasm_linux_release_MonoAOTOffsets - - build_wasi_wasm_linux_release_MonoAOTOffsets - - build_tvos_arm64_release_MonoAOTOffsets - - build_ios_arm64_release_MonoAOTOffsets - - build_maccatalyst_x64_release_MonoAOTOffsets - monoCrossAOTTargetOS: - - android - - browser - - wasi - - tvos - - ios - - maccatalyst isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 2e68a43af682e..1f432557bf0ae 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -728,7 +728,7 @@ extends: eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), eq(variables['isRollingBuild'], true)) - # Build Mono AOT offset headers once, for consumption elsewhere + # Build Mono AOT offset headers once, for validation # Only when mono changed # - template: /eng/pipelines/common/platform-matrix.yml @@ -739,8 +739,7 @@ extends: - android_x64 - browser_wasm - wasi_wasm - - tvos_arm64 - - ios_arm64 + - ios_arm64 # tvos and ios use the same offsets so we only need to build once - maccatalyst_x64 variables: - name: _osParameter @@ -749,20 +748,21 @@ extends: value: -arch x64 jobParameters: nameSuffix: MonoAOTOffsets - buildArgs: -s mono.aotcross -c $(_BuildConfig) /p:MonoGenerateOffsetsOSGroups=$(osGroup) + buildArgs: -s mono.aotcross -c $(_BuildConfig) /p:MonoGenerateOffsetsOSGroups=$(osGroup) /p:ValidateMonoOffsets=true postBuildSteps: # Upload offset files - task: CopyFiles@2 displayName: Collect offset files + condition: failed() inputs: - sourceFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/' - contents: '**/offsets-*.h' + sourceFolder: '$(Build.SourcesDirectory)/src/mono/mono/offsets' + contents: '*.h.new' targetFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles/' - publish: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles' + condition: failed() artifact: Mono_Offsets_$(osGroup)$(osSubGroup) displayName: Upload offset files - # needed by crossaot condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), @@ -1199,17 +1199,9 @@ extends: - linux_musl_arm64 jobParameters: buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser+wasi /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot - dependsOn: - - build_android_x64_release_MonoAOTOffsets - - build_browser_wasm_linux_release_MonoAOTOffsets - - build_wasi_wasm_linux_release_MonoAOTOffsets - monoCrossAOTTargetOS: - - android - - browser - - wasi condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), @@ -1226,17 +1218,9 @@ extends: - windows_x64 jobParameters: buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser+wasi /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot - dependsOn: - - build_android_x64_release_MonoAOTOffsets - - build_browser_wasm_linux_release_MonoAOTOffsets - - build_wasi_wasm_linux_release_MonoAOTOffsets - monoCrossAOTTargetOS: - - android - - browser - - wasi condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), @@ -1257,23 +1241,9 @@ extends: - osx_arm64 jobParameters: buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser+wasi+tvos+ios+maccatalyst /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi+tvos+ios+maccatalyst /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot - dependsOn: - - build_android_x64_release_MonoAOTOffsets - - build_browser_wasm_linux_release_MonoAOTOffsets - - build_wasi_wasm_linux_release_MonoAOTOffsets - - build_tvos_arm64_release_MonoAOTOffsets - - build_ios_arm64_release_MonoAOTOffsets - - build_maccatalyst_x64_release_MonoAOTOffsets - monoCrossAOTTargetOS: - - android - - browser - - wasi - - tvos - - ios - - maccatalyst condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 80d82971843e4..70e66329e043b 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -130,15 +130,9 @@ if(NOT AOT_TARGET_TRIPLE STREQUAL "") if(AOT_TARGET_TRIPLE STREQUAL "x86_64-apple-darwin10") set(TARGET_SYSTEM_NAME "ios") set(TARGET_ARCH "x86_64") - elseif(AOT_TARGET_TRIPLE STREQUAL "i386-apple-darwin10") - set(TARGET_SYSTEM_NAME "ios") - set(TARGET_ARCH "x86") elseif(AOT_TARGET_TRIPLE STREQUAL "aarch64-apple-darwin10") set(TARGET_SYSTEM_NAME "ios") set(TARGET_ARCH "arm64") - elseif(AOT_TARGET_TRIPLE STREQUAL "arm-apple-darwin10") - set(TARGET_SYSTEM_NAME "ios") - set(TARGET_ARCH "arm") elseif(AOT_TARGET_TRIPLE STREQUAL "x86_64-apple-maccatalyst") set(TARGET_SYSTEM_NAME "darwin") set(TARGET_ARCH "x86_64") diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 1e32e832ae0eb..56eb36acbc73e 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -45,6 +45,7 @@ true true true + false $([MSBuild]::NormalizeDirectory('$(MonoObjDir)', 'cross')) $([MSBuild]::NormalizePath('$(MonoObjCrossDir)', 'config.h')) true @@ -137,9 +138,9 @@ - - - + + + @@ -317,7 +318,7 @@ JS_ENGINES = [NODE_JS] + Condition="'$(ShouldProvisionWasiSdk)' == 'true' and ('$(BuildMonoAOTCrossCompilerOnly)' != 'true' or '$(MonoGenerateOffsetsOSGroups)' != '')"> @@ -345,7 +346,7 @@ JS_ENGINES = [NODE_JS] - + @@ -652,9 +653,6 @@ JS_ENGINES = [NODE_JS] <_MonoSkipInitCompiler>true - - <_MonoCPPFLAGS Include="-DANDROID_FORCE_ICU_DATA_DIR" /> - <_MonoCMakeArgs Include="-DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK_ROOT)/build/cmake/android.toolchain.cmake"/> <_MonoCMakeArgs Include="-DANDROID_NDK=$(ANDROID_NDK_ROOT)"/> @@ -774,7 +772,7 @@ JS_ENGINES = [NODE_JS] <_MonoCMakeCmdLineUpToDate Condition="Exists('$(MonoObjDir)cmake_cmd_line.txt') and '$([System.IO.File]::ReadAllText($(MonoObjDir)cmake_cmd_line.txt).Trim())' == '$(_MonoCMakeConfigureCommand.Trim())'">true <_MonoSkipCMakeConfigure>false - <_MonoSkipCMakeConfigure Condition="'$(SkipMonoCrossJitConfigure)' == 'true' or '$(_MonoCMakeCmdLineUpToDate)' == 'true'">true + <_MonoSkipCMakeConfigure Condition="('$(BuildMonoAOTCrossCompilerOnly)' == 'true' and '$(MonoGenerateOffsetsOSGroups)' == '') or '$(_MonoCMakeCmdLineUpToDate)' == 'true'">true @@ -807,16 +805,13 @@ JS_ENGINES = [NODE_JS] $(XcodeDir)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(iOSVersion).sdk $(XcodeDir)/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS$(tvOSVersion).sdk $(XcodeDir)/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator$(tvOSVersion).sdk - $(MonoObjCrossDir)offsets-$(Platform)-darwin.h aarch64-apple-darwin10 - arm-apple-darwin10 x86_64-apple-darwin10 $(XcodeDir)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk - $(MonoObjCrossDir)offsets-$(Platform)-darwin.h aarch64-apple-maccatalyst x86_64-apple-maccatalyst @@ -828,7 +823,7 @@ JS_ENGINES = [NODE_JS] - + aarch64-linux-gnu $(MonoObjCrossDir)offsets-aarch-linux-gnu.h $(MonoCrossDir)/usr/lib/gcc/aarch64-linux-gnu/7 @@ -869,7 +864,6 @@ JS_ENGINES = [NODE_JS] wasm32-unknown-none wasm32-unknown-wasip2 - $(MonoObjCrossDir)offsets-wasm32-unknown-none.h <_ForceRelease Condition="$([MSBuild]::IsOSPlatform('Windows')) and '$(TargetArchitecture)' == 'wasm' and '$(Configuration)' == 'Debug'">true @@ -917,10 +911,10 @@ JS_ENGINES = [NODE_JS] armv7-none-linux-androideabi i686-none-linux-android x86_64-none-linux-android - $(MonoObjDir)cross/offsets-$(Platform)-android.h + $(MonoProjectRoot)mono/offsets/$(MonoAotAbi).h $(MonoCrossDir) @@ -943,6 +937,7 @@ JS_ENGINES = [NODE_JS] + @@ -998,7 +993,7 @@ JS_ENGINES = [NODE_JS] <_MonoSkipInitCompiler Condition="'$(AotHostArchitecture)' != '$(BuildArchitecture)'">false <_MonoSkipInitCompiler Condition="'$(CrossBuild)' == 'true'">false - <_MonoAotCrossOffsetsToolPath>$(MonoProjectRoot)mono\tools\offsets-tool\offsets-tool.py + <_MonoAotCrossOffsetsToolPath>$(MonoProjectRoot)mono\offsets\offsets-tool.py <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(_MonoAotCrossOffsetsToolPath) @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">sh -c 'build_arch="$(_CompilerTargetArch)" ROOTFS_DIR="$(MonoCrossDir)" compiler="$(MonoCCompiler)" . "$(RepositoryEngineeringCommonDir)native/init-compiler.sh" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' @@ -1009,16 +1004,13 @@ JS_ENGINES = [NODE_JS] <_MonoAotCMakeBuildCommand Condition="'$(_MonoUseNinja)' != 'true'">$(_MonoAotCMakeBuildCommand) --parallel $([System.Environment]::ProcessorCount) <_MonoAotCMakeBuildCommand Condition="'$(HostOS)' != 'windows'">@(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) <_MonoAotCMakeBuildCommand Condition="'$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) - <_MonoAotPrebuiltOffsetsFile>$(ArtifactsObjDir)\mono\offsetfiles\$(PlatformConfigPathPart)\cross\$([System.IO.Path]::GetFileName('$(MonoAotOffsetsFile)')) - - - - + + diff --git a/src/mono/mono/metadata/abi-details.h b/src/mono/mono/metadata/abi-details.h index a2376816e331a..14deff4151329 100644 --- a/src/mono/mono/metadata/abi-details.h +++ b/src/mono/mono/metadata/abi-details.h @@ -19,7 +19,7 @@ * - MONO_STRUCT_OFFSET(struct, field) for various runtime structures * When not cross compiling, these correspond to the host ABI (i.e. sizeof/offsetof). * When cross compiling, these are defined in a generated header file which is - * generated by the offsets tool in tools/offsets-tool. The name of the file + * generated by the offsets tool in offsets/offsets-tool.py. The name of the file * is given by the --with-cross-offsets= configure argument. */ diff --git a/src/mono/mono/tools/offsets-tool/.gitignore b/src/mono/mono/offsets/.gitignore similarity index 100% rename from src/mono/mono/tools/offsets-tool/.gitignore rename to src/mono/mono/offsets/.gitignore diff --git a/src/mono/mono/tools/offsets-tool/README.md b/src/mono/mono/offsets/README.md similarity index 100% rename from src/mono/mono/tools/offsets-tool/README.md rename to src/mono/mono/offsets/README.md diff --git a/src/mono/mono/offsets/aarch64-apple-darwin10.h b/src/mono/mono/offsets/aarch64-apple-darwin10.h new file mode 100644 index 0000000000000..69c2cdc039c6b --- /dev/null +++ b/src/mono/mono/offsets/aarch64-apple-darwin10.h @@ -0,0 +1,326 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_ARM64 +#if defined (TARGET_IOS) || defined (TARGET_TVOS) +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,8) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,8) +DECL_SIZE2(MonoObject,16) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,8) +DECL_SIZE2(MonoClass,240) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,8) +DECL_OFFSET2(MonoClass,supertypes,16) +DECL_OFFSET2(MonoClass,idepth,24) +DECL_OFFSET2(MonoClass,rank,26) +DECL_OFFSET2(MonoClass,class_kind,27) +DECL_OFFSET2(MonoClass,instance_size,28) +DECL_OFFSET2(MonoClass,min_align,34) +DECL_OFFSET2(MonoClass,parent,40) +DECL_OFFSET2(MonoClass,nested_in,48) +DECL_OFFSET2(MonoClass,image,56) +DECL_OFFSET2(MonoClass,name,64) +DECL_OFFSET2(MonoClass,name_space,72) +DECL_OFFSET2(MonoClass,type_token,80) +DECL_OFFSET2(MonoClass,vtable_size,84) +DECL_OFFSET2(MonoClass,interface_count,88) +DECL_OFFSET2(MonoClass,interface_id,92) +DECL_OFFSET2(MonoClass,max_interface_id,96) +DECL_OFFSET2(MonoClass,interface_offsets_count,100) +DECL_OFFSET2(MonoClass,interfaces_packed,104) +DECL_OFFSET2(MonoClass,interface_offsets_packed,112) +DECL_OFFSET2(MonoClass,interface_bitmap,120) +DECL_OFFSET2(MonoClass,inlinearray_value,128) +DECL_OFFSET2(MonoClass,name_hash,132) +DECL_OFFSET2(MonoClass,interfaces,136) +DECL_OFFSET2(MonoClass,sizes,144) +DECL_OFFSET2(MonoClass,fields,152) +DECL_OFFSET2(MonoClass,methods,160) +DECL_OFFSET2(MonoClass,this_arg,168) +DECL_OFFSET2(MonoClass,_byval_arg,184) +DECL_OFFSET2(MonoClass,gc_descr,200) +DECL_OFFSET2(MonoClass,runtime_vtable,208) +DECL_OFFSET2(MonoClass,vtable,216) +DECL_OFFSET2(MonoClass,infrequent_data,224) +DECL_OFFSET2(MonoClass,variant_search_table,232) +DECL_SIZE2(MonoVTable,80) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,8) +DECL_OFFSET2(MonoVTable,domain,16) +DECL_OFFSET2(MonoVTable,type,24) +DECL_OFFSET2(MonoVTable,interface_bitmap,32) +DECL_OFFSET2(MonoVTable,loader_alloc,40) +DECL_OFFSET2(MonoVTable,max_interface_id,48) +DECL_OFFSET2(MonoVTable,rank,52) +DECL_OFFSET2(MonoVTable,initialized,53) +DECL_OFFSET2(MonoVTable,flags,54) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,56) +DECL_OFFSET2(MonoVTable,runtime_generic_context,64) +DECL_OFFSET2(MonoVTable,ee_data,72) +DECL_OFFSET2(MonoVTable,vtable,80) +DECL_SIZE2(MonoDelegate,120) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,16) +DECL_OFFSET2(MonoDelegate,invoke_impl,24) +DECL_OFFSET2(MonoDelegate,target,32) +DECL_OFFSET2(MonoDelegate,method,40) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,48) +DECL_OFFSET2(MonoDelegate,extra_arg,56) +DECL_OFFSET2(MonoDelegate,invoke_info,64) +DECL_OFFSET2(MonoDelegate,interp_method,72) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,80) +DECL_OFFSET2(MonoDelegate,method_info,88) +DECL_OFFSET2(MonoDelegate,original_method_info,96) +DECL_OFFSET2(MonoDelegate,data,104) +DECL_OFFSET2(MonoDelegate,method_is_virtual,112) +DECL_OFFSET2(MonoDelegate,bound,113) +DECL_SIZE2(MonoInternalThread,232) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,16) +DECL_OFFSET2(MonoInternalThread,handle,24) +DECL_OFFSET2(MonoInternalThread,native_handle,32) +DECL_OFFSET2(MonoInternalThread,name,40) +DECL_OFFSET2(MonoInternalThread,state,56) +DECL_OFFSET2(MonoInternalThread,abort_exc,64) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,72) +DECL_OFFSET2(MonoInternalThread,tid,80) +DECL_OFFSET2(MonoInternalThread,debugger_thread,88) +DECL_OFFSET2(MonoInternalThread,static_data,96) +DECL_OFFSET2(MonoInternalThread,thread_info,104) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,112) +DECL_OFFSET2(MonoInternalThread,longlived,120) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,128) +DECL_OFFSET2(MonoInternalThread,external_eventloop,129) +DECL_OFFSET2(MonoInternalThread,apartment_state,130) +DECL_OFFSET2(MonoInternalThread,managed_id,132) +DECL_OFFSET2(MonoInternalThread,small_id,136) +DECL_OFFSET2(MonoInternalThread,manage_callback,144) +DECL_OFFSET2(MonoInternalThread,flags,152) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,160) +DECL_OFFSET2(MonoInternalThread,priority,168) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,176) +DECL_OFFSET2(MonoInternalThread,suspended,184) +DECL_OFFSET2(MonoInternalThread,self_suspended,192) +DECL_OFFSET2(MonoInternalThread,thread_state,200) +DECL_OFFSET2(MonoInternalThread,internal_thread,208) +DECL_OFFSET2(MonoInternalThread,pending_exception,216) +DECL_OFFSET2(MonoInternalThread,last,224) +DECL_SIZE2(MonoMulticastDelegate,128) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,120) +DECL_SIZE2(MonoTransparentProxy,40) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,16) +DECL_OFFSET2(MonoTransparentProxy,remote_class,24) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,32) +DECL_SIZE2(MonoRealProxy,80) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,16) +DECL_OFFSET2(MonoRealProxy,context,24) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,32) +DECL_OFFSET2(MonoRealProxy,target_domain_id,40) +DECL_OFFSET2(MonoRealProxy,target_uri,48) +DECL_OFFSET2(MonoRealProxy,object_identity,56) +DECL_OFFSET2(MonoRealProxy,obj_TP,64) +DECL_OFFSET2(MonoRealProxy,stub_data,72) +DECL_SIZE2(MonoRemoteClass,40) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class,16) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,24) +DECL_OFFSET2(MonoRemoteClass,interface_count,32) +DECL_OFFSET2(MonoRemoteClass,interfaces,40) +DECL_SIZE2(MonoArray,32) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,16) +DECL_OFFSET2(MonoArray,max_length,24) +DECL_OFFSET2(MonoArray,vector,32) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,24) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,16) +DECL_SIZE2(MonoHandleRef,16) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,8) +DECL_SIZE2(MonoString,24) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,16) +DECL_OFFSET2(MonoString,chars,20) +DECL_SIZE2(MonoException,144) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,16) +DECL_OFFSET2(MonoException,message,24) +DECL_OFFSET2(MonoException,_data,32) +DECL_OFFSET2(MonoException,inner_ex,40) +DECL_OFFSET2(MonoException,help_link,48) +DECL_OFFSET2(MonoException,trace_ips,56) +DECL_OFFSET2(MonoException,stack_trace,64) +DECL_OFFSET2(MonoException,remote_stack_trace,72) +DECL_OFFSET2(MonoException,remote_stack_index,80) +DECL_OFFSET2(MonoException,dynamic_methods,88) +DECL_OFFSET2(MonoException,hresult,96) +DECL_OFFSET2(MonoException,source,104) +DECL_OFFSET2(MonoException,serialization_manager,112) +DECL_OFFSET2(MonoException,captured_traces,120) +DECL_OFFSET2(MonoException,native_trace_ips,128) +DECL_OFFSET2(MonoException,caught_in_unmanaged,136) +DECL_SIZE2(MonoTypedRef,24) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,8) +DECL_OFFSET2(MonoTypedRef,klass,16) +DECL_SIZE2(MonoThreadsSync,48) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,16) +DECL_OFFSET2(MonoThreadsSync,data,24) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,32) +DECL_OFFSET2(MonoThreadsSync,entry_cond,40) +DECL_SIZE2(SgenThreadInfo,2752) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,2704) +DECL_OFFSET2(SgenThreadInfo,tlab_next,2712) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,2720) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,2728) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,2736) +DECL_SIZE2(SgenClientThreadInfo,2704) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,1872) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,1876) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,1880) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,1888) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,1896) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,1904) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,1912) +DECL_OFFSET2(SgenClientThreadInfo,ctx,1920) +DECL_SIZE2(MonoProfilerCallContext,816) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,784) +DECL_OFFSET2(MonoProfilerCallContext,method,792) +DECL_OFFSET2(MonoProfilerCallContext,return_value,800) +DECL_OFFSET2(MonoProfilerCallContext,args,808) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,120) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,lmf_addr,8) +DECL_OFFSET2(MonoLMF,pc,16) +DECL_OFFSET2(MonoLMF,gregs,24) +DECL_SIZE2(MonoLMFExt,928) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,120) +DECL_OFFSET2(MonoLMFExt,ctx,128) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,912) +DECL_OFFSET2(MonoLMFExt,il_state,920) +DECL_SIZE2(MonoMethodILState,24) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,8) +DECL_OFFSET2(MonoMethodILState,data,16) +DECL_SIZE2(MonoMethodRuntimeGenericContext,32) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32) +DECL_SIZE2(MonoJitTlsData,4160) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,8) +DECL_OFFSET2(MonoJitTlsData,lmf,16) +DECL_OFFSET2(MonoJitTlsData,first_lmf,24) +DECL_OFFSET2(MonoJitTlsData,signal_stack,40) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,48) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,56) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,64) +DECL_OFFSET2(MonoJitTlsData,abort_func,72) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,80) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,88) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,96) +DECL_OFFSET2(MonoJitTlsData,resume_state,880) +DECL_OFFSET2(MonoJitTlsData,handler_block,2512) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,2528) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3312) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4096) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,4104) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4112) +DECL_OFFSET2(MonoJitTlsData,calling_image,4120) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4128) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4136) +DECL_OFFSET2(MonoJitTlsData,interp_context,4144) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8) +DECL_SIZE2(MonoContext,784) +DECL_OFFSET2(MonoContext,regs,0) +DECL_OFFSET2(MonoContext,fregs,256) +DECL_OFFSET2(MonoContext,pc,768) +DECL_OFFSET2(MonoContext,has_fregs,776) +DECL_SIZE2(MonoDelegateTrampInfo,80) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,8) +DECL_OFFSET2(MonoDelegateTrampInfo,method,16) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,24) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,32) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,40) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,48) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,56) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,64) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,72) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,76) +DECL_SIZE2(GSharedVtCallInfo,40) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_reg,12) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,16) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,20) +DECL_OFFSET2(GSharedVtCallInfo,map_count,24) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,28) +DECL_OFFSET2(GSharedVtCallInfo,calli,32) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,36) +DECL_OFFSET2(GSharedVtCallInfo,map,40) +DECL_SIZE2(SeqPointInfo,8) +DECL_OFFSET2(SeqPointInfo,ss_tramp_addr,0) +DECL_OFFSET2(SeqPointInfo,bp_addrs,8) +DECL_SIZE2(DynCallArgs,176) +DECL_OFFSET2(DynCallArgs,res,0) +DECL_OFFSET2(DynCallArgs,res2,8) +DECL_OFFSET2(DynCallArgs,ret,16) +DECL_OFFSET2(DynCallArgs,fpregs,24) +DECL_OFFSET2(DynCallArgs,n_fpargs,88) +DECL_OFFSET2(DynCallArgs,n_fpret,92) +DECL_OFFSET2(DynCallArgs,n_stackargs,96) +DECL_OFFSET2(DynCallArgs,regs,104) +DECL_SIZE2(CallContext,168) +DECL_OFFSET2(CallContext,gregs,0) +DECL_OFFSET2(CallContext,fregs,88) +DECL_OFFSET2(CallContext,stack_size,152) +DECL_OFFSET2(CallContext,stack,160) +DECL_SIZE2(MonoFtnDesc,32) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,8) +DECL_OFFSET2(MonoFtnDesc,method,16) +DECL_OFFSET2(MonoFtnDesc,interp_method,24) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_ARM64 +#endif //TARGET_IOS || TARGET_TVOS +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/aarch64-apple-maccatalyst.h b/src/mono/mono/offsets/aarch64-apple-maccatalyst.h new file mode 100644 index 0000000000000..47f18a795c5a6 --- /dev/null +++ b/src/mono/mono/offsets/aarch64-apple-maccatalyst.h @@ -0,0 +1,326 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_ARM64 +#ifdef TARGET_MACCAT +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,8) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,8) +DECL_SIZE2(MonoObject,16) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,8) +DECL_SIZE2(MonoClass,240) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,8) +DECL_OFFSET2(MonoClass,supertypes,16) +DECL_OFFSET2(MonoClass,idepth,24) +DECL_OFFSET2(MonoClass,rank,26) +DECL_OFFSET2(MonoClass,class_kind,27) +DECL_OFFSET2(MonoClass,instance_size,28) +DECL_OFFSET2(MonoClass,min_align,34) +DECL_OFFSET2(MonoClass,parent,40) +DECL_OFFSET2(MonoClass,nested_in,48) +DECL_OFFSET2(MonoClass,image,56) +DECL_OFFSET2(MonoClass,name,64) +DECL_OFFSET2(MonoClass,name_space,72) +DECL_OFFSET2(MonoClass,type_token,80) +DECL_OFFSET2(MonoClass,vtable_size,84) +DECL_OFFSET2(MonoClass,interface_count,88) +DECL_OFFSET2(MonoClass,interface_id,92) +DECL_OFFSET2(MonoClass,max_interface_id,96) +DECL_OFFSET2(MonoClass,interface_offsets_count,100) +DECL_OFFSET2(MonoClass,interfaces_packed,104) +DECL_OFFSET2(MonoClass,interface_offsets_packed,112) +DECL_OFFSET2(MonoClass,interface_bitmap,120) +DECL_OFFSET2(MonoClass,inlinearray_value,128) +DECL_OFFSET2(MonoClass,name_hash,132) +DECL_OFFSET2(MonoClass,interfaces,136) +DECL_OFFSET2(MonoClass,sizes,144) +DECL_OFFSET2(MonoClass,fields,152) +DECL_OFFSET2(MonoClass,methods,160) +DECL_OFFSET2(MonoClass,this_arg,168) +DECL_OFFSET2(MonoClass,_byval_arg,184) +DECL_OFFSET2(MonoClass,gc_descr,200) +DECL_OFFSET2(MonoClass,runtime_vtable,208) +DECL_OFFSET2(MonoClass,vtable,216) +DECL_OFFSET2(MonoClass,infrequent_data,224) +DECL_OFFSET2(MonoClass,variant_search_table,232) +DECL_SIZE2(MonoVTable,80) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,8) +DECL_OFFSET2(MonoVTable,domain,16) +DECL_OFFSET2(MonoVTable,type,24) +DECL_OFFSET2(MonoVTable,interface_bitmap,32) +DECL_OFFSET2(MonoVTable,loader_alloc,40) +DECL_OFFSET2(MonoVTable,max_interface_id,48) +DECL_OFFSET2(MonoVTable,rank,52) +DECL_OFFSET2(MonoVTable,initialized,53) +DECL_OFFSET2(MonoVTable,flags,54) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,56) +DECL_OFFSET2(MonoVTable,runtime_generic_context,64) +DECL_OFFSET2(MonoVTable,ee_data,72) +DECL_OFFSET2(MonoVTable,vtable,80) +DECL_SIZE2(MonoDelegate,120) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,16) +DECL_OFFSET2(MonoDelegate,invoke_impl,24) +DECL_OFFSET2(MonoDelegate,target,32) +DECL_OFFSET2(MonoDelegate,method,40) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,48) +DECL_OFFSET2(MonoDelegate,extra_arg,56) +DECL_OFFSET2(MonoDelegate,invoke_info,64) +DECL_OFFSET2(MonoDelegate,interp_method,72) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,80) +DECL_OFFSET2(MonoDelegate,method_info,88) +DECL_OFFSET2(MonoDelegate,original_method_info,96) +DECL_OFFSET2(MonoDelegate,data,104) +DECL_OFFSET2(MonoDelegate,method_is_virtual,112) +DECL_OFFSET2(MonoDelegate,bound,113) +DECL_SIZE2(MonoInternalThread,232) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,16) +DECL_OFFSET2(MonoInternalThread,handle,24) +DECL_OFFSET2(MonoInternalThread,native_handle,32) +DECL_OFFSET2(MonoInternalThread,name,40) +DECL_OFFSET2(MonoInternalThread,state,56) +DECL_OFFSET2(MonoInternalThread,abort_exc,64) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,72) +DECL_OFFSET2(MonoInternalThread,tid,80) +DECL_OFFSET2(MonoInternalThread,debugger_thread,88) +DECL_OFFSET2(MonoInternalThread,static_data,96) +DECL_OFFSET2(MonoInternalThread,thread_info,104) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,112) +DECL_OFFSET2(MonoInternalThread,longlived,120) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,128) +DECL_OFFSET2(MonoInternalThread,external_eventloop,129) +DECL_OFFSET2(MonoInternalThread,apartment_state,130) +DECL_OFFSET2(MonoInternalThread,managed_id,132) +DECL_OFFSET2(MonoInternalThread,small_id,136) +DECL_OFFSET2(MonoInternalThread,manage_callback,144) +DECL_OFFSET2(MonoInternalThread,flags,152) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,160) +DECL_OFFSET2(MonoInternalThread,priority,168) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,176) +DECL_OFFSET2(MonoInternalThread,suspended,184) +DECL_OFFSET2(MonoInternalThread,self_suspended,192) +DECL_OFFSET2(MonoInternalThread,thread_state,200) +DECL_OFFSET2(MonoInternalThread,internal_thread,208) +DECL_OFFSET2(MonoInternalThread,pending_exception,216) +DECL_OFFSET2(MonoInternalThread,last,224) +DECL_SIZE2(MonoMulticastDelegate,128) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,120) +DECL_SIZE2(MonoTransparentProxy,40) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,16) +DECL_OFFSET2(MonoTransparentProxy,remote_class,24) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,32) +DECL_SIZE2(MonoRealProxy,80) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,16) +DECL_OFFSET2(MonoRealProxy,context,24) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,32) +DECL_OFFSET2(MonoRealProxy,target_domain_id,40) +DECL_OFFSET2(MonoRealProxy,target_uri,48) +DECL_OFFSET2(MonoRealProxy,object_identity,56) +DECL_OFFSET2(MonoRealProxy,obj_TP,64) +DECL_OFFSET2(MonoRealProxy,stub_data,72) +DECL_SIZE2(MonoRemoteClass,40) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class,16) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,24) +DECL_OFFSET2(MonoRemoteClass,interface_count,32) +DECL_OFFSET2(MonoRemoteClass,interfaces,40) +DECL_SIZE2(MonoArray,32) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,16) +DECL_OFFSET2(MonoArray,max_length,24) +DECL_OFFSET2(MonoArray,vector,32) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,24) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,16) +DECL_SIZE2(MonoHandleRef,16) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,8) +DECL_SIZE2(MonoString,24) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,16) +DECL_OFFSET2(MonoString,chars,20) +DECL_SIZE2(MonoException,144) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,16) +DECL_OFFSET2(MonoException,message,24) +DECL_OFFSET2(MonoException,_data,32) +DECL_OFFSET2(MonoException,inner_ex,40) +DECL_OFFSET2(MonoException,help_link,48) +DECL_OFFSET2(MonoException,trace_ips,56) +DECL_OFFSET2(MonoException,stack_trace,64) +DECL_OFFSET2(MonoException,remote_stack_trace,72) +DECL_OFFSET2(MonoException,remote_stack_index,80) +DECL_OFFSET2(MonoException,dynamic_methods,88) +DECL_OFFSET2(MonoException,hresult,96) +DECL_OFFSET2(MonoException,source,104) +DECL_OFFSET2(MonoException,serialization_manager,112) +DECL_OFFSET2(MonoException,captured_traces,120) +DECL_OFFSET2(MonoException,native_trace_ips,128) +DECL_OFFSET2(MonoException,caught_in_unmanaged,136) +DECL_SIZE2(MonoTypedRef,24) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,8) +DECL_OFFSET2(MonoTypedRef,klass,16) +DECL_SIZE2(MonoThreadsSync,48) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,16) +DECL_OFFSET2(MonoThreadsSync,data,24) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,32) +DECL_OFFSET2(MonoThreadsSync,entry_cond,40) +DECL_SIZE2(SgenThreadInfo,2752) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,2704) +DECL_OFFSET2(SgenThreadInfo,tlab_next,2712) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,2720) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,2728) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,2736) +DECL_SIZE2(SgenClientThreadInfo,2704) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,1872) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,1876) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,1880) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,1888) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,1896) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,1904) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,1912) +DECL_OFFSET2(SgenClientThreadInfo,ctx,1920) +DECL_SIZE2(MonoProfilerCallContext,816) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,784) +DECL_OFFSET2(MonoProfilerCallContext,method,792) +DECL_OFFSET2(MonoProfilerCallContext,return_value,800) +DECL_OFFSET2(MonoProfilerCallContext,args,808) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,120) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,lmf_addr,8) +DECL_OFFSET2(MonoLMF,pc,16) +DECL_OFFSET2(MonoLMF,gregs,24) +DECL_SIZE2(MonoLMFExt,928) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,120) +DECL_OFFSET2(MonoLMFExt,ctx,128) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,912) +DECL_OFFSET2(MonoLMFExt,il_state,920) +DECL_SIZE2(MonoMethodILState,24) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,8) +DECL_OFFSET2(MonoMethodILState,data,16) +DECL_SIZE2(MonoMethodRuntimeGenericContext,32) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32) +DECL_SIZE2(MonoJitTlsData,4160) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,8) +DECL_OFFSET2(MonoJitTlsData,lmf,16) +DECL_OFFSET2(MonoJitTlsData,first_lmf,24) +DECL_OFFSET2(MonoJitTlsData,signal_stack,40) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,48) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,56) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,64) +DECL_OFFSET2(MonoJitTlsData,abort_func,72) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,80) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,88) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,96) +DECL_OFFSET2(MonoJitTlsData,resume_state,880) +DECL_OFFSET2(MonoJitTlsData,handler_block,2512) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,2528) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3312) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4096) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,4104) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4112) +DECL_OFFSET2(MonoJitTlsData,calling_image,4120) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4128) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4136) +DECL_OFFSET2(MonoJitTlsData,interp_context,4144) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8) +DECL_SIZE2(MonoContext,784) +DECL_OFFSET2(MonoContext,regs,0) +DECL_OFFSET2(MonoContext,fregs,256) +DECL_OFFSET2(MonoContext,pc,768) +DECL_OFFSET2(MonoContext,has_fregs,776) +DECL_SIZE2(MonoDelegateTrampInfo,80) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,8) +DECL_OFFSET2(MonoDelegateTrampInfo,method,16) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,24) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,32) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,40) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,48) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,56) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,64) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,72) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,76) +DECL_SIZE2(GSharedVtCallInfo,40) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_reg,12) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,16) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,20) +DECL_OFFSET2(GSharedVtCallInfo,map_count,24) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,28) +DECL_OFFSET2(GSharedVtCallInfo,calli,32) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,36) +DECL_OFFSET2(GSharedVtCallInfo,map,40) +DECL_SIZE2(SeqPointInfo,8) +DECL_OFFSET2(SeqPointInfo,ss_tramp_addr,0) +DECL_OFFSET2(SeqPointInfo,bp_addrs,8) +DECL_SIZE2(DynCallArgs,176) +DECL_OFFSET2(DynCallArgs,res,0) +DECL_OFFSET2(DynCallArgs,res2,8) +DECL_OFFSET2(DynCallArgs,ret,16) +DECL_OFFSET2(DynCallArgs,fpregs,24) +DECL_OFFSET2(DynCallArgs,n_fpargs,88) +DECL_OFFSET2(DynCallArgs,n_fpret,92) +DECL_OFFSET2(DynCallArgs,n_stackargs,96) +DECL_OFFSET2(DynCallArgs,regs,104) +DECL_SIZE2(CallContext,168) +DECL_OFFSET2(CallContext,gregs,0) +DECL_OFFSET2(CallContext,fregs,88) +DECL_OFFSET2(CallContext,stack_size,152) +DECL_OFFSET2(CallContext,stack,160) +DECL_SIZE2(MonoFtnDesc,32) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,8) +DECL_OFFSET2(MonoFtnDesc,method,16) +DECL_OFFSET2(MonoFtnDesc,interp_method,24) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_ARM64 +#endif //TARGET_MACCAT +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/aarch64-v8a-linux-android.h b/src/mono/mono/offsets/aarch64-v8a-linux-android.h new file mode 100644 index 0000000000000..fa096e4883df9 --- /dev/null +++ b/src/mono/mono/offsets/aarch64-v8a-linux-android.h @@ -0,0 +1,326 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_ARM64 +#ifdef TARGET_ANDROID +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,8) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,8) +DECL_SIZE2(MonoObject,16) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,8) +DECL_SIZE2(MonoClass,240) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,8) +DECL_OFFSET2(MonoClass,supertypes,16) +DECL_OFFSET2(MonoClass,idepth,24) +DECL_OFFSET2(MonoClass,rank,26) +DECL_OFFSET2(MonoClass,class_kind,27) +DECL_OFFSET2(MonoClass,instance_size,28) +DECL_OFFSET2(MonoClass,min_align,34) +DECL_OFFSET2(MonoClass,parent,40) +DECL_OFFSET2(MonoClass,nested_in,48) +DECL_OFFSET2(MonoClass,image,56) +DECL_OFFSET2(MonoClass,name,64) +DECL_OFFSET2(MonoClass,name_space,72) +DECL_OFFSET2(MonoClass,type_token,80) +DECL_OFFSET2(MonoClass,vtable_size,84) +DECL_OFFSET2(MonoClass,interface_count,88) +DECL_OFFSET2(MonoClass,interface_id,92) +DECL_OFFSET2(MonoClass,max_interface_id,96) +DECL_OFFSET2(MonoClass,interface_offsets_count,100) +DECL_OFFSET2(MonoClass,interfaces_packed,104) +DECL_OFFSET2(MonoClass,interface_offsets_packed,112) +DECL_OFFSET2(MonoClass,interface_bitmap,120) +DECL_OFFSET2(MonoClass,inlinearray_value,128) +DECL_OFFSET2(MonoClass,name_hash,132) +DECL_OFFSET2(MonoClass,interfaces,136) +DECL_OFFSET2(MonoClass,sizes,144) +DECL_OFFSET2(MonoClass,fields,152) +DECL_OFFSET2(MonoClass,methods,160) +DECL_OFFSET2(MonoClass,this_arg,168) +DECL_OFFSET2(MonoClass,_byval_arg,184) +DECL_OFFSET2(MonoClass,gc_descr,200) +DECL_OFFSET2(MonoClass,runtime_vtable,208) +DECL_OFFSET2(MonoClass,vtable,216) +DECL_OFFSET2(MonoClass,infrequent_data,224) +DECL_OFFSET2(MonoClass,variant_search_table,232) +DECL_SIZE2(MonoVTable,80) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,8) +DECL_OFFSET2(MonoVTable,domain,16) +DECL_OFFSET2(MonoVTable,type,24) +DECL_OFFSET2(MonoVTable,interface_bitmap,32) +DECL_OFFSET2(MonoVTable,loader_alloc,40) +DECL_OFFSET2(MonoVTable,max_interface_id,48) +DECL_OFFSET2(MonoVTable,rank,52) +DECL_OFFSET2(MonoVTable,initialized,53) +DECL_OFFSET2(MonoVTable,flags,54) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,56) +DECL_OFFSET2(MonoVTable,runtime_generic_context,64) +DECL_OFFSET2(MonoVTable,ee_data,72) +DECL_OFFSET2(MonoVTable,vtable,80) +DECL_SIZE2(MonoDelegate,120) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,16) +DECL_OFFSET2(MonoDelegate,invoke_impl,24) +DECL_OFFSET2(MonoDelegate,target,32) +DECL_OFFSET2(MonoDelegate,method,40) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,48) +DECL_OFFSET2(MonoDelegate,extra_arg,56) +DECL_OFFSET2(MonoDelegate,invoke_info,64) +DECL_OFFSET2(MonoDelegate,interp_method,72) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,80) +DECL_OFFSET2(MonoDelegate,method_info,88) +DECL_OFFSET2(MonoDelegate,original_method_info,96) +DECL_OFFSET2(MonoDelegate,data,104) +DECL_OFFSET2(MonoDelegate,method_is_virtual,112) +DECL_OFFSET2(MonoDelegate,bound,113) +DECL_SIZE2(MonoInternalThread,232) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,16) +DECL_OFFSET2(MonoInternalThread,handle,24) +DECL_OFFSET2(MonoInternalThread,native_handle,32) +DECL_OFFSET2(MonoInternalThread,name,40) +DECL_OFFSET2(MonoInternalThread,state,56) +DECL_OFFSET2(MonoInternalThread,abort_exc,64) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,72) +DECL_OFFSET2(MonoInternalThread,tid,80) +DECL_OFFSET2(MonoInternalThread,debugger_thread,88) +DECL_OFFSET2(MonoInternalThread,static_data,96) +DECL_OFFSET2(MonoInternalThread,thread_info,104) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,112) +DECL_OFFSET2(MonoInternalThread,longlived,120) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,128) +DECL_OFFSET2(MonoInternalThread,external_eventloop,129) +DECL_OFFSET2(MonoInternalThread,apartment_state,130) +DECL_OFFSET2(MonoInternalThread,managed_id,132) +DECL_OFFSET2(MonoInternalThread,small_id,136) +DECL_OFFSET2(MonoInternalThread,manage_callback,144) +DECL_OFFSET2(MonoInternalThread,flags,152) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,160) +DECL_OFFSET2(MonoInternalThread,priority,168) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,176) +DECL_OFFSET2(MonoInternalThread,suspended,184) +DECL_OFFSET2(MonoInternalThread,self_suspended,192) +DECL_OFFSET2(MonoInternalThread,thread_state,200) +DECL_OFFSET2(MonoInternalThread,internal_thread,208) +DECL_OFFSET2(MonoInternalThread,pending_exception,216) +DECL_OFFSET2(MonoInternalThread,last,224) +DECL_SIZE2(MonoMulticastDelegate,128) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,120) +DECL_SIZE2(MonoTransparentProxy,40) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,16) +DECL_OFFSET2(MonoTransparentProxy,remote_class,24) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,32) +DECL_SIZE2(MonoRealProxy,80) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,16) +DECL_OFFSET2(MonoRealProxy,context,24) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,32) +DECL_OFFSET2(MonoRealProxy,target_domain_id,40) +DECL_OFFSET2(MonoRealProxy,target_uri,48) +DECL_OFFSET2(MonoRealProxy,object_identity,56) +DECL_OFFSET2(MonoRealProxy,obj_TP,64) +DECL_OFFSET2(MonoRealProxy,stub_data,72) +DECL_SIZE2(MonoRemoteClass,40) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class,16) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,24) +DECL_OFFSET2(MonoRemoteClass,interface_count,32) +DECL_OFFSET2(MonoRemoteClass,interfaces,40) +DECL_SIZE2(MonoArray,32) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,16) +DECL_OFFSET2(MonoArray,max_length,24) +DECL_OFFSET2(MonoArray,vector,32) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,24) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,16) +DECL_SIZE2(MonoHandleRef,16) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,8) +DECL_SIZE2(MonoString,24) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,16) +DECL_OFFSET2(MonoString,chars,20) +DECL_SIZE2(MonoException,144) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,16) +DECL_OFFSET2(MonoException,message,24) +DECL_OFFSET2(MonoException,_data,32) +DECL_OFFSET2(MonoException,inner_ex,40) +DECL_OFFSET2(MonoException,help_link,48) +DECL_OFFSET2(MonoException,trace_ips,56) +DECL_OFFSET2(MonoException,stack_trace,64) +DECL_OFFSET2(MonoException,remote_stack_trace,72) +DECL_OFFSET2(MonoException,remote_stack_index,80) +DECL_OFFSET2(MonoException,dynamic_methods,88) +DECL_OFFSET2(MonoException,hresult,96) +DECL_OFFSET2(MonoException,source,104) +DECL_OFFSET2(MonoException,serialization_manager,112) +DECL_OFFSET2(MonoException,captured_traces,120) +DECL_OFFSET2(MonoException,native_trace_ips,128) +DECL_OFFSET2(MonoException,caught_in_unmanaged,136) +DECL_SIZE2(MonoTypedRef,24) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,8) +DECL_OFFSET2(MonoTypedRef,klass,16) +DECL_SIZE2(MonoThreadsSync,48) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,16) +DECL_OFFSET2(MonoThreadsSync,data,24) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,32) +DECL_OFFSET2(MonoThreadsSync,entry_cond,40) +DECL_SIZE2(SgenThreadInfo,2800) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,2752) +DECL_OFFSET2(SgenThreadInfo,tlab_next,2760) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,2768) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,2776) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,2784) +DECL_SIZE2(SgenClientThreadInfo,2752) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,1920) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,1924) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,1928) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,1936) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,1944) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,1952) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,1960) +DECL_OFFSET2(SgenClientThreadInfo,ctx,1968) +DECL_SIZE2(MonoProfilerCallContext,816) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,784) +DECL_OFFSET2(MonoProfilerCallContext,method,792) +DECL_OFFSET2(MonoProfilerCallContext,return_value,800) +DECL_OFFSET2(MonoProfilerCallContext,args,808) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,120) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,lmf_addr,8) +DECL_OFFSET2(MonoLMF,pc,16) +DECL_OFFSET2(MonoLMF,gregs,24) +DECL_SIZE2(MonoLMFExt,928) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,120) +DECL_OFFSET2(MonoLMFExt,ctx,128) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,912) +DECL_OFFSET2(MonoLMFExt,il_state,920) +DECL_SIZE2(MonoMethodILState,24) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,8) +DECL_OFFSET2(MonoMethodILState,data,16) +DECL_SIZE2(MonoMethodRuntimeGenericContext,32) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32) +DECL_SIZE2(MonoJitTlsData,4160) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,8) +DECL_OFFSET2(MonoJitTlsData,lmf,16) +DECL_OFFSET2(MonoJitTlsData,first_lmf,24) +DECL_OFFSET2(MonoJitTlsData,signal_stack,40) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,48) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,56) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,64) +DECL_OFFSET2(MonoJitTlsData,abort_func,72) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,80) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,88) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,96) +DECL_OFFSET2(MonoJitTlsData,resume_state,880) +DECL_OFFSET2(MonoJitTlsData,handler_block,2512) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,2528) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3312) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4096) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,4104) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4112) +DECL_OFFSET2(MonoJitTlsData,calling_image,4120) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4128) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4136) +DECL_OFFSET2(MonoJitTlsData,interp_context,4144) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8) +DECL_SIZE2(MonoContext,784) +DECL_OFFSET2(MonoContext,regs,0) +DECL_OFFSET2(MonoContext,fregs,256) +DECL_OFFSET2(MonoContext,pc,768) +DECL_OFFSET2(MonoContext,has_fregs,776) +DECL_SIZE2(MonoDelegateTrampInfo,80) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,8) +DECL_OFFSET2(MonoDelegateTrampInfo,method,16) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,24) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,32) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,40) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,48) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,56) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,64) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,72) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,76) +DECL_SIZE2(GSharedVtCallInfo,40) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_reg,12) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,16) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,20) +DECL_OFFSET2(GSharedVtCallInfo,map_count,24) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,28) +DECL_OFFSET2(GSharedVtCallInfo,calli,32) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,36) +DECL_OFFSET2(GSharedVtCallInfo,map,40) +DECL_SIZE2(SeqPointInfo,8) +DECL_OFFSET2(SeqPointInfo,ss_tramp_addr,0) +DECL_OFFSET2(SeqPointInfo,bp_addrs,8) +DECL_SIZE2(DynCallArgs,176) +DECL_OFFSET2(DynCallArgs,res,0) +DECL_OFFSET2(DynCallArgs,res2,8) +DECL_OFFSET2(DynCallArgs,ret,16) +DECL_OFFSET2(DynCallArgs,fpregs,24) +DECL_OFFSET2(DynCallArgs,n_fpargs,88) +DECL_OFFSET2(DynCallArgs,n_fpret,92) +DECL_OFFSET2(DynCallArgs,n_stackargs,96) +DECL_OFFSET2(DynCallArgs,regs,104) +DECL_SIZE2(CallContext,168) +DECL_OFFSET2(CallContext,gregs,0) +DECL_OFFSET2(CallContext,fregs,88) +DECL_OFFSET2(CallContext,stack_size,152) +DECL_OFFSET2(CallContext,stack,160) +DECL_SIZE2(MonoFtnDesc,32) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,8) +DECL_OFFSET2(MonoFtnDesc,method,16) +DECL_OFFSET2(MonoFtnDesc,interp_method,24) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_ARM64 +#endif //TARGET_ANDROID +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/armv7-none-linux-androideabi.h b/src/mono/mono/offsets/armv7-none-linux-androideabi.h new file mode 100644 index 0000000000000..a8468a1342409 --- /dev/null +++ b/src/mono/mono/offsets/armv7-none-linux-androideabi.h @@ -0,0 +1,334 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_ARM +#ifdef TARGET_ANDROID +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,4) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,4) +DECL_SIZE2(MonoObject,8) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,4) +DECL_SIZE2(MonoClass,144) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,4) +DECL_OFFSET2(MonoClass,supertypes,8) +DECL_OFFSET2(MonoClass,idepth,12) +DECL_OFFSET2(MonoClass,rank,14) +DECL_OFFSET2(MonoClass,class_kind,15) +DECL_OFFSET2(MonoClass,instance_size,16) +DECL_OFFSET2(MonoClass,min_align,22) +DECL_OFFSET2(MonoClass,parent,28) +DECL_OFFSET2(MonoClass,nested_in,32) +DECL_OFFSET2(MonoClass,image,36) +DECL_OFFSET2(MonoClass,name,40) +DECL_OFFSET2(MonoClass,name_space,44) +DECL_OFFSET2(MonoClass,type_token,48) +DECL_OFFSET2(MonoClass,vtable_size,52) +DECL_OFFSET2(MonoClass,interface_count,56) +DECL_OFFSET2(MonoClass,interface_id,60) +DECL_OFFSET2(MonoClass,max_interface_id,64) +DECL_OFFSET2(MonoClass,interface_offsets_count,68) +DECL_OFFSET2(MonoClass,interfaces_packed,72) +DECL_OFFSET2(MonoClass,interface_offsets_packed,76) +DECL_OFFSET2(MonoClass,interface_bitmap,80) +DECL_OFFSET2(MonoClass,inlinearray_value,84) +DECL_OFFSET2(MonoClass,name_hash,88) +DECL_OFFSET2(MonoClass,interfaces,92) +DECL_OFFSET2(MonoClass,sizes,96) +DECL_OFFSET2(MonoClass,fields,100) +DECL_OFFSET2(MonoClass,methods,104) +DECL_OFFSET2(MonoClass,this_arg,108) +DECL_OFFSET2(MonoClass,_byval_arg,116) +DECL_OFFSET2(MonoClass,gc_descr,124) +DECL_OFFSET2(MonoClass,runtime_vtable,128) +DECL_OFFSET2(MonoClass,vtable,132) +DECL_OFFSET2(MonoClass,infrequent_data,136) +DECL_OFFSET2(MonoClass,variant_search_table,140) +DECL_SIZE2(MonoVTable,44) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,4) +DECL_OFFSET2(MonoVTable,domain,8) +DECL_OFFSET2(MonoVTable,type,12) +DECL_OFFSET2(MonoVTable,interface_bitmap,16) +DECL_OFFSET2(MonoVTable,loader_alloc,20) +DECL_OFFSET2(MonoVTable,max_interface_id,24) +DECL_OFFSET2(MonoVTable,rank,28) +DECL_OFFSET2(MonoVTable,initialized,29) +DECL_OFFSET2(MonoVTable,flags,30) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,32) +DECL_OFFSET2(MonoVTable,runtime_generic_context,36) +DECL_OFFSET2(MonoVTable,ee_data,40) +DECL_OFFSET2(MonoVTable,vtable,44) +DECL_SIZE2(MonoDelegate,60) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,8) +DECL_OFFSET2(MonoDelegate,invoke_impl,12) +DECL_OFFSET2(MonoDelegate,target,16) +DECL_OFFSET2(MonoDelegate,method,20) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,24) +DECL_OFFSET2(MonoDelegate,extra_arg,28) +DECL_OFFSET2(MonoDelegate,invoke_info,32) +DECL_OFFSET2(MonoDelegate,interp_method,36) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,40) +DECL_OFFSET2(MonoDelegate,method_info,44) +DECL_OFFSET2(MonoDelegate,original_method_info,48) +DECL_OFFSET2(MonoDelegate,data,52) +DECL_OFFSET2(MonoDelegate,method_is_virtual,56) +DECL_OFFSET2(MonoDelegate,bound,57) +DECL_SIZE2(MonoInternalThread,136) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,8) +DECL_OFFSET2(MonoInternalThread,handle,12) +DECL_OFFSET2(MonoInternalThread,native_handle,16) +DECL_OFFSET2(MonoInternalThread,name,20) +DECL_OFFSET2(MonoInternalThread,state,32) +DECL_OFFSET2(MonoInternalThread,abort_exc,36) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,40) +DECL_OFFSET2(MonoInternalThread,tid,48) +DECL_OFFSET2(MonoInternalThread,debugger_thread,56) +DECL_OFFSET2(MonoInternalThread,static_data,60) +DECL_OFFSET2(MonoInternalThread,thread_info,64) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,68) +DECL_OFFSET2(MonoInternalThread,longlived,72) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,76) +DECL_OFFSET2(MonoInternalThread,external_eventloop,77) +DECL_OFFSET2(MonoInternalThread,apartment_state,78) +DECL_OFFSET2(MonoInternalThread,managed_id,80) +DECL_OFFSET2(MonoInternalThread,small_id,84) +DECL_OFFSET2(MonoInternalThread,manage_callback,88) +DECL_OFFSET2(MonoInternalThread,flags,92) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,96) +DECL_OFFSET2(MonoInternalThread,priority,100) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,104) +DECL_OFFSET2(MonoInternalThread,suspended,108) +DECL_OFFSET2(MonoInternalThread,self_suspended,112) +DECL_OFFSET2(MonoInternalThread,thread_state,116) +DECL_OFFSET2(MonoInternalThread,internal_thread,120) +DECL_OFFSET2(MonoInternalThread,pending_exception,124) +DECL_OFFSET2(MonoInternalThread,last,128) +DECL_SIZE2(MonoMulticastDelegate,64) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,60) +DECL_SIZE2(MonoTransparentProxy,20) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,8) +DECL_OFFSET2(MonoTransparentProxy,remote_class,12) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,16) +DECL_SIZE2(MonoRealProxy,40) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,8) +DECL_OFFSET2(MonoRealProxy,context,12) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,16) +DECL_OFFSET2(MonoRealProxy,target_domain_id,20) +DECL_OFFSET2(MonoRealProxy,target_uri,24) +DECL_OFFSET2(MonoRealProxy,object_identity,28) +DECL_OFFSET2(MonoRealProxy,obj_TP,32) +DECL_OFFSET2(MonoRealProxy,stub_data,36) +DECL_SIZE2(MonoRemoteClass,20) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,4) +DECL_OFFSET2(MonoRemoteClass,proxy_class,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,12) +DECL_OFFSET2(MonoRemoteClass,interface_count,16) +DECL_OFFSET2(MonoRemoteClass,interfaces,20) +DECL_SIZE2(MonoArray,16) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,8) +DECL_OFFSET2(MonoArray,max_length,12) +DECL_OFFSET2(MonoArray,vector,16) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,12) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,8) +DECL_SIZE2(MonoHandleRef,8) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,4) +DECL_SIZE2(MonoString,12) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,8) +DECL_OFFSET2(MonoString,chars,12) +DECL_SIZE2(MonoException,72) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,8) +DECL_OFFSET2(MonoException,message,12) +DECL_OFFSET2(MonoException,_data,16) +DECL_OFFSET2(MonoException,inner_ex,20) +DECL_OFFSET2(MonoException,help_link,24) +DECL_OFFSET2(MonoException,trace_ips,28) +DECL_OFFSET2(MonoException,stack_trace,32) +DECL_OFFSET2(MonoException,remote_stack_trace,36) +DECL_OFFSET2(MonoException,remote_stack_index,40) +DECL_OFFSET2(MonoException,dynamic_methods,44) +DECL_OFFSET2(MonoException,hresult,48) +DECL_OFFSET2(MonoException,source,52) +DECL_OFFSET2(MonoException,serialization_manager,56) +DECL_OFFSET2(MonoException,captured_traces,60) +DECL_OFFSET2(MonoException,native_trace_ips,64) +DECL_OFFSET2(MonoException,caught_in_unmanaged,68) +DECL_SIZE2(MonoTypedRef,12) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,4) +DECL_OFFSET2(MonoTypedRef,klass,8) +DECL_SIZE2(MonoThreadsSync,28) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,12) +DECL_OFFSET2(MonoThreadsSync,data,16) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,20) +DECL_OFFSET2(MonoThreadsSync,entry_cond,24) +DECL_SIZE2(SgenThreadInfo,872) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,848) +DECL_OFFSET2(SgenThreadInfo,tlab_next,852) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,856) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,860) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,864) +DECL_SIZE2(SgenClientThreadInfo,848) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,608) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,612) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,616) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,620) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,624) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,628) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,632) +DECL_OFFSET2(SgenClientThreadInfo,ctx,640) +DECL_SIZE2(MonoProfilerCallContext,224) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,208) +DECL_OFFSET2(MonoProfilerCallContext,method,212) +DECL_OFFSET2(MonoProfilerCallContext,return_value,216) +DECL_OFFSET2(MonoProfilerCallContext,args,220) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,208) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,lmf_addr,4) +DECL_OFFSET2(MonoLMF,method,8) +DECL_OFFSET2(MonoLMF,sp,12) +DECL_OFFSET2(MonoLMF,ip,16) +DECL_OFFSET2(MonoLMF,fp,20) +DECL_OFFSET2(MonoLMF,fregs,24) +DECL_OFFSET2(MonoLMF,iregs,152) +DECL_SIZE2(MonoLMFExt,432) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,208) +DECL_OFFSET2(MonoLMFExt,ctx,216) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,424) +DECL_OFFSET2(MonoLMFExt,il_state,428) +DECL_SIZE2(MonoMethodILState,12) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,4) +DECL_OFFSET2(MonoMethodILState,data,8) +DECL_SIZE2(MonoMethodRuntimeGenericContext,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16) +DECL_SIZE2(MonoJitTlsData,1168) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,4) +DECL_OFFSET2(MonoJitTlsData,lmf,8) +DECL_OFFSET2(MonoJitTlsData,first_lmf,12) +DECL_OFFSET2(MonoJitTlsData,signal_stack,20) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,24) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,28) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,32) +DECL_OFFSET2(MonoJitTlsData,abort_func,40) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,44) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,48) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,56) +DECL_OFFSET2(MonoJitTlsData,resume_state,264) +DECL_OFFSET2(MonoJitTlsData,handler_block,712) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,720) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,928) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,1136) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,1140) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,1144) +DECL_OFFSET2(MonoJitTlsData,calling_image,1148) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,1152) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,1156) +DECL_OFFSET2(MonoJitTlsData,interp_context,1160) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4) +DECL_SIZE2(MonoContext,208) +DECL_OFFSET2(MonoContext,pc,0) +DECL_OFFSET2(MonoContext,regs,4) +DECL_OFFSET2(MonoContext,fregs,72) +DECL_OFFSET2(MonoContext,cpsr,200) +DECL_SIZE2(MonoDelegateTrampInfo,44) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,4) +DECL_OFFSET2(MonoDelegateTrampInfo,method,8) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,12) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,16) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,20) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,24) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,28) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,32) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,36) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,40) +DECL_SIZE2(GSharedVtCallInfo,48) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,4) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_reg,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,12) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,16) +DECL_OFFSET2(GSharedVtCallInfo,map_count,20) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,24) +DECL_OFFSET2(GSharedVtCallInfo,calli,28) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,32) +DECL_OFFSET2(GSharedVtCallInfo,have_fregs,36) +DECL_OFFSET2(GSharedVtCallInfo,caller_cinfo,40) +DECL_OFFSET2(GSharedVtCallInfo,callee_cinfo,44) +DECL_OFFSET2(GSharedVtCallInfo,map,48) +DECL_SIZE2(SeqPointInfo,12) +DECL_OFFSET2(SeqPointInfo,ss_trigger_page,0) +DECL_OFFSET2(SeqPointInfo,bp_trigger_page,4) +DECL_OFFSET2(SeqPointInfo,ss_tramp_addr,8) +DECL_OFFSET2(SeqPointInfo,bp_addrs,12) +DECL_SIZE2(DynCallArgs,104) +DECL_OFFSET2(DynCallArgs,fpregs,0) +DECL_OFFSET2(DynCallArgs,res,64) +DECL_OFFSET2(DynCallArgs,res2,68) +DECL_OFFSET2(DynCallArgs,ret,72) +DECL_OFFSET2(DynCallArgs,has_fpregs,76) +DECL_OFFSET2(DynCallArgs,n_stackargs,80) +DECL_OFFSET2(DynCallArgs,regs,84) +DECL_SIZE2(CallContext,88) +DECL_OFFSET2(CallContext,gregs,0) +DECL_OFFSET2(CallContext,fregs,16) +DECL_OFFSET2(CallContext,stack_size,80) +DECL_OFFSET2(CallContext,stack,84) +DECL_SIZE2(MonoFtnDesc,16) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,4) +DECL_OFFSET2(MonoFtnDesc,method,8) +DECL_OFFSET2(MonoFtnDesc,interp_method,12) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_ARM +#endif //TARGET_ANDROID +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/i686-none-linux-android.h b/src/mono/mono/offsets/i686-none-linux-android.h new file mode 100644 index 0000000000000..59b24d7e86376 --- /dev/null +++ b/src/mono/mono/offsets/i686-none-linux-android.h @@ -0,0 +1,325 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_X86 +#ifdef TARGET_ANDROID +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,4) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,4) +DECL_ALIGN2(gpointer,4) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,4) +DECL_SIZE2(MonoObject,8) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,4) +DECL_SIZE2(MonoClass,144) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,4) +DECL_OFFSET2(MonoClass,supertypes,8) +DECL_OFFSET2(MonoClass,idepth,12) +DECL_OFFSET2(MonoClass,rank,14) +DECL_OFFSET2(MonoClass,class_kind,15) +DECL_OFFSET2(MonoClass,instance_size,16) +DECL_OFFSET2(MonoClass,min_align,22) +DECL_OFFSET2(MonoClass,parent,28) +DECL_OFFSET2(MonoClass,nested_in,32) +DECL_OFFSET2(MonoClass,image,36) +DECL_OFFSET2(MonoClass,name,40) +DECL_OFFSET2(MonoClass,name_space,44) +DECL_OFFSET2(MonoClass,type_token,48) +DECL_OFFSET2(MonoClass,vtable_size,52) +DECL_OFFSET2(MonoClass,interface_count,56) +DECL_OFFSET2(MonoClass,interface_id,60) +DECL_OFFSET2(MonoClass,max_interface_id,64) +DECL_OFFSET2(MonoClass,interface_offsets_count,68) +DECL_OFFSET2(MonoClass,interfaces_packed,72) +DECL_OFFSET2(MonoClass,interface_offsets_packed,76) +DECL_OFFSET2(MonoClass,interface_bitmap,80) +DECL_OFFSET2(MonoClass,inlinearray_value,84) +DECL_OFFSET2(MonoClass,name_hash,88) +DECL_OFFSET2(MonoClass,interfaces,92) +DECL_OFFSET2(MonoClass,sizes,96) +DECL_OFFSET2(MonoClass,fields,100) +DECL_OFFSET2(MonoClass,methods,104) +DECL_OFFSET2(MonoClass,this_arg,108) +DECL_OFFSET2(MonoClass,_byval_arg,116) +DECL_OFFSET2(MonoClass,gc_descr,124) +DECL_OFFSET2(MonoClass,runtime_vtable,128) +DECL_OFFSET2(MonoClass,vtable,132) +DECL_OFFSET2(MonoClass,infrequent_data,136) +DECL_OFFSET2(MonoClass,variant_search_table,140) +DECL_SIZE2(MonoVTable,44) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,4) +DECL_OFFSET2(MonoVTable,domain,8) +DECL_OFFSET2(MonoVTable,type,12) +DECL_OFFSET2(MonoVTable,interface_bitmap,16) +DECL_OFFSET2(MonoVTable,loader_alloc,20) +DECL_OFFSET2(MonoVTable,max_interface_id,24) +DECL_OFFSET2(MonoVTable,rank,28) +DECL_OFFSET2(MonoVTable,initialized,29) +DECL_OFFSET2(MonoVTable,flags,30) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,32) +DECL_OFFSET2(MonoVTable,runtime_generic_context,36) +DECL_OFFSET2(MonoVTable,ee_data,40) +DECL_OFFSET2(MonoVTable,vtable,44) +DECL_SIZE2(MonoDelegate,60) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,8) +DECL_OFFSET2(MonoDelegate,invoke_impl,12) +DECL_OFFSET2(MonoDelegate,target,16) +DECL_OFFSET2(MonoDelegate,method,20) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,24) +DECL_OFFSET2(MonoDelegate,extra_arg,28) +DECL_OFFSET2(MonoDelegate,invoke_info,32) +DECL_OFFSET2(MonoDelegate,interp_method,36) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,40) +DECL_OFFSET2(MonoDelegate,method_info,44) +DECL_OFFSET2(MonoDelegate,original_method_info,48) +DECL_OFFSET2(MonoDelegate,data,52) +DECL_OFFSET2(MonoDelegate,method_is_virtual,56) +DECL_OFFSET2(MonoDelegate,bound,57) +DECL_SIZE2(MonoInternalThread,128) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,8) +DECL_OFFSET2(MonoInternalThread,handle,12) +DECL_OFFSET2(MonoInternalThread,native_handle,16) +DECL_OFFSET2(MonoInternalThread,name,20) +DECL_OFFSET2(MonoInternalThread,state,32) +DECL_OFFSET2(MonoInternalThread,abort_exc,36) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,40) +DECL_OFFSET2(MonoInternalThread,tid,44) +DECL_OFFSET2(MonoInternalThread,debugger_thread,52) +DECL_OFFSET2(MonoInternalThread,static_data,56) +DECL_OFFSET2(MonoInternalThread,thread_info,60) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,64) +DECL_OFFSET2(MonoInternalThread,longlived,68) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,72) +DECL_OFFSET2(MonoInternalThread,external_eventloop,73) +DECL_OFFSET2(MonoInternalThread,apartment_state,74) +DECL_OFFSET2(MonoInternalThread,managed_id,76) +DECL_OFFSET2(MonoInternalThread,small_id,80) +DECL_OFFSET2(MonoInternalThread,manage_callback,84) +DECL_OFFSET2(MonoInternalThread,flags,88) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,92) +DECL_OFFSET2(MonoInternalThread,priority,96) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,100) +DECL_OFFSET2(MonoInternalThread,suspended,104) +DECL_OFFSET2(MonoInternalThread,self_suspended,108) +DECL_OFFSET2(MonoInternalThread,thread_state,112) +DECL_OFFSET2(MonoInternalThread,internal_thread,116) +DECL_OFFSET2(MonoInternalThread,pending_exception,120) +DECL_OFFSET2(MonoInternalThread,last,124) +DECL_SIZE2(MonoMulticastDelegate,64) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,60) +DECL_SIZE2(MonoTransparentProxy,20) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,8) +DECL_OFFSET2(MonoTransparentProxy,remote_class,12) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,16) +DECL_SIZE2(MonoRealProxy,40) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,8) +DECL_OFFSET2(MonoRealProxy,context,12) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,16) +DECL_OFFSET2(MonoRealProxy,target_domain_id,20) +DECL_OFFSET2(MonoRealProxy,target_uri,24) +DECL_OFFSET2(MonoRealProxy,object_identity,28) +DECL_OFFSET2(MonoRealProxy,obj_TP,32) +DECL_OFFSET2(MonoRealProxy,stub_data,36) +DECL_SIZE2(MonoRemoteClass,20) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,4) +DECL_OFFSET2(MonoRemoteClass,proxy_class,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,12) +DECL_OFFSET2(MonoRemoteClass,interface_count,16) +DECL_OFFSET2(MonoRemoteClass,interfaces,20) +DECL_SIZE2(MonoArray,16) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,8) +DECL_OFFSET2(MonoArray,max_length,12) +DECL_OFFSET2(MonoArray,vector,16) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,12) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,8) +DECL_SIZE2(MonoHandleRef,8) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,4) +DECL_SIZE2(MonoString,12) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,8) +DECL_OFFSET2(MonoString,chars,12) +DECL_SIZE2(MonoException,72) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,8) +DECL_OFFSET2(MonoException,message,12) +DECL_OFFSET2(MonoException,_data,16) +DECL_OFFSET2(MonoException,inner_ex,20) +DECL_OFFSET2(MonoException,help_link,24) +DECL_OFFSET2(MonoException,trace_ips,28) +DECL_OFFSET2(MonoException,stack_trace,32) +DECL_OFFSET2(MonoException,remote_stack_trace,36) +DECL_OFFSET2(MonoException,remote_stack_index,40) +DECL_OFFSET2(MonoException,dynamic_methods,44) +DECL_OFFSET2(MonoException,hresult,48) +DECL_OFFSET2(MonoException,source,52) +DECL_OFFSET2(MonoException,serialization_manager,56) +DECL_OFFSET2(MonoException,captured_traces,60) +DECL_OFFSET2(MonoException,native_trace_ips,64) +DECL_OFFSET2(MonoException,caught_in_unmanaged,68) +DECL_SIZE2(MonoTypedRef,12) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,4) +DECL_OFFSET2(MonoTypedRef,klass,8) +DECL_SIZE2(MonoThreadsSync,28) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,12) +DECL_OFFSET2(MonoThreadsSync,data,16) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,20) +DECL_OFFSET2(MonoThreadsSync,entry_cond,24) +DECL_SIZE2(SgenThreadInfo,348) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,324) +DECL_OFFSET2(SgenThreadInfo,tlab_next,328) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,332) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,336) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,340) +DECL_SIZE2(SgenClientThreadInfo,324) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,260) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,264) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,268) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,272) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,276) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,280) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,284) +DECL_OFFSET2(SgenClientThreadInfo,ctx,288) +DECL_SIZE2(MonoProfilerCallContext,52) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,36) +DECL_OFFSET2(MonoProfilerCallContext,method,40) +DECL_OFFSET2(MonoProfilerCallContext,return_value,44) +DECL_OFFSET2(MonoProfilerCallContext,args,48) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,36) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,lmf_addr,4) +DECL_OFFSET2(MonoLMF,method,8) +DECL_OFFSET2(MonoLMF,esp,12) +DECL_OFFSET2(MonoLMF,ebx,16) +DECL_OFFSET2(MonoLMF,edi,20) +DECL_OFFSET2(MonoLMF,esi,24) +DECL_OFFSET2(MonoLMF,ebp,28) +DECL_OFFSET2(MonoLMF,eip,32) +DECL_SIZE2(MonoLMFExt,84) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,36) +DECL_OFFSET2(MonoLMFExt,ctx,40) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,76) +DECL_OFFSET2(MonoLMFExt,il_state,80) +DECL_SIZE2(MonoMethodILState,12) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,4) +DECL_OFFSET2(MonoMethodILState,data,8) +DECL_SIZE2(MonoMethodRuntimeGenericContext,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16) +DECL_SIZE2(MonoJitTlsData,296) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,4) +DECL_OFFSET2(MonoJitTlsData,lmf,8) +DECL_OFFSET2(MonoJitTlsData,first_lmf,12) +DECL_OFFSET2(MonoJitTlsData,signal_stack,20) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,24) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,28) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,32) +DECL_OFFSET2(MonoJitTlsData,abort_func,40) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,44) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,48) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,52) +DECL_OFFSET2(MonoJitTlsData,resume_state,88) +DECL_OFFSET2(MonoJitTlsData,handler_block,192) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,196) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,232) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,268) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,272) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,276) +DECL_OFFSET2(MonoJitTlsData,calling_image,280) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,284) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,288) +DECL_OFFSET2(MonoJitTlsData,interp_context,292) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4) +DECL_SIZE2(MonoContext,36) +DECL_OFFSET2(MonoContext,eax,0) +DECL_OFFSET2(MonoContext,ebx,4) +DECL_OFFSET2(MonoContext,ecx,8) +DECL_OFFSET2(MonoContext,edx,12) +DECL_OFFSET2(MonoContext,ebp,16) +DECL_OFFSET2(MonoContext,esp,20) +DECL_OFFSET2(MonoContext,esi,24) +DECL_OFFSET2(MonoContext,edi,28) +DECL_OFFSET2(MonoContext,eip,32) +DECL_SIZE2(MonoDelegateTrampInfo,44) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,4) +DECL_OFFSET2(MonoDelegateTrampInfo,method,8) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,12) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,16) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,20) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,24) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,28) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,32) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,36) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,40) +DECL_SIZE2(GSharedVtCallInfo,36) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,4) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_slot,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,12) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,16) +DECL_OFFSET2(GSharedVtCallInfo,map_count,20) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,24) +DECL_OFFSET2(GSharedVtCallInfo,calli,28) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,32) +DECL_OFFSET2(GSharedVtCallInfo,map,36) +DECL_SIZE2(CallContext,24) +DECL_OFFSET2(CallContext,eax,0) +DECL_OFFSET2(CallContext,edx,4) +DECL_OFFSET2(CallContext,fret,8) +DECL_OFFSET2(CallContext,stack_size,16) +DECL_OFFSET2(CallContext,stack,20) +DECL_SIZE2(MonoFtnDesc,16) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,4) +DECL_OFFSET2(MonoFtnDesc,method,8) +DECL_OFFSET2(MonoFtnDesc,interp_method,12) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_X86 +#endif //TARGET_ANDROID +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/tools/offsets-tool/offsets-tool.py b/src/mono/mono/offsets/offsets-tool.py similarity index 93% rename from src/mono/mono/tools/offsets-tool/offsets-tool.py rename to src/mono/mono/offsets/offsets-tool.py index 3332a4b6c5df4..c91f96f4cfd68 100644 --- a/src/mono/mono/tools/offsets-tool/offsets-tool.py +++ b/src/mono/mono/offsets/offsets-tool.py @@ -44,6 +44,25 @@ def __init__(self, name, offset): self.name = name self.offset = offset +class ComparableFile: + def __init__(self): + self.lines = [] + + def write(self, line): + self.lines.append (line) + + def compare(self, filename): + with open (filename, 'r') as f: + orig_lines = f.readlines () + return self.lines != orig_lines + + def dump(self, filename): + with open (filename, 'w') as f: + f.writelines (self.lines) + + def close(self): + pass + class OffsetsTool: def __init__(self): pass @@ -65,6 +84,7 @@ def require_emscipten_path (args): parser.add_argument ('--emscripten-sdk', dest='emscripten_path', help='path to emscripten sdk') parser.add_argument ('--wasi-sdk', dest='wasi_path', help='path to wasi sdk') parser.add_argument ('--outfile', dest='outfile', help='path to output file', required=True) + parser.add_argument ('--validate-outfile', dest='validate_outfile', help='checks that there are no changes to outfile and writes changes into outfile.new otherwise', action='store_true') parser.add_argument ('--monodir', dest='mono_path', help='path to mono source tree', required=True) parser.add_argument ('--nativedir', dest='native_path', help='path to src/native', required=True) parser.add_argument ('--targetdir', dest='target_path', help='path to mono tree configured for target', required=True) @@ -82,6 +102,9 @@ def require_emscipten_path (args): if not os.path.isfile (args.target_path + "/config.h"): print ("File '" + args.target_path + "/config.h' doesn't exist.", file=sys.stderr) sys.exit (1) + if args.validate_outfile and not os.path.isfile (args.outfile): + print ("File '" + args.outfile + "' doesn't exist and --validate-outfile was passed.", file=sys.stderr) + sys.exit (1) self.sys_includes=[] self.target = None @@ -348,8 +371,14 @@ def run_clang(self): def gen (self): outfile = self.args.outfile + validate_outfile = self.args.validate_outfile target = self.target - f = open (outfile, 'w') + + if validate_outfile: + f = ComparableFile () + else: + f = open (outfile, 'w') + f.write ("#ifndef USED_CROSS_COMPILER_OFFSETS\n") if target.arch_define: f.write ("#ifdef " + target.arch_define + "\n") @@ -404,6 +433,11 @@ def gen (self): else: f.write ("#endif //" + target.platform_define + "\n") f.write ("#endif //USED_CROSS_COMPILER_OFFSETS check\n") + f.close () + + if validate_outfile and f.compare (outfile): + print ("Offsets file has changed.", file=sys.stderr) + f.dump (outfile + ".new") tool = OffsetsTool () tool.parse_args () diff --git a/src/mono/mono/offsets/wasm32-unknown-none.h b/src/mono/mono/offsets/wasm32-unknown-none.h new file mode 100644 index 0000000000000..c05a5e8cb1575 --- /dev/null +++ b/src/mono/mono/offsets/wasm32-unknown-none.h @@ -0,0 +1,297 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_WASM +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,4) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,4) +DECL_SIZE2(MonoObject,8) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,4) +DECL_SIZE2(MonoClass,144) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,4) +DECL_OFFSET2(MonoClass,supertypes,8) +DECL_OFFSET2(MonoClass,idepth,12) +DECL_OFFSET2(MonoClass,rank,14) +DECL_OFFSET2(MonoClass,class_kind,15) +DECL_OFFSET2(MonoClass,instance_size,16) +DECL_OFFSET2(MonoClass,min_align,22) +DECL_OFFSET2(MonoClass,parent,28) +DECL_OFFSET2(MonoClass,nested_in,32) +DECL_OFFSET2(MonoClass,image,36) +DECL_OFFSET2(MonoClass,name,40) +DECL_OFFSET2(MonoClass,name_space,44) +DECL_OFFSET2(MonoClass,type_token,48) +DECL_OFFSET2(MonoClass,vtable_size,52) +DECL_OFFSET2(MonoClass,interface_count,56) +DECL_OFFSET2(MonoClass,interface_id,60) +DECL_OFFSET2(MonoClass,max_interface_id,64) +DECL_OFFSET2(MonoClass,interface_offsets_count,68) +DECL_OFFSET2(MonoClass,interfaces_packed,72) +DECL_OFFSET2(MonoClass,interface_offsets_packed,76) +DECL_OFFSET2(MonoClass,interface_bitmap,80) +DECL_OFFSET2(MonoClass,inlinearray_value,84) +DECL_OFFSET2(MonoClass,name_hash,88) +DECL_OFFSET2(MonoClass,interfaces,92) +DECL_OFFSET2(MonoClass,sizes,96) +DECL_OFFSET2(MonoClass,fields,100) +DECL_OFFSET2(MonoClass,methods,104) +DECL_OFFSET2(MonoClass,this_arg,108) +DECL_OFFSET2(MonoClass,_byval_arg,116) +DECL_OFFSET2(MonoClass,gc_descr,124) +DECL_OFFSET2(MonoClass,runtime_vtable,128) +DECL_OFFSET2(MonoClass,vtable,132) +DECL_OFFSET2(MonoClass,infrequent_data,136) +DECL_OFFSET2(MonoClass,variant_search_table,140) +DECL_SIZE2(MonoVTable,44) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,4) +DECL_OFFSET2(MonoVTable,domain,8) +DECL_OFFSET2(MonoVTable,type,12) +DECL_OFFSET2(MonoVTable,interface_bitmap,16) +DECL_OFFSET2(MonoVTable,loader_alloc,20) +DECL_OFFSET2(MonoVTable,max_interface_id,24) +DECL_OFFSET2(MonoVTable,rank,28) +DECL_OFFSET2(MonoVTable,initialized,29) +DECL_OFFSET2(MonoVTable,flags,30) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,32) +DECL_OFFSET2(MonoVTable,runtime_generic_context,36) +DECL_OFFSET2(MonoVTable,ee_data,40) +DECL_OFFSET2(MonoVTable,vtable,44) +DECL_SIZE2(MonoDelegate,60) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,8) +DECL_OFFSET2(MonoDelegate,invoke_impl,12) +DECL_OFFSET2(MonoDelegate,target,16) +DECL_OFFSET2(MonoDelegate,method,20) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,24) +DECL_OFFSET2(MonoDelegate,extra_arg,28) +DECL_OFFSET2(MonoDelegate,invoke_info,32) +DECL_OFFSET2(MonoDelegate,interp_method,36) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,40) +DECL_OFFSET2(MonoDelegate,method_info,44) +DECL_OFFSET2(MonoDelegate,original_method_info,48) +DECL_OFFSET2(MonoDelegate,data,52) +DECL_OFFSET2(MonoDelegate,method_is_virtual,56) +DECL_OFFSET2(MonoDelegate,bound,57) +DECL_SIZE2(MonoInternalThread,136) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,8) +DECL_OFFSET2(MonoInternalThread,handle,12) +DECL_OFFSET2(MonoInternalThread,native_handle,16) +DECL_OFFSET2(MonoInternalThread,name,20) +DECL_OFFSET2(MonoInternalThread,state,32) +DECL_OFFSET2(MonoInternalThread,abort_exc,36) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,40) +DECL_OFFSET2(MonoInternalThread,tid,48) +DECL_OFFSET2(MonoInternalThread,debugger_thread,56) +DECL_OFFSET2(MonoInternalThread,static_data,60) +DECL_OFFSET2(MonoInternalThread,thread_info,64) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,68) +DECL_OFFSET2(MonoInternalThread,longlived,72) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,76) +DECL_OFFSET2(MonoInternalThread,external_eventloop,77) +DECL_OFFSET2(MonoInternalThread,apartment_state,78) +DECL_OFFSET2(MonoInternalThread,managed_id,80) +DECL_OFFSET2(MonoInternalThread,small_id,84) +DECL_OFFSET2(MonoInternalThread,manage_callback,88) +DECL_OFFSET2(MonoInternalThread,flags,92) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,96) +DECL_OFFSET2(MonoInternalThread,priority,100) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,104) +DECL_OFFSET2(MonoInternalThread,suspended,108) +DECL_OFFSET2(MonoInternalThread,self_suspended,112) +DECL_OFFSET2(MonoInternalThread,thread_state,116) +DECL_OFFSET2(MonoInternalThread,internal_thread,120) +DECL_OFFSET2(MonoInternalThread,pending_exception,124) +DECL_OFFSET2(MonoInternalThread,last,128) +DECL_SIZE2(MonoMulticastDelegate,64) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,60) +DECL_SIZE2(MonoTransparentProxy,20) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,8) +DECL_OFFSET2(MonoTransparentProxy,remote_class,12) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,16) +DECL_SIZE2(MonoRealProxy,40) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,8) +DECL_OFFSET2(MonoRealProxy,context,12) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,16) +DECL_OFFSET2(MonoRealProxy,target_domain_id,20) +DECL_OFFSET2(MonoRealProxy,target_uri,24) +DECL_OFFSET2(MonoRealProxy,object_identity,28) +DECL_OFFSET2(MonoRealProxy,obj_TP,32) +DECL_OFFSET2(MonoRealProxy,stub_data,36) +DECL_SIZE2(MonoRemoteClass,20) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,4) +DECL_OFFSET2(MonoRemoteClass,proxy_class,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,12) +DECL_OFFSET2(MonoRemoteClass,interface_count,16) +DECL_OFFSET2(MonoRemoteClass,interfaces,20) +DECL_SIZE2(MonoArray,16) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,8) +DECL_OFFSET2(MonoArray,max_length,12) +DECL_OFFSET2(MonoArray,vector,16) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,12) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,8) +DECL_SIZE2(MonoHandleRef,8) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,4) +DECL_SIZE2(MonoString,12) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,8) +DECL_OFFSET2(MonoString,chars,12) +DECL_SIZE2(MonoException,72) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,8) +DECL_OFFSET2(MonoException,message,12) +DECL_OFFSET2(MonoException,_data,16) +DECL_OFFSET2(MonoException,inner_ex,20) +DECL_OFFSET2(MonoException,help_link,24) +DECL_OFFSET2(MonoException,trace_ips,28) +DECL_OFFSET2(MonoException,stack_trace,32) +DECL_OFFSET2(MonoException,remote_stack_trace,36) +DECL_OFFSET2(MonoException,remote_stack_index,40) +DECL_OFFSET2(MonoException,dynamic_methods,44) +DECL_OFFSET2(MonoException,hresult,48) +DECL_OFFSET2(MonoException,source,52) +DECL_OFFSET2(MonoException,serialization_manager,56) +DECL_OFFSET2(MonoException,captured_traces,60) +DECL_OFFSET2(MonoException,native_trace_ips,64) +DECL_OFFSET2(MonoException,caught_in_unmanaged,68) +DECL_SIZE2(MonoTypedRef,12) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,4) +DECL_OFFSET2(MonoTypedRef,klass,8) +DECL_SIZE2(MonoThreadsSync,32) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,12) +DECL_OFFSET2(MonoThreadsSync,data,16) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,20) +DECL_OFFSET2(MonoThreadsSync,entry_cond,24) +DECL_OFFSET2(MonoThreadsSync,is_interned,28) +DECL_SIZE2(SgenThreadInfo,312) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,288) +DECL_OFFSET2(SgenThreadInfo,tlab_next,292) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,296) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,300) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,304) +DECL_SIZE2(SgenClientThreadInfo,288) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,240) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,244) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,248) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,252) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,256) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,260) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,264) +DECL_OFFSET2(SgenClientThreadInfo,ctx,268) +DECL_SIZE2(MonoProfilerCallContext,36) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,20) +DECL_OFFSET2(MonoProfilerCallContext,method,24) +DECL_OFFSET2(MonoProfilerCallContext,return_value,28) +DECL_OFFSET2(MonoProfilerCallContext,args,32) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,12) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,lmf_addr,4) +DECL_OFFSET2(MonoLMF,method,8) +DECL_SIZE2(MonoLMFExt,44) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,12) +DECL_OFFSET2(MonoLMFExt,ctx,16) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,36) +DECL_OFFSET2(MonoLMFExt,il_state,40) +DECL_SIZE2(MonoMethodILState,12) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,4) +DECL_OFFSET2(MonoMethodILState,data,8) +DECL_SIZE2(MonoMethodRuntimeGenericContext,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16) +DECL_SIZE2(MonoJitTlsData,216) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,4) +DECL_OFFSET2(MonoJitTlsData,lmf,8) +DECL_OFFSET2(MonoJitTlsData,first_lmf,12) +DECL_OFFSET2(MonoJitTlsData,signal_stack,20) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,24) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,28) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,32) +DECL_OFFSET2(MonoJitTlsData,abort_func,40) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,44) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,48) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,52) +DECL_OFFSET2(MonoJitTlsData,resume_state,72) +DECL_OFFSET2(MonoJitTlsData,handler_block,144) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,148) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,168) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,188) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,192) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,196) +DECL_OFFSET2(MonoJitTlsData,calling_image,200) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,204) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,208) +DECL_OFFSET2(MonoJitTlsData,interp_context,212) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4) +DECL_SIZE2(MonoContext,20) +DECL_OFFSET2(MonoContext,wasm_sp,0) +DECL_OFFSET2(MonoContext,wasm_bp,4) +DECL_OFFSET2(MonoContext,llvm_exc_reg,8) +DECL_OFFSET2(MonoContext,wasm_ip,12) +DECL_OFFSET2(MonoContext,wasm_pc,16) +DECL_SIZE2(MonoDelegateTrampInfo,44) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,4) +DECL_OFFSET2(MonoDelegateTrampInfo,method,8) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,12) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,16) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,20) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,24) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,28) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,32) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,36) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,40) +DECL_SIZE2(MonoFtnDesc,16) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,4) +DECL_OFFSET2(MonoFtnDesc,method,8) +DECL_OFFSET2(MonoFtnDesc,interp_method,12) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_WASM +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/wasm32-unknown-wasip2.h b/src/mono/mono/offsets/wasm32-unknown-wasip2.h new file mode 100644 index 0000000000000..f0a4d4de8e99e --- /dev/null +++ b/src/mono/mono/offsets/wasm32-unknown-wasip2.h @@ -0,0 +1,297 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_WASI +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,4) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,4) +DECL_SIZE2(MonoObject,8) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,4) +DECL_SIZE2(MonoClass,144) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,4) +DECL_OFFSET2(MonoClass,supertypes,8) +DECL_OFFSET2(MonoClass,idepth,12) +DECL_OFFSET2(MonoClass,rank,14) +DECL_OFFSET2(MonoClass,class_kind,15) +DECL_OFFSET2(MonoClass,instance_size,16) +DECL_OFFSET2(MonoClass,min_align,22) +DECL_OFFSET2(MonoClass,parent,28) +DECL_OFFSET2(MonoClass,nested_in,32) +DECL_OFFSET2(MonoClass,image,36) +DECL_OFFSET2(MonoClass,name,40) +DECL_OFFSET2(MonoClass,name_space,44) +DECL_OFFSET2(MonoClass,type_token,48) +DECL_OFFSET2(MonoClass,vtable_size,52) +DECL_OFFSET2(MonoClass,interface_count,56) +DECL_OFFSET2(MonoClass,interface_id,60) +DECL_OFFSET2(MonoClass,max_interface_id,64) +DECL_OFFSET2(MonoClass,interface_offsets_count,68) +DECL_OFFSET2(MonoClass,interfaces_packed,72) +DECL_OFFSET2(MonoClass,interface_offsets_packed,76) +DECL_OFFSET2(MonoClass,interface_bitmap,80) +DECL_OFFSET2(MonoClass,inlinearray_value,84) +DECL_OFFSET2(MonoClass,name_hash,88) +DECL_OFFSET2(MonoClass,interfaces,92) +DECL_OFFSET2(MonoClass,sizes,96) +DECL_OFFSET2(MonoClass,fields,100) +DECL_OFFSET2(MonoClass,methods,104) +DECL_OFFSET2(MonoClass,this_arg,108) +DECL_OFFSET2(MonoClass,_byval_arg,116) +DECL_OFFSET2(MonoClass,gc_descr,124) +DECL_OFFSET2(MonoClass,runtime_vtable,128) +DECL_OFFSET2(MonoClass,vtable,132) +DECL_OFFSET2(MonoClass,infrequent_data,136) +DECL_OFFSET2(MonoClass,variant_search_table,140) +DECL_SIZE2(MonoVTable,44) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,4) +DECL_OFFSET2(MonoVTable,domain,8) +DECL_OFFSET2(MonoVTable,type,12) +DECL_OFFSET2(MonoVTable,interface_bitmap,16) +DECL_OFFSET2(MonoVTable,loader_alloc,20) +DECL_OFFSET2(MonoVTable,max_interface_id,24) +DECL_OFFSET2(MonoVTable,rank,28) +DECL_OFFSET2(MonoVTable,initialized,29) +DECL_OFFSET2(MonoVTable,flags,30) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,32) +DECL_OFFSET2(MonoVTable,runtime_generic_context,36) +DECL_OFFSET2(MonoVTable,ee_data,40) +DECL_OFFSET2(MonoVTable,vtable,44) +DECL_SIZE2(MonoDelegate,60) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,8) +DECL_OFFSET2(MonoDelegate,invoke_impl,12) +DECL_OFFSET2(MonoDelegate,target,16) +DECL_OFFSET2(MonoDelegate,method,20) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,24) +DECL_OFFSET2(MonoDelegate,extra_arg,28) +DECL_OFFSET2(MonoDelegate,invoke_info,32) +DECL_OFFSET2(MonoDelegate,interp_method,36) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,40) +DECL_OFFSET2(MonoDelegate,method_info,44) +DECL_OFFSET2(MonoDelegate,original_method_info,48) +DECL_OFFSET2(MonoDelegate,data,52) +DECL_OFFSET2(MonoDelegate,method_is_virtual,56) +DECL_OFFSET2(MonoDelegate,bound,57) +DECL_SIZE2(MonoInternalThread,136) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,8) +DECL_OFFSET2(MonoInternalThread,handle,12) +DECL_OFFSET2(MonoInternalThread,native_handle,16) +DECL_OFFSET2(MonoInternalThread,name,20) +DECL_OFFSET2(MonoInternalThread,state,32) +DECL_OFFSET2(MonoInternalThread,abort_exc,36) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,40) +DECL_OFFSET2(MonoInternalThread,tid,48) +DECL_OFFSET2(MonoInternalThread,debugger_thread,56) +DECL_OFFSET2(MonoInternalThread,static_data,60) +DECL_OFFSET2(MonoInternalThread,thread_info,64) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,68) +DECL_OFFSET2(MonoInternalThread,longlived,72) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,76) +DECL_OFFSET2(MonoInternalThread,external_eventloop,77) +DECL_OFFSET2(MonoInternalThread,apartment_state,78) +DECL_OFFSET2(MonoInternalThread,managed_id,80) +DECL_OFFSET2(MonoInternalThread,small_id,84) +DECL_OFFSET2(MonoInternalThread,manage_callback,88) +DECL_OFFSET2(MonoInternalThread,flags,92) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,96) +DECL_OFFSET2(MonoInternalThread,priority,100) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,104) +DECL_OFFSET2(MonoInternalThread,suspended,108) +DECL_OFFSET2(MonoInternalThread,self_suspended,112) +DECL_OFFSET2(MonoInternalThread,thread_state,116) +DECL_OFFSET2(MonoInternalThread,internal_thread,120) +DECL_OFFSET2(MonoInternalThread,pending_exception,124) +DECL_OFFSET2(MonoInternalThread,last,128) +DECL_SIZE2(MonoMulticastDelegate,64) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,60) +DECL_SIZE2(MonoTransparentProxy,20) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,8) +DECL_OFFSET2(MonoTransparentProxy,remote_class,12) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,16) +DECL_SIZE2(MonoRealProxy,40) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,8) +DECL_OFFSET2(MonoRealProxy,context,12) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,16) +DECL_OFFSET2(MonoRealProxy,target_domain_id,20) +DECL_OFFSET2(MonoRealProxy,target_uri,24) +DECL_OFFSET2(MonoRealProxy,object_identity,28) +DECL_OFFSET2(MonoRealProxy,obj_TP,32) +DECL_OFFSET2(MonoRealProxy,stub_data,36) +DECL_SIZE2(MonoRemoteClass,20) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,4) +DECL_OFFSET2(MonoRemoteClass,proxy_class,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,12) +DECL_OFFSET2(MonoRemoteClass,interface_count,16) +DECL_OFFSET2(MonoRemoteClass,interfaces,20) +DECL_SIZE2(MonoArray,16) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,8) +DECL_OFFSET2(MonoArray,max_length,12) +DECL_OFFSET2(MonoArray,vector,16) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,12) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,8) +DECL_SIZE2(MonoHandleRef,8) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,4) +DECL_SIZE2(MonoString,12) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,8) +DECL_OFFSET2(MonoString,chars,12) +DECL_SIZE2(MonoException,72) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,8) +DECL_OFFSET2(MonoException,message,12) +DECL_OFFSET2(MonoException,_data,16) +DECL_OFFSET2(MonoException,inner_ex,20) +DECL_OFFSET2(MonoException,help_link,24) +DECL_OFFSET2(MonoException,trace_ips,28) +DECL_OFFSET2(MonoException,stack_trace,32) +DECL_OFFSET2(MonoException,remote_stack_trace,36) +DECL_OFFSET2(MonoException,remote_stack_index,40) +DECL_OFFSET2(MonoException,dynamic_methods,44) +DECL_OFFSET2(MonoException,hresult,48) +DECL_OFFSET2(MonoException,source,52) +DECL_OFFSET2(MonoException,serialization_manager,56) +DECL_OFFSET2(MonoException,captured_traces,60) +DECL_OFFSET2(MonoException,native_trace_ips,64) +DECL_OFFSET2(MonoException,caught_in_unmanaged,68) +DECL_SIZE2(MonoTypedRef,12) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,4) +DECL_OFFSET2(MonoTypedRef,klass,8) +DECL_SIZE2(MonoThreadsSync,32) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,12) +DECL_OFFSET2(MonoThreadsSync,data,16) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,20) +DECL_OFFSET2(MonoThreadsSync,entry_cond,24) +DECL_OFFSET2(MonoThreadsSync,is_interned,28) +DECL_SIZE2(SgenThreadInfo,312) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,288) +DECL_OFFSET2(SgenThreadInfo,tlab_next,292) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,296) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,300) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,304) +DECL_SIZE2(SgenClientThreadInfo,288) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,240) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,244) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,248) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,252) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,256) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,260) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,264) +DECL_OFFSET2(SgenClientThreadInfo,ctx,268) +DECL_SIZE2(MonoProfilerCallContext,36) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,20) +DECL_OFFSET2(MonoProfilerCallContext,method,24) +DECL_OFFSET2(MonoProfilerCallContext,return_value,28) +DECL_OFFSET2(MonoProfilerCallContext,args,32) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,12) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,lmf_addr,4) +DECL_OFFSET2(MonoLMF,method,8) +DECL_SIZE2(MonoLMFExt,44) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,12) +DECL_OFFSET2(MonoLMFExt,ctx,16) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,36) +DECL_OFFSET2(MonoLMFExt,il_state,40) +DECL_SIZE2(MonoMethodILState,12) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,4) +DECL_OFFSET2(MonoMethodILState,data,8) +DECL_SIZE2(MonoMethodRuntimeGenericContext,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16) +DECL_SIZE2(MonoJitTlsData,216) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,4) +DECL_OFFSET2(MonoJitTlsData,lmf,8) +DECL_OFFSET2(MonoJitTlsData,first_lmf,12) +DECL_OFFSET2(MonoJitTlsData,signal_stack,20) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,24) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,28) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,32) +DECL_OFFSET2(MonoJitTlsData,abort_func,40) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,44) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,48) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,52) +DECL_OFFSET2(MonoJitTlsData,resume_state,72) +DECL_OFFSET2(MonoJitTlsData,handler_block,144) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,148) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,168) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,188) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,192) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,196) +DECL_OFFSET2(MonoJitTlsData,calling_image,200) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,204) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,208) +DECL_OFFSET2(MonoJitTlsData,interp_context,212) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4) +DECL_SIZE2(MonoContext,20) +DECL_OFFSET2(MonoContext,wasm_sp,0) +DECL_OFFSET2(MonoContext,wasm_bp,4) +DECL_OFFSET2(MonoContext,llvm_exc_reg,8) +DECL_OFFSET2(MonoContext,wasm_ip,12) +DECL_OFFSET2(MonoContext,wasm_pc,16) +DECL_SIZE2(MonoDelegateTrampInfo,44) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,4) +DECL_OFFSET2(MonoDelegateTrampInfo,method,8) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,12) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,16) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,20) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,24) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,28) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,32) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,36) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,40) +DECL_SIZE2(MonoFtnDesc,16) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,4) +DECL_OFFSET2(MonoFtnDesc,method,8) +DECL_OFFSET2(MonoFtnDesc,interp_method,12) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_WASI +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/x86_64-apple-darwin10.h b/src/mono/mono/offsets/x86_64-apple-darwin10.h new file mode 100644 index 0000000000000..000ebc5440b55 --- /dev/null +++ b/src/mono/mono/offsets/x86_64-apple-darwin10.h @@ -0,0 +1,323 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_AMD64 +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,8) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,8) +DECL_SIZE2(MonoObject,16) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,8) +DECL_SIZE2(MonoClass,240) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,8) +DECL_OFFSET2(MonoClass,supertypes,16) +DECL_OFFSET2(MonoClass,idepth,24) +DECL_OFFSET2(MonoClass,rank,26) +DECL_OFFSET2(MonoClass,class_kind,27) +DECL_OFFSET2(MonoClass,instance_size,28) +DECL_OFFSET2(MonoClass,min_align,34) +DECL_OFFSET2(MonoClass,parent,40) +DECL_OFFSET2(MonoClass,nested_in,48) +DECL_OFFSET2(MonoClass,image,56) +DECL_OFFSET2(MonoClass,name,64) +DECL_OFFSET2(MonoClass,name_space,72) +DECL_OFFSET2(MonoClass,type_token,80) +DECL_OFFSET2(MonoClass,vtable_size,84) +DECL_OFFSET2(MonoClass,interface_count,88) +DECL_OFFSET2(MonoClass,interface_id,92) +DECL_OFFSET2(MonoClass,max_interface_id,96) +DECL_OFFSET2(MonoClass,interface_offsets_count,100) +DECL_OFFSET2(MonoClass,interfaces_packed,104) +DECL_OFFSET2(MonoClass,interface_offsets_packed,112) +DECL_OFFSET2(MonoClass,interface_bitmap,120) +DECL_OFFSET2(MonoClass,inlinearray_value,128) +DECL_OFFSET2(MonoClass,name_hash,132) +DECL_OFFSET2(MonoClass,interfaces,136) +DECL_OFFSET2(MonoClass,sizes,144) +DECL_OFFSET2(MonoClass,fields,152) +DECL_OFFSET2(MonoClass,methods,160) +DECL_OFFSET2(MonoClass,this_arg,168) +DECL_OFFSET2(MonoClass,_byval_arg,184) +DECL_OFFSET2(MonoClass,gc_descr,200) +DECL_OFFSET2(MonoClass,runtime_vtable,208) +DECL_OFFSET2(MonoClass,vtable,216) +DECL_OFFSET2(MonoClass,infrequent_data,224) +DECL_OFFSET2(MonoClass,variant_search_table,232) +DECL_SIZE2(MonoVTable,80) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,8) +DECL_OFFSET2(MonoVTable,domain,16) +DECL_OFFSET2(MonoVTable,type,24) +DECL_OFFSET2(MonoVTable,interface_bitmap,32) +DECL_OFFSET2(MonoVTable,loader_alloc,40) +DECL_OFFSET2(MonoVTable,max_interface_id,48) +DECL_OFFSET2(MonoVTable,rank,52) +DECL_OFFSET2(MonoVTable,initialized,53) +DECL_OFFSET2(MonoVTable,flags,54) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,56) +DECL_OFFSET2(MonoVTable,runtime_generic_context,64) +DECL_OFFSET2(MonoVTable,ee_data,72) +DECL_OFFSET2(MonoVTable,vtable,80) +DECL_SIZE2(MonoDelegate,120) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,16) +DECL_OFFSET2(MonoDelegate,invoke_impl,24) +DECL_OFFSET2(MonoDelegate,target,32) +DECL_OFFSET2(MonoDelegate,method,40) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,48) +DECL_OFFSET2(MonoDelegate,extra_arg,56) +DECL_OFFSET2(MonoDelegate,invoke_info,64) +DECL_OFFSET2(MonoDelegate,interp_method,72) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,80) +DECL_OFFSET2(MonoDelegate,method_info,88) +DECL_OFFSET2(MonoDelegate,original_method_info,96) +DECL_OFFSET2(MonoDelegate,data,104) +DECL_OFFSET2(MonoDelegate,method_is_virtual,112) +DECL_OFFSET2(MonoDelegate,bound,113) +DECL_SIZE2(MonoInternalThread,232) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,16) +DECL_OFFSET2(MonoInternalThread,handle,24) +DECL_OFFSET2(MonoInternalThread,native_handle,32) +DECL_OFFSET2(MonoInternalThread,name,40) +DECL_OFFSET2(MonoInternalThread,state,56) +DECL_OFFSET2(MonoInternalThread,abort_exc,64) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,72) +DECL_OFFSET2(MonoInternalThread,tid,80) +DECL_OFFSET2(MonoInternalThread,debugger_thread,88) +DECL_OFFSET2(MonoInternalThread,static_data,96) +DECL_OFFSET2(MonoInternalThread,thread_info,104) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,112) +DECL_OFFSET2(MonoInternalThread,longlived,120) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,128) +DECL_OFFSET2(MonoInternalThread,external_eventloop,129) +DECL_OFFSET2(MonoInternalThread,apartment_state,130) +DECL_OFFSET2(MonoInternalThread,managed_id,132) +DECL_OFFSET2(MonoInternalThread,small_id,136) +DECL_OFFSET2(MonoInternalThread,manage_callback,144) +DECL_OFFSET2(MonoInternalThread,flags,152) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,160) +DECL_OFFSET2(MonoInternalThread,priority,168) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,176) +DECL_OFFSET2(MonoInternalThread,suspended,184) +DECL_OFFSET2(MonoInternalThread,self_suspended,192) +DECL_OFFSET2(MonoInternalThread,thread_state,200) +DECL_OFFSET2(MonoInternalThread,internal_thread,208) +DECL_OFFSET2(MonoInternalThread,pending_exception,216) +DECL_OFFSET2(MonoInternalThread,last,224) +DECL_SIZE2(MonoMulticastDelegate,128) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,120) +DECL_SIZE2(MonoTransparentProxy,40) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,16) +DECL_OFFSET2(MonoTransparentProxy,remote_class,24) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,32) +DECL_SIZE2(MonoRealProxy,80) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,16) +DECL_OFFSET2(MonoRealProxy,context,24) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,32) +DECL_OFFSET2(MonoRealProxy,target_domain_id,40) +DECL_OFFSET2(MonoRealProxy,target_uri,48) +DECL_OFFSET2(MonoRealProxy,object_identity,56) +DECL_OFFSET2(MonoRealProxy,obj_TP,64) +DECL_OFFSET2(MonoRealProxy,stub_data,72) +DECL_SIZE2(MonoRemoteClass,40) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class,16) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,24) +DECL_OFFSET2(MonoRemoteClass,interface_count,32) +DECL_OFFSET2(MonoRemoteClass,interfaces,40) +DECL_SIZE2(MonoArray,32) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,16) +DECL_OFFSET2(MonoArray,max_length,24) +DECL_OFFSET2(MonoArray,vector,32) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,24) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,16) +DECL_SIZE2(MonoHandleRef,16) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,8) +DECL_SIZE2(MonoString,24) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,16) +DECL_OFFSET2(MonoString,chars,20) +DECL_SIZE2(MonoException,144) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,16) +DECL_OFFSET2(MonoException,message,24) +DECL_OFFSET2(MonoException,_data,32) +DECL_OFFSET2(MonoException,inner_ex,40) +DECL_OFFSET2(MonoException,help_link,48) +DECL_OFFSET2(MonoException,trace_ips,56) +DECL_OFFSET2(MonoException,stack_trace,64) +DECL_OFFSET2(MonoException,remote_stack_trace,72) +DECL_OFFSET2(MonoException,remote_stack_index,80) +DECL_OFFSET2(MonoException,dynamic_methods,88) +DECL_OFFSET2(MonoException,hresult,96) +DECL_OFFSET2(MonoException,source,104) +DECL_OFFSET2(MonoException,serialization_manager,112) +DECL_OFFSET2(MonoException,captured_traces,120) +DECL_OFFSET2(MonoException,native_trace_ips,128) +DECL_OFFSET2(MonoException,caught_in_unmanaged,136) +DECL_SIZE2(MonoTypedRef,24) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,8) +DECL_OFFSET2(MonoTypedRef,klass,16) +DECL_SIZE2(MonoThreadsSync,48) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,16) +DECL_OFFSET2(MonoThreadsSync,data,24) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,32) +DECL_OFFSET2(MonoThreadsSync,entry_cond,40) +DECL_SIZE2(SgenThreadInfo,1600) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,1552) +DECL_OFFSET2(SgenThreadInfo,tlab_next,1560) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,1568) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,1576) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,1584) +DECL_SIZE2(SgenClientThreadInfo,1552) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,1104) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,1108) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,1112) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,1120) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,1128) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,1136) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,1144) +DECL_OFFSET2(SgenClientThreadInfo,ctx,1152) +DECL_SIZE2(MonoProfilerCallContext,432) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,400) +DECL_OFFSET2(MonoProfilerCallContext,method,408) +DECL_OFFSET2(MonoProfilerCallContext,return_value,416) +DECL_OFFSET2(MonoProfilerCallContext,args,424) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,24) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,rbp,8) +DECL_OFFSET2(MonoLMF,rsp,16) +DECL_SIZE2(MonoLMFExt,448) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,24) +DECL_OFFSET2(MonoLMFExt,ctx,32) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,432) +DECL_OFFSET2(MonoLMFExt,il_state,440) +DECL_SIZE2(MonoMethodILState,24) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,8) +DECL_OFFSET2(MonoMethodILState,data,16) +DECL_SIZE2(MonoMethodRuntimeGenericContext,32) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32) +DECL_SIZE2(MonoJitTlsData,2240) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,8) +DECL_OFFSET2(MonoJitTlsData,lmf,16) +DECL_OFFSET2(MonoJitTlsData,first_lmf,24) +DECL_OFFSET2(MonoJitTlsData,signal_stack,40) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,48) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,56) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,64) +DECL_OFFSET2(MonoJitTlsData,abort_func,72) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,80) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,88) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,96) +DECL_OFFSET2(MonoJitTlsData,resume_state,496) +DECL_OFFSET2(MonoJitTlsData,handler_block,1360) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,1376) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1776) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2176) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,2184) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2192) +DECL_OFFSET2(MonoJitTlsData,calling_image,2200) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2208) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2216) +DECL_OFFSET2(MonoJitTlsData,interp_context,2224) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8) +DECL_SIZE2(MonoContext,400) +DECL_OFFSET2(MonoContext,gregs,0) +DECL_OFFSET2(MonoContext,fregs,144) +DECL_SIZE2(MonoDelegateTrampInfo,80) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,8) +DECL_OFFSET2(MonoDelegateTrampInfo,method,16) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,24) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,32) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,40) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,48) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,56) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,64) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,72) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,76) +DECL_SIZE2(GSharedVtCallInfo,40) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_reg,12) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,16) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,20) +DECL_OFFSET2(GSharedVtCallInfo,map_count,24) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,28) +DECL_OFFSET2(GSharedVtCallInfo,calli,32) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,36) +DECL_OFFSET2(GSharedVtCallInfo,map,40) +DECL_SIZE2(SeqPointInfo,8) +DECL_OFFSET2(SeqPointInfo,ss_tramp_addr,0) +DECL_OFFSET2(SeqPointInfo,bp_addrs,8) +DECL_SIZE2(DynCallArgs,144) +DECL_OFFSET2(DynCallArgs,res,0) +DECL_OFFSET2(DynCallArgs,ret,8) +DECL_OFFSET2(DynCallArgs,fregs,16) +DECL_OFFSET2(DynCallArgs,has_fp,80) +DECL_OFFSET2(DynCallArgs,nstack_args,88) +DECL_OFFSET2(DynCallArgs,regs,96) +DECL_SIZE2(MonoLMFTramp,40) +DECL_OFFSET2(MonoLMFTramp,lmf,0) +DECL_OFFSET2(MonoLMFTramp,ctx,24) +DECL_OFFSET2(MonoLMFTramp,lmf_addr,32) +DECL_SIZE2(CallContext,280) +DECL_OFFSET2(CallContext,gregs,0) +DECL_OFFSET2(CallContext,fregs,136) +DECL_OFFSET2(CallContext,stack_size,264) +DECL_OFFSET2(CallContext,stack,272) +DECL_SIZE2(MonoFtnDesc,32) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,8) +DECL_OFFSET2(MonoFtnDesc,method,16) +DECL_OFFSET2(MonoFtnDesc,interp_method,24) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_AMD64 +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/x86_64-apple-maccatalyst.h b/src/mono/mono/offsets/x86_64-apple-maccatalyst.h new file mode 100644 index 0000000000000..1ea46b7fc601a --- /dev/null +++ b/src/mono/mono/offsets/x86_64-apple-maccatalyst.h @@ -0,0 +1,325 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_AMD64 +#ifdef TARGET_MACCAT +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,8) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,8) +DECL_SIZE2(MonoObject,16) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,8) +DECL_SIZE2(MonoClass,240) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,8) +DECL_OFFSET2(MonoClass,supertypes,16) +DECL_OFFSET2(MonoClass,idepth,24) +DECL_OFFSET2(MonoClass,rank,26) +DECL_OFFSET2(MonoClass,class_kind,27) +DECL_OFFSET2(MonoClass,instance_size,28) +DECL_OFFSET2(MonoClass,min_align,34) +DECL_OFFSET2(MonoClass,parent,40) +DECL_OFFSET2(MonoClass,nested_in,48) +DECL_OFFSET2(MonoClass,image,56) +DECL_OFFSET2(MonoClass,name,64) +DECL_OFFSET2(MonoClass,name_space,72) +DECL_OFFSET2(MonoClass,type_token,80) +DECL_OFFSET2(MonoClass,vtable_size,84) +DECL_OFFSET2(MonoClass,interface_count,88) +DECL_OFFSET2(MonoClass,interface_id,92) +DECL_OFFSET2(MonoClass,max_interface_id,96) +DECL_OFFSET2(MonoClass,interface_offsets_count,100) +DECL_OFFSET2(MonoClass,interfaces_packed,104) +DECL_OFFSET2(MonoClass,interface_offsets_packed,112) +DECL_OFFSET2(MonoClass,interface_bitmap,120) +DECL_OFFSET2(MonoClass,inlinearray_value,128) +DECL_OFFSET2(MonoClass,name_hash,132) +DECL_OFFSET2(MonoClass,interfaces,136) +DECL_OFFSET2(MonoClass,sizes,144) +DECL_OFFSET2(MonoClass,fields,152) +DECL_OFFSET2(MonoClass,methods,160) +DECL_OFFSET2(MonoClass,this_arg,168) +DECL_OFFSET2(MonoClass,_byval_arg,184) +DECL_OFFSET2(MonoClass,gc_descr,200) +DECL_OFFSET2(MonoClass,runtime_vtable,208) +DECL_OFFSET2(MonoClass,vtable,216) +DECL_OFFSET2(MonoClass,infrequent_data,224) +DECL_OFFSET2(MonoClass,variant_search_table,232) +DECL_SIZE2(MonoVTable,80) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,8) +DECL_OFFSET2(MonoVTable,domain,16) +DECL_OFFSET2(MonoVTable,type,24) +DECL_OFFSET2(MonoVTable,interface_bitmap,32) +DECL_OFFSET2(MonoVTable,loader_alloc,40) +DECL_OFFSET2(MonoVTable,max_interface_id,48) +DECL_OFFSET2(MonoVTable,rank,52) +DECL_OFFSET2(MonoVTable,initialized,53) +DECL_OFFSET2(MonoVTable,flags,54) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,56) +DECL_OFFSET2(MonoVTable,runtime_generic_context,64) +DECL_OFFSET2(MonoVTable,ee_data,72) +DECL_OFFSET2(MonoVTable,vtable,80) +DECL_SIZE2(MonoDelegate,120) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,16) +DECL_OFFSET2(MonoDelegate,invoke_impl,24) +DECL_OFFSET2(MonoDelegate,target,32) +DECL_OFFSET2(MonoDelegate,method,40) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,48) +DECL_OFFSET2(MonoDelegate,extra_arg,56) +DECL_OFFSET2(MonoDelegate,invoke_info,64) +DECL_OFFSET2(MonoDelegate,interp_method,72) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,80) +DECL_OFFSET2(MonoDelegate,method_info,88) +DECL_OFFSET2(MonoDelegate,original_method_info,96) +DECL_OFFSET2(MonoDelegate,data,104) +DECL_OFFSET2(MonoDelegate,method_is_virtual,112) +DECL_OFFSET2(MonoDelegate,bound,113) +DECL_SIZE2(MonoInternalThread,232) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,16) +DECL_OFFSET2(MonoInternalThread,handle,24) +DECL_OFFSET2(MonoInternalThread,native_handle,32) +DECL_OFFSET2(MonoInternalThread,name,40) +DECL_OFFSET2(MonoInternalThread,state,56) +DECL_OFFSET2(MonoInternalThread,abort_exc,64) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,72) +DECL_OFFSET2(MonoInternalThread,tid,80) +DECL_OFFSET2(MonoInternalThread,debugger_thread,88) +DECL_OFFSET2(MonoInternalThread,static_data,96) +DECL_OFFSET2(MonoInternalThread,thread_info,104) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,112) +DECL_OFFSET2(MonoInternalThread,longlived,120) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,128) +DECL_OFFSET2(MonoInternalThread,external_eventloop,129) +DECL_OFFSET2(MonoInternalThread,apartment_state,130) +DECL_OFFSET2(MonoInternalThread,managed_id,132) +DECL_OFFSET2(MonoInternalThread,small_id,136) +DECL_OFFSET2(MonoInternalThread,manage_callback,144) +DECL_OFFSET2(MonoInternalThread,flags,152) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,160) +DECL_OFFSET2(MonoInternalThread,priority,168) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,176) +DECL_OFFSET2(MonoInternalThread,suspended,184) +DECL_OFFSET2(MonoInternalThread,self_suspended,192) +DECL_OFFSET2(MonoInternalThread,thread_state,200) +DECL_OFFSET2(MonoInternalThread,internal_thread,208) +DECL_OFFSET2(MonoInternalThread,pending_exception,216) +DECL_OFFSET2(MonoInternalThread,last,224) +DECL_SIZE2(MonoMulticastDelegate,128) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,120) +DECL_SIZE2(MonoTransparentProxy,40) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,16) +DECL_OFFSET2(MonoTransparentProxy,remote_class,24) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,32) +DECL_SIZE2(MonoRealProxy,80) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,16) +DECL_OFFSET2(MonoRealProxy,context,24) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,32) +DECL_OFFSET2(MonoRealProxy,target_domain_id,40) +DECL_OFFSET2(MonoRealProxy,target_uri,48) +DECL_OFFSET2(MonoRealProxy,object_identity,56) +DECL_OFFSET2(MonoRealProxy,obj_TP,64) +DECL_OFFSET2(MonoRealProxy,stub_data,72) +DECL_SIZE2(MonoRemoteClass,40) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class,16) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,24) +DECL_OFFSET2(MonoRemoteClass,interface_count,32) +DECL_OFFSET2(MonoRemoteClass,interfaces,40) +DECL_SIZE2(MonoArray,32) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,16) +DECL_OFFSET2(MonoArray,max_length,24) +DECL_OFFSET2(MonoArray,vector,32) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,24) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,16) +DECL_SIZE2(MonoHandleRef,16) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,8) +DECL_SIZE2(MonoString,24) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,16) +DECL_OFFSET2(MonoString,chars,20) +DECL_SIZE2(MonoException,144) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,16) +DECL_OFFSET2(MonoException,message,24) +DECL_OFFSET2(MonoException,_data,32) +DECL_OFFSET2(MonoException,inner_ex,40) +DECL_OFFSET2(MonoException,help_link,48) +DECL_OFFSET2(MonoException,trace_ips,56) +DECL_OFFSET2(MonoException,stack_trace,64) +DECL_OFFSET2(MonoException,remote_stack_trace,72) +DECL_OFFSET2(MonoException,remote_stack_index,80) +DECL_OFFSET2(MonoException,dynamic_methods,88) +DECL_OFFSET2(MonoException,hresult,96) +DECL_OFFSET2(MonoException,source,104) +DECL_OFFSET2(MonoException,serialization_manager,112) +DECL_OFFSET2(MonoException,captured_traces,120) +DECL_OFFSET2(MonoException,native_trace_ips,128) +DECL_OFFSET2(MonoException,caught_in_unmanaged,136) +DECL_SIZE2(MonoTypedRef,24) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,8) +DECL_OFFSET2(MonoTypedRef,klass,16) +DECL_SIZE2(MonoThreadsSync,48) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,16) +DECL_OFFSET2(MonoThreadsSync,data,24) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,32) +DECL_OFFSET2(MonoThreadsSync,entry_cond,40) +DECL_SIZE2(SgenThreadInfo,1600) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,1552) +DECL_OFFSET2(SgenThreadInfo,tlab_next,1560) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,1568) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,1576) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,1584) +DECL_SIZE2(SgenClientThreadInfo,1552) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,1104) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,1108) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,1112) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,1120) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,1128) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,1136) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,1144) +DECL_OFFSET2(SgenClientThreadInfo,ctx,1152) +DECL_SIZE2(MonoProfilerCallContext,432) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,400) +DECL_OFFSET2(MonoProfilerCallContext,method,408) +DECL_OFFSET2(MonoProfilerCallContext,return_value,416) +DECL_OFFSET2(MonoProfilerCallContext,args,424) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,24) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,rbp,8) +DECL_OFFSET2(MonoLMF,rsp,16) +DECL_SIZE2(MonoLMFExt,448) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,24) +DECL_OFFSET2(MonoLMFExt,ctx,32) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,432) +DECL_OFFSET2(MonoLMFExt,il_state,440) +DECL_SIZE2(MonoMethodILState,24) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,8) +DECL_OFFSET2(MonoMethodILState,data,16) +DECL_SIZE2(MonoMethodRuntimeGenericContext,32) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32) +DECL_SIZE2(MonoJitTlsData,2240) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,8) +DECL_OFFSET2(MonoJitTlsData,lmf,16) +DECL_OFFSET2(MonoJitTlsData,first_lmf,24) +DECL_OFFSET2(MonoJitTlsData,signal_stack,40) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,48) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,56) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,64) +DECL_OFFSET2(MonoJitTlsData,abort_func,72) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,80) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,88) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,96) +DECL_OFFSET2(MonoJitTlsData,resume_state,496) +DECL_OFFSET2(MonoJitTlsData,handler_block,1360) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,1376) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1776) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2176) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,2184) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2192) +DECL_OFFSET2(MonoJitTlsData,calling_image,2200) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2208) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2216) +DECL_OFFSET2(MonoJitTlsData,interp_context,2224) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8) +DECL_SIZE2(MonoContext,400) +DECL_OFFSET2(MonoContext,gregs,0) +DECL_OFFSET2(MonoContext,fregs,144) +DECL_SIZE2(MonoDelegateTrampInfo,80) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,8) +DECL_OFFSET2(MonoDelegateTrampInfo,method,16) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,24) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,32) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,40) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,48) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,56) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,64) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,72) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,76) +DECL_SIZE2(GSharedVtCallInfo,40) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_reg,12) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,16) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,20) +DECL_OFFSET2(GSharedVtCallInfo,map_count,24) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,28) +DECL_OFFSET2(GSharedVtCallInfo,calli,32) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,36) +DECL_OFFSET2(GSharedVtCallInfo,map,40) +DECL_SIZE2(SeqPointInfo,8) +DECL_OFFSET2(SeqPointInfo,ss_tramp_addr,0) +DECL_OFFSET2(SeqPointInfo,bp_addrs,8) +DECL_SIZE2(DynCallArgs,144) +DECL_OFFSET2(DynCallArgs,res,0) +DECL_OFFSET2(DynCallArgs,ret,8) +DECL_OFFSET2(DynCallArgs,fregs,16) +DECL_OFFSET2(DynCallArgs,has_fp,80) +DECL_OFFSET2(DynCallArgs,nstack_args,88) +DECL_OFFSET2(DynCallArgs,regs,96) +DECL_SIZE2(MonoLMFTramp,40) +DECL_OFFSET2(MonoLMFTramp,lmf,0) +DECL_OFFSET2(MonoLMFTramp,ctx,24) +DECL_OFFSET2(MonoLMFTramp,lmf_addr,32) +DECL_SIZE2(CallContext,280) +DECL_OFFSET2(CallContext,gregs,0) +DECL_OFFSET2(CallContext,fregs,136) +DECL_OFFSET2(CallContext,stack_size,264) +DECL_OFFSET2(CallContext,stack,272) +DECL_SIZE2(MonoFtnDesc,32) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,8) +DECL_OFFSET2(MonoFtnDesc,method,16) +DECL_OFFSET2(MonoFtnDesc,interp_method,24) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_AMD64 +#endif //TARGET_MACCAT +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/mono/offsets/x86_64-none-linux-android.h b/src/mono/mono/offsets/x86_64-none-linux-android.h new file mode 100644 index 0000000000000..ee6b4abf92b42 --- /dev/null +++ b/src/mono/mono/offsets/x86_64-none-linux-android.h @@ -0,0 +1,325 @@ +#ifndef USED_CROSS_COMPILER_OFFSETS +#ifdef TARGET_AMD64 +#ifdef TARGET_ANDROID +#ifndef HAVE_BOEHM_GC +#define HAS_CROSS_COMPILER_OFFSETS +#if defined (USE_CROSS_COMPILE_OFFSETS) || defined (MONO_CROSS_COMPILE) +#if !defined (DISABLE_METADATA_OFFSETS) +#define USED_CROSS_COMPILER_OFFSETS +DECL_ALIGN2(gint8,1) +DECL_ALIGN2(gint16,2) +DECL_ALIGN2(gint32,4) +DECL_ALIGN2(gint64,8) +DECL_ALIGN2(float,4) +DECL_ALIGN2(double,8) +DECL_ALIGN2(gpointer,8) +DECL_SIZE2(gint8,1) +DECL_SIZE2(gint16,2) +DECL_SIZE2(gint32,4) +DECL_SIZE2(gint64,8) +DECL_SIZE2(float,4) +DECL_SIZE2(double,8) +DECL_SIZE2(gpointer,8) +DECL_SIZE2(MonoObject,16) +DECL_OFFSET2(MonoObject,vtable,0) +DECL_OFFSET2(MonoObject,synchronisation,8) +DECL_SIZE2(MonoClass,240) +DECL_OFFSET2(MonoClass,element_class,0) +DECL_OFFSET2(MonoClass,cast_class,8) +DECL_OFFSET2(MonoClass,supertypes,16) +DECL_OFFSET2(MonoClass,idepth,24) +DECL_OFFSET2(MonoClass,rank,26) +DECL_OFFSET2(MonoClass,class_kind,27) +DECL_OFFSET2(MonoClass,instance_size,28) +DECL_OFFSET2(MonoClass,min_align,34) +DECL_OFFSET2(MonoClass,parent,40) +DECL_OFFSET2(MonoClass,nested_in,48) +DECL_OFFSET2(MonoClass,image,56) +DECL_OFFSET2(MonoClass,name,64) +DECL_OFFSET2(MonoClass,name_space,72) +DECL_OFFSET2(MonoClass,type_token,80) +DECL_OFFSET2(MonoClass,vtable_size,84) +DECL_OFFSET2(MonoClass,interface_count,88) +DECL_OFFSET2(MonoClass,interface_id,92) +DECL_OFFSET2(MonoClass,max_interface_id,96) +DECL_OFFSET2(MonoClass,interface_offsets_count,100) +DECL_OFFSET2(MonoClass,interfaces_packed,104) +DECL_OFFSET2(MonoClass,interface_offsets_packed,112) +DECL_OFFSET2(MonoClass,interface_bitmap,120) +DECL_OFFSET2(MonoClass,inlinearray_value,128) +DECL_OFFSET2(MonoClass,name_hash,132) +DECL_OFFSET2(MonoClass,interfaces,136) +DECL_OFFSET2(MonoClass,sizes,144) +DECL_OFFSET2(MonoClass,fields,152) +DECL_OFFSET2(MonoClass,methods,160) +DECL_OFFSET2(MonoClass,this_arg,168) +DECL_OFFSET2(MonoClass,_byval_arg,184) +DECL_OFFSET2(MonoClass,gc_descr,200) +DECL_OFFSET2(MonoClass,runtime_vtable,208) +DECL_OFFSET2(MonoClass,vtable,216) +DECL_OFFSET2(MonoClass,infrequent_data,224) +DECL_OFFSET2(MonoClass,variant_search_table,232) +DECL_SIZE2(MonoVTable,80) +DECL_OFFSET2(MonoVTable,klass,0) +DECL_OFFSET2(MonoVTable,gc_descr,8) +DECL_OFFSET2(MonoVTable,domain,16) +DECL_OFFSET2(MonoVTable,type,24) +DECL_OFFSET2(MonoVTable,interface_bitmap,32) +DECL_OFFSET2(MonoVTable,loader_alloc,40) +DECL_OFFSET2(MonoVTable,max_interface_id,48) +DECL_OFFSET2(MonoVTable,rank,52) +DECL_OFFSET2(MonoVTable,initialized,53) +DECL_OFFSET2(MonoVTable,flags,54) +DECL_OFFSET2(MonoVTable,imt_collisions_bitmap,56) +DECL_OFFSET2(MonoVTable,runtime_generic_context,64) +DECL_OFFSET2(MonoVTable,ee_data,72) +DECL_OFFSET2(MonoVTable,vtable,80) +DECL_SIZE2(MonoDelegate,120) +DECL_OFFSET2(MonoDelegate,object,0) +DECL_OFFSET2(MonoDelegate,method_ptr,16) +DECL_OFFSET2(MonoDelegate,invoke_impl,24) +DECL_OFFSET2(MonoDelegate,target,32) +DECL_OFFSET2(MonoDelegate,method,40) +DECL_OFFSET2(MonoDelegate,delegate_trampoline,48) +DECL_OFFSET2(MonoDelegate,extra_arg,56) +DECL_OFFSET2(MonoDelegate,invoke_info,64) +DECL_OFFSET2(MonoDelegate,interp_method,72) +DECL_OFFSET2(MonoDelegate,interp_invoke_impl,80) +DECL_OFFSET2(MonoDelegate,method_info,88) +DECL_OFFSET2(MonoDelegate,original_method_info,96) +DECL_OFFSET2(MonoDelegate,data,104) +DECL_OFFSET2(MonoDelegate,method_is_virtual,112) +DECL_OFFSET2(MonoDelegate,bound,113) +DECL_SIZE2(MonoInternalThread,232) +DECL_OFFSET2(MonoInternalThread,obj,0) +DECL_OFFSET2(MonoInternalThread,lock_thread_id,16) +DECL_OFFSET2(MonoInternalThread,handle,24) +DECL_OFFSET2(MonoInternalThread,native_handle,32) +DECL_OFFSET2(MonoInternalThread,name,40) +DECL_OFFSET2(MonoInternalThread,state,56) +DECL_OFFSET2(MonoInternalThread,abort_exc,64) +DECL_OFFSET2(MonoInternalThread,abort_state_handle,72) +DECL_OFFSET2(MonoInternalThread,tid,80) +DECL_OFFSET2(MonoInternalThread,debugger_thread,88) +DECL_OFFSET2(MonoInternalThread,static_data,96) +DECL_OFFSET2(MonoInternalThread,thread_info,104) +DECL_OFFSET2(MonoInternalThread,__interruption_requested,112) +DECL_OFFSET2(MonoInternalThread,longlived,120) +DECL_OFFSET2(MonoInternalThread,threadpool_thread,128) +DECL_OFFSET2(MonoInternalThread,external_eventloop,129) +DECL_OFFSET2(MonoInternalThread,apartment_state,130) +DECL_OFFSET2(MonoInternalThread,managed_id,132) +DECL_OFFSET2(MonoInternalThread,small_id,136) +DECL_OFFSET2(MonoInternalThread,manage_callback,144) +DECL_OFFSET2(MonoInternalThread,flags,152) +DECL_OFFSET2(MonoInternalThread,thread_pinning_ref,160) +DECL_OFFSET2(MonoInternalThread,priority,168) +DECL_OFFSET2(MonoInternalThread,owned_mutexes,176) +DECL_OFFSET2(MonoInternalThread,suspended,184) +DECL_OFFSET2(MonoInternalThread,self_suspended,192) +DECL_OFFSET2(MonoInternalThread,thread_state,200) +DECL_OFFSET2(MonoInternalThread,internal_thread,208) +DECL_OFFSET2(MonoInternalThread,pending_exception,216) +DECL_OFFSET2(MonoInternalThread,last,224) +DECL_SIZE2(MonoMulticastDelegate,128) +DECL_OFFSET2(MonoMulticastDelegate,delegate,0) +DECL_OFFSET2(MonoMulticastDelegate,delegates,120) +DECL_SIZE2(MonoTransparentProxy,40) +DECL_OFFSET2(MonoTransparentProxy,object,0) +DECL_OFFSET2(MonoTransparentProxy,rp,16) +DECL_OFFSET2(MonoTransparentProxy,remote_class,24) +DECL_OFFSET2(MonoTransparentProxy,custom_type_info,32) +DECL_SIZE2(MonoRealProxy,80) +DECL_OFFSET2(MonoRealProxy,object,0) +DECL_OFFSET2(MonoRealProxy,class_to_proxy,16) +DECL_OFFSET2(MonoRealProxy,context,24) +DECL_OFFSET2(MonoRealProxy,unwrapped_server,32) +DECL_OFFSET2(MonoRealProxy,target_domain_id,40) +DECL_OFFSET2(MonoRealProxy,target_uri,48) +DECL_OFFSET2(MonoRealProxy,object_identity,56) +DECL_OFFSET2(MonoRealProxy,obj_TP,64) +DECL_OFFSET2(MonoRealProxy,stub_data,72) +DECL_SIZE2(MonoRemoteClass,40) +DECL_OFFSET2(MonoRemoteClass,default_vtable,0) +DECL_OFFSET2(MonoRemoteClass,xdomain_vtable,8) +DECL_OFFSET2(MonoRemoteClass,proxy_class,16) +DECL_OFFSET2(MonoRemoteClass,proxy_class_name,24) +DECL_OFFSET2(MonoRemoteClass,interface_count,32) +DECL_OFFSET2(MonoRemoteClass,interfaces,40) +DECL_SIZE2(MonoArray,32) +DECL_OFFSET2(MonoArray,obj,0) +DECL_OFFSET2(MonoArray,bounds,16) +DECL_OFFSET2(MonoArray,max_length,24) +DECL_OFFSET2(MonoArray,vector,32) +DECL_SIZE2(MonoArrayBounds,8) +DECL_OFFSET2(MonoArrayBounds,length,0) +DECL_OFFSET2(MonoArrayBounds,lower_bound,4) +DECL_SIZE2(MonoSafeHandle,24) +DECL_OFFSET2(MonoSafeHandle,base,0) +DECL_OFFSET2(MonoSafeHandle,handle,16) +DECL_SIZE2(MonoHandleRef,16) +DECL_OFFSET2(MonoHandleRef,wrapper,0) +DECL_OFFSET2(MonoHandleRef,handle,8) +DECL_SIZE2(MonoString,24) +DECL_OFFSET2(MonoString,object,0) +DECL_OFFSET2(MonoString,length,16) +DECL_OFFSET2(MonoString,chars,20) +DECL_SIZE2(MonoException,144) +DECL_OFFSET2(MonoException,object,0) +DECL_OFFSET2(MonoException,class_name,16) +DECL_OFFSET2(MonoException,message,24) +DECL_OFFSET2(MonoException,_data,32) +DECL_OFFSET2(MonoException,inner_ex,40) +DECL_OFFSET2(MonoException,help_link,48) +DECL_OFFSET2(MonoException,trace_ips,56) +DECL_OFFSET2(MonoException,stack_trace,64) +DECL_OFFSET2(MonoException,remote_stack_trace,72) +DECL_OFFSET2(MonoException,remote_stack_index,80) +DECL_OFFSET2(MonoException,dynamic_methods,88) +DECL_OFFSET2(MonoException,hresult,96) +DECL_OFFSET2(MonoException,source,104) +DECL_OFFSET2(MonoException,serialization_manager,112) +DECL_OFFSET2(MonoException,captured_traces,120) +DECL_OFFSET2(MonoException,native_trace_ips,128) +DECL_OFFSET2(MonoException,caught_in_unmanaged,136) +DECL_SIZE2(MonoTypedRef,24) +DECL_OFFSET2(MonoTypedRef,type,0) +DECL_OFFSET2(MonoTypedRef,value,8) +DECL_OFFSET2(MonoTypedRef,klass,16) +DECL_SIZE2(MonoThreadsSync,48) +DECL_OFFSET2(MonoThreadsSync,status,0) +DECL_OFFSET2(MonoThreadsSync,nest,4) +DECL_OFFSET2(MonoThreadsSync,hash_code,8) +DECL_OFFSET2(MonoThreadsSync,wait_list,16) +DECL_OFFSET2(MonoThreadsSync,data,24) +DECL_OFFSET2(MonoThreadsSync,entry_mutex,32) +DECL_OFFSET2(MonoThreadsSync,entry_cond,40) +DECL_SIZE2(SgenThreadInfo,1616) +DECL_OFFSET2(SgenThreadInfo,client_info,0) +DECL_OFFSET2(SgenThreadInfo,tlab_start,1576) +DECL_OFFSET2(SgenThreadInfo,tlab_next,1584) +DECL_OFFSET2(SgenThreadInfo,tlab_temp_end,1592) +DECL_OFFSET2(SgenThreadInfo,tlab_real_end,1600) +DECL_OFFSET2(SgenThreadInfo,total_bytes_allocated,1608) +DECL_SIZE2(SgenClientThreadInfo,1576) +DECL_OFFSET2(SgenClientThreadInfo,info,0) +DECL_OFFSET2(SgenClientThreadInfo,skip,1136) +DECL_OFFSET2(SgenClientThreadInfo,suspend_done,1140) +DECL_OFFSET2(SgenClientThreadInfo,in_critical_region,1144) +DECL_OFFSET2(SgenClientThreadInfo,runtime_data,1152) +DECL_OFFSET2(SgenClientThreadInfo,stack_end,1160) +DECL_OFFSET2(SgenClientThreadInfo,stack_start,1168) +DECL_OFFSET2(SgenClientThreadInfo,stack_start_limit,1176) +DECL_OFFSET2(SgenClientThreadInfo,ctx,1184) +DECL_SIZE2(MonoProfilerCallContext,424) +DECL_OFFSET2(MonoProfilerCallContext,context,0) +DECL_OFFSET2(MonoProfilerCallContext,interp_frame,392) +DECL_OFFSET2(MonoProfilerCallContext,method,400) +DECL_OFFSET2(MonoProfilerCallContext,return_value,408) +DECL_OFFSET2(MonoProfilerCallContext,args,416) +#endif //disable metadata check +#ifndef DISABLE_JIT_OFFSETS +#define USED_CROSS_COMPILER_OFFSETS +DECL_SIZE2(MonoLMF,24) +DECL_OFFSET2(MonoLMF,previous_lmf,0) +DECL_OFFSET2(MonoLMF,rbp,8) +DECL_OFFSET2(MonoLMF,rsp,16) +DECL_SIZE2(MonoLMFExt,440) +DECL_OFFSET2(MonoLMFExt,lmf,0) +DECL_OFFSET2(MonoLMFExt,kind,24) +DECL_OFFSET2(MonoLMFExt,ctx,32) +DECL_OFFSET2(MonoLMFExt,interp_exit_data,424) +DECL_OFFSET2(MonoLMFExt,il_state,432) +DECL_SIZE2(MonoMethodILState,24) +DECL_OFFSET2(MonoMethodILState,method,0) +DECL_OFFSET2(MonoMethodILState,il_offset,8) +DECL_OFFSET2(MonoMethodILState,data,16) +DECL_SIZE2(MonoMethodRuntimeGenericContext,32) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,class_vtable,0) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24) +DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32) +DECL_SIZE2(MonoJitTlsData,2176) +DECL_OFFSET2(MonoJitTlsData,end_of_stack,0) +DECL_OFFSET2(MonoJitTlsData,stack_size,8) +DECL_OFFSET2(MonoJitTlsData,lmf,16) +DECL_OFFSET2(MonoJitTlsData,first_lmf,24) +DECL_OFFSET2(MonoJitTlsData,signal_stack,40) +DECL_OFFSET2(MonoJitTlsData,signal_stack_size,48) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_base,56) +DECL_OFFSET2(MonoJitTlsData,stack_ovf_guard_size,64) +DECL_OFFSET2(MonoJitTlsData,abort_func,72) +DECL_OFFSET2(MonoJitTlsData,class_cast_from,80) +DECL_OFFSET2(MonoJitTlsData,class_cast_to,88) +DECL_OFFSET2(MonoJitTlsData,ex_ctx,96) +DECL_OFFSET2(MonoJitTlsData,resume_state,488) +DECL_OFFSET2(MonoJitTlsData,handler_block,1328) +DECL_OFFSET2(MonoJitTlsData,handler_block_context,1336) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1728) +DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2120) +DECL_OFFSET2(MonoJitTlsData,thrown_exc,2128) +DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2136) +DECL_OFFSET2(MonoJitTlsData,calling_image,2144) +DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2152) +DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2160) +DECL_OFFSET2(MonoJitTlsData,interp_context,2168) +DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0) +DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8) +DECL_SIZE2(MonoContext,392) +DECL_OFFSET2(MonoContext,gregs,0) +DECL_OFFSET2(MonoContext,fregs,136) +DECL_SIZE2(MonoDelegateTrampInfo,80) +DECL_OFFSET2(MonoDelegateTrampInfo,klass,0) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke,8) +DECL_OFFSET2(MonoDelegateTrampInfo,method,16) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_sig,24) +DECL_OFFSET2(MonoDelegateTrampInfo,sig,32) +DECL_OFFSET2(MonoDelegateTrampInfo,method_ptr,40) +DECL_OFFSET2(MonoDelegateTrampInfo,invoke_impl,48) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_this,56) +DECL_OFFSET2(MonoDelegateTrampInfo,impl_nothis,64) +DECL_OFFSET2(MonoDelegateTrampInfo,need_rgctx_tramp,72) +DECL_OFFSET2(MonoDelegateTrampInfo,is_virtual,76) +DECL_SIZE2(GSharedVtCallInfo,40) +DECL_OFFSET2(GSharedVtCallInfo,addr,0) +DECL_OFFSET2(GSharedVtCallInfo,ret_marshal,8) +DECL_OFFSET2(GSharedVtCallInfo,vret_arg_reg,12) +DECL_OFFSET2(GSharedVtCallInfo,vret_slot,16) +DECL_OFFSET2(GSharedVtCallInfo,stack_usage,20) +DECL_OFFSET2(GSharedVtCallInfo,map_count,24) +DECL_OFFSET2(GSharedVtCallInfo,vcall_offset,28) +DECL_OFFSET2(GSharedVtCallInfo,calli,32) +DECL_OFFSET2(GSharedVtCallInfo,gsharedvt_in,36) +DECL_OFFSET2(GSharedVtCallInfo,map,40) +DECL_SIZE2(SeqPointInfo,8) +DECL_OFFSET2(SeqPointInfo,ss_tramp_addr,0) +DECL_OFFSET2(SeqPointInfo,bp_addrs,8) +DECL_SIZE2(DynCallArgs,144) +DECL_OFFSET2(DynCallArgs,res,0) +DECL_OFFSET2(DynCallArgs,ret,8) +DECL_OFFSET2(DynCallArgs,fregs,16) +DECL_OFFSET2(DynCallArgs,has_fp,80) +DECL_OFFSET2(DynCallArgs,nstack_args,88) +DECL_OFFSET2(DynCallArgs,regs,96) +DECL_SIZE2(MonoLMFTramp,40) +DECL_OFFSET2(MonoLMFTramp,lmf,0) +DECL_OFFSET2(MonoLMFTramp,ctx,24) +DECL_OFFSET2(MonoLMFTramp,lmf_addr,32) +DECL_SIZE2(CallContext,280) +DECL_OFFSET2(CallContext,gregs,0) +DECL_OFFSET2(CallContext,fregs,136) +DECL_OFFSET2(CallContext,stack_size,264) +DECL_OFFSET2(CallContext,stack,272) +DECL_SIZE2(MonoFtnDesc,32) +DECL_OFFSET2(MonoFtnDesc,addr,0) +DECL_OFFSET2(MonoFtnDesc,arg,8) +DECL_OFFSET2(MonoFtnDesc,method,16) +DECL_OFFSET2(MonoFtnDesc,interp_method,24) +#endif //disable jit check +#endif //cross compiler checks +#endif //gc check +#endif //TARGET_AMD64 +#endif //TARGET_ANDROID +#endif //USED_CROSS_COMPILER_OFFSETS check diff --git a/src/mono/monoaotcross.proj b/src/mono/monoaotcross.proj index a48130d2807a0..c747e87f763ea 100644 --- a/src/mono/monoaotcross.proj +++ b/src/mono/monoaotcross.proj @@ -30,6 +30,11 @@ Projects="$(MSBuildThisFileFullPath)" BuildInParallel="true" Properties="MonoAotTargetRid=%(MonoAotTargetRids.Identity);RealRuntimeBinDir=$(RuntimeBinDir)" /> + + + + + @@ -46,7 +51,7 @@ + Properties="AotHostOS=$(MonoAotHostOS);AotHostArchitecture=$(TargetArchitecture);BuildMonoAOTCrossCompilerOnly=true;TargetArchitecture=$(MonoAotTargetArchitecture);TargetOS=$(MonoAotTargetOS)" /> <_MonoAOTCrossFiles Include="$(ArtifactsBinDir)mono\$(MonoAotTargetOS).$(MonoAotTargetArchitecture).$(Configuration)\cross\$(MonoAotTargetRid.ToLower())\**" />