示例#1
0
SBModule::SBModule(lldb::SBProcess &process, lldb::addr_t header_addr)
    : m_opaque_sp() {
  ProcessSP process_sp(process.GetSP());
  if (process_sp) {
    m_opaque_sp = process_sp->ReadModuleFromMemory(FileSpec(), header_addr);
    if (m_opaque_sp) {
      Target &target = process_sp->GetTarget();
      bool changed = false;
      m_opaque_sp->SetLoadAddress(target, 0, true, changed);
      target.GetImages().Append(m_opaque_sp);
    }
  }
}
示例#2
0
SBModule::SBModule (lldb::SBProcess &process, lldb::addr_t header_addr) :
    m_opaque_sp ()
{
    ProcessSP process_sp (process.GetSP());
    if (process_sp)
    {
        const bool add_image_to_target = true;
        const bool load_image_sections_in_target = true;
        m_opaque_sp = process_sp->ReadModuleFromMemory (FileSpec(), 
                                                        header_addr, 
                                                        add_image_to_target,
                                                        load_image_sections_in_target);
    }
}
示例#3
0
bool 
ExceptionBreakpointCallback(
    void *baton, 
    lldb::SBProcess &process,
    lldb::SBThread &thread, 
    lldb::SBBreakpointLocation &location)
{
    lldb::SBDebugger debugger = process.GetTarget().GetDebugger();

    // Send the normal and error output to stdout/stderr since we
    // don't have a return object from the command interpreter.
    lldb::SBCommandReturnObject result;
    result.SetImmediateOutputFile(stdout);
    result.SetImmediateErrorFile(stderr);

    // Save the process and thread to be used by the current process/thread 
    // helper functions.
    LLDBServices* client = new LLDBServices(debugger, result, &process, &thread);
    return ((PFN_EXCEPTION_CALLBACK)baton)(client) == S_OK;
}
示例#4
0
SBExecutionContext::SBExecutionContext (const lldb::SBProcess &process) :
m_exe_ctx_sp(new ExecutionContextRef())
{
    m_exe_ctx_sp->SetProcessSP(process.GetSP());
}