-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Implement ISOSDacInterface::GetThreadAllocData in cDAC SOSDacImpl #124817
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
base: main
Are you sure you want to change the base?
Changes from all commits
31fae06
95f03eb
764358c
9fbc6c9
a4ca9e9
0abc066
0e5922e
fa4b867
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 |
|---|---|---|
|
|
@@ -123,6 +123,47 @@ public void IterateThreads(MockTarget.Architecture arch) | |
| Assert.Equal(expectedCount, count); | ||
| } | ||
|
|
||
| [Theory] | ||
| [ClassData(typeof(MockTarget.StdArch))] | ||
| public void GetThreadAllocContext(MockTarget.Architecture arch) | ||
| { | ||
| TargetTestHelpers helpers = new(arch); | ||
| MockMemorySpace.Builder builder = new(helpers); | ||
| MockDescriptors.Thread thread = new(builder); | ||
|
|
||
| long allocBytes = 1024; | ||
| long allocBytesLoh = 4096; | ||
|
|
||
| TargetPointer addr = thread.AddThread(1, new TargetNUInt(1234), allocBytes, allocBytesLoh); | ||
|
|
||
| Target target = CreateTarget(thread); | ||
| IThread contract = target.Contracts.Thread; | ||
|
Comment on lines
126
to
140
|
||
| Assert.NotNull(contract); | ||
|
|
||
| contract.GetThreadAllocContext(addr, out long resultAllocBytes, out long resultAllocBytesLoh); | ||
| Assert.Equal(allocBytes, resultAllocBytes); | ||
| Assert.Equal(allocBytesLoh, resultAllocBytesLoh); | ||
| } | ||
|
|
||
| [Theory] | ||
| [ClassData(typeof(MockTarget.StdArch))] | ||
| public void GetThreadAllocContext_ZeroValues(MockTarget.Architecture arch) | ||
| { | ||
| TargetTestHelpers helpers = new(arch); | ||
| MockMemorySpace.Builder builder = new(helpers); | ||
| MockDescriptors.Thread thread = new(builder); | ||
|
|
||
| TargetPointer addr = thread.AddThread(1, new TargetNUInt(1234)); | ||
|
|
||
| Target target = CreateTarget(thread); | ||
| IThread contract = target.Contracts.Thread; | ||
| Assert.NotNull(contract); | ||
|
|
||
| contract.GetThreadAllocContext(addr, out long allocBytes, out long allocBytesLoh); | ||
| Assert.Equal(0, allocBytes); | ||
| Assert.Equal(0, allocBytesLoh); | ||
| } | ||
|
|
||
| [Theory] | ||
| [ClassData(typeof(MockTarget.StdArch))] | ||
| public void GetStackLimits(MockTarget.Architecture arch) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.