Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lldb/source/ValueObject/ValueObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2966,10 +2966,13 @@ ValueObjectSP ValueObject::AddressOf(Status &error) {
std::string name(1, '&');
name.append(m_name.AsCString(""));
ExecutionContext exe_ctx(GetExecutionContextRef());

lldb::DataBufferSP buffer(
new lldb_private::DataBufferHeap(&addr, sizeof(lldb::addr_t)));
m_addr_of_valobj_sp = ValueObjectConstResult::Create(
exe_ctx.GetBestExecutionContextScope(),
compiler_type.GetPointerType(), ConstString(name.c_str()), addr,
eAddressTypeInvalid, m_data.GetAddressByteSize());
compiler_type.GetPointerType(), ConstString(name.c_str()), buffer,
endian::InlHostByteOrder(), exe_ctx.GetAddressByteSize());
}
} break;
default:
Expand Down
2 changes: 2 additions & 0 deletions lldb/test/API/python_api/sbvalue_const_addrof/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ int main (int argc, char const *argv[], char const *envp[])
{
printf ("g_thread_list is %p\n", g_thread_list_ptr);
return 0; //% v = self.dbg.GetSelectedTarget().FindFirstGlobalVariable('g_thread_list_ptr')
//% self.assertTrue(v.AddressOf().IsValid())
//% self.assertFalse(v.AddressOf().AddressOf().IsValid())
//% v_gla = v.GetChildMemberWithName('regs').GetLoadAddress()
//% v_aof = v.GetChildMemberWithName('regs').AddressOf().GetValueAsUnsigned(lldb.LLDB_INVALID_ADDRESS)
//% expr = '(%s)0x%x' % (v.GetType().GetName(), v.GetValueAsUnsigned(0))
Expand Down
Loading