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: documentation/design-docs/ipc-protocol.md
+64-1Lines changed: 64 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -383,6 +383,7 @@ enum class ProcessCommandId : uint8_t
383
383
EnablePerfMap = 0x05,
384
384
DisablePerfMap = 0x06,
385
385
ApplyStartupHook = 0x07
386
+
ProcessInfo3 = 0x08,
386
387
// future
387
388
}
388
389
```
@@ -804,7 +805,7 @@ In the event of an [error](#Errors), the runtime will attempt to send an error m
804
805
805
806
#### Inputs:
806
807
807
-
Header: `{ Magic; Size; 0x0402; 0x0000 }`
808
+
Header: `{ Magic; Size; 0x0404; 0x0000 }`
808
809
809
810
There is no payload.
810
811
@@ -848,6 +849,8 @@ struct Payload
848
849
}
849
850
```
850
851
852
+
> Available since .NET 7.0
853
+
851
854
### `EnablePerfMap`
852
855
853
856
Command Code: `0x0405`
@@ -972,6 +975,66 @@ struct Payload
972
975
973
976
> Available since .NET 8.0
974
977
978
+
### `ProcessInfo3`
979
+
980
+
Command Code: `0x0408`
981
+
982
+
The `ProcessInfo3` command queries the runtime for some basic information about the process. The returned payload is versioned and fields will be added over time.
983
+
984
+
In the event of an [error](#Errors), the runtime will attempt to send an error message and subsequently close the connection.
985
+
986
+
#### Inputs:
987
+
988
+
Header: `{ Magic; Size; 0x0408; 0x0000 }`
989
+
990
+
There is no payload.
991
+
992
+
#### Returns (as an IPC Message Payload):
993
+
994
+
Header: `{ Magic; size; 0xFF00; 0x0000; }`
995
+
996
+
Payload:
997
+
* `uint32 version`: the version of the payload returned. Future versions can add new fields after the end of the current structure, but will never remove or change any field that has already been defined.
998
+
* `uint64 processId`: the process id in the process's PID-space
999
+
* `GUID runtimeCookie`: a 128-bit GUID that should be unique across PID-spaces
1000
+
* `string commandLine`: the command line that invoked the process
1001
+
* Windows: will be the same as the output of `GetCommandLineW`
1002
+
* Non-Windows: will be the fully qualified path of the executable in `argv[0]` followed by all arguments as the appear in `argv` separated by spaces, i.e., `/full/path/to/argv[0] argv[1] argv[2] ...`
1003
+
* `string OS`: the operating system that the process is running on
1004
+
* macOS => `"macOS"`
1005
+
* Windows => `"Windows"`
1006
+
* Linux => `"Linux"`
1007
+
* other => `"Unknown"`
1008
+
* `string arch`: the architecture of the process
1009
+
* 32-bit => `"x86"`
1010
+
* 64-bit => `"x64"`
1011
+
* ARM32 => `"arm32"`
1012
+
* ARM64 => `"arm64"`
1013
+
* Other => `"Unknown"`
1014
+
* `string managedEntrypointAssemblyName`: the assembly name from the assembly identity of the entrypoint assembly of the process. This is the same value that is returned from executing `System.Reflection.Assembly.GetEntryAssembly().GetName().Name` in the target process.
1015
+
* `string clrProductVersion`: the product version of the CLR of the process; may contain prerelease label information e.g. `6.0.0-preview.6.#####`
1016
+
* `string runtimeIdentifier`: information to identify the platform this runtime targets, e.g. `linux_musl_arm`64, `linux_x64`, or `windows_x64` are all valid identifiers. See [.NET RID Catalog](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog) for more information.
1017
+
1018
+
##### Details:
1019
+
1020
+
Returns:
1021
+
```c++
1022
+
struct Payload
1023
+
{
1024
+
uint32_t Version;
1025
+
uint64_t ProcessId;
1026
+
LPCWSTR CommandLine;
1027
+
LPCWSTR OS;
1028
+
LPCWSTR Arch;
1029
+
GUID RuntimeCookie;
1030
+
LPCWSTR ManagedEntrypointAssemblyName;
1031
+
LPCWSTR ClrProductVersion;
1032
+
LPCWSTR RuntimeIdentifier;
1033
+
}
1034
+
```
1035
+
1036
+
> Available since .NET 8.0
1037
+
975
1038
## Errors
976
1039
977
1040
In the event an error occurs in the handling of an Ipc Message, the Diagnostic Server will attempt to send an Ipc Message encoding the error and subsequently close the connection. The connection will be closed **regardless** of the success of sending the error message. The Client is expected to be resilient in the event of a connection being abruptly closed.
0 commit comments