[OB PATCH][gdb/testsuite] Handle removed valgrind option --db-attach

Tom de Vries tdevries@suse.de
Wed Oct 24 19:34:00 GMT 2018


On 10/24/18 6:29 PM, Pedro Alves wrote:
> On 10/24/2018 12:13 PM, Tom de Vries wrote:
>> Hi,
>>
>> When running valgrind-db-attach.exp with valgrind version 3.13.0, we get:
>> ...
>> PASS: gdb.base/valgrind-db-attach.exp: spawn valgrind
>> valgrind: Unknown option: --db-attach=yes
>> valgrind: Use --help for more information or consult the user manual.
>> ERROR: Process no longer exists
>> UNRESOLVED: gdb.base/valgrind-db-attach.exp: valgrind started
>> ...
>>
>> The valgrind option --db-attach has been deprecated in version 3.10.0, and
>> removed in version 3.11.0.
>>
> 
> But was it replaced with / renamed to something else equivalent,
> or the functionality completely eliminated?
> 

>From http://valgrind.org/docs/manual/dist.news.html:
...
* ================== DEPRECATED FEATURES =================

* --db-attach is now deprecated and will be removed in the next
  valgrind feature release.  The built-in GDB server capabilities are
  superior and should be used instead. Learn more here:

http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver
...

I'd say the functionality was replaced with vgdb, which is exercised in
other test-cases (valgrind-infcall.exp, valgrind-disp-step.exp).

> If the latter, I don't see much value in keeping the
> test case around going forward.  Especially if we have no
> comment in the source indicating when it stopped being useful...

I could add this (similar to the "valgrind is not >= 3.7.0" comment in
valgrind-infcall.exp):
...
diff --git a/gdb/testsuite/gdb.base/valgrind-db-attach.exp
b/gdb/testsuite/gdb.base/valgrind-db-attach.exp
index 3e40283a95..dd13b4d170 100644
--- a/gdb/testsuite/gdb.base/valgrind-db-attach.exp
+++ b/gdb/testsuite/gdb.base/valgrind-db-attach.exp
@@ -52,6 +52,7 @@ set test "valgrind started"
 # The trailing '.' differs for different memcheck versions.
 gdb_test_multiple "" $test {
     -re "valgrind: Unknown option: --db-attach=yes" {
+       # valgrind is not <= 3.10.0.
        unsupported $test
        return -1
     }
...
?

> It ends up just being dead weight and future gdb developers
> won't even realize.
> 

True. I can also remove the testcase.

Thanks,
- Tom



More information about the Gdb-patches mailing list