This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] GDB tests for Go language support: remove unnecessary first breakpoint
- From: Doug Evans <dje at google dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Mon, 13 Apr 2015 13:19:31 -0700
- Subject: Re: [PATCH] GDB tests for Go language support: remove unnecessary first breakpoint
- Authentication-results: sourceware.org; auth=none
- References: <87twwyshi2 dot fsf at br87z6lw dot de dot ibm dot com>
Andreas Arnez writes:
> On s390x targets some of the Go test cases fail because the first
> breakpoint happens to be at the same spot as the breakpoint at
> main.main. When such a test case tries to continue to the first
> breakpoint, the program runs until the end instead, and the test fails
> like this:
>
> FAIL: gdb.go/handcall.exp: Going to first breakpoint (the program exited)
>
> This patch removes all the handling related to the first breakpoint in
> those cases. After applying the patch, the tests run successfully on
> s390x.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.go/handcall.exp: Remove all logic related to the first
> breakpoint and rely on go_runto_main instead.
> * gdb.go/hello.exp: Likewise.
> * gdb.go/strings.exp: Likewise.
> * gdb.go/unsafe.exp: Likewise.
> * gdb.go/handcall.go: Remove comment "set breakpoint 1 here".
> * gdb.go/hello.go: Likewise.
> * gdb.go/strings.go: Likewise.
> * gdb.go/unsafe.go: Likewise.
Hi.
Ok with one nit fixed.
> diff --git a/gdb/testsuite/gdb.go/hello.exp b/gdb/testsuite/gdb.go/hello.exp
> index 577d9a0..898a04a 100644
> --- a/gdb/testsuite/gdb.go/hello.exp
> +++ b/gdb/testsuite/gdb.go/hello.exp
> @@ -27,7 +27,6 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
> return -1
> }
>
> -set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
> set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
Can you rename breakpoint 2 to 1?
I see there's two appearances of "set breakpoint 2 here" in hello.go.
Just delete the second copy.
Thanks.