[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 20 16:03:21 PDT 2017


krytarowski added inline comments.


================
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:588
+      }
+    } else if (strncmp(note.n_name.c_str(), "OpenBSD", 7) == 0) {
+      m_os = llvm::Triple::OpenBSD;
----------------
kettenis wrote:
> krytarowski wrote:
> > `note.n_name == "OpenBSD"` ?
> That wouldn't work. The notes describing the registers have the thread ID attached to this name, i.e. "OpenBSD at 250037".  I'll need to parse that string to make core dumps of multi-threaded processes work later.
I would change it o `string::substr` to make it more clear that it's not just secure comparison of a string. A comment explaining it for those not familiar with OpenBSD internals would be nice.


Repository:
  rL LLVM

https://reviews.llvm.org/D31131





More information about the lldb-commits mailing list