Skip to content
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

Parse call frame instructions #94

Merged
merged 1 commit into from
Sep 6, 2016
Merged

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Sep 6, 2016

  • Defines a CallFrameInstruction type to represent parsed call frame
    instructions
  • Exposes a FallibleIterator to lazily parse instructions
  • Adds methods to FDEs and CIEs to iterate and parse their instructions

r? @philipc

@coveralls
Copy link

coveralls commented Sep 6, 2016

Coverage Status

Coverage increased (+1.04%) to 90.017% when pulling 65f11e1 on fitzgen:cfi-instructions into 2511d64 on gimli-rs:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.04%) to 90.017% when pulling 65f11e1 on fitzgen:cfi-instructions into 2511d64 on gimli-rs:master.


debug_assert!(high_bits == 0);

if instruction == constants::DW_CFA_nop.0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: how about let instruction = DwCfa(instruction); and then drop the .0.

Is there a reason you used if statements instead of match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: how about let instruction = DwCfa(instruction); and then drop the .0.

Done

Is there a reason you used if statements instead of match?

I wanted to avoid rightward drift since the high bit masking would lead to two matches, each of which is double indentation, so quad indentation. I ended up making the second larger set (when the high bits aren't set) a match.

@philipc
Copy link
Collaborator

philipc commented Sep 6, 2016

LGTM

@philipc philipc mentioned this pull request Sep 6, 2016
* Defines a CallFrameInstruction type to represent parsed call frame
  instructions
* Exposes a FallibleIterator to lazily parse instructions
* Adds methods to FDEs and CIEs to iterate and parse their instructions
@fitzgen
Copy link
Member Author

fitzgen commented Sep 6, 2016

Thanks!

@fitzgen fitzgen merged commit 5b27409 into gimli-rs:master Sep 6, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+1.04%) to 89.849% when pulling a42cd8d on fitzgen:cfi-instructions into 6e3c7e1 on gimli-rs:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+1.04%) to 89.849% when pulling a42cd8d on fitzgen:cfi-instructions into 6e3c7e1 on gimli-rs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.04%) to 89.849% when pulling a42cd8d on fitzgen:cfi-instructions into 6e3c7e1 on gimli-rs:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants