@@ -384,15 +384,21 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
384
384
match & * config. target {
385
385
"arm-linux-androideabi" | "aarch64-linux-android" => {
386
386
387
- cmds = cmds. replace ( "run" , "continue" ) . to_string ( ) ;
387
+ cmds = cmds. replace ( "run" , "continue" ) ;
388
388
389
389
// write debugger script
390
- let script_str = [ "set charset UTF-8" . to_string ( ) ,
391
- format ! ( "file {}" , exe_file. as_str( ) . unwrap( )
392
- . to_string( ) ) ,
393
- "target remote :5039" . to_string ( ) ,
394
- cmds,
395
- "quit" . to_string ( ) ] . connect ( "\n " ) ;
390
+ let mut script_str = String :: with_capacity ( 2048 ) ;
391
+ script_str. push_str ( "set charset UTF-8\n " ) ;
392
+ script_str. push_str ( & format ! ( "file {}\n " , exe_file. as_str( ) . unwrap( ) ) ) ;
393
+ script_str. push_str ( "target remote :5039\n " ) ;
394
+ for line in breakpoint_lines. iter ( ) {
395
+ script_str. push_str ( & format ! ( "break {:?}:{}\n " ,
396
+ testfile. filename_display( ) ,
397
+ * line) [ ] ) ;
398
+ }
399
+ script_str. push_str ( & cmds) ;
400
+ script_str. push_str ( "quit\n " ) ;
401
+
396
402
debug ! ( "script_str = {}" , script_str) ;
397
403
dump_output_file ( config,
398
404
testfile,
@@ -425,8 +431,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
425
431
. expect ( & format ! ( "failed to exec `{:?}`" , config. adb_path) ) ;
426
432
427
433
let adb_arg = format ! ( "export LD_LIBRARY_PATH={}; \
428
- gdbserver :5039 {}/{}",
434
+ gdbserver{} :5039 {}/{}",
429
435
config. adb_test_dir. clone( ) ,
436
+ if config. target. contains( "aarch64" )
437
+ { "64" } else { "" } ,
430
438
config. adb_test_dir. clone( ) ,
431
439
str :: from_utf8(
432
440
exe_file. filename( )
@@ -496,7 +504,9 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
496
504
stderr : err,
497
505
cmdline : cmdline
498
506
} ;
499
- process. signal_kill ( ) . unwrap ( ) ;
507
+ if process. signal_kill ( ) . is_err ( ) {
508
+ println ! ( "Adb process is already finished." ) ;
509
+ }
500
510
}
501
511
502
512
_=> {
0 commit comments