MCPcopy Create free account
hub / github.com/boostorg/build / run_command

Function run_command

src/engine/debugger.cpp:2618–2640  ·  view source on GitHub ↗

Runs the matching command in the current command_array. */

Source from the content-addressed store, hash-verified

2616
2617/* Runs the matching command in the current command_array. */
2618static int run_command( int argc, const char * * argv )
2619{
2620 struct command_elem * command;
2621 const char * command_name;
2622 if ( argc == 0 )
2623 {
2624 return 1;
2625 }
2626 command_name = argv[ 0 ];
2627 /* Skip the GDB/MI token when choosing the command to run. */
2628 while( isdigit( *command_name ) ) ++command_name;
2629 current_token = atoi( argv[ 0 ] );
2630 for( command = command_array; command->key; ++command )
2631 {
2632 if ( strcmp( command->key, command_name ) == 0 )
2633 {
2634 ( *command->command )( argc, argv );
2635 return 1;
2636 }
2637 }
2638 debug_error( "Unknown command: %s", command_name );
2639 return 0;
2640}
2641
2642/* Parses a single command into whitespace separated tokens, and runs it. */
2643static int process_command( char * line )

Callers 1

process_commandFunction · 0.85

Calls 1

debug_errorFunction · 0.85

Tested by

no test coverage detected