libbacktrace: update to current version from GCC trunk

This adds DWARF 5 support as well as an enhanced testsuite.

Patch assembled by Than McIntosh.
This commit is contained in:
Ian Lance Taylor
2019-12-23 18:55:51 -08:00
parent 5a99ff7fed
commit 559ab7cab4
62 changed files with 17898 additions and 3864 deletions

17
btest.c
View File

@@ -1,5 +1,5 @@
/* btest.c -- Test for libbacktrace library
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copyright (C) 2012-2019 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
@@ -48,9 +48,9 @@ POSSIBILITY OF SUCH DAMAGE. */
/* Test the backtrace function with non-inlined functions. */
static int test1 (void) __attribute__ ((noinline, unused));
static int f2 (int) __attribute__ ((noinline));
static int f3 (int, int) __attribute__ ((noinline));
static int test1 (void) __attribute__ ((noinline, noclone, unused));
static int f2 (int) __attribute__ ((noinline, noclone));
static int f3 (int, int) __attribute__ ((noinline, noclone));
static int
test1 (void)
@@ -162,9 +162,9 @@ f13 (int f1line, int f2line)
/* Test the backtrace_simple function with non-inlined functions. */
static int test3 (void) __attribute__ ((noinline, unused));
static int f22 (int) __attribute__ ((noinline));
static int f23 (int, int) __attribute__ ((noinline));
static int test3 (void) __attribute__ ((noinline, noclone, unused));
static int f22 (int) __attribute__ ((noinline, noclone));
static int f23 (int, int) __attribute__ ((noinline, noclone));
static int
test3 (void)
@@ -423,7 +423,8 @@ test5 (void)
fprintf (stderr, "test5: NULL syminfo name\n");
symdata.failed = 1;
}
else if (strcmp (symdata.name, "global") != 0)
else if (!(strncmp (symdata.name, "global", 6) == 0
&& (symdata.name[6] == '\0'|| symdata.name[6] == '.')))
{
fprintf (stderr,
"test5: unexpected syminfo name got %s expected %s\n",