Skip to content

Commit 3adbcf5

Browse files
Doc improvements (dotnet#76863)
- Use proper macOS capitalization - Delete superfluous details Co-authored-by: Theodore Tsirpanis <[email protected]>
1 parent 3ded1a4 commit 3adbcf5

17 files changed

+56
-77
lines changed

docs/design/coreclr/botr/xplat-minidump-generation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Like the severe memory corruption case, if the signal handler (`SIGSEGV`) gets c
4040

4141
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.
4242

43-
### OS X ###
43+
### macOS ###
4444

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.
4646

4747
Starting .NET 6.0, native Mach-O core files get generated and the variable COMPlus_DbgEnableElfDumpOnMacOS has been deprecated.
4848

docs/design/mono/diagnostics-tracing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ MonoVM includes support for EventPipe and DiagnosticServer components used to ge
1010

1111
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.
1212

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.
1515

1616
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.
1717

docs/design/security/unix-tmp.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ are used to Windows may inadvertently create security risk if they use the same
77
Most notably, the Windows model for temporary files is that the operating system provides each user with a *unique*, *user-owned* temporary directory.
88
Moreover, all Windows users, including the service and system users, have designated user folders, including temporary folders.
99

10-
The Unix model is very different. The temp directory, assuming there is one, is often a global folder (except on MacOS).
10+
The Unix model is very different. The temp directory, assuming there is one, is often a global folder (except on macOS).
1111
If possible, prefer a library function like `GetTempPath()` to find the folder. Otherwise,
1212
the `TMPDIR` environment variable is used to store the location of this folder. This variable is
1313
widely used and supported, but it is not mandatory for all Unix implementations. It should be the preferred
1414
mechanism for finding the Unix temporary folder if a library method is not available. It will commonly
15-
point to either the `/tmp` or `/var/tmp` folder. These folders are not used for MacOS, so it is not recommended
15+
point to either the `/tmp` or `/var/tmp` folder. These folders are not used for macOS, so it is not recommended
1616
to use them directly.
1717

1818
Because the temporary directory is often global, any use of the temp directory should be carefully

docs/infra/test-configurations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ All builds are
3838
- Linux arm32 Release
3939
- Linux arm32 musl Release
4040
- FreeBSD x64 (build only)
41-
- MacOS 11.6.4 x64
41+
- macOS 11.6.4 x64
4242
- x64 Release
4343
- arm64 Release
4444

docs/workflow/building/coreclr/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Here is a brief overview on how to build the common form of CoreCLR in general.
1414

1515
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.
1616

17-
For Linux and MacOS:
17+
For Linux and macOS:
1818

1919
```bash
2020
./build.sh --subset clr
@@ -89,7 +89,7 @@ If you want to force a full rebuild of the subsets you specified when calling th
8989
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.
9090

9191
* [Build CoreCLR on Windows](windows-instructions.md)
92-
* [Build CoreCLR on MacOS](macos-instructions.md)
92+
* [Build CoreCLR on macOS](macos-instructions.md)
9393
* [Build CoreCLR on Linux](linux-instructions.md)
9494
* [Build CoreCLR on FreeBSD](freebsd-instructions.md)
9595

docs/workflow/building/coreclr/cross-building.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* [Windows Cross-Building](#windows-cross-building)
44
* [Cross-Compiling for ARM32 and ARM64 on Windows](#cross-compiling-for-arm32-and-arm64-on-windows)
55
* [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)
77
* [Linux Cross-Building](#linux-cross-building)
88
* [Generating the ROOTFS](#generating-the-rootfs)
99
* [ROOTFS for FreeBSD](#rootfs-for-freebsd)
@@ -39,11 +39,11 @@ Building for x86 doesn't require any additional software installed or configured
3939
.\build.cmd -s clr -c Release -arch x86
4040
```
4141

42-
## MacOS Cross-Building
42+
## macOS Cross-Building
4343

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.
4545

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:
4747

4848
```bash
4949
./build.sh -s clr -c Release --cross -a arm64

docs/workflow/building/coreclr/macos-instructions.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Build CoreCLR on MacOS
1+
# Build CoreCLR on macOS
22

33
* [Environment](#environment)
44
* [Build the Runtime](#build-the-runtime)
@@ -9,11 +9,11 @@ This guide will walk you through building CoreCLR on macOS.
99

1010
## Environment
1111

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).
1313

1414
## Build the Runtime
1515

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:
1717

1818
```bash
1919
./build.sh --subset clr <other args>
@@ -27,7 +27,7 @@ After the build has completed, there should be some files placed in `artifacts/b
2727

2828
### Cross-Compilation
2929

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).
3131

3232
## Create the Core_Root
3333

docs/workflow/building/coreclr/windows-instructions.md

+6-21
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22

33
* [Environment](#environment)
44
* [Build the Runtime](#build-the-runtime)
5-
* [Using the Command Line](#using-the-command-line)
6-
* [CoreCLR](#coreclr)
7-
* [Cross-Compilation](#cross-compilation)
8-
* [Core_Root](#core_root)
9-
* [Native ARM64 (Experimental)](#native-arm64-experimental)
10-
* [Using Visual Studio](#using-visual-studio)
5+
* [Cross-Compilation](#cross-compilation)
6+
* [Core_Root](#core_root)
7+
* [Native ARM64 (Experimental)](#native-arm64-experimental)
118

129
This guide will walk you through building CoreCLR on Windows.
1310

@@ -17,14 +14,6 @@ Ensure you have all of the prerequisites installed from the [Windows Requirement
1714

1815
## Build the Runtime
1916

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-
2817
To build CoreCLR on Windows, run `build.cmd` while specifying the `clr` subset:
2918

3019
```cmd
@@ -37,15 +26,15 @@ After the build has completed, there should be some files placed in `artifacts/b
3726
* `coreclr.dll`: The CoreCLR runtime itself.
3827
* `System.Private.CoreLib.dll`: The core managed library, containing definitions of `Object` and base functionality.
3928

40-
##### Cross-Compilation
29+
### Cross-Compilation
4130

4231
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).
4332

44-
#### Core_Root
33+
## Core_Root
4534

4635
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).
4736

48-
#### Native ARM64 (Experimental)
37+
## Native ARM64 (Experimental)
4938

5039
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).
5140

@@ -56,7 +45,3 @@ build.cmd -s clr -c Release -arch arm64 -msbuild
5645
```
5746

5847
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).
59-
60-
### Using Visual Studio
61-
62-
Visual Studio instructions coming soon!

docs/workflow/debugging/coreclr/debugging-runtime.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* [Using Visual Studio Open Folder with CMake](#using-visual-studio-open-folder-with-cmake)
66
* [Using Visual Studio Code](#using-visual-studio-code)
77
* [Using SOS with Windbg or Cdb on Windows](#using-sos-with-windbg-or-cdb-on-windows)
8-
* [Debugging CoreCLR on Linux and MacOS](#debugging-coreclr-on-linux-and-macos)
8+
* [Debugging CoreCLR on Linux and macOS](#debugging-coreclr-on-linux-and-macos)
99
* [SOS on Unix](#sos-on-unix)
1010
* [Debugging CoreCLR with lldb](#debugging-coreclr-with-lldb)
1111
* [Disabling Managed Attach/Debugging](#disabling-managed-attachdebugging)
@@ -117,9 +117,9 @@ Under normal circumstances, SOS usually comes shipped with Windbg, so no additio
117117

118118
For more information on SOS commands click [here](https://github.com/dotnet/diagnostics/blob/master/documentation/sos-debugging-extension-windows.md).
119119

120-
## Debugging CoreCLR on Linux and MacOS
120+
## Debugging CoreCLR on Linux and macOS
121121

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:
123123

124124
```bash
125125
./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
137137

138138
### SOS on Unix
139139

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:
141141

142142
* The official [Microsoft docs on SOS](https://docs.microsoft.com/dotnet/core/diagnostics/dotnet-sos).
143143
* The instructions at the [diagnostics repo](https://github.com/dotnet/diagnostics/blob/master/documentation/installing-sos-instructions.md).
144144

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.
146146

147147
### Debugging CoreCLR with lldb
148148

149149
**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.
150150

151151
1. Perform a build of the _clr_ subset of the runtime repo.
152152
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).
154154
4. Launch program: `process launch -s`
155155
5. To stop breaks on _SIGUSR1_ signals used by the runtime run the following command: `process handle -s false SIGUSR1`
156156
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'
159159

160160
#### Disabling Managed Attach/Debugging
161161

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.
163163

164164
```bash
165165
export DOTNET_EnableDiagnostics=0

docs/workflow/requirements/freebsd-requirements.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Since there is no official build and FreeBSD package, native build on FreeBSD is
1717

1818
## Docker
1919

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/).
2121

2222
All the required build tools are included in the Docker images used to do the build, so no additional setup is required.
2323

docs/workflow/requirements/linux-requirements.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ Install Docker. For further installation instructions, see [here](https://docs.d
1717

1818
## Environment
1919

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.
2121

2222
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)).
2323

2424
### Toolchain Setup
2525

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/).
27-
2826
Install the following packages for the toolchain:
2927

30-
* CMake
28+
* CMake 3.14.5 or newer
3129
* llvm
3230
* lld
3331
* clang

docs/workflow/requirements/macos-requirements.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Requirements to build dotnet/runtime on MacOS
1+
# Requirements to build dotnet/runtime on macOS
22

33
* [Environment](#environment)
44
* [Xcode](#xcode)
55
* [Toolchain Setup](#toolchain-setup)
66

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.
88

99
## Environment
1010

0 commit comments

Comments
 (0)