Skip to content

Commit

Permalink
debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
benfred committed Nov 1, 2024
1 parent eecc0d2 commit b509256
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/binary_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use memmap2::Mmap;

use crate::utils::is_subrange;

#[derive(Debug)]
pub struct BinaryInfo {
pub symbols: HashMap<String, u64>,
pub bss_addr: u64,
Expand Down Expand Up @@ -248,6 +249,7 @@ pub fn parse_binary(filename: &Path, addr: u64, size: u64) -> Result<BinaryInfo,
let mut pyruntime_size = 0;
let mut found_data = false;
for section in pe.sections.iter() {
println!("section name {:#?}", section.name);
if section.name.starts_with(b".data") {
found_data = true;
if let Some(addr) = offset.checked_add(section.virtual_address as u64) {
Expand Down
1 change: 1 addition & 0 deletions src/python_process_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ where
P: ProcessMemory,
{
// First check the pyruntime section it was found
info!("getting interpreter addresses from {:#?}", binary);
if binary.pyruntime_addr != 0 {
let bss = process.copy(
binary.pyruntime_addr as usize,
Expand Down

0 comments on commit b509256

Please sign in to comment.