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

Johnny Chen johnny.chen at apple.com
Mon Feb 20 13:44:36 PST 2012


Hi Dmitry,

Thanks.  Submitted r150990.

On Feb 20, 2012, at 5:04 AM, Dmitry Vyukov wrote:

> Hi,
> 
> 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 offset
>              // 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 together
> 
> <examples_lookup.diff>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list