This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix bitfield "frame var" for pointers (pr47743)
ClosedPublic

Authored by labath on Oct 12 2020, 6:30 AM.

Details

Summary

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)

Diff Detail

Event Timeline

labath created this revision.Oct 12 2020, 6:30 AM
Herald added a project: Restricted Project. · View Herald Transcript
labath requested review of this revision.Oct 12 2020, 6:30 AM
mamai added a subscriber: mamai.Oct 15 2020, 6:25 AM
mamai accepted this revision.Oct 23 2020, 11:22 AM

LGTM

This revision is now accepted and ready to land.Oct 23 2020, 11:22 AM

What is the status of this patch?
Can it be committed?
It helps for our out of tree fork of lldb.

@shafik, @teemperor, any thoughts on this?

This revision was landed with ongoing or failed builds.Oct 26 2020, 4:01 AM
This revision was automatically updated to reflect the committed changes.