* RFA: adapt gdb/testsuite/config/sim.exp to new gdb_file_cmd
@ 2004-09-08 23:24 Jim Blandy
2004-09-09 17:33 ` Michael Chastain
0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2004-09-08 23:24 UTC (permalink / raw)
To: gdb-patches
Here's a caller of gdb_file_cmd that wasn't updated when the type of
its return value was changed.
Tested on i686-pc-linux-gnu x powerpc-eabispe sim.
2004-09-08 Jim Blandy <jimb@redhat.com>
* config/sim.exp (gdb_load): Adapt to expect and return new return
values from gdb_file_command.
Index: gdb/testsuite/config/sim.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/config/sim.exp,v
retrieving revision 1.2
diff -c -p -r1.2 sim.exp
*** gdb/testsuite/config/sim.exp 8 Feb 2004 03:56:14 -0000 1.2
--- gdb/testsuite/config/sim.exp 8 Sep 2004 23:22:12 -0000
*************** proc gdb_target_sim { } {
*** 46,52 ****
#
# gdb_load -- load a file into the debugger.
- # return a -1 if anything goes wrong.
#
proc gdb_load { arg } {
global verbose
--- 46,51 ----
*************** proc gdb_load { arg } {
*** 56,62 ****
global gdb_prompt
if { $arg != "" } {
! if [gdb_file_cmd $arg] then { return -1 }
}
gdb_target_sim
--- 55,64 ----
global gdb_prompt
if { $arg != "" } {
! set status [gdb_file_cmd $arg]
! if { [lindex $status 0] != "" } then {
! return $status
! }
}
gdb_target_sim
*************** proc gdb_load { arg } {
*** 71,77 ****
}
set timeout 30
verbose "Timeout is now $timeout seconds" 2
! return 1
}
-re "$gdb_prompt $" {
if $verbose>1 then {
--- 73,79 ----
}
set timeout 30
verbose "Timeout is now $timeout seconds" 2
! return { "" }
}
-re "$gdb_prompt $" {
if $verbose>1 then {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: adapt gdb/testsuite/config/sim.exp to new gdb_file_cmd
2004-09-08 23:24 RFA: adapt gdb/testsuite/config/sim.exp to new gdb_file_cmd Jim Blandy
@ 2004-09-09 17:33 ` Michael Chastain
0 siblings, 0 replies; 2+ messages in thread
From: Michael Chastain @ 2004-09-09 17:33 UTC (permalink / raw)
To: manjo, cagney, jimb; +Cc: gdb-patches
Jim Blandy <jimb@redhat.com> wrote:
> Here's a caller of gdb_file_cmd that wasn't updated when the type of
> its return value was changed.
Yes. I didn't even look in config/*.exp when I changed the return type
of gdb_file_cmd and gdb_load. I thought there was one implementation of
gdb_load, but actually, there are nine implementations!
I've thought about this and I've decided to revert the return type
change. After that, I'll change gdb_file_cmd to set a global variable,
which gdb.gdb/*.exp will test.
So I'm declining this patch. I'll have the breakage fixed shortly,
and then add the new global.
Michael
> 2004-09-08 Jim Blandy <jimb@redhat.com>
>
> * config/sim.exp (gdb_load): Adapt to expect and return new return
> values from gdb_file_command.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-09 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-08 23:24 RFA: adapt gdb/testsuite/config/sim.exp to new gdb_file_cmd Jim Blandy
2004-09-09 17:33 ` Michael Chastain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox