ruby/ruby-3.1.0-addr2line-DW_FORM_ref_addr.patch
Vít Ondruch a796603d8c Enable LTO.
Resolves: rhbz#1990108
2022-02-11 13:52:42 +01:00

30 lines
1.1 KiB
Diff

From a9977ba2f9863e3fb1b2346589ebbca67d80536c Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Sat, 14 Aug 2021 10:08:19 +0900
Subject: [PATCH] Constified addr2line.c
---
addr2line.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addr2line.c b/addr2line.c
index 8ee4416650d3..fed1a8da84e5 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -1137,12 +1137,12 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
set_uint_value(v, read_uleb128(reader));
break;
case DW_FORM_ref_addr:
- if (reader->address_size == 4) {
+ if (reader->format == 4) {
set_uint_value(v, read_uint32(&reader->p));
- } else if (reader->address_size == 8) {
+ } else if (reader->format == 8) {
set_uint_value(v, read_uint64(&reader->p));
} else {
- fprintf(stderr,"unknown address_size:%d", reader->address_size);
+ fprintf(stderr,"unknown format:%d", reader->format);
abort();
}
break;