aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-16 23:57:47 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-16 23:57:47 +0000
commita756de61af646a9a94b1ee75a2a546328545c115 (patch)
treef92e5cfc7aa36490e608bbf79a207ddbf1b9d2c7
parent4d76884e98cf5284afd8413b6c24903d0a43f377 (diff)
downloadruby-a756de61af646a9a94b1ee75a2a546328545c115.tar.gz
Support base address selection entry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--addr2line.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/addr2line.c b/addr2line.c
index ae21f7cbdb..f05ff277cf 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -1348,7 +1348,11 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
uintptr_t from = read_uintptr(&p);
uintptr_t to = read_uintptr(&p);
if (!from && !to) break;
- if (base + from <= addr && addr <= base + to) {
+ if (from == UINTPTR_MAX) {
+ /* base address selection entry */
+ base = to;
+ }
+ else if (base + from <= addr && addr <= base + to) {
return from;
}
}