LLDB  mainline
Functions | Variables
TSanRuntime.cpp File Reference
#include "TSanRuntime.h"
#include "Plugins/Process/Utility/HistoryThread.h"
#include "lldb/Breakpoint/StoppointCallbackContext.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Expression/UserExpression.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Symbol/Variable.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/InstrumentationRuntimeStopInfo.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/StopInfo.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/RegularExpression.h"
#include "lldb/Utility/Stream.h"
#include <memory>
Include dependency graph for TSanRuntime.cpp:

Go to the source code of this file.

Functions

static StructuredData::ArrayCreateStackTrace (ValueObjectSP o, const std::string &trace_item_name=".trace")
 
static StructuredData::ArrayConvertToStructuredArray (ValueObjectSP return_value_sp, const std::string &items_name, const std::string &count_name, std::function< void(ValueObjectSP o, StructuredData::Dictionary *dict)> const &callback)
 
static std::string RetrieveString (ValueObjectSP return_value_sp, ProcessSP process_sp, const std::string &expression_path)
 
static void GetRenumberedThreadIds (ProcessSP process_sp, ValueObjectSP data, std::map< uint64_t, user_id_t > &thread_id_map)
 
static user_id_t Renumber (uint64_t id, std::map< uint64_t, user_id_t > &thread_id_map)
 
static std::string Sprintf (const char *format,...)
 
static std::string GetSymbolNameFromAddress (ProcessSP process_sp, addr_t addr)
 
static void GetSymbolDeclarationFromAddress (ProcessSP process_sp, addr_t addr, Declaration &decl)
 
static std::string GenerateThreadName (const std::string &path, StructuredData::Object *o, StructuredData::ObjectSP main_info)
 
static void AddThreadsForPath (const std::string &path, ThreadCollectionSP threads, ProcessSP process_sp, StructuredData::ObjectSP info)
 

Variables

const char * thread_sanitizer_retrieve_report_data_prefix
 
const char * thread_sanitizer_retrieve_report_data_command
 

Function Documentation

◆ AddThreadsForPath()

static void AddThreadsForPath ( const std::string &  path,
ThreadCollectionSP  threads,
ProcessSP  process_sp,
StructuredData::ObjectSP  info 
)
static

◆ ConvertToStructuredArray()

static StructuredData::Array* ConvertToStructuredArray ( ValueObjectSP  return_value_sp,
const std::string &  items_name,
const std::string &  count_name,
std::function< void(ValueObjectSP o, StructuredData::Dictionary *dict)> const &  callback 
)
static

Definition at line 229 of file TSanRuntime.cpp.

References lldb_private::StructuredData::Array::AddItem().

Referenced by GetRenumberedThreadIds(), and Renumber().

◆ CreateStackTrace()

static StructuredData::Array* CreateStackTrace ( ValueObjectSP  o,
const std::string &  trace_item_name = ".trace" 
)
static

Definition at line 212 of file TSanRuntime.cpp.

References lldb_private::StructuredData::Array::AddItem().

Referenced by Renumber().

◆ GenerateThreadName()

static std::string GenerateThreadName ( const std::string &  path,
StructuredData::Object o,
StructuredData::ObjectSP  main_info 
)
static

◆ GetRenumberedThreadIds()

static void GetRenumberedThreadIds ( ProcessSP  process_sp,
ValueObjectSP  data,
std::map< uint64_t, user_id_t > &  thread_id_map 
)
static

Definition at line 264 of file TSanRuntime.cpp.

References ConvertToStructuredArray().

Referenced by Renumber().

◆ GetSymbolDeclarationFromAddress()

static void GetSymbolDeclarationFromAddress ( ProcessSP  process_sp,
addr_t  addr,
Declaration decl 
)
static

◆ GetSymbolNameFromAddress()

static std::string GetSymbolNameFromAddress ( ProcessSP  process_sp,
addr_t  addr 
)
static

◆ Renumber()

static user_id_t Renumber ( uint64_t  id,
std::map< uint64_t, user_id_t > &  thread_id_map 
)
static

◆ RetrieveString()

static std::string RetrieveString ( ValueObjectSP  return_value_sp,
ProcessSP  process_sp,
const std::string &  expression_path 
)
static

Definition at line 251 of file TSanRuntime.cpp.

Referenced by Renumber().

◆ Sprintf()

static std::string Sprintf ( const char *  format,
  ... 
)
static

Variable Documentation

◆ thread_sanitizer_retrieve_report_data_command

const char* thread_sanitizer_retrieve_report_data_command

Definition at line 162 of file TSanRuntime.cpp.

Referenced by Renumber().

◆ thread_sanitizer_retrieve_report_data_prefix

const char* thread_sanitizer_retrieve_report_data_prefix

Definition at line 63 of file TSanRuntime.cpp.

Referenced by Renumber().