summaryrefslogtreecommitdiff
path: root/addr2line.c
Commit message (Collapse)AuthorAgeFilesLines
...
* addr2line.c: more on suppressing warningsshyouhei2018-11-131-0/+1
| | | | | | | See also: https://travis-ci.org/ruby/ruby/jobs/454269559#L1898 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: fix compilation for i386-darwinnobu2018-11-091-12/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c uses c99ismnaruse2018-11-041-0/+6
| | | | | | https://travis-ci.org/ruby/ruby/jobs/450505006 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use symtab if there's no .dSYM filenaruse2018-11-041-21/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use C90 commentsnaruse2018-10-311-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: add explicit casts for clang on 32bit environmentmame2018-10-231-3/+3
| | | | | | Assigning uint64_t to size_t or uintptr_t caused a build error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check VLIW casenaruse2018-10-211-7/+6
| | | | | | | If maximum_operations_per_instruction != 1, it is VLIW. But there seems no need to support such architecture now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* initialize is_stmt with default_is_stmtnaruse2018-10-211-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use inline function with stable code instead of macronaruse2018-10-211-1/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix sign of integer variablenaruse2018-10-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check version of .debug_infonaruse2018-10-211-37/+30
| | | | | | and refactor related code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip dwarf if its version is not supportednaruse2018-10-211-116/+104
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix header_length's type to unsigned longnaruse2018-10-201-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix r65202 on ELF environmentnaruse2018-10-201-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support Mach-O on backtrace with DWARFnaruse2018-10-201-56/+212
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support DWARF4's .debug_linenaruse2018-10-201-8/+20
| | | | | | | ICC uses DWARF4 for .debug_line which adds maximum_operations_per_instruction in its header. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: minimal workaround to prevent parse errorshyouhei2018-10-191-2/+2
| | | | | | | "//*" is super dangerous for non-C++ compiler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: this file has no portabilityshyouhei2018-10-191-0/+6
| | | | | | | | It seems nobody on earth is interested in such thing for it. Ignore compiler warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Check the end of Compilation Unit by unit length instead of level of treenaruse2018-10-171-4/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support base address selection entrynaruse2018-10-161-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Correct the handling of .debug_rangesnaruse2018-10-161-31/+60
| | | | | | | Though DWARF specifies "the applicable base address defaults to the base address of the compilation unit", but GCC seems to use zero as default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* The value of .debug_ranges are uintptr_tnaruse2018-10-161-4/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* If high_pc uses DW_FORM_addr, it's not size but addressnaruse2018-10-161-26/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check dwarf version and skip non Dwarf v4naruse2018-10-161-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Moved hexdump macro before usednobu2018-10-141-24/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make local functions staticnobu2018-10-141-24/+45
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Read debug_info to show inline functions in backtracenaruse2018-10-141-128/+1175
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-10-131-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: fix *printf type warnings on 32-bitnormal2018-10-131-7/+9
| | | | | | Yup, back to using an ancient 32-bit system... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-10-111-88/+88
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert wrongly commit debug_info featurenaruse2018-10-111-1139/+130
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support FreeBSDnaruse2018-10-111-50/+54
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support compressed debug_infonaruse2018-10-111-159/+183
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* free line info leavesnaruse2018-10-111-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* close dlopen-ed handlenaruse2018-10-111-14/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixnaruse2018-10-111-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support additional formsnaruse2018-10-111-20/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Show backtrace with .debug_infonaruse2018-10-111-331/+626
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Read .debug_infonaruse2018-10-111-8/+667
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: fix -Wmaybe-uninitializedk0kubun2018-09-161-2/+2
| | | | | | | | | | | | ../addr2line.c: In function ‘fill_lines’: ../addr2line.c:709:8: warning: ‘file’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (file != NULL) { ^ ../addr2line.c:535:11: warning: ‘filesize’ may be used uninitialized in this function [-Wmaybe-uninitialized] off_t filesize; ^~~~~~~~ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix issues detected by code analysis tool (mainly Coverity).nobu2018-09-151-2/+6
| | | | | | | | | | | * Fix leaked storage in addr2line.c. * Fix for "top_root" leaking the resource. [Fix GH-1956] From: Jun Aruga <jaruga@redhat.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* FreeBSD 11.0 lacks ELFCOMPRESS_ZLIBnaruse2018-08-131-1/+2
| | | | | | | | | | | | FreeBSD 11.0 unfortunately lacks ELF compression definitions in their elf.h (sys/elf_common.h), and 11.1 introduced them. https://github.com/freebsd/freebsd/commit/b9167d33a12b8a6c279be9cd1005874728e808c9 Though we can add workaround, we simply drop support because FreeBSD 11.0 is already EOL at November 30, 2017. https://www.freebsd.org/security/unsupported.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't free allocated uncompressed_debug_line until backtrace is printednaruse2018-08-131-8/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Define parse_compressed_debug_line() only ifdef SUPPORT_COMPRESSED_DEBUG_LINEnaruse2018-08-131-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* support compressed debug_linenaruse2018-08-131-8/+57
| | | | | | | | re-commit r64328 https://blogs.oracle.com/solaris/elf_section_compression-v2 https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "support compressed debug_line"naruse2018-08-131-52/+7
| | | | | | This reverts commit r64328 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* support compressed debug_linenaruse2018-08-131-7/+52
| | | | | | | https://blogs.oracle.com/solaris/elf_section_compression-v2 https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add PRINTF_ARGS to kprintfkazu2018-07-311-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c (kprintf): staticnormal2018-07-091-2/+2
| | | | | | This function is not used outside of addr2line.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: no need to keep fd around after mmapnormal2018-07-081-6/+2
| | | | | | | | | | | POSIX mmap(3) manpage stipulates mmap bumps the reference count of the file description. Thus keeping a file descriptor to maintain the reference is not necessary. If this didn't work, every extension .so would require a permanent FD, which is obviously not the case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e