1 Star 0 Fork 21

gaochang/systemtap

forked from src-anolis-os/systemtap 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rhbz2149223.patch 2.52 KB
一键复制 编辑 原始数据 按行查看 历史
Zhao Hang 提交于 2023-07-04 21:41 . update to systemtap-4.8-2.el8.src.rpm
commit 05eb6742c169226ae09f1737aa8b9dc1dc12adb5
Author: Mark Wielaard <[email protected]>
Date: Tue Nov 29 18:50:58 2022 +0100
Handle DWARF5 DW_OP_implicit_pointer and DW_OP_entry_value
These are the same as the GNU extensions for older DWARF,
DW_OP_GNU_implicit_pointer and DW_GNU_entry_value.
diff --git a/loc2stap.cxx b/loc2stap.cxx
index efc78cc57..53316a480 100644
--- a/loc2stap.cxx
+++ b/loc2stap.cxx
@@ -23,6 +23,11 @@
#define DW_OP_GNU_entry_value 0xf3
#endif
+#if ! _ELFUTILS_PREREQ(0, 171)
+#define DW_OP_entry_value 0xa3
+#define DW_OP_implicit_pointer 0xa0
+#endif
+
#define N_(x) x
@@ -372,7 +377,7 @@ location_context::translate (const Dwarf_Op *expr, const size_t len,
DIE ("operations follow DW_OP_implicit_value");
if (implicit_pointer != NULL)
- DIE ("operations follow DW_OP_GNU_implicit_pointer");
+ DIE ("operations follow DW_OP implicit_pointer");
}
switch (expr[i].atom)
@@ -662,6 +667,7 @@ location_context::translate (const Dwarf_Op *expr, const size_t len,
#if _ELFUTILS_PREREQ (0, 149)
case DW_OP_GNU_implicit_pointer:
+ case DW_OP_implicit_pointer:
implicit_pointer = &expr[i];
/* Fake top of stack: implicit_pointer being set marks it. */
PUSH(NULL);
@@ -684,10 +690,11 @@ location_context::translate (const Dwarf_Op *expr, const size_t len,
break;
case DW_OP_GNU_entry_value:
+ case DW_OP_entry_value:
{
expression *result = handle_GNU_entry_value (expr[i]);
if (result == NULL)
- DIE("DW_OP_GNU_entry_value unable to resolve value");
+ DIE("DW_OP entry_value unable to resolve value");
PUSH(result);
}
break;
@@ -1248,7 +1255,8 @@ location_context::location_relative (const Dwarf_Op *expr, size_t len,
break;
case DW_OP_GNU_entry_value:
- DIE ("unhandled DW_OP_GNU_entry_value");
+ case DW_OP_entry_value:
+ DIE ("unhandled DW_OP entry_value");
break;
default:
diff --git a/testsuite/systemtap.base/dw_entry_value.exp b/testsuite/systemtap.base/dw_entry_value.exp
index 7339fc5fa..b728fa7ff 100644
--- a/testsuite/systemtap.base/dw_entry_value.exp
+++ b/testsuite/systemtap.base/dw_entry_value.exp
@@ -10,7 +10,7 @@ if { $res != "" } {
pass "$test: compiled $test.c"
}
-if { ![catch { exec eu-readelf -w $test | grep GNU_entry_value }] } {
+if { ![catch { exec eu-readelf -w $test | grep entry_value: }] } {
stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp -c ./${test} -w
} else {
untested "$test: no DW_OP_GNU_entry_value found"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gcdota930915/systemtap.git
[email protected]:gcdota930915/systemtap.git
gcdota930915
systemtap
systemtap
a8

搜索帮助