mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-03-26 03:59:06 +08:00
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:
17
btest.c
17
btest.c
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user