summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addr2line.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/addr2line.c b/addr2line.c
index 6c3143a94e3..d99102407dd 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);