You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/coreclr/botr/xplat-minidump-generation.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,9 @@ Like the severe memory corruption case, if the signal handler (`SIGSEGV`) gets c
40
40
41
41
There will be some differences gathering the crash information but these platforms still use ELF format core dumps so that part of the utility should be much different. The mechanism used for Linux to give _createdump_ permission to use ptrace and access the /proc doesn't exists on these platforms.
42
42
43
-
### OS X ###
43
+
### macOS ###
44
44
45
-
On .NET 5.0, createdump supported generating dumps on MacOS but instead of the MachO dump format, it generates the ELF coredumps. This wad because of time constraints developing a MachO dump writer on the generation side and a MachO reader for the diagnostics tooling side (dotnet-dump and CLRMD). This means the native debuggers like gdb and lldb will not work with dumps obtained from apps running on a 5.0 runtime, but the dotnet-dump tool will allow the managed state to be analyzed. Because of this behavior an additional environment variable will need to be set (COMPlus_DbgEnableElfDumpOnMacOS=1) along with the ones below in the Configuration/Policy section.
45
+
On .NET 5.0, createdump supported generating dumps on macOS but instead of the MachO dump format, it generates the ELF coredumps. This wad because of time constraints developing a MachO dump writer on the generation side and a MachO reader for the diagnostics tooling side (dotnet-dump and CLRMD). This means the native debuggers like gdb and lldb will not work with dumps obtained from apps running on a 5.0 runtime, but the dotnet-dump tool will allow the managed state to be analyzed. Because of this behavior an additional environment variable will need to be set (COMPlus_DbgEnableElfDumpOnMacOS=1) along with the ones below in the Configuration/Policy section.
46
46
47
47
Starting .NET 6.0, native Mach-O core files get generated and the variable COMPlus_DbgEnableElfDumpOnMacOS has been deprecated.
Copy file name to clipboardExpand all lines: docs/design/mono/diagnostics-tracing.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ MonoVM includes support for EventPipe and DiagnosticServer components used to ge
10
10
11
11
Due to differences between runtimes many of the NativeRuntimeEvents won't apply to MonoVM. Only a selected amount of NativeRuntimeEvents will initially be added to MonoVM. Current supported NativeRuntimeEvents can be viewed in MonoVM include file, https://github.com/dotnet/runtime/blob/main/src/mono/mono/eventpipe/gen-eventing-event-inc.lst. Since primary focus is EventPipe and mobile platforms (iOS/Android), ETW and LTTng providers have currently not been integrated/enabled for NativeRuntimeEvents on MonoVM.
12
12
13
-
MonoVM runs on a variety of platforms and depending on platform capabilities MonoVM support different build configurations of EventPipe and DiagnosticServer. For desktop platforms (Windows, Linux, MacOS), MonoVM build DiagnosticServer using
14
-
`NamedPipes` (Windows) or `UnixDomainSockets` (Linux, MacOS) support. This is in line with CoreCLR build configuration of the DiagnosticServer, working in the same way.
13
+
MonoVM runs on a variety of platforms and depending on platform capabilities MonoVM support different build configurations of EventPipe and DiagnosticServer. For desktop platforms (Windows, Linux, macOS), MonoVM build DiagnosticServer using
14
+
`NamedPipes` (Windows) or `UnixDomainSockets` (Linux, macOS) support. This is in line with CoreCLR build configuration of the DiagnosticServer, working in the same way.
15
15
16
16
On mobile platforms (Android/iOS) or other remote sandboxed environments, MonoVM DiagnosticServer component can be build using TCP/IP support to better handle remote targets. It also handles the connect scenario (runtime act as TCP/IP client connecting back to tooling), as well as the listening scenario (runtime act as a TCP/IP listener waiting for tooling to connect). Depending on platform, allowed capabilities (some platforms won't allow listening on sockets) and tracing scenarios (startup tracing needs suspended runtime), a combination of these scenarios can be used.
Copy file name to clipboardExpand all lines: docs/workflow/building/coreclr/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Here is a brief overview on how to build the common form of CoreCLR in general.
14
14
15
15
To build just CoreCLR, use the `subset` flag to the `build.sh` or `build.cmd` script at the repo root. Note that specifying `-subset` explicitly is not necessary if it is the first argument (i.e. `./build.sh --subset clr` and `./build.sh clr` are equivalent). However, if you specify any other argument beforehand, then you must specify the `-subset` flag.
16
16
17
-
For Linux and MacOS:
17
+
For Linux and macOS:
18
18
19
19
```bash
20
20
./build.sh --subset clr
@@ -89,7 +89,7 @@ If you want to force a full rebuild of the subsets you specified when calling th
89
89
Now that you've got the general idea on how the _CoreCLR_ builds work, here are some further documentation links on platform-specific caveats and features.
90
90
91
91
*[Build CoreCLR on Windows](windows-instructions.md)
92
-
*[Build CoreCLR on MacOS](macos-instructions.md)
92
+
*[Build CoreCLR on macOS](macos-instructions.md)
93
93
*[Build CoreCLR on Linux](linux-instructions.md)
94
94
*[Build CoreCLR on FreeBSD](freebsd-instructions.md)
*[Cross-Compiling for ARM32 and ARM64 on Windows](#cross-compiling-for-arm32-and-arm64-on-windows)
5
5
*[Cross-Compiling for x86 on Windows](#cross-compiling-for-x86-on-windows)
6
-
*[MacOS Cross-Building](#macos-cross-building)
6
+
*[macOS Cross-Building](#macos-cross-building)
7
7
*[Linux Cross-Building](#linux-cross-building)
8
8
*[Generating the ROOTFS](#generating-the-rootfs)
9
9
*[ROOTFS for FreeBSD](#rootfs-for-freebsd)
@@ -39,11 +39,11 @@ Building for x86 doesn't require any additional software installed or configured
39
39
.\build.cmd -s clr -c Release -arch x86
40
40
```
41
41
42
-
## MacOS Cross-Building
42
+
## macOS Cross-Building
43
43
44
-
This section will go over cross-compiling on MacOS. Currently, MacOS allows you to cross-compile between x64 and ARM64.
44
+
This section will go over cross-compiling on macOS. Currently, macOS allows you to cross-compile between x64 and ARM64.
45
45
46
-
Similarly to targeting Windows x86, the native tooling you installed back in the [MacOS requirements doc](/docs/workflow/requirements/macos-requirements.md) has the capabilities to effectuate the cross-compilation. You have simply to pass the `-cross` flag, along with the designated architecture. For example, for an arm64 build on an Intel x64 Mac:
46
+
Similarly to targeting Windows x86, the native tooling you installed back in the [macOS requirements doc](/docs/workflow/requirements/macos-requirements.md) has the capabilities to effectuate the cross-compilation. You have simply to pass the `-cross` flag, along with the designated architecture. For example, for an arm64 build on an Intel x64 Mac:
Copy file name to clipboardExpand all lines: docs/workflow/building/coreclr/macos-instructions.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Build CoreCLR on MacOS
1
+
# Build CoreCLR on macOS
2
2
3
3
*[Environment](#environment)
4
4
*[Build the Runtime](#build-the-runtime)
@@ -9,11 +9,11 @@ This guide will walk you through building CoreCLR on macOS.
9
9
10
10
## Environment
11
11
12
-
Ensure you have all of the prerequisites installed from the [MacOS Requirements](/docs/workflow/requirements/macos-requirements.md).
12
+
Ensure you have all of the prerequisites installed from the [macOS Requirements](/docs/workflow/requirements/macos-requirements.md).
13
13
14
14
## Build the Runtime
15
15
16
-
To build CoreCLR on MacOS, run `build.sh` while specifying the `clr` subset:
16
+
To build CoreCLR on macOS, run `build.sh` while specifying the `clr` subset:
17
17
18
18
```bash
19
19
./build.sh --subset clr <other args>
@@ -27,7 +27,7 @@ After the build has completed, there should be some files placed in `artifacts/b
27
27
28
28
### Cross-Compilation
29
29
30
-
It is possible to get a MacOS ARM64 build using an Intel x64 Mac and vice versa, an x64 one using an M1 Mac. Instructions on how to do this are in the [cross-building doc](/docs/workflow/building/coreclr/cross-building.md#macos-cross-building).
30
+
It is possible to get a macOS ARM64 build using an Intel x64 Mac and vice versa, an x64 one using an M1 Mac. Instructions on how to do this are in the [cross-building doc](/docs/workflow/building/coreclr/cross-building.md#macos-cross-building).
This guide will walk you through building CoreCLR on Windows.
13
10
@@ -17,14 +14,6 @@ Ensure you have all of the prerequisites installed from the [Windows Requirement
17
14
18
15
## Build the Runtime
19
16
20
-
As the main development platform for .NET, Windows has more than one way to build the _dotnet/runtime_ repo. You can do it entirely through the command-line as you'd do in Linux and MacOS, or you can leverage the integration with Visual Studio that the repository provides. This document will go on about both ways so you can choose whichever fits your needs best, or even use a combination of both.
21
-
22
-
### Using the Command Line
23
-
24
-
This section will cover how to build the product using the command-line.
25
-
26
-
#### CoreCLR
27
-
28
17
To build CoreCLR on Windows, run `build.cmd` while specifying the `clr` subset:
29
18
30
19
```cmd
@@ -37,15 +26,15 @@ After the build has completed, there should be some files placed in `artifacts/b
37
26
*`coreclr.dll`: The CoreCLR runtime itself.
38
27
*`System.Private.CoreLib.dll`: The core managed library, containing definitions of `Object` and base functionality.
39
28
40
-
#####Cross-Compilation
29
+
### Cross-Compilation
41
30
42
31
It is possible to get Windows x86, ARM32, and ARM64 builds using an x64 machine. Instructions on how to do this are in the [cross-building doc](/docs/workflow/building/coreclr/cross-building.md#windows-cross-building).
43
32
44
-
####Core_Root
33
+
## Core_Root
45
34
46
35
The Core_Root provides one of the main ways to test your build. Full instructions on how to build it in the [CoreCLR testing doc](/docs/workflow/testing/coreclr/testing.md), and we also have a detailed guide on how to use it for your own testing in [its own dedicated doc](/docs/workflow/testing/using-corerun-and-coreroot.md).
47
36
48
-
####Native ARM64 (Experimental)
37
+
## Native ARM64 (Experimental)
49
38
50
39
Building natively on ARM64 requires you to have installed the appropriate ARM64 build tools and Windows SDK, as specified in the [Windows requirements doc](/docs/workflow/requirements/windows-requirements.md).
Since this is still in an experimental phase, the recommended way for building ARM64 is cross-compiling from an x64 machine. Instructions on how to do this can be found at the [cross-building doc](/docs/workflow/building/coreclr/cross-building.md#cross-compiling-for-arm32-and-arm64).
@@ -117,9 +117,9 @@ Under normal circumstances, SOS usually comes shipped with Windbg, so no additio
117
117
118
118
For more information on SOS commands click [here](https://github.com/dotnet/diagnostics/blob/master/documentation/sos-debugging-extension-windows.md).
119
119
120
-
## Debugging CoreCLR on Linux and MacOS
120
+
## Debugging CoreCLR on Linux and macOS
121
121
122
-
Very similarly to Windows, Linux and MacOS also require to have at least the _clr_ subset built prior to attempting to debug, most preferably under the _Debug_ configuration:
122
+
Very similarly to Windows, Linux and macOS also require to have at least the _clr_ subset built prior to attempting to debug, most preferably under the _Debug_ configuration:
123
123
124
124
```bash
125
125
./build.sh -s clr -c Debug
@@ -137,20 +137,20 @@ If for some reason `System.Private.CoreLib.dll` is missing, you can rebuild it w
137
137
138
138
### SOS on Unix
139
139
140
-
For Linux and MacOS, you have to install SOS by yourself, as opposed to Windows' Windbg. The instructions are very similar however, and you can find them on these two links:
140
+
For Linux and macOS, you have to install SOS by yourself, as opposed to Windows' Windbg. The instructions are very similar however, and you can find them on these two links:
141
141
142
142
* The official [Microsoft docs on SOS](https://docs.microsoft.com/dotnet/core/diagnostics/dotnet-sos).
143
143
* The instructions at the [diagnostics repo](https://github.com/dotnet/diagnostics/blob/master/documentation/installing-sos-instructions.md).
144
144
145
-
It might also be the case that you would need the latest changes in SOS, or you're working with a not-officially-supported scenario that actually works. The most common occurrence of this scenario is when using MacOS Arm64. In this case, you have to build SOS from the diagnostics repo (linked above). Once you have it done, then simply load it to your `lldb`. More details in the following section.
145
+
It might also be the case that you would need the latest changes in SOS, or you're working with a not-officially-supported scenario that actually works. The most common occurrence of this scenario is when using macOS Arm64. In this case, you have to build SOS from the diagnostics repo (linked above). Once you have it done, then simply load it to your `lldb`. More details in the following section.
146
146
147
147
### Debugging CoreCLR with lldb
148
148
149
149
**NOTE**: Only `lldb` is supported to use with SOS. You can also use `gdb`, `cgdb`, or other debuggers, but you might not have access to SOS.
150
150
151
151
1. Perform a build of the _clr_ subset of the runtime repo.
152
152
2. Start lldb passing `corerun`, the app to run (e.g. `HelloWorld.dll`), and any arguments this app might need: `lldb /path/to/corerun /path/to/app.dll <app args go here>`
153
-
3. If you're using the installed version of SOS, you can skip this step. If you built SOS manually, you have to load it before starting the debugging session: `plugin load /path/to/built/sos/libsosplugin.so`. Note that `.so` is for Linux, and `.dylib` is for MacOS. You can find more information in the diagnostics repo [private sos build doc](https://github.com/dotnet/diagnostics/blob/main/documentation/using-sos-private-build.md).
153
+
3. If you're using the installed version of SOS, you can skip this step. If you built SOS manually, you have to load it before starting the debugging session: `plugin load /path/to/built/sos/libsosplugin.so`. Note that `.so` is for Linux, and `.dylib` is for macOS. You can find more information in the diagnostics repo [private sos build doc](https://github.com/dotnet/diagnostics/blob/main/documentation/using-sos-private-build.md).
154
154
4. Launch program: `process launch -s`
155
155
5. To stop breaks on _SIGUSR1_ signals used by the runtime run the following command: `process handle -s false SIGUSR1`
156
156
6. Set a breakpoint where CoreCLR is initialized, as it's the most stable point to begin debugging: `breakpoint set -n coreclr_execute_assembly`.
@@ -159,7 +159,7 @@ It might also be the case that you would need the latest changes in SOS, or you'
159
159
160
160
#### Disabling Managed Attach/Debugging
161
161
162
-
The `DOTNET_EnableDiagnostics`_environment variable_ can be used to disable managed debugging. This prevents the various OS artifacts used for debugging, such as named pipes and semaphores on Linux and MacOS, from being created.
162
+
The `DOTNET_EnableDiagnostics`_environment variable_ can be used to disable managed debugging. This prevents the various OS artifacts used for debugging, such as named pipes and semaphores on Linux and macOS, from being created.
Copy file name to clipboardExpand all lines: docs/workflow/requirements/freebsd-requirements.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Since there is no official build and FreeBSD package, native build on FreeBSD is
17
17
18
18
## Docker
19
19
20
-
Install Docker. For further instructions on installation, see [here](https://docs.docker.com/install/). You can find the official .NET images in [their Docker hub](https://hub.docker.com/_/microsoft-dotnet).
20
+
Install Docker. For further instructions on installation, see [here](https://docs.docker.com/install/).
21
21
22
22
All the required build tools are included in the Docker images used to do the build, so no additional setup is required.
Copy file name to clipboardExpand all lines: docs/workflow/requirements/linux-requirements.md
+2-4
Original file line number
Diff line number
Diff line change
@@ -17,17 +17,15 @@ Install Docker. For further installation instructions, see [here](https://docs.d
17
17
18
18
## Environment
19
19
20
-
These instructions are written assuming the current Ubuntu LTS, since that's the officially used distribution. Pull Requests are welcome to address other environments as long as they don't break the ability to use Ubuntu LTS.
20
+
These instructions are written assuming the current Ubuntu LTS. Pull Requests are welcome to address other environments.
21
21
22
22
Minimum RAM required to build is 1GB. The build is known to fail on 512 MB VMs ([dotnet/runtime#4069](https://github.com/dotnet/runtime/issues/4069)).
23
23
24
24
### Toolchain Setup
25
25
26
-
Building the repo requires CMake 3.14.5 or newer on Linux. Add Kitware's APT feed to your configuration for a newer version of CMake (optional). See their instructions at their [website](https://apt.kitware.com/).
Copy file name to clipboardExpand all lines: docs/workflow/requirements/macos-requirements.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
# Requirements to build dotnet/runtime on MacOS
1
+
# Requirements to build dotnet/runtime on macOS
2
2
3
3
*[Environment](#environment)
4
4
*[Xcode](#xcode)
5
5
*[Toolchain Setup](#toolchain-setup)
6
6
7
-
This guide will walk you through the requirements needed to build _dotnet/runtime_ on MacOS. We'll start by showing how to set up your environment from scratch.
7
+
This guide will walk you through the requirements needed to build _dotnet/runtime_ on macOS. We'll start by showing how to set up your environment from scratch.
0 commit comments