java.lang.Object
com.ibm.j9ddr.tools.ddrinteractive.Command
com.ibm.j9ddr.vm29.tools.ddrinteractive.commands.SetVMCommand
- All Implemented Interfaces:
ICommand
-
Nested Class Summary
Nested classes/interfaces declared in class com.ibm.j9ddr.tools.ddrinteractive.Command
Command.CommandDescription
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(String command, String[] args, Context context, PrintStream out) Runs the !Methods declared in class com.ibm.j9ddr.tools.ddrinteractive.Command
addCommand, addSubCommand, dbgFindPatternInRange, getCommandDescriptions, getCommandNames, printDetailedHelp, recognises
-
Constructor Details
-
SetVMCommand
public SetVMCommand()Constructor. It adds the command info into !j9help menu
-
-
Method Details
-
run
public void run(String command, String[] args, Context context, PrintStream out) throws DDRInteractiveCommandException Runs the !setvm command. 1. Checks whether correct number of args passed which is 1. 2. If condition 1 is successful, checks whether the passed arg is a valid integer, decimal or hexadecimal. 3. If condition 2 is successful, checks whether the address (only arg) is a valid J9JavaVM address. 4. If condition 3 is unsuccessful, checks whether the address is a valid J9VMThread address. If any of the condition 3 or 4 succeeds, then cachedVM is set to new address. Otherwise, it prints error msg.- Parameters:
command
- DDR extension command which is setVM for this extension.args
- arguments passed with the commandcontext
- current context that DDR is running on.out
- PrintStream to print the user messages.- Throws:
DDRInteractiveCommandException
- If there is any problem running the command (incorrect usage, CorruptData etc.)
-