llvm/lldb/source/Symbol/Function.cpp

//===-- Function.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 "lldb/Symbol/Function.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Disassembler.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/Section.h"
#include "lldb/Host/Host.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/LineTable.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "llvm/Support/Casting.h"

usingnamespacelldb;
usingnamespacelldb_private;

// Basic function information is contained in the FunctionInfo class. It is
// designed to contain the name, linkage name, and declaration location.
FunctionInfo::FunctionInfo(const char *name, const Declaration *decl_ptr)
    :{}

FunctionInfo::FunctionInfo(ConstString name, const Declaration *decl_ptr)
    :{}

FunctionInfo::~FunctionInfo() = default;

void FunctionInfo::Dump(Stream *s, bool show_fullpaths) const {}

int FunctionInfo::Compare(const FunctionInfo &a, const FunctionInfo &b) {}

Declaration &FunctionInfo::GetDeclaration() {}

const Declaration &FunctionInfo::GetDeclaration() const {}

ConstString FunctionInfo::GetName() const {}

size_t FunctionInfo::MemorySize() const {}

InlineFunctionInfo::InlineFunctionInfo(const char *name,
                                       llvm::StringRef mangled,
                                       const Declaration *decl_ptr,
                                       const Declaration *call_decl_ptr)
    :{}

InlineFunctionInfo::InlineFunctionInfo(ConstString name,
                                       const Mangled &mangled,
                                       const Declaration *decl_ptr,
                                       const Declaration *call_decl_ptr)
    :{}

InlineFunctionInfo::~InlineFunctionInfo() = default;

void InlineFunctionInfo::Dump(Stream *s, bool show_fullpaths) const {}

void InlineFunctionInfo::DumpStopContext(Stream *s) const {}

ConstString InlineFunctionInfo::GetName() const {}

ConstString InlineFunctionInfo::GetDisplayName() const {}

Declaration &InlineFunctionInfo::GetCallSite() {}

const Declaration &InlineFunctionInfo::GetCallSite() const {}

Mangled &InlineFunctionInfo::GetMangled() {}

const Mangled &InlineFunctionInfo::GetMangled() const {}

size_t InlineFunctionInfo::MemorySize() const {}

/// @name Call site related structures
/// @{

CallEdge::~CallEdge() = default;

CallEdge::CallEdge(AddrType caller_address_type, lldb::addr_t caller_address,
                   bool is_tail_call, CallSiteParameterArray &&parameters)
    :{}

lldb::addr_t CallEdge::GetLoadAddress(lldb::addr_t unresolved_pc,
                                      Function &caller, Target &target) {}

lldb::addr_t CallEdge::GetReturnPCAddress(Function &caller,
                                          Target &target) const {}

void DirectCallEdge::ParseSymbolFileAndResolve(ModuleList &images) {}

DirectCallEdge::DirectCallEdge(const char *symbol_name,
                               AddrType caller_address_type,
                               lldb::addr_t caller_address, bool is_tail_call,
                               CallSiteParameterArray &&parameters)
    :{}

Function *DirectCallEdge::GetCallee(ModuleList &images, ExecutionContext &) {}

IndirectCallEdge::IndirectCallEdge(DWARFExpressionList call_target,
                                   AddrType caller_address_type,
                                   lldb::addr_t caller_address,
                                   bool is_tail_call,
                                   CallSiteParameterArray &&parameters)
    :{}

Function *IndirectCallEdge::GetCallee(ModuleList &images,
                                      ExecutionContext &exe_ctx) {}

/// @}

//
Function::Function(CompileUnit *comp_unit, lldb::user_id_t func_uid,
                   lldb::user_id_t type_uid, const Mangled &mangled, Type *type,
                   const AddressRange &range)
    :{}

Function::~Function() = default;

void Function::GetStartLineSourceInfo(FileSpec &source_file,
                                      uint32_t &line_no) {}

void Function::GetEndLineSourceInfo(FileSpec &source_file, uint32_t &line_no) {}

llvm::ArrayRef<std::unique_ptr<CallEdge>> Function::GetCallEdges() {}

llvm::ArrayRef<std::unique_ptr<CallEdge>> Function::GetTailCallingEdges() {}

CallEdge *Function::GetCallEdgeForReturnAddress(addr_t return_pc,
                                                Target &target) {}

Block &Function::GetBlock(bool can_create) {}

CompileUnit *Function::GetCompileUnit() {}

const CompileUnit *Function::GetCompileUnit() const {}

void Function::GetDescription(Stream *s, lldb::DescriptionLevel level,
                              Target *target) {}

void Function::Dump(Stream *s, bool show_context) const {}

void Function::CalculateSymbolContext(SymbolContext *sc) {}

ModuleSP Function::CalculateSymbolContextModule() {}

CompileUnit *Function::CalculateSymbolContextCompileUnit() {}

Function *Function::CalculateSymbolContextFunction() {}

lldb::DisassemblerSP Function::GetInstructions(const ExecutionContext &exe_ctx,
                                               const char *flavor,
                                               bool prefer_file_cache) {}

bool Function::GetDisassembly(const ExecutionContext &exe_ctx,
                              const char *flavor, Stream &strm,
                              bool prefer_file_cache) {}

// Symbol *
// Function::CalculateSymbolContextSymbol ()
//{
//    return // TODO: find the symbol for the function???
//}

void Function::DumpSymbolContext(Stream *s) {}

size_t Function::MemorySize() const {}

bool Function::GetIsOptimized() {}

bool Function::IsTopLevelFunction() {}

ConstString Function::GetDisplayName() const {}

CompilerDeclContext Function::GetDeclContext() {}

std::vector<CompilerContext> Function::GetCompilerContext() {}

Type *Function::GetType() {}

const Type *Function::GetType() const {}

CompilerType Function::GetCompilerType() {}

uint32_t Function::GetPrologueByteSize() {}

lldb::LanguageType Function::GetLanguage() const {}

ConstString Function::GetName() const {}

ConstString Function::GetNameNoArguments() const {}