@@ -4,7 +4,6 @@ use std::io::{BufRead, BufReader};
44use std:: path:: { Path , PathBuf } ;
55
66use crate :: common:: Config ;
7- use crate :: header:: line_directive;
87use crate :: runtest:: ProcRes ;
98
109/// Representation of information to invoke a debugger and check its output
@@ -24,7 +23,6 @@ impl DebuggerCommands {
2423 file : & Path ,
2524 config : & Config ,
2625 debugger_prefixes : & [ & str ] ,
27- rev : Option < & str > ,
2826 ) -> Result < Self , String > {
2927 let directives = debugger_prefixes
3028 . iter ( )
@@ -39,18 +37,17 @@ impl DebuggerCommands {
3937 for ( line_no, line) in reader. lines ( ) . enumerate ( ) {
4038 counter += 1 ;
4139 let line = line. map_err ( |e| format ! ( "Error while parsing debugger commands: {}" , e) ) ?;
42- let ( lnrev, line) = line_directive ( "//" , & line) . unwrap_or ( ( None , & line) ) ;
43-
44- // Skip any revision specific directive that doesn't match the current
45- // revision being tested
46- if lnrev. is_some ( ) && lnrev != rev {
47- continue ;
48- }
4940
41+ // Breakpoints appear on lines with actual code, typically at the end of the line.
5042 if line. contains ( "#break" ) {
5143 breakpoint_lines. push ( counter) ;
44+ continue ;
5245 }
5346
47+ let Some ( line) = line. trim_start ( ) . strip_prefix ( "//" ) . map ( str:: trim_start) else {
48+ continue ;
49+ } ;
50+
5451 for & ( ref command_directive, ref check_directive) in & directives {
5552 config
5653 . parse_name_value_directive ( & line, command_directive)
0 commit comments