[Lldb-commits] [PATCH] D29078: This patch implements a command to access and manipulate the Intel(R) MPX Boundary Tables.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 24 09:47:02 PST 2017

clayborg added a comment.

Noticed another efficiency thing, see inlined comment.

Comment at: tools/intel-mpx/IntelMPXTablePlugin.cpp:37
+  ptr_str.insert(0, "&");
+  lldb::SBValue ptr_addr = frame.GetValueForVariablePath(ptr_str.c_str());
+  if (!ptr_addr.IsValid()) {
Actually you may not want to make a string like "&my->expr" as you can probably get away with:

lldb::SBValue ptr_addr = frame.GetValueForVariablePath(cptr).GetLoadAddress();

The SBValue::GetLoadAddress() will return the address of the value itself instead of having to conjure up a SBValue for it.


More information about the lldb-commits mailing list