forked from OSchip/llvm-project
				
			Add "var" and "vo" aliases for "frame variable" and "frame variable -O".
Differential Revision: https://reviews.llvm.org/D53010 llvm-svn: 344102
This commit is contained in:
		
							parent
							
								
									abbc51e5c3
								
							
						
					
					
						commit
						285ae0c07b
					
				| 
						 | 
					@ -427,7 +427,17 @@ public:
 | 
				
			||||||
            "arguments and local variables in scope. Names of argument, "
 | 
					            "arguments and local variables in scope. Names of argument, "
 | 
				
			||||||
            "local, file static and file global variables can be specified. "
 | 
					            "local, file static and file global variables can be specified. "
 | 
				
			||||||
            "Children of aggregate variables can be specified such as "
 | 
					            "Children of aggregate variables can be specified such as "
 | 
				
			||||||
            "'var->child.x'.",
 | 
					            "'var->child.x'.  The -> and [] operators in 'frame variable' do "
 | 
				
			||||||
 | 
					            "not invoke operator overloads if they exist, but directly access "
 | 
				
			||||||
 | 
					            "the specified element.  If you want to trigger operator overloads "
 | 
				
			||||||
 | 
					            "use the expression command to print the variable instead."
 | 
				
			||||||
 | 
					            "\nIt is worth noting that except for overloaded "
 | 
				
			||||||
 | 
					            "operators, when printing local variables 'expr local_var' and "
 | 
				
			||||||
 | 
					            "'frame var local_var' produce the same "
 | 
				
			||||||
 | 
					            "results.  However, 'frame variable' is more efficient, since it "
 | 
				
			||||||
 | 
					            "uses debug information and memory reads directly, rather than "
 | 
				
			||||||
 | 
					            "parsing and evaluating an expression, which may even involve "
 | 
				
			||||||
 | 
					            "JITing and running code in the target program.",
 | 
				
			||||||
            nullptr, eCommandRequiresFrame | eCommandTryTargetAPILock |
 | 
					            nullptr, eCommandRequiresFrame | eCommandTryTargetAPILock |
 | 
				
			||||||
                         eCommandProcessMustBeLaunched |
 | 
					                         eCommandProcessMustBeLaunched |
 | 
				
			||||||
                         eCommandProcessMustBePaused | eCommandRequiresProcess),
 | 
					                         eCommandProcessMustBePaused | eCommandRequiresProcess),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -423,6 +423,13 @@ void CommandInterpreter::Initialize() {
 | 
				
			||||||
  if (cmd_obj_sp) {
 | 
					  if (cmd_obj_sp) {
 | 
				
			||||||
    AddAlias("rbreak", cmd_obj_sp, "--func-regex %1");
 | 
					    AddAlias("rbreak", cmd_obj_sp, "--func-regex %1");
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  cmd_obj_sp = GetCommandSPExact("frame variable", false);
 | 
				
			||||||
 | 
					  if (cmd_obj_sp) {
 | 
				
			||||||
 | 
					    AddAlias("var", cmd_obj_sp);
 | 
				
			||||||
 | 
					    AddAlias("vo", cmd_obj_sp, "--object-description");
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CommandInterpreter::Clear() {
 | 
					void CommandInterpreter::Clear() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue