-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[cDAC] Implement basic stackwalking #111759
base: main
Are you sure you want to change the base?
Conversation
4f1fbee
to
5d9317a
Compare
8009551
to
a794374
Compare
…ad_local callbacks
@@ -23,6 +23,10 @@ struct CodeBlockHandle | |||
TargetPointer GetMethodDesc(CodeBlockHandle codeInfoHandle); | |||
// Get the instruction pointer address of the start of the code block | |||
TargetCodePointer GetStartAddress(CodeBlockHandle codeInfoHandle); | |||
// Gets the base address of the module containing the code block | |||
TargetPointer GetModuleBaseAddress(CodeBlockHandle codeInfoHandle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this naming/meaning. Looking closer at this, this concept of "module" isn't used anywhere else in the documentation. Other parts of the documentation refer to modules as the IL concept, but in this case it refers to the concept of a module which is either a PE binary which holds R2R code, or a CodeHeap which may have code from many different IL modules within it. Possibly change the name here to something like "GetUnwindInfoBaseAddress" and document that it serves as the base pointer for the RUNTIME_FUNCTION found in the GetUnwindInfo api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed GetModuleBaseAddress
-> GetUnwindInfoBaseAddress
. It's documented as "returning the base address that the unwind info for a given CodeBlockHandle
is relative to."
I changed all of cDAC to reference the base address using unwindInfoBase
but left the pre-existing native references to moduleBase
and imageBase
.
Contributes to #110758
Implements bulk of the cDAC stackwalking mechanics.
IStackWalk
contractSupports
amd64
andarm64
architectures. Tested on Windows targetingwin-amd64
andlinux-arm64
dumps.Supports
InlineCallFrames
andSoftwareExceptionFrames
.Does not support and will be added in future PRs:
IXCLRDataTask.CreateStackWalk
#112366ClrDataAccess::GetFrameName
#112274IXCLRDataStackWalk::Request
parametersCLRDATA_REQUEST_REVISION
andCLRDATA_STACK_WALK_REQUEST_SET_FIRST_FRAME
[cDAC] ImplementIXCLRDataStackWalk::Request
support forCLRDATA_REQUEST_REVISION
andCLRDATA_STACK_WALK_REQUEST_SET_FIRST_FRAME
#112275