ruby-changes:52989
From: naruse <ko1@a...>
Date: Sat, 20 Oct 2018 15:45:57 +0900 (JST)
Subject: [ruby-changes:52989] naruse:r65203 (trunk): fix r65202 on ELF environment
naruse 2018-10-20 15:45:51 +0900 (Sat, 20 Oct 2018) New Revision: 65203 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65203 Log: fix r65202 on ELF environment Modified files: trunk/addr2line.c Index: addr2line.c =================================================================== --- addr2line.c (revision 65202) +++ addr2line.c (revision 65203) @@ -315,8 +315,8 @@ parse_debug_line_cu(int num_traces, void https://github.com/ruby/ruby/blob/trunk/addr2line.c#L315 dwarf_version = *(unsigned short *)p; p += 2; - header_length = *(unsigned int *)p; - p += sizeof(unsigned int); + header_length = dwarf_word == 4 ? *(unsigned int *)p : *(unsigned long *)p; + p += dwarf_word; cu_start = p + header_length; @@ -1795,7 +1795,7 @@ fill_lines(int num_traces, void **traces https://github.com/ruby/ruby/blob/trunk/addr2line.c#L1795 } } - if (!obj->debug_line.shdr) { + if (!obj->debug_line.ptr) { /* This file doesn't have .debug_line section, let's check .gnu_debuglink section instead. */ if (gnu_debuglink_shdr && check_debuglink) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/