Add indication of mpers support to strace -V output

* strace.c (print_version): Append information about m32 and mx32
decoding support.
* tests/strace-V.test: Update expected output.
This commit is contained in:
Eugene Syromyatnikov 2018-01-09 20:09:05 +01:00 committed by Dmitry V. Levin
parent 5c3d4b631d
commit 7dbc3780a6
2 changed files with 27 additions and 1 deletions

View File

@ -207,6 +207,20 @@ print_version(void)
#ifdef USE_DEMANGLE
" stack-demangle"
#endif /* USE_DEMANGLE */
#if SUPPORTED_PERSONALITIES > 1
# if defined HAVE_M32_MPERS
" m32-mpers"
# else
" no-m32-mpers"
# endif
#endif /* SUPPORTED_PERSONALITIES > 1 */
#if SUPPORTED_PERSONALITIES > 2
# if defined HAVE_MX32_MPERS
" mx32-mpers"
# else
" no-mx32-mpers"
# endif
#endif /* SUPPORTED_PERSONALITIES > 2 */
"";
printf("%s -- version %s\n"

View File

@ -41,7 +41,19 @@ config_year=$(getstr COPYRIGHT_YEAR)
option_unwind=$(getoption USE_LIBUNWIND " stack-unwind")
option_demangle=$(getoption USE_DEMANGLE " stack-demangle")
features="${option_unwind}${option_demangle}"
option_m32=
option_mx32=
case "$STRACE_NATIVE_ARCH" in
x86_64)
option_m32=$(getoption HAVE_M32_MPERS ' m32-mpers' ' no-m32-mpers')
option_mx32=$(getoption HAVE_MX32_MPERS ' mx32-mpers' ' no-mx32-mpers')
;;
aarch64|powerpc64|riscv|sparc64|tile|x32)
option_m32=$(getoption HAVE_M32_MPERS ' m32-mpers' ' no-m32-mpers')
;;
esac
features="${option_unwind}${option_demangle}${option_m32}${option_mx32}"
[ -n "$features" ] || features=" (none)"
cat > "$EXP" << __EOF__