| 607 | } |
| 608 | |
| 609 | static int get_breakpoint_by_name( const char * name ) |
| 610 | { |
| 611 | int result; |
| 612 | const char * file_ptr = name; |
| 613 | const char * ptr = strrchr( file_ptr, ':' ); |
| 614 | if ( ptr ) |
| 615 | { |
| 616 | char * end; |
| 617 | long line = strtoul( ptr + 1, &end, 10 ); |
| 618 | if ( line > 0 && line <= INT_MAX && end != ptr + 1 && *end == 0 ) |
| 619 | { |
| 620 | OBJECT * file = object_new_range( file_ptr, int32_t(ptr - file_ptr) ); |
| 621 | result = handle_line_breakpoint( file, line ); |
| 622 | object_free( file ); |
| 623 | } |
| 624 | else |
| 625 | { |
| 626 | OBJECT * name = object_new( file_ptr ); |
| 627 | result = handle_function_breakpoint( name ); |
| 628 | object_free( name ); |
| 629 | } |
| 630 | } |
| 631 | else |
| 632 | { |
| 633 | OBJECT * name = object_new( file_ptr ); |
| 634 | result = handle_function_breakpoint( name ); |
| 635 | object_free( name ); |
| 636 | } |
| 637 | return result; |
| 638 | } |
| 639 | |
| 640 | static void debug_child_disable( int argc, const char * * argv ) |
| 641 | { |
no test coverage detected