[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 28 14:39:09 PDT 2023


https://github.com/jimingham commented:

This is much nicer looking!

I had a couple small comments about apportioning duties between the ValueObjectVTable::Update and the GetVTableInfo in the comments.

It doesn't look like you handled corrupted tables yet?  Are you still intending to do that?

Another thing it might be good to test - though from what you've done it should indeed work is if I have:

BaseClass Foo my_foo = FirstChildOfFoo();
// Stop after this line and do `vtbl = frame.FindVariable("my_foo").GetVTable()` and check the vtable has the right functions for FirstChildOfFoo()
my_foo = SecondChildOfFoo();
// Stop after this line and check the `vtbl` variable again, it should now have the functions for SecondChildOfFoo...

That will make sure both that we notice the change in the parent & update the vtable appropriately, and that we don't mess up the memory management, such that holding onto just the vtable child doesn't keep the whole tree valid.

https://github.com/llvm/llvm-project/pull/67599


More information about the lldb-commits mailing list