Skip to content

Commit

Permalink
Merge branch 'master' into test_windows_wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
benfred authored Oct 10, 2024
2 parents 6895ed9 + 8e80803 commit 7ca6a8a
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
if: runner.os == 'Linux'
- name: Build
run: cargo build --release --verbose --examples
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Test
id: test
continue-on-error: true
run: cargo test --release
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Test (retry#1)
id: test1
run: cargo test --release
Expand Down
79 changes: 76 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ py-spy-testdata = "0.1.0"
termios = "0.3.3"

[target.'cfg(windows)'.dependencies]
winapi = {version = "0.3", features = ["winbase", "consoleapi", "wincon", "handleapi", "timeapi", "processenv" ]}
winapi = {version = "0.3", features = ["errhandlingapi", "winbase", "consoleapi", "wincon", "handleapi", "timeapi", "processenv" ]}
6 changes: 4 additions & 2 deletions src/python_process_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ use std::slice;
use anyhow::{Context, Error, Result};
use lazy_static::lazy_static;
use proc_maps::{get_process_maps, MapRange};
use remoteprocess::{Pid, ProcessMemory};
#[cfg(not(target_os = "macos"))]
use remoteprocess::Pid;
use remoteprocess::ProcessMemory;

use crate::binary_parser::{parse_binary, BinaryInfo};
use crate::config::Config;
Expand Down Expand Up @@ -599,7 +601,7 @@ pub trait ContainsAddr {

impl ContainsAddr for Vec<MapRange> {
#[cfg(windows)]
fn contains_addr(&self, addr: usize) -> bool {
fn contains_addr(&self, _addr: usize) -> bool {
// On windows, we can't just check if a pointer is valid by looking to see if it points
// to something in the virtual memory map. Brute-force it instead
true
Expand Down
2 changes: 0 additions & 2 deletions src/python_spy.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[cfg(windows)]
use regex::RegexBuilder;
use std::collections::HashMap;
#[cfg(all(target_os = "linux", feature = "unwind"))]
use std::collections::HashSet;
Expand Down

0 comments on commit 7ca6a8a

Please sign in to comment.