LLDB mainline
Functions | Variables
MemoryHistoryASan.cpp File Reference
#include "MemoryHistoryASan.h"
#include "lldb/Target/MemoryHistory.h"
#include "Plugins/Process/Utility/HistoryThread.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Expression/UserExpression.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadList.h"
#include "lldb/ValueObject/ValueObject.h"
#include "lldb/lldb-private.h"
#include <sstream>

Go to the source code of this file.

Functions

static void CreateHistoryThreadFromValueObject (ProcessSP process_sp, ValueObjectSP return_value_sp, const char *type, const char *thread_name, HistoryThreads &result)
 

Variables

const char * memory_history_asan_command_prefix
 
const char * memory_history_asan_command_format
 

Function Documentation

◆ CreateHistoryThreadFromValueObject()

static void CreateHistoryThreadFromValueObject ( ProcessSP  process_sp,
ValueObjectSP  return_value_sp,
const char *  type,
const char *  thread_name,
HistoryThreads result 
)
static

Variable Documentation

◆ memory_history_asan_command_format

const char* memory_history_asan_command_format
Initial value:
=
R"(
struct {
void *alloc_trace[256];
size_t alloc_count;
int alloc_tid;
void *free_trace[256];
size_t free_count;
int free_tid;
} t;
t.alloc_count = __asan_get_alloc_stack((void *)0x%)" PRIx64
R"(, t.alloc_trace, 256, &t.alloc_tid);
t.free_count = __asan_get_free_stack((void *)0x%)" PRIx64
R"(, t.free_trace, 256, &t.free_tid);
t;
)"

Definition at line 72 of file MemoryHistoryASan.cpp.

Referenced by lldb_private::MemoryHistoryASan::GetHistoryThreads().

◆ memory_history_asan_command_prefix

const char* memory_history_asan_command_prefix
Initial value:
= R"(
extern "C"
{
size_t __asan_get_alloc_stack(void *addr, void **trace, size_t size, int *thread_id);
size_t __asan_get_free_stack(void *addr, void **trace, size_t size, int *thread_id);
}
)"

Definition at line 64 of file MemoryHistoryASan.cpp.

Referenced by lldb_private::MemoryHistoryASan::GetHistoryThreads().