-
Notifications
You must be signed in to change notification settings - Fork 384
Add -all flag to DumpMT command
#5701
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?
Conversation
- Add -all flag to DumpMT that includes class details and method descriptors - -all implies -MD but -MD remains independently usable - Create DisplayClassDetails() helper to avoid duplication between DumpMT -all and DumpClass - Simplify Canonical MethodTable display: only show when it differs from current MT - Update PrintVC and PrintObj to use same simplified logic - Keep DumpClass as separate command for backward compatibility - Update documentation for both Windows and Unix
… GetStaticFieldPTR
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.
Pull request overview
This PR adds a new -all flag to the DumpMT command that provides comprehensive class details including attributes, fields, and method descriptors. The changes refactor code to reduce duplication by introducing a DisplayClassDetails() helper function and simplify the display of canonical MethodTable information by only showing it when it differs from the current MT.
Changes:
- Added
-allflag toDumpMTcommand (implies-MD) for showing class details and method descriptors - Created
DisplayClassDetails()helper function to share code betweenDumpClassandDumpMT -all - Simplified canonical MethodTable display logic across
DumpMT,DumpClass,PrintVC, andPrintObjto only show when different from current MT - Changed field value type indicator from "1"/"0" to "T"/"F" for better clarity
- Updated documentation for both Windows and Unix platforms
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/SOS/Strike/util.cpp | Changed value type indicator from numeric to T/F, fixed format string for pointer alignment, removed trailing whitespace |
| src/SOS/Strike/strike.cpp | Added DisplayClassDetails() helper, implemented -all flag for DumpMT, simplified canonical MT display logic, refactored DumpClass, PrintVC, and PrintObj |
| src/SOS/Strike/sosdocsunix.txt | Updated DumpMT command documentation to describe -all flag |
| src/SOS/Strike/sosdocs.txt | Updated DumpMT command documentation to describe -all flag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
noahfalk
left a comment
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.
Seems OK to me. One UI suggestion inline. @hoyosjs @tommcdon to get a few more eyes on it.
Thanks @AaronRobinsonMSFT!
Update tests.
noahfalk
left a comment
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.
👍
New output