From: Joel Brobecker Date: Mon, 8 Jan 2018 09:26:52 +0000 (-0500) Subject: Relax expected output in gdb.ada/access_tagged_param.exp test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30066b0b00a2c09baed08e49437c2ae3c44bc4e0;p=binutils-gdb.git Relax expected output in gdb.ada/access_tagged_param.exp test One of the tests in gdb.ada/access_tagged_param.exp verifies the value of the parameters being printed by GDB when stopping at a breakpoint inside procedure Pck.Inspect. In particular, one of these parameters is actually generated internally by the compiler, and does only indirectly depend on the user-level code. A recent change in AdaCore's compiler caused the code expansion to change a little bit, and as a result, the value of that parameter has changed from 2 to 3. This can be evindenced by looking at the code post expansion, using the -gnatDG command-line switch to generate the .dg files: $ gnatmake -g -gnatDG foo.adb $ vi foo.adb.dg We can see that the call to pck.inspect used to be: pck__inspect (P8b, objL => 2); With a recent version of GNAT Pro, it is now: pck__inspect (P9b, objL => 3); This change causes a spurious FAIL when running this testcase. The objL parameter being, at heart, a simple counter of the nesting level, this commit relaxes the expected output to accept any single- digit number. We could accept any decimal, but given the example program, I dout that number will reach double-digit level. If it does, we'll double-check that this is normal, and relax the expected output further. gdb/testsuite/ChangeLog: * gdb.ada/access_tagged_param.exp: Relax expected output for value of "ObjL" in "continue" to pck.inspect breakpoint test. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index baa01048196..7f4d80db9c5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-01-08 Joel Brobecker + + * gdb.ada/access_tagged_param.exp: Relax expected output + for value of "ObjL" in "continue" to pck.inspect breakpoint + test. + 2018-01-08 Joel Brobecker * gdb.ada/arr_enum_idx_w_gap.exp diff --git a/gdb/testsuite/gdb.ada/access_tagged_param.exp b/gdb/testsuite/gdb.ada/access_tagged_param.exp index 598cf89b4ec..47b180d56fa 100644 --- a/gdb/testsuite/gdb.ada/access_tagged_param.exp +++ b/gdb/testsuite/gdb.ada/access_tagged_param.exp @@ -37,4 +37,4 @@ gdb_breakpoint "pck.inspect" # the value of all the parameters. gdb_test "continue" \ - ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, =2\\) at .*" + ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, =\[1-9\]\\) at .*"