LLDB mainline
GenericFilesystem.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "Generic.h"
10
11using namespace lldb;
12using namespace lldb_private;
13
15 ValueObject &valobj, Stream &stream, const TypeSummaryOptions &) {
16 ValueObjectSP path_sp = valobj.GetChildMemberWithName("_Text");
17 if (!path_sp)
18 path_sp = valobj.GetChildMemberWithName("_M_pathname");
19 if (!path_sp)
20 return false;
21
22 if (const char *summary = path_sp->GetSummaryAsCString()) {
23 stream << summary;
24 return true;
25 }
26 return false;
27}
A stream class that can stream formatted output to a file.
Definition Stream.h:28
virtual lldb::ValueObjectSP GetChildMemberWithName(llvm::StringRef name, bool can_create=true)
bool GenericFilesystemPathSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP