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

Don't fail if unable to read the string for DW_AT_comp_dir or DW_AT_name #515

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

jrmuizel
Copy link
Contributor

This matches the behaviour of llvm-dwarfdump:
e.g. dwarf::toString(UnitDie.find(DW_AT_comp_dir)) just returns an
Optional and doesn't fail.

Fixes #514

This matches the behaviour of llvm-dwarfdump:
e.g. dwarf::toString(UnitDie.find(DW_AT_comp_dir)) just returns an
Optional and doesn't fail.

Fixes gimli-rs#514
@philipc
Copy link
Collaborator

philipc commented Jun 25, 2020

I think this change is good, but I'm also curious why we are unable to read those strings. Is there another bug causing that?

@jrmuizel
Copy link
Contributor Author

I think offsets are outside of the file. We get an Err value: UnexpectedEof(ReaderOffsetId(4497503920))' and the file is only 112197928 bytes long. llvm-dwarfdump is also seems unable to read the strings.

Copy link
Collaborator

@philipc philipc left a comment

Choose a reason for hiding this comment

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

Thanks!

@philipc philipc merged commit e40ff75 into gimli-rs:master Jun 26, 2020
@philipc
Copy link
Collaborator

philipc commented Jun 26, 2020

The value in ReaderOffsetId isn't an offset (it's a memory address), but if llvm-dwarfdump can't read them then that's fine.

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.

Handle DW_TAG_partial_unit
2 participants