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

Add DebugDirectory directory entry type #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pantaloons
Copy link

No description provided.

@pantaloons
Copy link
Author

@jethrogb @aidanhs

Bump :)


let rsds_offset: RVA<DebugDirectory> = start_address;
let rsds_debug_entry: &DebugDirectory = SQLITE_X86_PE.ref_at(rsds_offset).unwrap();
assert_eq!(rsds_debug_entry.debug_type, 2);
Copy link
Owner

Choose a reason for hiding this comment

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

What does 2 mean?

@@ -43,6 +43,35 @@ fn list_sections() {
}

#[test]
fn rsds_debug_directory() {
Copy link
Owner

Choose a reason for hiding this comment

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

Can you check add tests for the 64-bit image as well?

@jethrogb
Copy link
Owner

jethrogb commented Jun 9, 2017

Neat!

@@ -85,6 +85,7 @@ macro_rules! directory_entry(

directory_entry!(ExportTable = RVA<ExportDirectory>);
directory_entry!(BaseRelocationTable = RVA<RelocationBlock>);
directory_entry!(Debug = RVA<DebugDirectory>);
Copy link
Owner

Choose a reason for hiding this comment

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

I think RVA<[DebugDirectory]> would be more appropriate. Can you also add pub fn get_debug_directories(&self) -> Result<&'data [DebugDirectory]> to impl Pe?

Copy link
Author

Choose a reason for hiding this comment

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

Could you clarify on RVA<[DebugDirectory]>, [DebugDirectory] is not RefSafe so wouldn't be able to implement the Directory trait.

Copy link
Owner

@jethrogb jethrogb Jun 12, 2017

Choose a reason for hiding this comment

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

I think that's actually too strict a limitation and the RefSafe bound can be moved to Directory::Type

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

2 participants