[Lldb-commits] [lldb] 0863f67 - [lldb] Remove DataExtractor::GetPointer

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 18 01:38:56 PST 2020


Author: Pavel Labath
Date: 2020-02-18T10:38:41+01:00
New Revision: 0863f6757953684400162f2ad418f3e8e28af278

URL: https://github.com/llvm/llvm-project/commit/0863f6757953684400162f2ad418f3e8e28af278
DIFF: https://github.com/llvm/llvm-project/commit/0863f6757953684400162f2ad418f3e8e28af278.diff

LOG: [lldb] Remove DataExtractor::GetPointer

This function is equivalent to GetAddress, but getAddress is also
present on the llvm version of the data extractor.

Added: 
    

Modified: 
    lldb/include/lldb/Utility/DataExtractor.h
    lldb/source/Core/ValueObject.cpp
    lldb/source/Core/ValueObjectDynamicValue.cpp
    lldb/source/Expression/DWARFExpression.cpp
    lldb/source/Expression/Materializer.cpp
    lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
    lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
    lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
    lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
    lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
    lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
    lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
    lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    lldb/source/Symbol/DWARFCallFrameInfo.cpp
    lldb/source/Utility/DataExtractor.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Utility/DataExtractor.h b/lldb/include/lldb/Utility/DataExtractor.h
index 7f09b7114a8d..8f82ae5af42d 100644
--- a/lldb/include/lldb/Utility/DataExtractor.h
+++ b/lldb/include/lldb/Utility/DataExtractor.h
@@ -573,24 +573,6 @@ class DataExtractor {
                             uint32_t bitfield_bit_size,
                             uint32_t bitfield_bit_offset) const;
 
-  /// Extract an pointer from \a *offset_ptr.
-  ///
-  /// Extract a single pointer from the data and update the offset pointed to
-  /// by \a offset_ptr. The size of the extracted pointer comes from the \a
-  /// m_addr_size member variable and should be set correctly prior to
-  /// extracting any pointer values.
-  ///
-  /// \param[in,out] offset_ptr
-  ///     A pointer to an offset within the data that will be advanced
-  ///     by the appropriate number of bytes if the value is extracted
-  ///     correctly. If the offset is out of bounds or there are not
-  ///     enough bytes to extract this value, the offset will be left
-  ///     unmodified.
-  ///
-  /// \return
-  ///     The extracted pointer value as a 64 integer.
-  uint64_t GetPointer(lldb::offset_t *offset_ptr) const;
-
   /// Get the current byte order value.
   ///
   /// \return
@@ -1003,8 +985,7 @@ class DataExtractor {
       *m_end; ///< A pointer to the byte that is past the end of the data.
   lldb::ByteOrder
       m_byte_order;     ///< The byte order of the data we are extracting from.
-  uint32_t m_addr_size; ///< The address size to use when extracting pointers or
-                        /// addresses
+  uint32_t m_addr_size; ///< The address size to use when extracting addresses.
   /// The shared pointer to data that can be shared among multiple instances
   lldb::DataBufferSP m_data_sp;
   const uint32_t m_target_byte_size;

diff  --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 71ceef7798d3..e1d0ca941108 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -1551,7 +1551,7 @@ addr_t ValueObject::GetPointerValue(AddressType *address_type) {
   case Value::eValueTypeLoadAddress:
   case Value::eValueTypeFileAddress: {
     lldb::offset_t data_offset = 0;
-    address = m_data.GetPointer(&data_offset);
+    address = m_data.GetAddress(&data_offset);
   } break;
   }
 

diff  --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp
index 149984df1841..ca66740cb55d 100644
--- a/lldb/source/Core/ValueObjectDynamicValue.cpp
+++ b/lldb/source/Core/ValueObjectDynamicValue.cpp
@@ -327,7 +327,7 @@ bool ValueObjectDynamicValue::SetData(DataExtractor &data, Status &error) {
     // but NULL'ing out a value should always be allowed
     lldb::offset_t offset = 0;
 
-    if (data.GetPointer(&offset) != 0) {
+    if (data.GetAddress(&offset) != 0) {
       error.SetErrorString(
           "unable to modify dynamic value, use 'expression' command");
       return false;

diff  --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index 849c96d9b455..7f12d06450c6 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1182,7 +1182,7 @@ bool DWARFExpression::Evaluate(
                 break;
               default:
                 stack.back().GetScalar() =
-                    addr_data.GetPointer(&addr_data_offset);
+                    addr_data.GetAddress(&addr_data_offset);
               }
               stack.back().ClearContext();
             } else {

diff  --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp
index 0d210ca19074..33c061effca4 100644
--- a/lldb/source/Expression/Materializer.cpp
+++ b/lldb/source/Expression/Materializer.cpp
@@ -698,7 +698,7 @@ class EntityVariable : public Materializer::Entity {
 
         lldb::offset_t offset;
 
-        ptr = extractor.GetPointer(&offset);
+        ptr = extractor.GetAddress(&offset);
 
         dump_stream.PutChar('\n');
       }
@@ -972,7 +972,7 @@ class EntityResultVariable : public Materializer::Entity {
 
         lldb::offset_t offset;
 
-        ptr = extractor.GetPointer(&offset);
+        ptr = extractor.GetAddress(&offset);
 
         dump_stream.PutChar('\n');
       }

diff  --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index a6db648baa1a..d425b3587237 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -481,17 +481,17 @@ bool DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure() {
       offset = 0;
       m_dyld_all_image_infos.version = data.GetU32(&offset);
       m_dyld_all_image_infos.dylib_info_count = data.GetU32(&offset);
-      m_dyld_all_image_infos.dylib_info_addr = data.GetPointer(&offset);
-      m_dyld_all_image_infos.notification = data.GetPointer(&offset);
+      m_dyld_all_image_infos.dylib_info_addr = data.GetAddress(&offset);
+      m_dyld_all_image_infos.notification = data.GetAddress(&offset);
       m_dyld_all_image_infos.processDetachedFromSharedRegion =
           data.GetU8(&offset);
       m_dyld_all_image_infos.libSystemInitialized = data.GetU8(&offset);
       // Adjust for padding.
       offset += addr_size - 2;
-      m_dyld_all_image_infos.dyldImageLoadAddress = data.GetPointer(&offset);
+      m_dyld_all_image_infos.dyldImageLoadAddress = data.GetAddress(&offset);
       if (m_dyld_all_image_infos.version >= 11) {
         offset += addr_size * 8;
-        uint64_t dyld_all_image_infos_addr = data.GetPointer(&offset);
+        uint64_t dyld_all_image_infos_addr = data.GetAddress(&offset);
 
         // When we started, we were given the actual address of the
         // all_image_infos struct (probably via TASK_DYLD_INFO) in memory -
@@ -671,9 +671,9 @@ bool DynamicLoaderMacOSXDYLD::ReadImageInfos(
     for (size_t i = 0;
          i < image_infos.size() && info_data_ref.ValidOffset(info_data_offset);
          i++) {
-      image_infos[i].address = info_data_ref.GetPointer(&info_data_offset);
-      lldb::addr_t path_addr = info_data_ref.GetPointer(&info_data_offset);
-      image_infos[i].mod_date = info_data_ref.GetPointer(&info_data_offset);
+      image_infos[i].address = info_data_ref.GetAddress(&info_data_offset);
+      lldb::addr_t path_addr = info_data_ref.GetAddress(&info_data_offset);
+      image_infos[i].mod_date = info_data_ref.GetAddress(&info_data_offset);
 
       char raw_path[PATH_MAX];
       m_process->ReadCStringFromMemory(path_addr, raw_path, sizeof(raw_path),

diff  --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
index df9f700a7f18..cbeef600ba9b 100644
--- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
+++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
@@ -134,9 +134,9 @@ bool ReadJITEntry(const addr_t from_addr, Process *process,
   DataExtractor extractor(data.GetBytes(), data.GetByteSize(),
                           process->GetByteOrder(), sizeof(ptr_t));
   lldb::offset_t offset = 0;
-  entry->next_entry = extractor.GetPointer(&offset);
-  entry->prev_entry = extractor.GetPointer(&offset);
-  entry->symfile_addr = extractor.GetPointer(&offset);
+  entry->next_entry = extractor.GetAddress(&offset);
+  entry->prev_entry = extractor.GetAddress(&offset);
+  entry->symfile_addr = extractor.GetAddress(&offset);
   offset = llvm::alignTo(offset, uint64_align_bytes);
   entry->symfile_size = extractor.GetU64(&offset);
 

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index cca6911485a0..0fe0d9217e6a 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -538,8 +538,8 @@ ThreadSP AppleObjCRuntime::GetBacktraceThreadFromException(
     if (error.Fail()) return ThreadSP();
 
     lldb::offset_t data_offset = 0;
-    auto dict_entry_key = data.GetPointer(&data_offset);
-    auto dict_entry_value = data.GetPointer(&data_offset);
+    auto dict_entry_key = data.GetAddress(&data_offset);
+    auto dict_entry_value = data.GetAddress(&data_offset);
 
     auto key_nsstring = objc_object_from_address(dict_entry_key, "key");
     StreamString key_summary;

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index 3d3c69a75f2b..46b0cbc2fc3b 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -362,7 +362,7 @@ void AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded() {
         lldb::offset_t offset = addr_size; // Skip prototype
         const uint32_t count = data.GetU32(&offset);
         const uint32_t num_buckets = data.GetU32(&offset);
-        const addr_t buckets_ptr = data.GetPointer(&offset);
+        const addr_t buckets_ptr = data.GetAddress(&offset);
         if (m_hash_signature.NeedsUpdate(count, num_buckets, buckets_ptr)) {
           m_hash_signature.UpdateSignature(count, num_buckets, buckets_ptr);
 

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 0f89550984ac..50b5f2e250d6 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1497,7 +1497,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassInfoArray(const DataExtractor &data,
   // Iterate through all ClassInfo structures
   lldb::offset_t offset = 0;
   for (uint32_t i = 0; i < num_class_infos; ++i) {
-    ObjCISA isa = data.GetPointer(&offset);
+    ObjCISA isa = data.GetAddress(&offset);
 
     if (isa == 0) {
       if (should_log)
@@ -2548,7 +2548,7 @@ bool AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(
 
           lldb::offset_t offset = 0;
           for (unsigned i = 0; i != num_new_classes; ++i)
-            m_indexed_isa_cache.push_back(data.GetPointer(&offset));
+            m_indexed_isa_cache.push_back(data.GetAddress(&offset));
         }
       }
 

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index 9b5e6777e9e1..0fe9dc35a9a7 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -318,7 +318,7 @@ void AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::SetUpRegion() {
   const uint16_t descriptor_size = data.GetU16(&offset);
   const size_t num_descriptors = data.GetU32(&offset);
 
-  m_next_region = data.GetPointer(&offset);
+  m_next_region = data.GetAddress(&offset);
 
   // If the header size is 0, that means we've come in too early before this
   // data is set up.
@@ -547,7 +547,7 @@ bool AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(
     error = argument_values.GetValueAtIndex(0)->GetValueAsData(&exe_ctx, data,
                                                                nullptr);
     lldb::offset_t offset = 0;
-    lldb::addr_t region_addr = data.GetPointer(&offset);
+    lldb::addr_t region_addr = data.GetAddress(&offset);
 
     if (region_addr != 0)
       vtable_handler->ReadRegions(region_addr);

diff  --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index 7b36c5dfc8c8..d8b3b046855f 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -788,7 +788,7 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
           const uint32_t region_count = packet.GetU32(&offset);
           s.Printf(" (count = %u", region_count);
           for (uint32_t i = 0; i < region_count; ++i) {
-            const addr_t region_addr = packet.GetPointer(&offset);
+            const addr_t region_addr = packet.GetAddress(&offset);
             const uint32_t region_size = packet.GetU32(&offset);
             const uint32_t region_prot = packet.GetU32(&offset);
             s.Printf("\n\tregion[%" PRIu64 "] = { range = [0x%16.16" PRIx64

diff  --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
index 8975337d6ada..c3ae95a13b31 100644
--- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
@@ -296,25 +296,25 @@ Status ELFLinuxPrStatus::Parse(const DataExtractor &data,
   pr_cursig = data.GetU16(&offset);
   offset += 2; // pad
 
-  pr_sigpend = data.GetPointer(&offset);
-  pr_sighold = data.GetPointer(&offset);
+  pr_sigpend = data.GetAddress(&offset);
+  pr_sighold = data.GetAddress(&offset);
 
   pr_pid = data.GetU32(&offset);
   pr_ppid = data.GetU32(&offset);
   pr_pgrp = data.GetU32(&offset);
   pr_sid = data.GetU32(&offset);
 
-  pr_utime.tv_sec = data.GetPointer(&offset);
-  pr_utime.tv_usec = data.GetPointer(&offset);
+  pr_utime.tv_sec = data.GetAddress(&offset);
+  pr_utime.tv_usec = data.GetAddress(&offset);
 
-  pr_stime.tv_sec = data.GetPointer(&offset);
-  pr_stime.tv_usec = data.GetPointer(&offset);
+  pr_stime.tv_sec = data.GetAddress(&offset);
+  pr_stime.tv_usec = data.GetAddress(&offset);
 
-  pr_cutime.tv_sec = data.GetPointer(&offset);
-  pr_cutime.tv_usec = data.GetPointer(&offset);
+  pr_cutime.tv_sec = data.GetAddress(&offset);
+  pr_cutime.tv_usec = data.GetAddress(&offset);
 
-  pr_cstime.tv_sec = data.GetPointer(&offset);
-  pr_cstime.tv_usec = data.GetPointer(&offset);
+  pr_cstime.tv_sec = data.GetAddress(&offset);
+  pr_cstime.tv_usec = data.GetAddress(&offset);
 
   return error;
 }
@@ -367,7 +367,7 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data,
     offset += 4;
   }
 
-  pr_flag = data.GetPointer(&offset);
+  pr_flag = data.GetAddress(&offset);
 
   if (arch.IsMIPS()) {
     // The pr_uid and pr_gid is always 32 bit irrespective of platforms

diff  --git a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
index 25db5fe892fb..50f53e5a8b50 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
@@ -795,8 +795,8 @@ SystemRuntimeMacOSX::GetPendingItemRefsForQueue(lldb::addr_t queue) {
                    static_cast<size_t>(i) < pending_items_pointer.count) {
               offset = start_of_array_offset + (i * item_size);
               ItemRefAndCodeAddress item;
-              item.item_ref = extractor.GetPointer(&offset);
-              item.code_address = extractor.GetPointer(&offset);
+              item.item_ref = extractor.GetAddress(&offset);
+              item.code_address = extractor.GetAddress(&offset);
               pending_item_refs.item_refs_and_code_addresses.push_back(item);
               i++;
             }
@@ -806,7 +806,7 @@ SystemRuntimeMacOSX::GetPendingItemRefsForQueue(lldb::addr_t queue) {
             while (offset < pending_items_pointer.items_buffer_size &&
                    static_cast<size_t>(i) < pending_items_pointer.count) {
               ItemRefAndCodeAddress item;
-              item.item_ref = extractor.GetPointer(&offset);
+              item.item_ref = extractor.GetAddress(&offset);
               item.code_address = LLDB_INVALID_ADDRESS;
               pending_item_refs.item_refs_and_code_addresses.push_back(item);
               i++;
@@ -913,7 +913,7 @@ void SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR(
       uint32_t offset_to_next = extractor.GetU32(&offset);
 
       offset += 4; // Skip over the 4 bytes of reserved space
-      addr_t queue = extractor.GetPointer(&offset);
+      addr_t queue = extractor.GetAddress(&offset);
       uint64_t serialnum = extractor.GetU64(&offset);
       uint32_t running_work_items_count = extractor.GetU32(&offset);
       uint32_t pending_work_items_count = extractor.GetU32(&offset);
@@ -954,8 +954,8 @@ SystemRuntimeMacOSX::ItemInfo SystemRuntimeMacOSX::ExtractItemInfoFromBuffer(
 
   offset_t offset = 0;
 
-  item.item_that_enqueued_this = extractor.GetPointer(&offset);
-  item.function_or_block = extractor.GetPointer(&offset);
+  item.item_that_enqueued_this = extractor.GetAddress(&offset);
+  item.function_or_block = extractor.GetAddress(&offset);
   item.enqueuing_thread_id = extractor.GetU64(&offset);
   item.enqueuing_queue_serialnum = extractor.GetU64(&offset);
   item.target_queue_serialnum = extractor.GetU64(&offset);
@@ -965,7 +965,7 @@ SystemRuntimeMacOSX::ItemInfo SystemRuntimeMacOSX::ExtractItemInfoFromBuffer(
   offset = m_lib_backtrace_recording_info.item_info_data_offset;
 
   for (uint32_t i = 0; i < item.enqueuing_callstack_frame_count; i++) {
-    item.enqueuing_callstack.push_back(extractor.GetPointer(&offset));
+    item.enqueuing_callstack.push_back(extractor.GetAddress(&offset));
   }
   item.enqueuing_thread_label = extractor.GetCStr(&offset);
   item.enqueuing_queue_label = extractor.GetCStr(&offset);

diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 475c927f6114..275911a76fb6 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -240,7 +240,7 @@ static lldb::addr_t GetVTableAddress(Process &process,
   if (err.Fail() || vbtable_ptr_offset + data.GetAddressByteSize() > size)
     return LLDB_INVALID_ADDRESS;
 
-  return data.GetPointer(&vbtable_ptr_offset);
+  return data.GetAddress(&vbtable_ptr_offset);
 }
 
 static int64_t ReadVBaseOffsetFromVTable(Process &process,

diff  --git a/lldb/source/Symbol/DWARFCallFrameInfo.cpp b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
index 707e26332adf..3111c33c7108 100644
--- a/lldb/source/Symbol/DWARFCallFrameInfo.cpp
+++ b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
@@ -690,7 +690,7 @@ bool DWARFCallFrameInfo::FDEToUnwindPlan(dw_offset_t dwarf_offset,
           UnwindPlan::Row *newrow = new UnwindPlan::Row;
           *newrow = *row.get();
           row.reset(newrow);
-          row->SetOffset(m_cfi_data.GetPointer(&offset) -
+          row->SetOffset(m_cfi_data.GetAddress(&offset) -
                          startaddr.GetFileAddress());
           break;
         }

diff  --git a/lldb/source/Utility/DataExtractor.cpp b/lldb/source/Utility/DataExtractor.cpp
index da886201dfc7..fd4b7643cdc5 100644
--- a/lldb/source/Utility/DataExtractor.cpp
+++ b/lldb/source/Utility/DataExtractor.cpp
@@ -689,17 +689,6 @@ uint64_t DataExtractor::GetAddress_unchecked(offset_t *offset_ptr) const {
   return GetMaxU64_unchecked(offset_ptr, m_addr_size);
 }
 
-// Extract a single pointer from the data and update the offset pointed to by
-// "offset_ptr". The size of the extracted pointer comes from the
-// "this->m_addr_size" member variable and should be set correctly prior to
-// extracting any pointer values.
-//
-// RETURNS the pointer that was extracted, or zero on failure.
-uint64_t DataExtractor::GetPointer(offset_t *offset_ptr) const {
-  assert(m_addr_size == 4 || m_addr_size == 8);
-  return GetMaxU64(offset_ptr, m_addr_size);
-}
-
 size_t DataExtractor::ExtractBytes(offset_t offset, offset_t length,
                                    ByteOrder dst_byte_order, void *dst) const {
   const uint8_t *src = PeekData(offset, length);


        


More information about the lldb-commits mailing list