[Lldb-commits] [PATCH] D89236: [lldb] Fix bitfield "frame var" for pointers (pr47743)

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 12 06:30:59 PDT 2020


labath created this revision.
labath added reviewers: shafik, teemperor.
Herald added a reviewer: JDevlieghere.
Herald added a project: LLDB.
labath requested review of this revision.

Displaying large packed bitfields did not work if one was accessing them
through a pointer, and he used the "->" notation ("[0]." notation is
fine). The reason for that is that implicit dereference in -> is plumbed
all the way down to ValueObjectChild::UpdateValue, where the process of
fetching the child value was forked for this flag. The bitfield
"sliding" code was implemented only for the branch which did not require
dereferencing.

This patch restructures the function to avoid this mistake. Processing
now happens in two stages.

- first the parent is dereferenced (if needed)
- then the child value is computed (this step includes sliding and is common for both branches)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89236

Files:
  lldb/source/Core/ValueObjectChild.cpp
  lldb/test/API/lang/c/bitfields/TestBitfields.py
  lldb/test/API/lang/c/bitfields/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89236.297575.patch
Type: text/x-patch
Size: 8882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201012/100f9fa7/attachment.bin>


More information about the lldb-commits mailing list