Fix gdb.base/share-env-with-gdbserver.exp with Clang
authorPedro Alves <pedro@palves.net>
Sun, 13 Sep 2020 20:28:09 +0000 (21:28 +0100)
committerPedro Alves <pedro@palves.net>
Sun, 13 Sep 2020 20:28:09 +0000 (21:28 +0100)
commitaf26601c2f657535af68cc3cec2af969838877da
tree75525b0ea7980285f489337668f0780a3b4e44e0
parent2f4b83cd51953fdf9626dc7a198b35505d1f5472
Fix gdb.base/share-env-with-gdbserver.exp with Clang

The testcase has GDB call my_getenv in the inferior, and that fails
with Clang, because Clang optimizes out my_getenv completely, since it
isn't called anywhere (in the program).

This commit fixes it.

gdb/testsuite/ChangeLog:

* gdb.base/share-env-with-gdbserver.c (main): Call my_getenv
instead of getenv.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/share-env-with-gdbserver.c