[ping1] Add missing expect for running a program with CLI jump

Message ID 002a01d13bd9$29442990$7bcc7cb0$@foss.arm.com
State New, archived
Headers

Commit Message

Thomas Preud'homme Dec. 21, 2015, 10:20 a.m. UTC
  Hi Joel,

I hope this time it's fine. I'm also adding it in attachment just in case.

Best regards,

Thomas

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Joel Brobecker
> Sent: Saturday, December 19, 2015 2:23 AM
> To: Thomas Preud'homme
> Cc: gdb-patches@sourceware.org
> Subject: Re: [PATCH, ping1] Add missing expect for running a program
> with CLI jump
> 
> > > 2015-10-15  Thomas Preud'homme
> <thomas.preudhomme@arm.com>
> > >
> > >         * lib/mi-support.exp (mi_run_cmd_full): Add an expect for the
> CLI
> > > jump
> > >         case.
> 
> I think the patch is good, but your mailer did some line folding.
> Can you resend?
> 
> Thanks!
> 
> > >
> > >
> > > diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-
> > > support.exp
> > > index 0d17ecb..cc055f6 100644
> > > --- a/gdb/testsuite/lib/mi-support.exp
> > > +++ b/gdb/testsuite/lib/mi-support.exp
> > > @@ -886,6 +886,9 @@ proc mi_run_cmd_full {use_mi_command
> args} {
> > >  	# to better handle RUN.
> > >  	send_gdb  "jump *$start\n"
> > >  	warning "Using CLI jump command, expect run-to-main FAIL"
> > > +	gdb_expect {
> > > +	    -re "${run_match}&\"jump
> > > \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-
> > > f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-
> > > id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
> > > +	}
> > >  	return 0
> > >      }
> > >
> > >
> > > With this patch applied, testsuite results become much more stable.
> > >
> > > Is this ok for the master branch?
> > >
> > > Best regards,
> > >
> > > Thomas
> > >
> >
> 
> --
> Joel
  

Comments

Joel Brobecker Dec. 21, 2015, 11:06 a.m. UTC | #1
> I hope this time it's fine. I'm also adding it in attachment just in case.
> 
> Best regards,
> 
> Thomas
> 
> diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
> index 0d17ecb..cc055f6 100644
> --- a/gdb/testsuite/lib/mi-support.exp
> +++ b/gdb/testsuite/lib/mi-support.exp
> @@ -886,6 +886,9 @@ proc mi_run_cmd_full {use_mi_command args} {
>  	# to better handle RUN.
>  	send_gdb  "jump *$start\n"
>  	warning "Using CLI jump command, expect run-to-main FAIL"
> +	gdb_expect {
> +	    -re "${run_match}&\"jump \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
> +	}
>  	return 0
>      }

Thanks. LGTM, so go ahead and push.

> > > > 2015-10-15  Thomas Preud'homme
> > <thomas.preudhomme@arm.com>
> > > >
> > > >         * lib/mi-support.exp (mi_run_cmd_full): Add an expect for the
> > CLI
> > > > jump
> > > >         case.
> > 
> > I think the patch is good, but your mailer did some line folding.
> > Can you resend?
  
Thomas Preud'homme Dec. 22, 2015, 2:55 a.m. UTC | #2
Done, thanks.

Best regards,

Thomas

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Joel Brobecker
> Sent: Monday, December 21, 2015 7:06 PM
> To: Thomas Preud'homme
> Cc: gdb-patches@sourceware.org
> Subject: Re: [PATCH, ping1] Add missing expect for running a program
> with CLI jump
> 
> > I hope this time it's fine. I'm also adding it in attachment just in case.
> >
> > Best regards,
> >
> > Thomas
> >
> > diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-
> support.exp
> > index 0d17ecb..cc055f6 100644
> > --- a/gdb/testsuite/lib/mi-support.exp
> > +++ b/gdb/testsuite/lib/mi-support.exp
> > @@ -886,6 +886,9 @@ proc mi_run_cmd_full {use_mi_command args}
> {
> >  	# to better handle RUN.
> >  	send_gdb  "jump *$start\n"
> >  	warning "Using CLI jump command, expect run-to-main FAIL"
> > +	gdb_expect {
> > +	    -re "${run_match}&\"jump
> \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-
> f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-
> id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
> > +	}
> >  	return 0
> >      }
> 
> Thanks. LGTM, so go ahead and push.
> 
> > > > > 2015-10-15  Thomas Preud'homme
> > > <thomas.preudhomme@arm.com>
> > > > >
> > > > >         * lib/mi-support.exp (mi_run_cmd_full): Add an expect for
> the
> > > CLI
> > > > > jump
> > > > >         case.
> > >
> > > I think the patch is good, but your mailer did some line folding.
> > > Can you resend?
> --
> Joel
  

Patch

diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 0d17ecb..cc055f6 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -886,6 +886,9 @@  proc mi_run_cmd_full {use_mi_command args} {
 	# to better handle RUN.
 	send_gdb  "jump *$start\n"
 	warning "Using CLI jump command, expect run-to-main FAIL"
+	gdb_expect {
+	    -re "${run_match}&\"jump \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
+	}
 	return 0
     }