mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
Tweaked to work with either version of expect.
This commit is contained in:
@ -24,7 +24,7 @@ load_lib gdb.exp
|
|||||||
# variables that need to set up
|
# variables that need to set up
|
||||||
#
|
#
|
||||||
if ![info exists prompt] then {
|
if ![info exists prompt] then {
|
||||||
set prompt "\(gdb\)"
|
set prompt "\[(\]gdb\[)\]"
|
||||||
}
|
}
|
||||||
# some convenience abbreviations
|
# some convenience abbreviations
|
||||||
#
|
#
|
||||||
@ -98,9 +98,7 @@ proc gdb_start {} {
|
|||||||
global prompt
|
global prompt
|
||||||
global spawn_id
|
global spawn_id
|
||||||
global timeout
|
global timeout
|
||||||
if $verbose>1 then {
|
verbose "Spawning $GDB $GDBFLAGS"
|
||||||
send_user "Spawning $GDB $GDBFLAGS\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
set oldtimeout $timeout
|
set oldtimeout $timeout
|
||||||
set timeout [expr "$timeout + 60"]
|
set timeout [expr "$timeout + 60"]
|
||||||
@ -120,10 +118,8 @@ proc gdb_start {} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect {
|
expect {
|
||||||
-re ".*$prompt $" {
|
-re ".*\r\n$prompt $" {
|
||||||
if $verbose>1 then {
|
verbose "GDB initialized for native mode"
|
||||||
send_user "GDB initialized for native mode\n"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
-re "$prompt $" {
|
-re "$prompt $" {
|
||||||
perror "GDB never initialized."
|
perror "GDB never initialized."
|
||||||
@ -139,7 +135,7 @@ proc gdb_start {} {
|
|||||||
send "set height 0\n"
|
send "set height 0\n"
|
||||||
expect {
|
expect {
|
||||||
-re ".*$prompt $" {
|
-re ".*$prompt $" {
|
||||||
verbose "Seting height to 0."
|
verbose "Setting height to 0." 2
|
||||||
}
|
}
|
||||||
timeout {
|
timeout {
|
||||||
warning "Couldn't set the height to 0."
|
warning "Couldn't set the height to 0."
|
||||||
@ -149,9 +145,7 @@ proc gdb_start {} {
|
|||||||
send "set width 0\n"
|
send "set width 0\n"
|
||||||
expect {
|
expect {
|
||||||
-re ".*$prompt $" {
|
-re ".*$prompt $" {
|
||||||
if $verbose>2 then {
|
verbose "Seting width to 0." 2
|
||||||
send_user "Seting width to 0.\n"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
timeout {
|
timeout {
|
||||||
warning "Couldn't set the width to 0."
|
warning "Couldn't set the width to 0."
|
||||||
|
Reference in New Issue
Block a user