java.lang.Object
com.ibm.j9ddr.corereaders.memory.EnvironmentUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Properties
readEnvironment
(IProcess proc, long environPointer) Extracts environment data from the environ pointerstatic Properties
readEnvironmentStrings
(IProcess proc, long environmentPtr) Constructs a set of environment variable properties a the Windows environment variable string block.
-
Constructor Details
-
EnvironmentUtils
public EnvironmentUtils()
-
-
Method Details
-
readEnvironment
Extracts environment data from the environ pointer- Parameters:
proc
- Process whose environment is being extractedenvironPointer
- char ** environ value- Returns:
- Environment properties
- Throws:
MemoryFault
-
readEnvironmentStrings
public static Properties readEnvironmentStrings(IProcess proc, long environmentPtr) throws MemoryFault Constructs a set of environment variable properties a the Windows environment variable string block. Documentation in MSDN: The GetEnvironmentStrings function returns a pointer to a block of memory that contains the environment variables of the calling process (both the system and the user environment variables). Each environment block contains the environment variables in the following format: Var1=Value1\0 Var2=Value2\0 Var3=Value3\0 .... VarN=ValueN\0\0- Parameters:
proc
- - process whose environment variables are being extractedenvironPtr
- - address of Windows environment strings memory block- Returns:
- Properties object containing list of process environment variable names and values
- Throws:
MemoryFault
-