From 64e961df8de89b57963dc439c0f17d595bbb90fcf2218b321e43639e46ff4454 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 11 Apr 2018 11:21:24 +0000 Subject: [PATCH] - Add dwz-0.12-DW_OP_GNU_variable_value.patch to handle DW_OP_GNU_variable_value. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/dwz?expand=0&rev=11 --- dwz-0.12-DW_OP_GNU_variable_value.patch | 35 +++++++++++++++++++++++++ dwz.changes | 6 +++++ dwz.spec | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 dwz-0.12-DW_OP_GNU_variable_value.patch diff --git a/dwz-0.12-DW_OP_GNU_variable_value.patch b/dwz-0.12-DW_OP_GNU_variable_value.patch new file mode 100644 index 0000000..a89e0bc --- /dev/null +++ b/dwz-0.12-DW_OP_GNU_variable_value.patch @@ -0,0 +1,35 @@ +diff --git a/dwarf2.def b/dwarf2.def +index e9a8bca..17311fa 100644 +--- a/dwarf2.def ++++ b/dwarf2.def +@@ -588,6 +588,9 @@ DW_OP (DW_OP_GNU_reinterpret, 0xf9) + DW_OP (DW_OP_GNU_parameter_ref, 0xfa) + /* Extension for Fission. See http://gcc.gnu.org/wiki/DebugFission. */ + DW_OP (DW_OP_GNU_addr_index, 0xfb) ++/* The GNU variable value extension. ++ See http://dwarfstd.org/ShowIssue.php?issue=161109.2 . */ ++DW_OP (DW_OP_GNU_variable_value, 0xfd) + /* HP extensions. */ + DW_OP_DUP (DW_OP_HP_unknown, 0xe0) /* Ouch, the same as GNU_push_tls_address. */ + DW_OP (DW_OP_HP_is_value, 0xe1) +diff --git a/dwz.c b/dwz.c +index b3b779d..b387ebc 100644 +--- a/dwz.c ++++ b/dwz.c +@@ -1522,6 +1522,7 @@ read_exprloc (DSO *dso, dw_die_ref die, unsigned char *ptr, size_t len, + ptr += 4; + break; + case DW_OP_call_ref: ++ case DW_OP_GNU_variable_value: + case DW_OP_GNU_implicit_pointer: + cu = die_cu (die); + addr = read_size (ptr, cu->cu_version == 2 ? ptr_size : 4); +@@ -8576,6 +8577,7 @@ adjust_exprloc (dw_cu_ref cu, dw_die_ref die, dw_cu_ref refcu, + ptr += 4; + break; + case DW_OP_call_ref: ++ case DW_OP_GNU_variable_value: + case DW_OP_GNU_implicit_pointer: + addr = read_size (ptr, refcu->cu_version == 2 ? ptr_size : 4); + assert (cu->cu_version == refcu->cu_version); + diff --git a/dwz.changes b/dwz.changes index 3c860d2..619b632 100644 --- a/dwz.changes +++ b/dwz.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 11 11:02:06 UTC 2018 - rguenther@suse.com + +- Add dwz-0.12-DW_OP_GNU_variable_value.patch to handle + DW_OP_GNU_variable_value. + ------------------------------------------------------------------- Wed Mar 14 13:32:56 UTC 2018 - mliska@suse.cz diff --git a/dwz.spec b/dwz.spec index 712ee78..501fe3e 100644 --- a/dwz.spec +++ b/dwz.spec @@ -26,6 +26,7 @@ License: GPL-2.0-or-later AND LGPL-2.0-or-later Group: Development/Tools/Building Source: %{name}-%{version}.tar.xz Patch0: dwz-0.12-ignore-nobits.patch +Patch1: dwz-0.12-DW_OP_GNU_variable_value.patch BuildRequires: libelf-devel BuildRequires: xz @@ -50,6 +51,7 @@ is needed. %prep %setup -q -n %{name} %patch0 -p1 +%patch1 -p1 %build make %{?_smp_mflags} CFLAGS="%{optflags}"