Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Stray "," in mi-support.exp
@ 2005-03-12  1:27 Paul Brook
  2005-03-13  4:52 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Brook @ 2005-03-12  1:27 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

The attached patch removes what appears to be a stray "," in 
testsuite/lib/mi-support.exp

I'd commit as obvious, but I never can be sure with dejagnu.The relevant 
excerpt from testsuite/gdb.log is:

(gdb) ^M
target remote tcp:localhost:2345^M
&"target remote tcp:localhost:2345\n"^M
~"Remote debugging using tcp:localhost:2345\n"^M
~"0x00000000 in ?? ()\n"^M
^done^M
(gdb) ^M

Ok?

Paul

[-- Attachment #2: patch.gdb_mi_exp --]
[-- Type: text/x-diff, Size: 662 bytes --]

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	12 Mar 2005 01:16:39 -0000
@@ -496,7 +496,7 @@ proc mi_gdb_load { arg } {
 	# remote targets
 	send_gdb "target [target_info gdb_protocol] [target_info netport]\n"
 	gdb_expect 60 {
-	    -re "\\^done,.*$mi_gdb_prompt$" {
+	    -re "\\^done.*$mi_gdb_prompt$" {
 	    }
 	    timeout {
 		perror "Unable to connect to remote target"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] Stray "," in mi-support.exp
  2005-03-12  1:27 [patch] Stray "," in mi-support.exp Paul Brook
@ 2005-03-13  4:52 ` Daniel Jacobowitz
  2005-03-14 15:06   ` Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2005-03-13  4:52 UTC (permalink / raw)
  To: Paul Brook; +Cc: gdb-patches

On Sat, Mar 12, 2005 at 01:27:23AM +0000, Paul Brook wrote:
> The attached patch removes what appears to be a stray "," in 
> testsuite/lib/mi-support.exp
> 
> I'd commit as obvious, but I never can be sure with dejagnu.The relevant 
> excerpt from testsuite/gdb.log is:
> 
> (gdb) ^M
> target remote tcp:localhost:2345^M
> &"target remote tcp:localhost:2345\n"^M
> ~"Remote debugging using tcp:localhost:2345\n"^M
> ~"0x00000000 in ?? ()\n"^M
> ^done^M
> (gdb) ^M
> 
> Ok?

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?

-- 
Daniel Jacobowitz
CodeSourcery, LLC


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] Stray "," in mi-support.exp
  2005-03-13  4:52 ` Daniel Jacobowitz
@ 2005-03-14 15:06   ` Paul Brook
  2005-03-14 15:10     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Brook @ 2005-03-14 15:06 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

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.
 

[-- Attachment #2: patch.gdb_mi_exp --]
[-- Type: text/x-diff, Size: 897 bytes --]

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 {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] Stray "," in mi-support.exp
  2005-03-14 15:06   ` Paul Brook
@ 2005-03-14 15:10     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2005-03-14 15:10 UTC (permalink / raw)
  To: Paul Brook; +Cc: gdb-patches

On Mon, Mar 14, 2005 at 03:05:53PM +0000, Paul Brook wrote:
> 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.

Hmm... I think this is sufficiently simple that I can approve it.  Yes,
this is OK - thanks!

-- 
Daniel Jacobowitz
CodeSourcery, LLC


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-14 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-12  1:27 [patch] Stray "," in mi-support.exp Paul Brook
2005-03-13  4:52 ` Daniel Jacobowitz
2005-03-14 15:06   ` Paul Brook
2005-03-14 15:10     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox