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

Function debug_mi_stack_list_locals

src/engine/debugger.cpp:2340–2442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2338}
2339
2340static void debug_mi_stack_list_locals( int argc, const char * * argv )
2341{
2342#define DEBUG_PRINT_VARIABLES_NO_VALUES 1
2343#define DEBUG_PRINT_VARIABLES_ALL_VALUES 2
2344#define DEBUG_PRINT_VARIABLES_SIMPLE_VALUES 3
2345 if ( debug_state == DEBUG_NO_CHILD )
2346 {
2347 debug_mi_format_token();
2348 printf( "^error,msg=\"No child\"\n(gdb) \n" );
2349 return;
2350 }
2351 --argc;
2352 ++argv;
2353 for ( ; argc; --argc, ++argv )
2354 {
2355 if ( strcmp( *argv, "--thread" ) == 0 )
2356 {
2357 /* Only one thread. */
2358 --argc;
2359 ++argv;
2360 if ( argc == 0 )
2361 {
2362 debug_mi_format_token();
2363 printf( "^error,msg=\"Argument required for --thread.\"" );
2364 return;
2365 }
2366 }
2367 else if ( strcmp( *argv, "--no-values" ) == 0 )
2368 {
2369 // print_values = DEBUG_PRINT_VARIABLES_NO_VALUES;
2370 }
2371 else if ( strcmp( *argv, "--all-values" ) == 0 )
2372 {
2373 // print_values = DEBUG_PRINT_VARIABLES_ALL_VALUES;
2374 }
2375 else if ( strcmp( *argv, "--simple-values" ) == 0 )
2376 {
2377 // print_values = DEBUG_PRINT_VARIABLES_SIMPLE_VALUES;
2378 }
2379 else if ( strcmp( *argv, "--" ) == 0 )
2380 {
2381 --argc;
2382 ++argv;
2383 break;
2384 }
2385 else if ( argv[ 0 ][ 0 ] == '-' )
2386 {
2387 debug_mi_format_token();
2388 printf( "^error,msg=\"Unknown argument %s\"\n(gdb) \n", *argv );
2389 return;
2390 }
2391 else
2392 {
2393 break;
2394 }
2395 }
2396 if ( argc != 0 )
2397 {

Callers

nothing calls this directly

Calls 11

debug_mi_format_tokenFunction · 0.85
debug_list_readFunction · 0.85
debug_parent_waitFunction · 0.85
list_beginFunction · 0.85
list_endFunction · 0.85
object_strFunction · 0.85
string_newFunction · 0.85
string_appendFunction · 0.85
debug_parent_forwardFunction · 0.85
string_freeFunction · 0.85
list_freeFunction · 0.85

Tested by

no test coverage detected