This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Adjust SID-specific version of gdb_load to honor empty argument
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 18 Jul 2007 17:45:00 -0700
- Subject: Re: [RFC] Adjust SID-specific version of gdb_load to honor empty argument
- References: <20070713163226.29458e74@ironwood.lan>
Below is the patch that I ended up committing. This version differs
from the patch that I originally submitted in that this version removes
the call to gdb_unload. This change was suggested by Daniel in the
`Add another "Are you sure..."...' thread. I've tested it and it works
fine.
* config/sid.exp (gdb_load): Add test for empty argument. Adjust
return value to be compatible with gdb_run_cmd in lib/gdb.exp.
Remove call to gdb_unload.
Index: testsuite/config/sid.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/config/sid.exp,v
retrieving revision 1.9
diff -u -p -r1.9 sid.exp
--- testsuite/config/sid.exp 9 Jan 2007 17:59:08 -0000 1.9
+++ testsuite/config/sid.exp 19 Jul 2007 00:40:33 -0000
@@ -175,8 +175,10 @@ proc gdb_load { arg } {
global gdb_prompt
global retval
- gdb_unload
- if [gdb_file_cmd $arg] then { return -1 }
+ if { $arg != "" } {
+ if [gdb_file_cmd $arg] then { return -1 }
+ }
+
gdb_target_sid
send_gdb "load\n"
@@ -195,7 +197,7 @@ proc gdb_load { arg } {
if $verbose>1 then {
send_user "Loaded $arg into $GDB\n"
}
- set retval 1;
+ set retval 0;
}
-re "$gdb_prompt $" {
if $verbose>1 then {