003 File Manager
Current Path:
/usr/src/contrib/llvm-project/lldb/source/API
usr
/
src
/
contrib
/
llvm-project
/
lldb
/
source
/
API
/
📁
..
📄
SBAddress.cpp
(10.65 KB)
📄
SBAttachInfo.cpp
(10.17 KB)
📄
SBBlock.cpp
(12.18 KB)
📄
SBBreakpoint.cpp
(34.51 KB)
📄
SBBreakpointLocation.cpp
(17.54 KB)
📄
SBBreakpointName.cpp
(23.49 KB)
📄
SBBreakpointOptionCommon.cpp
(2.88 KB)
📄
SBBreakpointOptionCommon.h
(1.22 KB)
📄
SBBroadcaster.cpp
(7.11 KB)
📄
SBCommandInterpreter.cpp
(33.92 KB)
📄
SBCommandInterpreterRunOptions.cpp
(9.99 KB)
📄
SBCommandReturnObject.cpp
(14.87 KB)
📄
SBCommunication.cpp
(7.16 KB)
📄
SBCompileUnit.cpp
(9.25 KB)
📄
SBData.cpp
(23.68 KB)
📄
SBDebugger.cpp
(66.66 KB)
📄
SBDeclaration.cpp
(6.16 KB)
📄
SBEnvironment.cpp
(5.2 KB)
📄
SBError.cpp
(5.64 KB)
📄
SBEvent.cpp
(7.37 KB)
📄
SBExecutionContext.cpp
(5.26 KB)
📄
SBExpressionOptions.cpp
(12.71 KB)
📄
SBFile.cpp
(4.89 KB)
📄
SBFileSpec.cpp
(7.2 KB)
📄
SBFileSpecList.cpp
(4.81 KB)
📄
SBFrame.cpp
(45.55 KB)
📄
SBFunction.cpp
(9.03 KB)
📄
SBHostOS.cpp
(5.96 KB)
📄
SBInstruction.cpp
(12.79 KB)
📄
SBInstructionList.cpp
(7.64 KB)
📄
SBLanguageRuntime.cpp
(1.54 KB)
📄
SBLaunchInfo.cpp
(13.96 KB)
📄
SBLineEntry.cpp
(6.73 KB)
📄
SBListener.cpp
(13.13 KB)
📄
SBMemoryRegionInfo.cpp
(5.4 KB)
📄
SBMemoryRegionInfoList.cpp
(5.09 KB)
📄
SBModule.cpp
(25.85 KB)
📄
SBModuleSpec.cpp
(10.62 KB)
📄
SBPlatform.cpp
(25.5 KB)
📄
SBProcess.cpp
(49.03 KB)
📄
SBProcessInfo.cpp
(5.98 KB)
📄
SBQueue.cpp
(9.86 KB)
📄
SBQueueItem.cpp
(4.36 KB)
📄
SBReproducer.cpp
(7.57 KB)
📄
SBReproducerPrivate.h
(2.07 KB)
📄
SBSection.cpp
(10.38 KB)
📄
SBSourceManager.cpp
(5.84 KB)
📄
SBStream.cpp
(6.95 KB)
📄
SBStringList.cpp
(4.86 KB)
📄
SBStructuredData.cpp
(8.71 KB)
📄
SBSymbol.cpp
(7.6 KB)
📄
SBSymbolContext.cpp
(8.59 KB)
📄
SBSymbolContextList.cpp
(4.58 KB)
📄
SBTarget.cpp
(99.19 KB)
📄
SBThread.cpp
(47.63 KB)
📄
SBThreadCollection.cpp
(3.37 KB)
📄
SBThreadPlan.cpp
(17.19 KB)
📄
SBTrace.cpp
(4.21 KB)
📄
SBTraceOptions.cpp
(5.22 KB)
📄
SBType.cpp
(32.23 KB)
📄
SBTypeCategory.cpp
(24.5 KB)
📄
SBTypeEnumMember.cpp
(7.64 KB)
📄
SBTypeFilter.cpp
(6.8 KB)
📄
SBTypeFormat.cpp
(7.19 KB)
📄
SBTypeNameSpecifier.cpp
(6 KB)
📄
SBTypeSummary.cpp
(17.62 KB)
📄
SBTypeSynthetic.cpp
(7.87 KB)
📄
SBUnixSignals.cpp
(6.29 KB)
📄
SBValue.cpp
(52.5 KB)
📄
SBValueList.cpp
(6.43 KB)
📄
SBVariablesOptions.cpp
(9.41 KB)
📄
SBWatchpoint.cpp
(11.29 KB)
📄
SystemInitializerFull.cpp
(2.24 KB)
📄
SystemInitializerFull.h
(1.08 KB)
📄
Utils.h
(847 B)
📄
liblldb-private.exports
(84 B)
📄
liblldb.exports
(45 B)
📄
liblldb.xcode.exports
(34 B)
Editing: SBReproducer.cpp
//===-- SBReproducer.cpp --------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "SBReproducerPrivate.h" #include "SBReproducerPrivate.h" #include "lldb/API/LLDB.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBAttachInfo.h" #include "lldb/API/SBBlock.h" #include "lldb/API/SBBreakpoint.h" #include "lldb/API/SBCommandInterpreter.h" #include "lldb/API/SBCommandInterpreterRunOptions.h" #include "lldb/API/SBData.h" #include "lldb/API/SBDebugger.h" #include "lldb/API/SBDeclaration.h" #include "lldb/API/SBError.h" #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBHostOS.h" #include "lldb/API/SBReproducer.h" #include "lldb/Host/FileSystem.h" #include "lldb/lldb-private.h" using namespace lldb; using namespace lldb_private; using namespace lldb_private::repro; SBRegistry::SBRegistry() { Registry &R = *this; RegisterMethods<SBAddress>(R); RegisterMethods<SBAttachInfo>(R); RegisterMethods<SBBlock>(R); RegisterMethods<SBBreakpoint>(R); RegisterMethods<SBBreakpointList>(R); RegisterMethods<SBBreakpointLocation>(R); RegisterMethods<SBBreakpointName>(R); RegisterMethods<SBBroadcaster>(R); RegisterMethods<SBCommandInterpreter>(R); RegisterMethods<SBCommandInterpreterRunOptions>(R); RegisterMethods<SBCommandReturnObject>(R); RegisterMethods<SBCommunication>(R); RegisterMethods<SBCompileUnit>(R); RegisterMethods<SBData>(R); RegisterMethods<SBDebugger>(R); RegisterMethods<SBDeclaration>(R); RegisterMethods<SBEnvironment>(R); RegisterMethods<SBError>(R); RegisterMethods<SBEvent>(R); RegisterMethods<SBExecutionContext>(R); RegisterMethods<SBExpressionOptions>(R); RegisterMethods<SBFile>(R); RegisterMethods<SBFileSpec>(R); RegisterMethods<SBFileSpecList>(R); RegisterMethods<SBFrame>(R); RegisterMethods<SBFunction>(R); RegisterMethods<SBHostOS>(R); RegisterMethods<SBInputReader>(R); RegisterMethods<SBInstruction>(R); RegisterMethods<SBInstructionList>(R); RegisterMethods<SBLanguageRuntime>(R); RegisterMethods<SBLaunchInfo>(R); RegisterMethods<SBLineEntry>(R); RegisterMethods<SBListener>(R); RegisterMethods<SBMemoryRegionInfo>(R); RegisterMethods<SBMemoryRegionInfoList>(R); RegisterMethods<SBModule>(R); RegisterMethods<SBModuleSpec>(R); RegisterMethods<SBPlatform>(R); RegisterMethods<SBPlatformConnectOptions>(R); RegisterMethods<SBPlatformShellCommand>(R); RegisterMethods<SBProcess>(R); RegisterMethods<SBProcessInfo>(R); RegisterMethods<SBQueue>(R); RegisterMethods<SBQueueItem>(R); RegisterMethods<SBSection>(R); RegisterMethods<SBSourceManager>(R); RegisterMethods<SBStream>(R); RegisterMethods<SBStringList>(R); RegisterMethods<SBStructuredData>(R); RegisterMethods<SBSymbol>(R); RegisterMethods<SBSymbolContext>(R); RegisterMethods<SBSymbolContextList>(R); RegisterMethods<SBTarget>(R); RegisterMethods<SBThread>(R); RegisterMethods<SBThreadCollection>(R); RegisterMethods<SBThreadPlan>(R); RegisterMethods<SBTrace>(R); RegisterMethods<SBTraceOptions>(R); RegisterMethods<SBType>(R); RegisterMethods<SBTypeCategory>(R); RegisterMethods<SBTypeEnumMember>(R); RegisterMethods<SBTypeFilter>(R); RegisterMethods<SBTypeFormat>(R); RegisterMethods<SBTypeNameSpecifier>(R); RegisterMethods<SBTypeSummary>(R); RegisterMethods<SBTypeSummaryOptions>(R); RegisterMethods<SBTypeSynthetic>(R); RegisterMethods<SBUnixSignals>(R); RegisterMethods<SBValue>(R); RegisterMethods<SBValueList>(R); RegisterMethods<SBVariablesOptions>(R); RegisterMethods<SBWatchpoint>(R); } const char *SBReproducer::Capture() { static std::string error; if (auto e = Reproducer::Initialize(ReproducerMode::Capture, llvm::None)) { error = llvm::toString(std::move(e)); return error.c_str(); } if (auto *g = lldb_private::repro::Reproducer::Instance().GetGenerator()) { auto &p = g->GetOrCreate<SBProvider>(); InstrumentationData::Initialize(p.GetSerializer(), p.GetRegistry()); } return nullptr; } const char *SBReproducer::Capture(const char *path) { static std::string error; if (auto e = Reproducer::Initialize(ReproducerMode::Capture, FileSpec(path))) { error = llvm::toString(std::move(e)); return error.c_str(); } if (auto *g = lldb_private::repro::Reproducer::Instance().GetGenerator()) { auto &p = g->GetOrCreate<SBProvider>(); InstrumentationData::Initialize(p.GetSerializer(), p.GetRegistry()); } return nullptr; } const char *SBReproducer::PassiveReplay(const char *path) { static std::string error; if (auto e = Reproducer::Initialize(ReproducerMode::PassiveReplay, FileSpec(path))) { error = llvm::toString(std::move(e)); return error.c_str(); } if (auto *l = lldb_private::repro::Reproducer::Instance().GetLoader()) { FileSpec file = l->GetFile<SBProvider::Info>(); auto error_or_file = llvm::MemoryBuffer::getFile(file.GetPath()); if (!error_or_file) { error = "unable to read SB API data: " + error_or_file.getError().message(); return error.c_str(); } static ReplayData r(std::move(*error_or_file)); InstrumentationData::Initialize(r.GetDeserializer(), r.GetRegistry()); } return nullptr; } const char *SBReproducer::Replay(const char *path) { return SBReproducer::Replay(path, false); } const char *SBReproducer::Replay(const char *path, bool skip_version_check) { static std::string error; if (auto e = Reproducer::Initialize(ReproducerMode::Replay, FileSpec(path))) { error = llvm::toString(std::move(e)); return error.c_str(); } repro::Loader *loader = repro::Reproducer::Instance().GetLoader(); if (!loader) { error = "unable to get replay loader."; return error.c_str(); } if (!skip_version_check) { llvm::Expected<std::string> version = loader->LoadBuffer<VersionProvider>(); if (!version) { error = llvm::toString(version.takeError()); return error.c_str(); } if (lldb_private::GetVersion() != llvm::StringRef(*version).rtrim()) { error = "reproducer capture and replay version don't match:\n"; error.append("reproducer captured with:\n"); error.append(*version); error.append("reproducer replayed with:\n"); error.append(lldb_private::GetVersion()); return error.c_str(); } } FileSpec file = loader->GetFile<SBProvider::Info>(); if (!file) { error = "unable to get replay data from reproducer."; return error.c_str(); } SBRegistry registry; registry.Replay(file); return nullptr; } bool SBReproducer::Generate() { auto &r = Reproducer::Instance(); if (auto generator = r.GetGenerator()) { generator->Keep(); return true; } return false; } bool SBReproducer::SetAutoGenerate(bool b) { auto &r = Reproducer::Instance(); if (auto generator = r.GetGenerator()) { generator->SetAutoGenerate(b); return true; } return false; } const char *SBReproducer::GetPath() { static std::string path; auto &r = Reproducer::Instance(); path = r.GetReproducerPath().GetCString(); return path.c_str(); } void SBReproducer::SetWorkingDirectory(const char *path) { if (auto *g = lldb_private::repro::Reproducer::Instance().GetGenerator()) { g->GetOrCreate<WorkingDirectoryProvider>().Update(path); } } char lldb_private::repro::SBProvider::ID = 0; const char *SBProvider::Info::name = "sbapi"; const char *SBProvider::Info::file = "sbapi.bin";
Upload File
Create Folder