[Lldb-commits] [lldb] r163038 - in /lldb/trunk: include/lldb/Symbol/Block.h source/Symbol/Block.cpp
Jim Ingham
jingham at apple.com
Fri Aug 31 16:49:32 PDT 2012
Author: jingham
Date: Fri Aug 31 18:49:32 2012
New Revision: 163038
URL: http://llvm.org/viewvc/llvm-project?rev=163038&view=rev
Log:
Add a convenience function to get the range containing a given PC specified as load address + Target.
Modified:
lldb/trunk/include/lldb/Symbol/Block.h
lldb/trunk/source/Symbol/Block.cpp
Modified: lldb/trunk/include/lldb/Symbol/Block.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=163038&r1=163037&r2=163038&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Block.h (original)
+++ lldb/trunk/include/lldb/Symbol/Block.h Fri Aug 31 18:49:32 2012
@@ -446,6 +446,9 @@
bool
GetRangeContainingAddress (const Address& addr, AddressRange &range);
+
+ bool
+ GetRangeContainingLoadAddress (lldb::addr_t load_addr, Target &target, AddressRange &range);
uint32_t
GetRangeIndexContainingAddress (const Address& addr);
Modified: lldb/trunk/source/Symbol/Block.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Block.cpp?rev=163038&r1=163037&r2=163038&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Block.cpp (original)
+++ lldb/trunk/source/Symbol/Block.cpp Fri Aug 31 18:49:32 2012
@@ -317,6 +317,16 @@
return false;
}
+bool
+Block::GetRangeContainingLoadAddress (lldb::addr_t load_addr, Target &target, AddressRange &range)
+{
+ Address load_address;
+ load_address.SetLoadAddress(load_addr, &target);
+ AddressRange containing_range;
+ return GetRangeContainingAddress(load_address, containing_range);
+}
+
+
uint32_t
Block::GetRangeIndexContainingAddress (const Address& addr)
{
More information about the lldb-commits
mailing list