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

Function debug_parent_backtrace

src/engine/debugger.cpp:1546–1581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1544}
1545
1546static void debug_parent_backtrace( int argc, const char * * argv )
1547{
1548 const char * new_args[ 3 ];
1549 OBJECT * depth_str;
1550 int depth;
1551 int i;
1552 FRAME_INFO frame;
1553
1554 if ( debug_state == DEBUG_NO_CHILD )
1555 {
1556 debug_error( "The program is not being run." );
1557 return;
1558 }
1559
1560 new_args[ 0 ] = "info";
1561 new_args[ 1 ] = "frame";
1562
1563 fprintf( command_output, "info depth\n" );
1564 fflush( command_output );
1565 depth_str = debug_object_read( command_child );
1566 depth = atoi( object_str( depth_str ) );
1567 object_free( depth_str );
1568
1569 for ( i = 0; i < depth; ++i )
1570 {
1571 char buf[ 16 ];
1572 sprintf( buf, "%d", i );
1573 new_args[ 2 ] = buf;
1574 debug_parent_forward_nowait( 3, new_args, 0, 0 );
1575 debug_frame_read( command_child, &frame );
1576 printf( "#%d in ", i );
1577 debug_print_frame_info( &frame );
1578 printf( "\n" );
1579 }
1580 fflush( stdout );
1581}
1582
1583static void debug_parent_quit( int argc, const char * * argv )
1584{

Callers

nothing calls this directly

Calls 7

debug_errorFunction · 0.85
debug_object_readFunction · 0.85
object_strFunction · 0.85
object_freeFunction · 0.85
debug_frame_readFunction · 0.85
debug_print_frame_infoFunction · 0.85

Tested by

no test coverage detected