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

Disassemble command improvements #71

Merged
merged 2 commits into from Jul 27, 2017

Conversation

Projects
None yet
2 participants
@adamsitnik
Copy link
Contributor

adamsitnik commented Jul 27, 2017

Hi!

I have been using part of the code of msos to display the disassembly code for BenchmarkDotNet and I have realized, that always the last line of source code was printed.

The bug fix was trivial: when you find smaller distance, set the current distance to it. So far the value of distance was always int.Max, so the value of if (dist < distance) was always true, so the loop was going to the end, and returning the last line.

I also added more defensive way of looking for the source lines in the file, which can handle "nop" (clrmd reports some another magic number for it)

image

I implemented the support for printing epilogue. It looks like always the first element of method.ILOffsetMap with ILOffset == -2 is prolog, and the last one with ILOffset == -3 is epilogue.

@goldshtn

This comment has been minimized.

Copy link
Owner

goldshtn commented Jul 27, 2017

Very cool; thanks for this!

@goldshtn goldshtn merged commit e71adc7 into goldshtn:master Jul 27, 2017

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment