aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/btest.c
AgeCommit message (Collapse)AuthorFilesLines
2019-02-26[libbacktrace] Fix btest-lto for older gccTom de Vries1-1/+2
With gcc 4.8.5, btest_lto ends up with a privatized name for the variable with name 'global': ... $ nm btest_lto | grep ' d ' | grep global 0000000000617150 d global.2530 ... which makes test5 fail: ... test5: unexpected syminfo name got global.2530 expected global ... Fix this failure by accepting this type of name as a valid name in btest_lto. 2019-02-26 Tom de Vries <tdevries@suse.de> * btest.c (test5): Allow global.* as minimal symbol name for global. From-SVN: r269217
2019-02-10[libbacktrace] Add btest_ltoTom de Vries1-6/+6
Add libbacktrace test-case using -flto. 2019-02-10 Tom de Vries <tdevries@suse.de> * Makefile.am (BUILDTESTS): Add btest_lto. * Makefile.in: Regenerate. * btest.c (test1, f2, f3, test3, f22, f23): Declare with __attribute__((noclone)). From-SVN: r268736
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-01-31elf.c (elf_add): Close descriptor if we use a debugfile.Ian Lance Taylor1-0/+22
* elf.c (elf_add): Close descriptor if we use a debugfile. * btest.c (check_open_files): New static function. (main): Call check_open_files. From-SVN: r257275
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-06-12elf.c (backtrace_initialize): Always set *fileline_fn.Ian Lance Taylor1-254/+13
* elf.c (backtrace_initialize): Always set *fileline_fn. * ttest.c: New file. * btest.c: Move support functions into testlib.c. Change calls to check to pass file name. * testlib.c: New file, copied from (part of) btest.c. * testlib.h: New file, declarations for testlib.c. * edtest.c: Use testlib.h and testlib.c. * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional. * Makefile.am (btest_SOURCES): Add testlib.c. (edtest_SOURCES): Likewise. (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD. (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define. * configure, Makefile.in: Rebuild. From-SVN: r249111
2017-03-08btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile ↵Sam Thursfield1-3/+1
warning when... * btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile warning when BACKTRACE_SUPPORTED isn't defined. From-SVN: r245977
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-09-11* all: Remove meaningless trailing whitespace.Carlos Liam1-4/+4
From-SVN: r240084
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-05-29libbacktrace: add support of PE/COFFTristan Gingold1-0/+6
libbacktrace/ 2015-05-29 Tristan Gingold <gingold@adacore.com> * pecoff.c: New file. * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies. * Makefile.in: Regenerate. * filetype.awk: Detect pecoff. * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms. Add pecoff. * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is true. * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define. * configure: Regenerate. * pecoff.c: New file. From-SVN: r223859
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-01-02Update copyright years in libbacktrace/Richard Sandiford1-1/+1
From-SVN: r206292
2013-11-28dwarf.c (find_address_ranges): New static function, broken out of ↵Ian Lance Taylor1-0/+15
build_address_map. * dwarf.c (find_address_ranges): New static function, broken out of build_address_map. (build_address_map): Call it. * btest.c (check): Check for missing filename or function, rather than crashing. (f3): Check that enough frames were returned. From-SVN: r205490
2013-11-19backtrace.h (backtrace_syminfo_callback): Add symsize argument.Jakub Jelinek1-3/+27
* backtrace.h (backtrace_syminfo_callback): Add symsize argument. * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as last argument. * btest.c (struct symdata): Add size field. (callback_three): Add symsize argument. Copy it to the data->size field. (f23): Set symdata.size to 0. (test5): Likewise. If sizeof (int) > 1, lookup address of ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size values. From-SVN: r205028
2013-11-16backtrace.h (backtrace_syminfo): Update comment and parameter name to take ↵Ian Lance Taylor1-0/+48
any address, not just a PC value. * backtrace.h (backtrace_syminfo): Update comment and parameter name to take any address, not just a PC value. * elf.c (STT_OBJECT): Define. (elf_nosyms): Rename parameter pc to addr. (elf_symbol_search): Rename local variable pc to addr. (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols. (elf_syminfo): Rename parameter pc to addr. * btest.c (global): New global variable. (test5): New test. (main): Call test5. From-SVN: r204904
2013-01-14Update copyright years in libbacktrace.Richard Sandiford1-1/+1
From-SVN: r195165
2012-10-04* btest.c (f23): Avoid uninitialized variable warning.Gerald Pfeifer1-1/+1
From-SVN: r192102
2012-09-19configure.ac (GCC_HEADER_STDINT): Invoke.Rainer Orth1-1/+0
* configure.ac (GCC_HEADER_STDINT): Invoke. * backtrace.h: If we can't find <stdint.h>, use "gstdint.h". * btest.c: Don't include <stdint.h>. * dwarf.c: Likewise. * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild. Co-Authored-By: Ian Lance Taylor <iant@google.com> From-SVN: r191474
2012-09-18* btest.c (test1, test2, test3, test4): Add the unused attribute.Ian Lance Taylor1-4/+4
From-SVN: r191440
2012-09-17libbacktrace/:Ian Lance Taylor1-0/+629
* Initial implementation. ./: * MAINTAINERS (Various Maintainers): Add libbacktrace. * configure.ac (host_libs): Add libbacktrace. (target_libraries): Add libbacktrace. * Makefile.def (host_modules): Add libbacktrace. (target_modules): Likewise. * configure, Makefile.in: Rebuild. gcc/go: * config-lang.in (target_libs): Add target-libbacktrace. From-SVN: r191397