summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-16 23:57:47 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-16 23:57:47 (GMT)
commit0f92eba17f3fef786dd54e953df1db97835c2bb1 (patch)
treef92e5cfc7aa36490e608bbf79a207ddbf1b9d2c7 /addr2line.c
parente9a284ab94d1168467a917667a7d1a33185fcfcd (diff)
Support base address selection entry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/addr2line.c b/addr2line.c
index ae21f7c..f05ff27 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;
}
}