vm: only show factorbug basic commands at first
"help" brings up the entire command list.db4
parent
80fb7788d9
commit
b341b0ce13
14
vm/debug.cpp
14
vm/debug.cpp
|
@ -343,7 +343,7 @@ void factor_vm::dump_code_heap()
|
|||
std::cout << printer.parameter_size << " bytes used by parameter tables" << std::endl;
|
||||
}
|
||||
|
||||
void factor_vm::factorbug_usage()
|
||||
void factor_vm::factorbug_usage(bool advanced_p)
|
||||
{
|
||||
std::cout << "Basic commands:" << std::endl;
|
||||
#ifdef WINDOWS
|
||||
|
@ -354,6 +354,8 @@ void factor_vm::factorbug_usage()
|
|||
std::cout << " c -- continue executing Factor - NOT SAFE" << std::endl;
|
||||
std::cout << " t -- throw exception in Factor - NOT SAFE" << std::endl;
|
||||
std::cout << " .s .r .c -- print data, retain, call stacks" << std::endl;
|
||||
if (advanced_p)
|
||||
{
|
||||
std::cout << " help -- reprint this message" << std::endl;
|
||||
std::cout << "Advanced commands:" << std::endl;
|
||||
std::cout << " e -- dump environment" << std::endl;
|
||||
|
@ -370,6 +372,12 @@ void factor_vm::factorbug_usage()
|
|||
std::cout << " push <addr> -- push object on data stack - NOT SAFE" << std::endl;
|
||||
std::cout << " gc -- trigger full GC - NOT SAFE" << std::endl;
|
||||
std::cout << " code -- code heap dump" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << " help -- full help, including advanced commands" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << std::endl;
|
||||
|
||||
}
|
||||
|
@ -385,7 +393,7 @@ void factor_vm::factorbug()
|
|||
fep_p = true;
|
||||
|
||||
std::cout << "Starting low level debugger..." << std::endl;
|
||||
factorbug_usage();
|
||||
factorbug_usage(false);
|
||||
bool seen_command = false;
|
||||
|
||||
for(;;)
|
||||
|
@ -492,7 +500,7 @@ void factor_vm::factorbug()
|
|||
else if(strcmp(cmd,"gc") == 0)
|
||||
primitive_full_gc();
|
||||
else if(strcmp(cmd,"help") == 0)
|
||||
factorbug_usage();
|
||||
factorbug_usage(true);
|
||||
else
|
||||
std::cout << "unknown command" << std::endl;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue