diff options
| author | Jason Molenda <jmolenda@apple.com> | 2014-10-16 08:43:27 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2014-10-16 08:43:27 +0000 |
| commit | 823d8f6246ff96156bbab7432a4142140361e697 (patch) | |
| tree | 1e4fb1534a4184a8183c4a887251790727d26924 | |
| parent | ea772b4df29c88ce44413b6935278b9eddc3ff5d (diff) | |
| download | bcm5719-llvm-823d8f6246ff96156bbab7432a4142140361e697.tar.gz bcm5719-llvm-823d8f6246ff96156bbab7432a4142140361e697.zip | |
Most of this function checks to see if m_process is non-null before
dereferencing it, except for this one section of code. Add a null
check around it.
clang static analyzer fix.
llvm-svn: 219920
| -rw-r--r-- | lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp index 79f20a89018..a7a2d3f76a0 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -257,13 +257,15 @@ DynamicLoaderPOSIXDYLD::ProbeEntry() if (log) log->Printf ("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64 " GetEntryPoint() returned address 0x%" PRIx64 ", setting entry breakpoint", __FUNCTION__, m_process ? m_process->GetID () : LLDB_INVALID_PROCESS_ID, entry); + if (m_process) + { + Breakpoint *const entry_break = m_process->GetTarget().CreateBreakpoint(entry, true, false).get(); + entry_break->SetCallback(EntryBreakpointHit, this, true); + entry_break->SetBreakpointKind("shared-library-event"); - Breakpoint *const entry_break = m_process->GetTarget().CreateBreakpoint(entry, true, false).get(); - entry_break->SetCallback(EntryBreakpointHit, this, true); - entry_break->SetBreakpointKind("shared-library-event"); - - // Shoudn't hit this more than once. - entry_break->SetOneShot (true); + // Shoudn't hit this more than once. + entry_break->SetOneShot (true); + } } // The runtime linker has run and initialized the rendezvous structure once the |

