Skip to content

Commit

Permalink
Upgrade crate dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
acj committed Oct 3, 2021
1 parent cb85592 commit 111b93a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 68 deletions.
106 changes: 61 additions & 45 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ libc = "0.2.54"
[target.'cfg(target_os="macos")'.dependencies]
anyhow = "1.0.40"
mach = "0.3.2"
libproc = "0.9.1"
libproc = "0.10.0"

[target.'cfg(windows)'.dependencies]
winapi = {version = "0.3", features = ["tlhelp32", "processthreadsapi", "handleapi", "impl-default", "dbghelp"]}

[target.'cfg(target_os="freebsd")'.build-dependencies]
bindgen = "0.53.1"
bindgen = "0.59.1"
26 changes: 5 additions & 21 deletions src/win_maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,18 @@ use std::io;
use std::os::windows::ffi::{OsStrExt, OsStringExt};
use std::ptr::null_mut;

use winapi::shared::basetsd::DWORD64;
use winapi::shared::minwindef::{BOOL, DWORD, FALSE};
use winapi::um::dbghelp::{SymCleanup, SymInitializeW, PMODLOAD_DATA, PSYMBOL_INFOW, SYMBOL_INFOW};
use winapi::shared::minwindef::{DWORD, FALSE};
use winapi::um::dbghelp::{
SymCleanup, SymFromNameW, SymInitializeW, SymLoadModuleExW, SymUnloadModule64, SYMBOL_INFOW,
};
use winapi::um::handleapi::{CloseHandle, INVALID_HANDLE_VALUE};
use winapi::um::processthreadsapi::OpenProcess;
use winapi::um::tlhelp32::{CreateToolhelp32Snapshot, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32};
use winapi::um::tlhelp32::{Module32FirstW, Module32NextW, MODULEENTRY32W};
use winapi::um::winnt::{HANDLE, PCWSTR, PROCESS_VM_READ};
use winapi::um::winnt::{HANDLE, PROCESS_VM_READ};

pub type Pid = u32;

// TODO: once this winapi-rs PR is merged (and on crates.io) this section can be removed
// https://github.com/retep998/winapi-rs/pull/653
extern "system" {
pub fn SymLoadModuleExW(
hProcess: HANDLE,
hFile: HANDLE,
ImageName: PCWSTR,
ModuleName: PCWSTR,
BaseOfDll: DWORD64,
SizeOfDll: DWORD,
Data: PMODLOAD_DATA,
Flags: DWORD,
) -> DWORD64;
pub fn SymFromNameW(hProcess: HANDLE, Name: PCWSTR, Symbol: PSYMBOL_INFOW) -> BOOL;
pub fn SymUnloadModule64(hProcess: HANDLE, BaseOfDll: DWORD64) -> BOOL;
}

#[derive(Debug, Clone, PartialEq)]
pub struct MapRange {
base_addr: usize,
Expand Down

0 comments on commit 111b93a

Please sign in to comment.