-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add ICorDebugDataTarget5 with GetTargetInfo and implement it in ShimDataTarget #131106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -834,6 +834,60 @@ interface ICorDebugDataTarget4 : IUnknown | |
| [in, out, size_is(contextSize)] BYTE *context); | ||
| }; | ||
|
|
||
| /* | ||
| * Describes the processor architecture of the target process. | ||
| */ | ||
| typedef enum CorDebugTargetArchitecture | ||
| { | ||
| CORDB_ARCH_UNKNOWN, | ||
| CORDB_ARCH_X86, | ||
| CORDB_ARCH_AMD64, | ||
| CORDB_ARCH_ARM, | ||
| CORDB_ARCH_ARM64, | ||
| CORDB_ARCH_LOONGARCH64, | ||
| CORDB_ARCH_RISCV64, | ||
| CORDB_ARCH_WASM | ||
| } CorDebugTargetArchitecture; | ||
|
|
||
| /* | ||
| * Describes the operating system of the target process. | ||
| */ | ||
| typedef enum CorDebugTargetOperatingSystem | ||
| { | ||
| CORDB_OS_UNKNOWN, | ||
| CORDB_OS_WINDOWS, | ||
| CORDB_OS_MACOS, | ||
| CORDB_OS_LINUX | ||
| } CorDebugTargetOperatingSystem; | ||
|
|
||
| /* | ||
| * Describes the processor architecture and operating system of the target process. | ||
| */ | ||
| typedef struct CorDebugTargetInfo | ||
| { | ||
| CorDebugTargetArchitecture arch; | ||
| CorDebugTargetOperatingSystem os; | ||
| } CorDebugTargetInfo; | ||
|
|
||
| /* | ||
| * Data target that can report the processor architecture and operating system | ||
| * of the target process. | ||
| */ | ||
| [ | ||
| object, | ||
| uuid(A5634045-7D7E-4497-A608-44D6BFE4FC28), | ||
| local, | ||
| pointer_default(unique) | ||
| ] | ||
| interface ICorDebugDataTarget5 : IUnknown | ||
| { | ||
| /* | ||
| * GetTargetInfo returns the processor architecture and operating system | ||
| * of the target process. | ||
| */ | ||
| HRESULT GetTargetInfo([out] CorDebugTargetInfo * pTargetInfo); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What pushes us to make a new API vs using the one we already have?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, implementations of the API do not distinguish between Mac and Linux. If we ever needed to distinguish the two, we would not be able to distinguish say a Mac with an old implementation that returns POSIX_XXX, from a Linux with either an old or a new implementation. I also like the (arch, OS) API as opposed to one which lists all the possible combinations - especially when we often care about only one element at a time.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm skeptical we need to add this new public surface area right now, especially considering this is implemented for in repo use only. What APIs need this? Do we need to distinguish between MacOS and Linux today?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see us distinguishing Mac from Linux anywhere at the moment, but we really should be able to distinguish them, and we really should not rely on this surface where we have to do X different checks just to check if we are ARM64, for example. The idea is that @hoyosjs would have the rest of the data targets implement this API as well, and that if needed we can fall back to the old API. |
||
| }; | ||
|
rcj1 marked this conversation as resolved.
|
||
|
|
||
| /* | ||
| * Mutable extension to the data target. This version of ICorDebugDataTarget | ||
| * can be implemented by targets that wish to support modification of the target | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.