[Lldb-commits] [PATCH] D18697: Fix a bug in linux core file handling

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 1 10:00:08 PDT 2016


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

See inlined comments.


================
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:644-647
@@ +643,6 @@
+{
+    info.Clear();
+    info.SetProcessID(GetID());
+    info.SetArchitecture(GetArchitecture());
+    return true;
+}
----------------
Can the ELF core really not figure out what its executable is? Shouldn't it be filling in info.m_executable by calling info.SetExecutableFile(...)?

================
Comment at: source/Target/Process.cpp:6487
@@ +6486,3 @@
+{
+    return GetTarget().GetPlatform()->GetProcessInfo(GetID(), info);
+}
----------------
We should probably be extra safe here and do:

```
PlatformSP platform_sp = GetTarget().GetPlatform();
if (platform_sp)
    return platform_sp->GetProcessInfo(GetID(), info);
else
    return false;
```


http://reviews.llvm.org/D18697





More information about the lldb-commits mailing list