-
Notifications
You must be signed in to change notification settings - Fork 10.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
[BOLT][NFC] Extract a function for dump MCInst #67225
Conversation
bolt/lib/Core/BinaryFunction.cpp
Outdated
@@ -389,6 +389,13 @@ bool BinaryFunction::isForwardCall(const MCSymbol *CalleeSymbol) const { | |||
} | |||
} | |||
|
|||
void BinaryFunction::dump(const MCInst &Inst) const { | |||
if (!BC.InstPrinter) |
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.
It seems to me it is more of a BC interace, not BF. Also suggest you to write something on if instprinter is not ready.
Anyway it needs to be used somehow, it could not be just merged without proper usage, tests & etc
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.
Oh, thanks for your suggestion. I will try to modify it to BC interface and add test cases or usage, for testing purposes.
ping. |
Hi, @aaupov @maksfb @rafaelauler , can I merge this debugging assistance interface? |
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.
LGTM. Thanks. Small suggestion: s/dumpInst/dump/
for debugging convenience, but I don't insist.
Extract a function for printing MCInst, so we can call it in GDB to get a more intuitive assembly representation.
Thanks, modified. |
In GDB debugging, obtaining the assembly representation of MCInst is more intuitive.