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