[lldb-dev] Creating a breakpoint on a target with no process

Greg Clayton gclayton at apple.com
Thu Dec 4 17:07:58 PST 2014


> On Dec 4, 2014, at 2:35 PM, Zachary Turner <zturner at google.com> wrote:
> 
> 
> Makes sense, thanks.  Last question.  When a module loads the notification I get contains the load address.  So I call module->SetLoadAddress(x), and then ModulesDidLoad, at some point in the future I'm going to get a module unloaded event with the only parameter being x.  It doesn't seem there's an easy way for me to find the ModuleSP in the target given only this value.  Do I need to just keep my own map in the DynamicLoader or in the Process plugin?

You can just resolve the "load address" x using the target:

Address addr;
if (m_process->GetTarget().ResolveLoadAddress (x, addr))
{
    ModuleSP module_sp = addr.GetModule();
    if (module_sp)
    {
    }
}






More information about the lldb-dev mailing list