This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] Stray "," in mi-support.exp
On Sunday 13 March 2005 04:52, Daniel Jacobowitz wrote:
> Hmm, it looks right to me, but I'd like for one of the MI maintainers
> to comment. With gdbserver, we use -target-select, which produces:
>
> 47-target-select remote localhost:2346
> Remote debugging from host 127.0.0.1
> 47^connected,thread-id="0",frame={addr="0xb7feac20",func="??",args=[]}
> (gdb)
>
> This is preferable to using the CLI passthrough; want to give that a
> shot, and then we can just delete the questionable pattern?
That does seem a better solution, and works as expected.
Updated patch attached.
Ok?
Paul
2005-03-14 Paul Brook <paul@codesourcery.com>
* lib/mi-support.exp: Use mi_gdb_target_cmd to connect to remote
targets.
Index: gdb/testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.24
diff -u -p -r1.24 mi-support.exp
--- gdb/testsuite/lib/mi-support.exp 18 Jan 2004 15:23:30 -0000 1.24
+++ gdb/testsuite/lib/mi-support.exp 14 Mar 2005 14:50:31 -0000
@@ -494,14 +494,9 @@ proc mi_gdb_load { arg } {
}
} elseif { [target_info gdb_protocol] == "remote" } {
# remote targets
- send_gdb "target [target_info gdb_protocol] [target_info netport]\n"
- gdb_expect 60 {
- -re "\\^done,.*$mi_gdb_prompt$" {
- }
- timeout {
- perror "Unable to connect to remote target"
- return -1
- }
+ if { [mi_gdb_target_cmd "remote" [target_info netport]] != 0 } {
+ perror "Unable to connect to remote target"
+ return -1
}
send_gdb "48-target-download\n"
gdb_expect 10 {