summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authorxtkoba <69125751+xtkoba@users.noreply.github.com>2021-08-19 06:01:24 +0900
committerAaron Patterson <aaron.patterson@gmail.com>2021-09-23 12:29:07 -0700
commit5d756118af16d22c9b276bad86464050d9100cce (patch)
tree7fbbd4317fa6a11be81c58ef8a222eedaf75b187 /addr2line.c
parent77e6715d67b92b16bcb4588e0da37b494cdc5278 (diff)
Use the correct address size
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4439
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/addr2line.c b/addr2line.c
index 6c3143a94e..d99102407d 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -1410,10 +1410,10 @@ static uint64_t
read_dw_form_addr(DebugInfoReader *reader, const char **ptr)
{
const char *p = *ptr;
- *ptr = p + reader->format;
- if (reader->format == 4) {
+ *ptr = p + reader->address_size;
+ if (reader->address_size == 4) {
return read_uint32(&p);
- } else if (reader->format == 8) {
+ } else if (reader->address_size == 8) {
return read_uint64(&p);
} else {
fprintf(stderr,"unknown address_size:%d", reader->address_size);