diff options
author | Bruno Larsen <blarsen@redhat.com> | 2022-07-20 16:44:37 -0300 |
---|---|---|
committer | Bruno Larsen <blarsen@redhat.com> | 2022-09-13 14:02:51 +0200 |
commit | 8fa9bc6a030c9a41eb8cf6f0f66043e02005b291 (patch) | |
tree | 179bbd653148acc4de5bb541907ce097d4729653 /gdb/testsuite/gdb.base/solib1.c | |
parent | 9db78678c7c08760fe1eff7d94a5989cf2fc4145 (diff) | |
download | binutils-8fa9bc6a030c9a41eb8cf6f0f66043e02005b291.zip binutils-8fa9bc6a030c9a41eb8cf6f0f66043e02005b291.tar.gz binutils-8fa9bc6a030c9a41eb8cf6f0f66043e02005b291.tar.bz2 |
gdb/testsuite: Update gdb.base/so-impl-ld.exp
gdb.base/so-impl-ld.exp was setup assuming that the compiler would add
epilogue information and that GDB would stop in the } line. This would
make clang tests fail like so:
step^M
solib_main (arg=10000) at ../../../common/git-repos/binutils-gdb/gdb/testsuite/gdb.base/solib1.c:7^M
7|__ return arg*arg;|__|___/* HERE */^M
(gdb) PASS: gdb.base/so-impl-ld.exp: step into solib call
next^M
main () at ../../../common/git-repos/binutils-gdb/gdb/testsuite/gdb.base/so-impl-ld.c:22^M
22|_ return 0;^M
(gdb) FAIL: gdb.base/so-impl-ld.exp: step in solib call
next^M
0x00007ffff7cef560 in __libc_start_call_main () from /lib64/libc.so.6^M
(gdb) FAIL: gdb.base/so-impl-ld.exp: step out of solib call
This patch changes it so solib_main has 2 lines where GDB can stop
regardless of compiler choices, and updates the exp file to
generically deal with unknown number of steps until leaving that
function.
Diffstat (limited to 'gdb/testsuite/gdb.base/solib1.c')
-rw-r--r-- | gdb/testsuite/gdb.base/solib1.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/solib1.c b/gdb/testsuite/gdb.base/solib1.c index 16b7233..bf52bee 100644 --- a/gdb/testsuite/gdb.base/solib1.c +++ b/gdb/testsuite/gdb.base/solib1.c @@ -4,5 +4,6 @@ extern "C" int solib_main (int arg) { - return arg*arg; /* HERE */ -} /* STEP */ + int ans = arg*arg; /* HERE */ + return ans; /* STEP */ +} |