Skip to content

feat: populate MemoryRegion.path on Windows and macOS#64

Closed
JeanExtreme002 wants to merge 4 commits into
mainfrom
jeanextreme002/refine-memory-display
Closed

feat: populate MemoryRegion.path on Windows and macOS#64
JeanExtreme002 wants to merge 4 commits into
mainfrom
jeanextreme002/refine-memory-display

Conversation

@JeanExtreme002

Copy link
Copy Markdown
Owner

Summary

Resolve the missing path field on memory regions for Windows and macOS. Previously it was always "" on both platforms (only Linux populated it from /proc/<pid>/maps).

Changes

  • Windows: Call GetMappedFileNameW (psapi.dll) for each region yielded by VirtualQueryEx, returning the NT device path (e.g. \\Device\\HarddiskVolume3\\Windows\\System32\\ntdll.dll).
  • macOS: Call proc_regionfilename for each region yielded by mach_vm_region, returning the full filesystem path.
  • region.py: make_region() now accepts an optional path= keyword so backends can pass a pre-resolved path without modifying their struct layouts.
  • Tests: Added tests/process/test_memory_regions.py with comprehensive tests for get_memory_regions() (contract validation + path assertions on all platforms).

- Win32: call GetMappedFileNameW (psapi.dll) for each region
- macOS: call proc_regionfilename for each region
- Add optional 'path' kwarg to make_region() for backend overrides
- Add comprehensive tests for get_memory_regions() in tests/process/
@github-actions github-actions Bot added app GUI application changes (PyMemoryEditor/app/) win32 Windows backend changes (PyMemoryEditor/win32/) macOS macOS backend changes (PyMemoryEditor/macos/) lib Library changes (PyMemoryEditor/) tests Test changes (tests/) labels Jun 7, 2026
@github-actions github-actions Bot removed the app GUI application changes (PyMemoryEditor/app/) label Jun 7, 2026
@github-actions github-actions Bot deleted the jeanextreme002/refine-memory-display branch June 7, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib Library changes (PyMemoryEditor/) macOS macOS backend changes (PyMemoryEditor/macos/) tests Test changes (tests/) win32 Windows backend changes (PyMemoryEditor/win32/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant