LLDB  mainline
Functions | Variables
UBSanRuntime.cpp File Reference
#include "UBSanRuntime.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 <ctype.h>
#include <memory>
Include dependency graph for UBSanRuntime.cpp:

Go to the source code of this file.

Functions

static addr_t RetrieveUnsigned (ValueObjectSP return_value_sp, ProcessSP process_sp, const std::string &expression_path)
 
static std::string RetrieveString (ValueObjectSP return_value_sp, ProcessSP process_sp, const std::string &expression_path)
 
static std::string GetStopReasonDescription (StructuredData::ObjectSP report)
 

Variables

static const char * ub_sanitizer_retrieve_report_data_prefix
 
static const char * ub_sanitizer_retrieve_report_data_command
 

Function Documentation

◆ GetStopReasonDescription()

static std::string GetStopReasonDescription ( StructuredData::ObjectSP  report)
static

◆ RetrieveString()

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

◆ RetrieveUnsigned()

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

Definition at line 96 of file UBSanRuntime.cpp.

Referenced by RetrieveString().

Variable Documentation

◆ ub_sanitizer_retrieve_report_data_command

const char* ub_sanitizer_retrieve_report_data_command
static
Initial value:
= R"(
data t;
__ubsan_get_current_report_data(&t.issue_kind, &t.message, &t.filename, &t.line,
&t.col, &t.memory_addr);
t;
)"

Definition at line 89 of file UBSanRuntime.cpp.

Referenced by RetrieveString().

◆ ub_sanitizer_retrieve_report_data_prefix

const char* ub_sanitizer_retrieve_report_data_prefix
static
Initial value:
= R"(
extern "C" {
void
__ubsan_get_current_report_data(const char **OutIssueKind,
const char **OutMessage, const char **OutFilename, unsigned *OutLine,
unsigned *OutCol, char **OutMemoryAddr);
}
struct data {
const char *issue_kind;
const char *message;
const char *filename;
unsigned line;
unsigned col;
char *memory_addr;
};
)"

Definition at line 71 of file UBSanRuntime.cpp.

Referenced by RetrieveString().