Skip to content

Commit 969e328

Browse files
committed
Added getter for modules and sections.
1 parent 5f4a79c commit 969e328

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Memory/RemoteProcess.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,34 @@ public class RemoteProcess : IDisposable
5353

5454
public SymbolStore Symbols => symbols;
5555

56+
/// <summary>Gets a copy of the current modules list. This list may change if the remote process (un)loads a module.</summary>
57+
public IEnumerable<Module> Modules
58+
{
59+
get
60+
{
61+
List<Module> cpy;
62+
lock (modules)
63+
{
64+
cpy = modules.ToList();
65+
}
66+
return cpy;
67+
}
68+
}
69+
70+
/// <summary>Gets a copy of the current sections list. This list may change if the remote process (un)loads a section.</summary>
71+
public IEnumerable<Section> Sections
72+
{
73+
get
74+
{
75+
List<Section> cpy;
76+
lock (sections)
77+
{
78+
cpy = sections.ToList();
79+
}
80+
return cpy;
81+
}
82+
}
83+
5684
public bool IsValid => process != null && coreFunctions.IsProcessValid(handle);
5785

5886
public RemoteProcess(CoreFunctionsManager coreFunctions)

0 commit comments

Comments
 (0)