[Lldb-commits] Fix examples/lookup/main.cpp

Dmitry Vyukov dvyukov at google.com
Mon Feb 20 05:04:03 PST 2012


I would like to ask you to review and land this patch:

Index: examples/lookup/main.cpp
--- examples/lookup/main.cpp (revision 150956)
+++ examples/lookup/main.cpp (working copy)
@@ -58,11 +58,11 @@
             // Find the executable module so we can do a lookup inside it
             SBModule module (target.FindModule (exe_file_spec));
-            SBAddress addr;

             // Take a file virtual address and resolve it to a section
             // address that can be used to do a symbol lookup by address
-            if (module.ResolveFileAddress (file_addr, addr))
+            SBAddress addr = module.ResolveFileAddress (file_addr);
+            if (addr.IsValid())
                 // We can resolve a section offset address in the module
                 // and only ask for what we need. You can logical or
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20120220/6ebc834f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: examples_lookup.diff
Type: application/octet-stream
Size: 891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20120220/6ebc834f/attachment.obj>

More information about the lldb-commits mailing list