Skip to content

Commit

Permalink
Merge branch 'master' into python_3_12
Browse files Browse the repository at this point in the history
  • Loading branch information
benfred authored Oct 10, 2024
2 parents c5e38a6 + 98de420 commit 6bbb5c2
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install Dependencies
run: sudo apt install libunwind-dev
if: runner.os == 'Linux'
Expand All @@ -39,6 +40,9 @@ jobs:
python-version: 3.9
- 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
Expand Down Expand Up @@ -92,6 +96,7 @@ jobs:
CARGO_HOME: /root/.cargo
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: |
python3 -m pip install --upgrade maturin
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 @@ -604,7 +606,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 6bbb5c2

Please sign in to comment.