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

Function debug_print_source

src/engine/debugger.cpp:379–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379static void debug_print_source( OBJECT * filename, int line )
380{
381 FILE * file;
382
383 if ( filename == NULL || object_equal( filename, constant_builtin ) )
384 return;
385
386 file = fopen( object_str( filename ), "r" );
387 if ( file )
388 {
389 int ch;
390 int printing = 0;
391 int current_line = 1;
392 if ( line == 1 )
393 {
394 printing = 1;
395 printf( "%d\t", current_line );
396 }
397 while ( ( ch = fgetc( file ) ) != EOF )
398 {
399 if ( printing )
400 fputc( ch, stdout );
401
402 if ( ch == '\n' )
403 {
404 if ( printing )
405 break;
406
407 ++current_line;
408 if ( current_line == line )
409 {
410 printing = 1;
411 printf( "%d\t", current_line );
412 }
413 }
414 }
415 fclose( file );
416 }
417}
418
419static void debug_print_frame_info( FRAME_INFO * frame )
420{

Callers 2

Calls 2

object_equalFunction · 0.85
object_strFunction · 0.85

Tested by

no test coverage detected