This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regression for gdb.base/stap-probe.exp (and some others) [Re: [patch] Have gdb_breakpoint call pass]


On Mon, Oct 15, 2012 at 2:35 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi Doug,
>
> On Mon, 15 Oct 2012 19:41:28 +0200, dje@google.com wrote:
>> This patch fixes stap-probe.exp on the Fedora box I tested on.
>
> Yes, it does.
>
>> I didn't test jmisc.exp but it is likely the same issue.
>
> No, it is not.
>
> I guess you agree, I will check it in.  With '{ allow-pending }' the function
> gets passed "{ allow-pending }" while with '{allow-pending}' it gets passed
> "allow-pending".  tcl-8.5.12-3.fc18.x86_64

I gather the issue is that the code is now treating { allow-pending }
like " allow-pending ", and the test for "allow-pending" (no spaces)
is now failing.  Given that gdb_breakpoint is a varargs function, and
parameters like allow-pending are part of the varargs parameters, it
seems wrong to pass allow-pending as a list itself (which the braces
imply), so perhaps we should remove the braces altogether.
i.e., s/{ allow-pending }/allow-pending/

>
> Thanks,
> Jan
>
>
> gdb/testsuite/
> 2012-10-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
>
>         Fix recent gdb_breakpoint regression.
>         * gdb.java/jmisc.exp: gdb_breakpoint for $function - remove spaces from
>         curly bracketed parameter.
>         * gdb.java/jprint.exp: Likewise.
>
> diff --git a/gdb/testsuite/gdb.java/jmisc.exp b/gdb/testsuite/gdb.java/jmisc.exp
> index 7215861..64ae559 100644
> --- a/gdb/testsuite/gdb.java/jmisc.exp
> +++ b/gdb/testsuite/gdb.java/jmisc.exp
> @@ -43,8 +43,8 @@ if [set_lang_java] then {
>      # signature.
>      runto_main
>      set function "${testfile}.main(java.lang.String\[\])"
> -    gdb_breakpoint "$function" { allow-pending }
> -    gdb_breakpoint "${function}void" { allow-pending }
> +    gdb_breakpoint "$function" {allow-pending}
> +    gdb_breakpoint "${function}void" {allow-pending}
>      gdb_continue_to_breakpoint $function
>
>      gdb_test_multiple "ptype jmisc" "ptype jmisc" {
> diff --git a/gdb/testsuite/gdb.java/jprint.exp b/gdb/testsuite/gdb.java/jprint.exp
> index b2d5d31..ac5c55c 100644
> --- a/gdb/testsuite/gdb.java/jprint.exp
> +++ b/gdb/testsuite/gdb.java/jprint.exp
> @@ -43,8 +43,8 @@ if [set_lang_java] then {
>      # signature.
>      runto_main
>      set function "${testfile}.main(java.lang.String\[\])"
> -    gdb_breakpoint "$function" { allow-pending }
> -    gdb_breakpoint "${function}void" { allow-pending }
> +    gdb_breakpoint "$function" {allow-pending}
> +    gdb_breakpoint "${function}void" {allow-pending}
>      gdb_continue_to_breakpoint $function
>
>      gdb_test "p jvclass.addprint(4,5,6)" " = 15" "unambiguous static call"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]