diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 512b5bebf07f..83cf9f8bd269 100644 --- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -1,4 +1,4 @@ -//===-- ObjectContainerBSDArchive.cpp ---------------------------*- C++ -*-===// +//===-- ObjectContainerBSDArchive.cpp -------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -40,6 +40,8 @@ typedef struct ar_hdr { using namespace lldb; using namespace lldb_private; +LLDB_PLUGIN_DEFINE(ObjectContainerBSDArchive) + ObjectContainerBSDArchive::Object::Object() : ar_name(), modification_time(0), uid(0), gid(0), mode(0), size(0), file_offset(0), file_size(0) {} @@ -86,7 +88,7 @@ ObjectContainerBSDArchive::Object::Extract(const DataExtractor &data, return LLDB_INVALID_OFFSET; str.assign((const char *)data.GetData(&offset, 16), 16); - if (str.find("#1/") == 0) { + if (llvm::StringRef(str).startswith("#1/")) { // If the name is longer than 16 bytes, or contains an embedded space then // it will use this format where the length of the name is here and the // name characters are after this header. |