[lldb-dev] [Bug 23299] New: transparent_pointers not working
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Apr 20 15:16:49 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23299
Bug ID: 23299
Summary: transparent_pointers not working
Product: lldb
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev at cs.uiuc.edu
Reporter: ribrdb at google.com
Classification: Unclassified
While working on a LanguageRuntime plugin for go, I noticed some strangeness
with ValueObjects for pointers.
If I use valobj.GetChildMemberWithName(...), it returns a child, but with the
wrong address so the value is unusable.
However, if I use valobj.Dereference()->GetChildMemberWithName(...) I can read
the data.
I think I've tracked this down to an interaction between
ValueObject::GetPointerValue and ValueObjectChild::UpdateValue:
- UpdateValue performs pointer arithmetic, saves the result in
m_value.GetScalar(), and sets the value type to an address (could be Host, Load
or FileAddress).
- However, GetPointerValue only uses m_value if the value type is
eValueTypeScalar or eValueTypeVector.
So at least in the case where the offset is != 0, GetPointerValue seems to be
returning something wrong.
Simply changing the value type to scalar doesn't work, because other code is
expecting it to be some sort of address.
Unfortunately I haven't found a way to reproduce this using the public api so I
can't write a test for it.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150420/729a5961/attachment.html>
More information about the lldb-dev
mailing list