[Lldb-commits] [lldb] [lldb] Add missing operations to GetOpcodeDataSize (PR #120163)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 16 16:00:00 PST 2024


https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/120163

The improved error reporting in #120162 revealed that we were missing opcodes in GetOpcodeDataSize.

rdar://139705570

>From 5aca34df18e4a64a5c7aacfa77d9086dd6ca5271 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Mon, 16 Dec 2024 15:58:52 -0800
Subject: [PATCH] [lldb] Add missing operations to GetOpcodeDataSize

The improved error reporting in #120162 revealed that we were missing
opcodes in GetOpcodeDataSize.

rdar://139705570
---
 lldb/source/Expression/DWARFExpression.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index a7126b25c1cc38..34d508f97ae012 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -269,6 +269,7 @@ static lldb::offset_t GetOpcodeDataSize(const DataExtractor &data,
 
   // All opcodes that have a single ULEB (signed or unsigned) argument
   case DW_OP_addrx:           // 0xa1 1 ULEB128 index
+  case DW_OP_constx:          // 0xa2 1 ULEB128 index
   case DW_OP_constu:          // 0x10 1 ULEB128 constant
   case DW_OP_consts:          // 0x11 1 SLEB128 constant
   case DW_OP_plus_uconst:     // 0x23 1 ULEB128 addend
@@ -307,6 +308,8 @@ static lldb::offset_t GetOpcodeDataSize(const DataExtractor &data,
   case DW_OP_regx:            // 0x90 1 ULEB128 register
   case DW_OP_fbreg:           // 0x91 1 SLEB128 offset
   case DW_OP_piece:           // 0x93 1 ULEB128 size of piece addressed
+  case DW_OP_convert:         // 0xa8 1 ULEB128 offset
+  case DW_OP_reinterpret:     // 0xa9 1 ULEB128 offset
   case DW_OP_GNU_addr_index:  // 0xfb 1 ULEB128 index
   case DW_OP_GNU_const_index: // 0xfc 1 ULEB128 index
     data.Skip_LEB128(&offset);



More information about the lldb-commits mailing list