summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-20 06:45:51 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-20 06:45:51 +0000
commitd79f72521e512a91955881de33be12464b9e3e4e (patch)
tree2c1fd3cc5c5a6c75252bc8cd20093d75a9de37cd
parent595056135f2b57fc4c018e561d6ad8d59b06b26b (diff)
fix r65202 on ELF environment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--addr2line.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/addr2line.c b/addr2line.c
index 1bc3896e5a..2b32735ce2 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -315,8 +315,8 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
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, int check_debuglink,
}
}
- 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) {