Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
abbiecnt committed Sep 4, 2024
1 parent bbcca54 commit f2feda0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Inka
//! # Inka
mod base;
mod program;
Expand Down
2 changes: 1 addition & 1 deletion src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn program() -> &'static Program {
&PROGRAM
}

/// Represents the program's in-memory layout, providing access to its base address, size,
/// Represents the `Program`'s in-memory layout, providing access to its base address, size,
/// and sections.
#[derive(Debug)]
pub struct Program {
Expand Down
6 changes: 4 additions & 2 deletions src/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use core::ops::Index;
use rayon::iter::IndexedParallelIterator;
use rayon::slice::ParallelSlice;

/// Represents a `Section` of the program in memory, providing access to its name, base address, and length.
#[derive(Debug)]
pub struct Section {
name: &'static str,
Expand All @@ -18,9 +19,10 @@ impl Section {
self.name
}

/// Returns a base pointer of this section.
#[inline]
pub fn as_ptr(&self) -> *const u8 {
self.base.as_ptr()
pub fn base(&self) -> Base {
self.base
}

/// Returns the length of this section.
Expand Down

0 comments on commit f2feda0

Please sign in to comment.