l Show variable
A) Simple Variable: input variable name directly, then variable value can be displayed.
ds>var
retValue:15
B) Complex variable: use dumpvar(var, showLevel) to show structure information
var: Variable name;
showLevel: displayed structure level, which is used for nested structure. 0 means to show variable itself, 1 means to show variable and its member … as so on. -1 means totally expansion of the structure.
If the member is an object, shown value is the address of the member.
ds>dumpvar(obj,0)
type:I name:obj value:4535760
retValue:0
ds>dumpvar(obj)
type:I name:obj value:4535760
type:int name:i value:0
type:G name:base class value:4535760
type:int name:g1 value:0
type:C name:virtual base class value:4535800
type:int name:c1 value:0
retValue:0
l Modify variable: use assigned sentence to modify variable value.
ds>var = var2
retValue:15
l Call function: function name(para1, para2...)
When inputting, although the function has no parameters, it should also add (). Otherwise, it will not run but show the address of the function.
Use comma to separate parameters. Function return value or expression is allowed as input parameter.
C++ has overload mechanism, so make sure the match of input parameter type. Otherwise, the function will be looked as non-existing. But basic prototype conversion is permitted.
Do not support default parameter. Users need to manually input default parameter.
ds>testFun(reObj(obj))
13
retValue:13
l Class Member (including function and data)
Static Member:classname::varname
ds>testClass::staticFun() //调用类的静态成员函数
ok,staticFun call success
retValue:0
Non-static Member:obj.varname OR objPtr->varname
ds>obj.noStaticFun() //调用类的非静态成员
ok,noStaticFun call success:15
retValue:0
l Namespace
Do not support “using namespace” syntax. Specify namespace if using any member of it,
ds>mynamespace::obj.testvar
retValue:0
l Type convert
Support type conversion of C style and automatically adjust address for base class and inherit class. Do not support static_cast、dynamic_cast、reinterpret_cast and const_cast.
Explicitly specify pointer type in conversion of base class and inherit class. Do not support default conversion.
Type conversion follows the way as (int)var. Do not support int(var).
Input type name directly .Do not use prefix such as class, struct and enum.
const, static, mutable and volatile are invalid
l String
Double quotation is used to embrace string. Follow the same string syntax as C language. Support \n, \r, \t, \v, \f, \b, \", \\.
ds>showInfo( " \tinfo1 \n " )
info1
retValue:0