From 171324cb0325c6c54a1d98d3564a4da5ca2dc1a5 Mon Sep 17 00:00:00 2001 From: Weimin Pan Date: Tue, 27 Sep 2022 15:24:47 -0700 Subject: unwinder: Add SFrame unwinder tests [Changes in V4] - Addressed Mike's review comments. - Be careful with the use of # and dnl in configure.ac - Add AC_CANONICAL_TARGET as we check for target. - Remove the LC_ALL=C bits. - Minor code fixups in the testcases - Removed unnecessary unistd.h. - use ATTRIBUTE_NOCLONE consistently. - Other minor cleanups. [End of changes in V4] [Changes in V3] - Added two new tests with attributes -f(no-)omit-frame-pointer. - Minor adjustments due to buildsystem changes in libsframe. [End of changes in V3] [Changes in V2] - minor changes in filenames in the testsuite. [End of changes in V2] Add tests for backtracing using SFrame section. ChangeLog: * libsframe/Makefile.in: Regenerated. * libsframe/configure: Regenerated. * libsframe/configure.ac: Check for cross compilation. * libsframe/testsuite/Makefile.in: Regenerated. * libsframe/testsuite/config/default.exp: Load sframe-lib.exp. * libsframe/testsuite/libsframe.decode/Makefile.in: Regenerated. * libsframe/testsuite/libsframe.encode/Makefile.in: Regenerated. * libsframe/testsuite/lib/sframe-lib.exp: New file. Add procedures for handling unwinder tests. * libsframe/testsuite/libsframe.unwind/backtrace.c: New test. * libsframe/testsuite/libsframe.unwind/backtrace.lk: New test. * libsframe/testsuite/libsframe.unwind/inline-cmds.c: New test. * libsframe/testsuite/libsframe.unwind/inline-cmds.lk: New test. * libsframe/testsuite/libsframe.unwind/inline.c: New test. * libsframe/testsuite/libsframe.unwind/inline.lk: New test. * libsframe/testsuite/libsframe.unwind/solib-lib1.c: New test. * libsframe/testsuite/libsframe.unwind/solib-lib2.c: New test. * libsframe/testsuite/libsframe.unwind/solib-main.c: New test. * libsframe/testsuite/libsframe.unwind/solib-main.d: New test. * libsframe/testsuite/libsframe.unwind/solib.exp: New file. * libsframe/testsuite/libsframe.unwind/solib-lib1.h: New test. * libsframe/testsuite/libsframe.unwind/solib-lib2.h: New test. * libsframe/testsuite/libsframe.unwind/tailcall.c: New test. * libsframe/testsuite/libsframe.unwind/tailcall.lk: New test. * libsframe/testsuite/libsframe.unwind/ttest.c: New test. * libsframe/testsuite/libsframe.unwind/ttest.lk: New test. * libsframe/testsuite/libsframe.unwind/unwind.exp: New file. * libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.c: Likewise. * libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.lk: Likewise. * libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.c: Likewise. * libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.lk: Likewise. --- libsframe/testsuite/libsframe.unwind/solib-lib1.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 libsframe/testsuite/libsframe.unwind/solib-lib1.c (limited to 'libsframe/testsuite/libsframe.unwind/solib-lib1.c') diff --git a/libsframe/testsuite/libsframe.unwind/solib-lib1.c b/libsframe/testsuite/libsframe.unwind/solib-lib1.c new file mode 100644 index 0000000..16c77ca --- /dev/null +++ b/libsframe/testsuite/libsframe.unwind/solib-lib1.c @@ -0,0 +1,8 @@ +#include "solib-lib1.h" + +unsigned int +adder(unsigned int a, unsigned int b, int (*call)(int)) +{ + (void)(*call)(a+b); + return (a+b); +} -- cgit v1.1