[Bug other/67165] please enable libbacktrace to work with compressed debug sections

2017-10-02 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67165

--- Comment #6 from Thomas Schwinge  ---
Author: tschwinge
Date: Mon Oct  2 11:56:39 2017
New Revision: 253345

URL: https://gcc.gnu.org/viewcvs?rev=253345=gcc=rev
Log:
libbacktrace: Support the case that clock_gettime is in librt

libbacktrace/
PR other/67165
* Makefile.am: Append the content of clock_gettime_link to
ztest_LDADD.
* configure.ac: Test for the case that clock_gettime is in librt.
* Makefile.in: Regenerate.
* configure: Likewise.

Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/Makefile.am
trunk/libbacktrace/Makefile.in
trunk/libbacktrace/configure
trunk/libbacktrace/configure.ac

[Bug other/67165] please enable libbacktrace to work with compressed debug sections

2017-10-02 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67165

--- Comment #5 from Thomas Schwinge  ---
Author: tschwinge
Date: Mon Oct  2 11:56:25 2017
New Revision: 253344

URL: https://gcc.gnu.org/viewcvs?rev=253344=gcc=rev
Log:
libbacktrace: Conditionalize test timing on clock_gettime availability

libbacktrace/
PR other/67165
* configure.ac: Check for clock_gettime.
* config.h.in: Regenerate.
* configure: Likewise.
* ztest.c (average_time, test_large): Conditionalize test timing
on clock_gettime availability.

Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/config.h.in
trunk/libbacktrace/configure
trunk/libbacktrace/configure.ac
trunk/libbacktrace/ztest.c

[Bug other/67165] please enable libbacktrace to work with compressed debug sections

2017-09-28 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67165

Ian Lance Taylor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Ian Lance Taylor  ---
Implemented.

[Bug other/67165] please enable libbacktrace to work with compressed debug sections

2017-09-28 Thread ian at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67165

--- Comment #3 from ian at gcc dot gnu.org  ---
Author: ian
Date: Fri Sep 29 00:30:35 2017
New Revision: 253275

URL: https://gcc.gnu.org/viewcvs?rev=253275=gcc=rev
Log:
PR other/67165
* elf.c (__builtin_prefetch): Define if not __GNUC__.
(unlikely): Define.
(SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
(b_elf_chdr): Define type.
(enum debug_section): Add ZDEBUG_xxx values.
(debug_section_names): Add names for new sections.
(struct debug_section_info): Add compressed field.
(elf_zlib_failed, elf_zlib_fetch): New static functions.
(HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
(HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
(HUFFMAN_SECONDARY_SHIFT): Define.
(ZDEBUG_TABLE_SIZE): Define.
(ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
(final_next_secondary): New static variable if
BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
(elf_zlib_inflate_table): New static function.
(BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
function to produce fixed Huffman table.
(elf_zlib_default_table): New static variable.
(elf_zlib_inflate): New static function.
(elf_zlib_verify_checksum): Likewise.
(elf_zlib_inflate_and_verify): Likewise.
(elf_uncompress_zdebug): Likewise.
(elf_uncompress_chdr): Likewise.
(backtrace_uncompress_zdebug): New extern function.
(elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
sections, and uncompress them.
* internal.h (backtrace_compress_zdebug): Declare.
* ztest.c: New file.
* configure.ac: Check for -lz and check whether the linker
supports --compress-debug-sections.
* Makefile.am (ztest_SOURCES): New variable.
(ztest_CFLAGS, ztest_LDADD): New variables.
(check_PROGRAMS): Add ztest.
(ctestg_SOURCES): New variable.
(ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
(ctesta_SOURCES): New variable.
(ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
(check_PROGRAMS): Add ctestg and ctesta.
* configure, config.h.in, Makefile.in: Rebuild.

Added:
trunk/libbacktrace/ztest.c
Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/Makefile.am
trunk/libbacktrace/Makefile.in
trunk/libbacktrace/config.h.in
trunk/libbacktrace/configure
trunk/libbacktrace/configure.ac
trunk/libbacktrace/elf.c
trunk/libbacktrace/internal.h

[Bug other/67165] please enable libbacktrace to work with compressed debug sections

2017-07-06 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67165

Yuri Gribov  changed:

   What|Removed |Added

 CC||tetra2005 at gmail dot com

--- Comment #2 from Yuri Gribov  ---
Patch under review here:
https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01868.html

[Bug other/67165] please enable libbacktrace to work with compressed debug sections

2016-09-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67165

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org
   Severity|normal  |enhancement

[Bug other/67165] please enable libbacktrace to work with compressed debug sections

2015-08-09 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67165

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-08-09
 CC||hjl.tools at gmail dot com
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
Both ld and gold on binutils master branch support

--compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]

to compress debug sections.  --compress-debug-sections=zlib-gnu is
for legacy .zdebug* compressed debug section support.  Support for
the gABI SHF_COMPRESSED debug sections should be sufficient.  bfd,
readelf and gold can decompress the SHF_COMPRESSED debug sections.