Skip to content

Commit

Permalink
Add proccontrol/src/unix.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 1fe4c84 commit 464e279
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/proccontrol/developer/unix.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ unix.h
.. cpp:function:: virtual bool plat_getMemoryAccessRights(Dyninst::Address addr, Process::mem_perm& rights)
.. cpp:function:: virtual bool plat_setMemoryAccessRights(Dyninst::Address addr, size_t size, Process::mem_perm rights, Process::mem_perm& oldRights)
.. cpp:function:: virtual bool plat_findAllocatedRegionAround(Dyninst::Address addr, Process::MemoryRegion& memRegion)

I'm not sure that unix_process is the proper place for this--it's really based on whether
``/proc/PID/maps`` exists. Currently, that matches our platforms that use unix_process, so I'll leave
it be for now.

.. cpp:function:: virtual Dyninst::Address plat_mallocExecMemory(Dyninst::Address, unsigned size)
.. cpp:function:: virtual bool plat_supportFork()
.. cpp:function:: virtual bool plat_supportExec()
4 changes: 1 addition & 3 deletions proccontrol/src/unix.C
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ bool unix_process::plat_findAllocatedRegionAround(Dyninst::Address addr,
setLastError(err_unsupported, "Find Allocated Memory Region not supported on this platform\n");
return false;
}
//I'm not sure that unix_process is the proper place for this--it's really based on whether
// /proc/PID/maps exists. Currently, that matches our platforms that use unix_process, so
// I'll leave it be for now.

Dyninst::Address unix_process::plat_mallocExecMemory(Dyninst::Address min, unsigned size) {
Dyninst::Address result = 0x0;
bool found_result = false;
Expand Down

0 comments on commit 464e279

Please sign in to comment.