LLDB mainline
Trace.cpp File Reference
#include "lldb/Target/Trace.h"
#include "llvm/Support/Format.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Stream.h"
#include <optional>

Go to the source code of this file.

Classes

struct  JSONSimpleTraceBundleDescription

Namespaces

namespace  llvm
namespace  llvm::json

Functions

bool llvm::json::fromJSON (const Value &value, JSONSimpleTraceBundleDescription &bundle, Path path)
static Error createInvalidPlugInError (StringRef plugin_name)
template<typename V>
static std::optional< V > Lookup (StringMap< V > &map, StringRef k)
 Helper functions for fetching data in maps and returning Optionals or pointers instead of iterators for simplicity.
template<typename V>
static V * LookupAsPtr (StringMap< V > &map, StringRef k)
template<typename K, typename V>
static std::optional< V > Lookup (DenseMap< K, StringMap< V > > &map, K k1, StringRef k2)
 Similar to the methods above but it looks for an item in a map of maps.
template<typename K, typename V>
static V * LookupAsPtr (DenseMap< K, StringMap< V > > &map, K k1, StringRef k2)
 Similar to the methods above but it looks for an item in a map of maps.

Function Documentation

◆ createInvalidPlugInError()

◆ Lookup() [1/2]

template<typename K, typename V>
std::optional< V > Lookup ( DenseMap< K, StringMap< V > > & map,
K k1,
StringRef k2 )
static

Similar to the methods above but it looks for an item in a map of maps.

Definition at line 69 of file Trace.cpp.

References Lookup().

◆ Lookup() [2/2]

template<typename V>
std::optional< V > Lookup ( StringMap< V > & map,
StringRef k )
static

Helper functions for fetching data in maps and returning Optionals or pointers instead of iterators for simplicity.

It's worth mentioning that the Optionals version can't return the inner data by reference because of limitations in move constructors.

Definition at line 53 of file Trace.cpp.

Referenced by lldb_private::Trace::GetLiveCpuBinaryDataSize(), lldb_private::Trace::GetLiveProcessBinaryDataSize(), lldb_private::Trace::GetLiveThreadBinaryDataSize(), lldb_private::Trace::GetPostMortemCpuDataFile(), lldb_private::Trace::GetPostMortemThreadDataFile(), and Lookup().

◆ LookupAsPtr() [1/2]

template<typename K, typename V>
V * LookupAsPtr ( DenseMap< K, StringMap< V > > & map,
K k1,
StringRef k2 )
static

Similar to the methods above but it looks for an item in a map of maps.

Definition at line 79 of file Trace.cpp.

References LookupAsPtr().

◆ LookupAsPtr() [2/2]

template<typename V>
V * LookupAsPtr ( StringMap< V > & map,
StringRef k )
static

Definition at line 60 of file Trace.cpp.

Referenced by LookupAsPtr(), and lldb_private::Trace::OnLiveCpuBinaryDataRead().