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
base: master
Are you sure you want to change the base?
Conversation
|
||
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); |
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.
What does 2
mean?
@@ -43,6 +43,35 @@ fn list_sections() { | |||
} | |||
|
|||
#[test] | |||
fn rsds_debug_directory() { |
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.
Can you check add tests for the 64-bit image as well?
Neat! |
@@ -85,6 +85,7 @@ macro_rules! directory_entry( | |||
|
|||
directory_entry!(ExportTable = RVA<ExportDirectory>); | |||
directory_entry!(BaseRelocationTable = RVA<RelocationBlock>); | |||
directory_entry!(Debug = RVA<DebugDirectory>); |
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.
I think RVA<[DebugDirectory]>
would be more appropriate. Can you also add pub fn get_debug_directories(&self) -> Result<&'data [DebugDirectory]>
to impl Pe
?
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.
Could you clarify on RVA<[DebugDirectory]>
, [DebugDirectory]
is not RefSafe so wouldn't be able to implement the Directory trait.
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.
I think that's actually too strict a limitation and the RefSafe
bound can be moved to Directory::Type
No description provided.