[all-commits] [llvm/llvm-project] 3b7ac5: Fix GetAddressOf for children of pointer ValueObje...

jimingham via All-commits all-commits at lists.llvm.org
Fri Dec 9 11:16:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b7ac5b295df7381cee277342085f52fe468e633
      https://github.com/llvm/llvm-project/commit/3b7ac5b295df7381cee277342085f52fe468e633
  Author: Jim Ingham <jingham at apple.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M lldb/source/Core/ValueObjectConstResultImpl.cpp
    A lldb/test/API/lang/c/parray_vrs_char_array/Makefile
    A lldb/test/API/lang/c/parray_vrs_char_array/TestParrayVrsCharArrayChild.py
    A lldb/test/API/lang/c/parray_vrs_char_array/main.c

  Log Message:
  -----------
  Fix GetAddressOf for children of pointer ValueObjectConstResult* variables.

The original code always set the m_live_address of children of the ValueObjects that
use ValueObjectConstResultImpl backends to the parent m_live_address + child_byte_offset.
That is correct for structure types, but wrong for pointer types, since m_live_address
for a pointer type is the address of the storage for the pointer, not of the pointee.

Also added a test which was failing before this patch.




More information about the All-commits mailing list