From fdda0bece6dd57aafd7cc527e86431794430dc4a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 15 Jan 2023 14:24:19 +0100 Subject: [PATCH] m_debuginfo: Suppress warning about not handling entry_value ops The warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0xf3 isn't very helpful. This means we didn't handle DW_OP_GNU_entry_value. DW_OP_GNU_entry_value (or DWARF5 DW_OP_entry_value) means interpreting the given DWARF expression using register values as they were upon entering the function. Which is non-trivial to implement. We can fail the evaluation of the DWARF expression without warning about it by default, since it isn't really needed for any current valgrind functionality (and it is only done with --read-var-info=yes. --- coregrind/m_debuginfo/d3basics.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coregrind/m_debuginfo/d3basics.c b/coregrind/m_debuginfo/d3basics.c index d48589a30c..e9e8944af8 100644 --- a/coregrind/m_debuginfo/d3basics.c +++ b/coregrind/m_debuginfo/d3basics.c @@ -1048,6 +1048,14 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( const UChar* expr, UWord exprszB, FAIL("evaluate_Dwarf3_Expr: DW_OP_stack_value " "does not terminate expression"); break; + case DW_OP_entry_value: + case DW_OP_GNU_entry_value: + /* This provides a DWARF expression where any register op + needs tobe evaluated as if the value that register had + upon entering the function. Which is non-trivial to + implement. */ + FAIL("evaluate_Dwarf3_Expr: Unhandled DW_OP entry_value"); + return res; default: if (!VG_(clo_xml)) VG_(message)(Vg_DebugMsg, -- 2.47.2