| 573 | } |
| 574 | |
| 575 | static int debug_add_breakpoint( const char * name ) |
| 576 | { |
| 577 | const char * file_ptr = name; |
| 578 | const char * ptr = strrchr( file_ptr, ':' ); |
| 579 | if ( ptr ) |
| 580 | { |
| 581 | char * end; |
| 582 | long line = strtoul( ptr + 1, &end, 10 ); |
| 583 | if ( line > 0 && line <= INT_MAX && end != ptr + 1 && *end == 0 ) |
| 584 | { |
| 585 | OBJECT * file = object_new_range( file_ptr, int32_t(ptr - file_ptr) ); |
| 586 | return add_line_breakpoint( file, line ); |
| 587 | } |
| 588 | else |
| 589 | { |
| 590 | OBJECT * name = object_new( file_ptr ); |
| 591 | return add_function_breakpoint( name ); |
| 592 | } |
| 593 | } |
| 594 | else |
| 595 | { |
| 596 | OBJECT * name = object_new( file_ptr ); |
| 597 | return add_function_breakpoint( name ); |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | static void debug_child_break( int argc, const char * * argv ) |
| 602 | { |
no test coverage detected