Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: gdb/testsuite/config/monitor.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/config/mn10300-eval.exp ('k') | gdb/testsuite/config/proelf.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/config/monitor.exp
diff --git a/gdb/testsuite/config/monitor.exp b/gdb/testsuite/config/monitor.exp
index a40911d09ede01cdfde857e73565ae312a8d2884..c8b1676e216c3af4600c35a6d012b96936343599 100644
--- a/gdb/testsuite/config/monitor.exp
+++ b/gdb/testsuite/config/monitor.exp
@@ -1,5 +1,5 @@
# Test Framework Driver for GDB driving a ROM monitor (via monitor.c).
-# Copyright 1995-2000, 2007-2012 Free Software Foundation, Inc.
+# Copyright 1995-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,27 +28,27 @@ proc gdb_target_cmd { targetname serialport } {
send_gdb "target $targetname $serialport\n"
gdb_expect 60 {
-re "A program is being debugged already.*ill it.*y or n. $" {
- send_gdb "y\n";
- exp_continue;
+ send_gdb "y\n"
+ exp_continue
}
-re "Couldn't establish connection to remote.*$gdb_prompt" {
- verbose "Connection failed";
+ verbose "Connection failed"
}
-re "Remote MIPS debugging.*$gdb_prompt" {
- verbose "Set target to $targetname";
- return 0;
+ verbose "Set target to $targetname"
+ return 0
}
-re "Remote debugging using .*$serialport.*$gdb_prompt" {
- verbose "Set target to $targetname";
- return 0;
+ verbose "Set target to $targetname"
+ return 0
}
-re "Remote target $targetname connected to.*$gdb_prompt" {
- verbose "Set target to $targetname";
- return 0;
+ verbose "Set target to $targetname"
+ return 0
}
-re "Connected to.*$gdb_prompt" {
- verbose "Set target to $targetname";
- return 0;
+ verbose "Set target to $targetname"
+ return 0
}
-re "Ending remote.*$gdb_prompt" { }
-re "Connection refused.*$gdb_prompt" {
@@ -57,10 +57,10 @@ proc gdb_target_cmd { targetname serialport } {
continue
}
-re "Timeout reading from remote system.*$gdb_prompt" {
- verbose "Got timeout error from gdb.";
+ verbose "Got timeout error from gdb."
}
timeout {
- send_gdb "";
+ send_gdb ""
break
}
}
@@ -82,8 +82,8 @@ proc gdb_target_monitor { exec_file } {
if [target_info exists gdb_protocol] {
set targetname "[target_info gdb_protocol]"
} else {
- perror "No protocol specified for [target_info name].";
- return -1;
+ perror "No protocol specified for [target_info name]."
+ return -1
}
if [target_info exists baud] {
gdb_test "set remotebaud [target_info baud]" "" ""
@@ -98,7 +98,7 @@ proc gdb_target_monitor { exec_file } {
gdb_test "set remote Z-packet disable" ""
}
if [target_info exists gdb_serial] {
- set serialport "[target_info gdb_serial]";
+ set serialport "[target_info gdb_serial]"
} elseif [target_info exists netport] {
set serialport "[target_info netport]"
} else {
@@ -106,19 +106,19 @@ proc gdb_target_monitor { exec_file } {
}
for {set j 1} {$j <= 2} {incr j} {
- if [gdb_file_cmd $exec_file] { return -1; }
+ if [gdb_file_cmd $exec_file] { return -1 }
- if ![gdb_target_cmd $targetname $serialport] { return 0; }
+ if ![gdb_target_cmd $targetname $serialport] { return 0 }
- gdb_target_exec;
+ gdb_target_exec
if { $j == 1 && ![reboot_target] } {
- break;
+ break
}
}
- perror "Couldn't set target for $targetname, port is $serialport.";
- return -1;
+ perror "Couldn't set target for $targetname, port is $serialport."
+ return -1
}
proc gdb_target_exec { } {
@@ -136,45 +136,45 @@ proc gdb_load { arg } {
global GDB
global gdb_prompt
global timeout
- global last_gdb_file;
+ global last_gdb_file
if { $arg == "" } {
if [info exists last_gdb_file] {
- set arg $last_gdb_file;
+ set arg $last_gdb_file
} else {
- send_gdb "info files\n";
+ send_gdb "info files\n"
gdb_expect 30 {
-re "Symbols from \"(\[^\"\]+)\"" {
- set arg $expect_out(1,string);
- exp_continue;
+ set arg $expect_out(1,string)
+ exp_continue
}
-re "Local exec file:\[\r\n\]+\[ \t\]*`(\[^'\]+)'," {
- set arg $expect_out(1,string);
- exp_continue;
+ set arg $expect_out(1,string)
+ exp_continue
}
-re "$gdb_prompt $" { }
}
}
}
- set last_gdb_file $arg;
+ set last_gdb_file $arg
- for { set j 1; } { $j <= 2 } {incr j; } {
+ for { set j 1 } { $j <= 2 } {incr j } {
if [target_info exists gdb,use_standard_load] {
- gdb_target_exec;
+ gdb_target_exec
if ![target_info exists gdb,no_push_conn] {
- remote_push_conn host;
+ remote_push_conn host
}
- set state [remote_ld target $arg];
+ set state [remote_ld target $arg]
if ![target_info exists gdb,no_push_conn] {
- remote_close target;
- remote_pop_conn host;
+ remote_close target
+ remote_pop_conn host
}
if { $state == "pass" } {
- if [gdb_target_monitor $arg] { return -1; }
+ if [gdb_target_monitor $arg] { return -1 }
gdb_test "list main" ".*" ""
- verbose "Loaded $arg into $GDB\n";
- return 0;
+ verbose "Loaded $arg into $GDB\n"
+ return 0
}
} else {
@@ -182,32 +182,32 @@ proc gdb_load { arg } {
if [is_remote host] {
# FIXME: Multiple downloads. bleah.
- set farg [remote_download host $arg];
+ set farg [remote_download host $arg]
} else {
- set farg $arg;
+ set farg $arg
}
if { $arg != "" && [target_info exists gdb_sect_offset] } {
- set textoff [target_info gdb_sect_offset];
- send_gdb "sect .text $textoff\n";
+ set textoff [target_info gdb_sect_offset]
+ send_gdb "sect .text $textoff\n"
gdb_expect 30 {
-re "(0x\[0-9a-z]+) - 0x\[0-9a-z\]+ is \\.data" {
- set dataoff $expect_out(1,string);
- exp_continue;
+ set dataoff $expect_out(1,string)
+ exp_continue
}
-re "(0x\[0-9a-z\]+) - 0x\[0-9a-z\]+ is \\.bss" {
- set bssoff $expect_out(1,string);
- exp_continue;
+ set bssoff $expect_out(1,string)
+ exp_continue
}
-re "$gdb_prompt" { }
}
- set dataoff [format 0x%x [expr $dataoff + $textoff]];
- set bssoff [format 0x%x [expr $bssoff + $textoff]];
- send_gdb "sect .data $dataoff\n";
+ set dataoff [format 0x%x [expr $dataoff + $textoff]]
+ set bssoff [format 0x%x [expr $bssoff + $textoff]]
+ send_gdb "sect .data $dataoff\n"
gdb_expect 30 {
-re "$gdb_prompt" { }
}
- send_gdb "sect .bss $bssoff\n";
+ send_gdb "sect .bss $bssoff\n"
gdb_expect 30 {
-re "$gdb_prompt" { }
}
@@ -215,9 +215,9 @@ proc gdb_load { arg } {
verbose "Loading $farg"
if [target_info exists gdb_load_offset] {
- set command "load $farg [target_info gdb_load_offset]\n";
+ set command "load $farg [target_info gdb_load_offset]\n"
} else {
- set command "load $farg\n";
+ set command "load $farg\n"
}
if [target_info exists gdb_load_timeout] {
set loadtimeout [target_info gdb_load_timeout]
@@ -231,10 +231,10 @@ proc gdb_load { arg } {
}
set load_ok 0
- send_gdb $command;
+ send_gdb $command
gdb_expect $loadtimeout {
-re "\[Ff\]ailed.*$gdb_prompt $" {
- verbose "load failed";
+ verbose "load failed"
}
-re "Timeout reading from remote.*$gdb_prompt" {
}
@@ -254,19 +254,19 @@ proc gdb_load { arg } {
}
if { $load_ok == 1 } {
- return 0;
+ return 0
}
}
# Make sure we don't have an open connection to the target.
- gdb_target_exec;
+ gdb_target_exec
if { $j == 1 } {
if { ![reboot_target] } {
- break;
+ break
}
}
}
- perror "Couldn't load file into GDB.";
- return -1;
+ perror "Couldn't load file into GDB."
+ return -1
}
« no previous file with comments | « gdb/testsuite/config/mn10300-eval.exp ('k') | gdb/testsuite/config/proelf.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698