卜部昌平
8184adabe5
internal/stdbool.h rework
...
Noticed that internal/stdbool.h and addr2line.c are the only two place
where missing/stdbool.h is included. Why not delete the file so that
we can merge internal/stdbool.h and missing/stdbool.h into one.
2019-12-26 20:45:12 +09:00
David Carlier
e6b72e8cae
retrieve current path on macOS
2019-08-20 02:05:10 +09:00
Yusuke Endoh
a197579073
addr2line.c: clarify the type of integer expression
...
to suppress Coverity Scan warning.
This expression converted uint8_t to int, and then int to unsigned long.
Now it directly converts uint8_t to unsigned long.
2019-07-15 08:38:37 +09:00
Yusuke Endoh
41e09ca4be
addr2line.c (binary_filename): extend the buffer for NUL terminator
2019-07-14 20:23:29 +09:00
Yusuke Endoh
db1c30b37f
addr2line.c (main_exe_path): avoid SEGV when /proc is not available
...
readlink would return -1 if /proc is not mounted.
Coverity Scan found this issue.
2019-07-14 17:54:48 +09:00
Kazuhiro NISHIYAMA
c1ebb384fd
Fix a typo
2019-07-07 20:16:31 +09:00
Nobuyoshi Nakada
1ca03dc4f7
Suppress warnings by gcc 9.1
2019-06-08 19:46:32 +09:00
naruse
1f64192494
Use _NSGetMachExecuteHeader() instead of _mh_execute_header
...
_mh_execute_header is not accessible from a dylib unless libruby.dylib is
built with -undefined dynamic_lookup. And using -undefined
dynamic_lookup is not good style.
Reported by Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31 12:58:33 +00:00
k0kubun
dd67af4892
addr2line.c: fix -Wextra-semi
...
and ignore only -Wgnu-empty-initializer.
https://travis-ci.org/ruby/ruby/jobs/477867392
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 15:42:44 +00:00
k0kubun
d74fc1b175
addr2line.c: do not suppress -Wpedantic
...
because it was for "-assi -Wpedantic" on Travis, but we changed the
Travis build to "-std=c99 -Wpedantic".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 15:02:35 +00:00
k0kubun
299e9cd91a
revert r66768 for Ruby 2.7 due to Misc#15347
...
It's safer to backport r66768 to 2.6 branch, but for 2.7 it's not
needed anymore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 15:00:40 +00:00
nobu
671ef4e9e3
Get rid of C99 feature for now [ruby-core:90949] [Bug #15519 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 00:36:28 +00:00
naruse
b755c26146
Show function name based on dladdr
...
If there's no dwarf and symbol table, this will be a last resort.
(mainly on macOS)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 22:40:21 +00:00
naruse
529adb6872
Support Universal Binary for macOS
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 22:40:20 +00:00
shyouhei
9d9e1a4d65
addr2line.c: more on suppressing warnings
...
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
2018-11-13 02:19:49 +00:00
nobu
9d2f88fc13
addr2line.c: fix compilation for i386-darwin
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-09 11:19:23 +00:00
naruse
fc1f476b61
addr2line.c uses c99ism
...
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
2018-11-04 22:36:05 +00:00
naruse
e6d63ac606
Use symtab if there's no .dSYM file
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-04 15:14:42 +00:00
naruse
5bc93ec743
Use C90 comments
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-31 11:08:07 +00:00
mame
ab20aee573
addr2line.c: add explicit casts for clang on 32bit environment
...
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
2018-10-23 12:38:48 +00:00
naruse
879b42b043
check VLIW case
...
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
2018-10-21 20:01:22 +00:00
naruse
448a014d42
initialize is_stmt with default_is_stmt
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-21 16:42:23 +00:00
naruse
6018bc5e73
Use inline function with stable code instead of macro
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-21 16:37:24 +00:00
naruse
e01c9c743f
fix sign of integer variable
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-21 10:46:56 +00:00
naruse
ec91ea5c16
check version of .debug_info
...
and refactor related code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-21 00:08:02 +00:00
naruse
69e328b532
Skip dwarf if its version is not supported
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-21 00:07:53 +00:00
naruse
5b1bbc9af0
fix header_length's type to unsigned long
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20 06:56:51 +00:00
naruse
d79f72521e
fix r65202 on ELF environment
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20 06:45:51 +00:00
naruse
595056135f
Support Mach-O on backtrace with DWARF
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20 06:35:25 +00:00
naruse
fe735bd30f
Support DWARF4's .debug_line
...
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
2018-10-20 06:18:41 +00:00
shyouhei
ad564b87ad
addr2line.c: minimal workaround to prevent parse error
...
"//*" is super dangerous for non-C++ compiler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19 02:01:46 +00:00
shyouhei
c102e5e0ea
addr2line.c: this file has no portability
...
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
2018-10-19 00:35:42 +00:00
naruse
2a59b579fe
Check the end of Compilation Unit by unit length instead of level of tree
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-17 01:29:49 +00:00
naruse
0f92eba17f
Support base address selection entry
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-16 23:57:47 +00:00
naruse
e9a284ab94
Correct the handling of .debug_ranges
...
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
2018-10-16 23:52:28 +00:00
naruse
447d7a394f
The value of .debug_ranges are uintptr_t
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-16 23:52:28 +00:00
naruse
f60c2d396d
If high_pc uses DW_FORM_addr, it's not size but address
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-16 23:52:26 +00:00
naruse
417fc484c3
check dwarf version and skip non Dwarf v4
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-16 07:12:26 +00:00
nobu
f572aeb71f
Moved hexdump macro before used
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-14 23:45:33 +00:00
nobu
bb9eea9065
Make local functions static
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-14 23:40:27 +00:00
naruse
8bf4d89917
Read debug_info to show inline functions in backtrace
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-14 16:59:15 +00:00
svn
19f9d30249
* expand tabs.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13 05:36:51 +00:00
normal
d3e1afacaa
addr2line.c: fix *printf type warnings on 32-bit
...
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
2018-10-13 05:36:50 +00:00
svn
eca36f9cd8
* expand tabs.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11 23:58:21 +00:00
naruse
0b81f7bfe7
Revert wrongly commit debug_info feature
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11 23:58:20 +00:00
naruse
d3853d7c10
Support FreeBSD
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11 23:55:47 +00:00
naruse
628e85c7b3
Support compressed debug_info
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11 23:55:47 +00:00
naruse
136d24ea1b
free line info leaves
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11 23:55:46 +00:00
naruse
336f86f2ee
close dlopen-ed handle
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11 23:55:45 +00:00
naruse
69f06e9e84
fix
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11 23:55:45 +00:00