- java.lang.Object
-
- com.ibm.j9ddr.corereaders.memory.EnvironmentUtils
-
public class EnvironmentUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description EnvironmentUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
readEnvironment
public static Properties readEnvironment(IProcess proc, long environPointer) throws MemoryFault
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
-
-