llvm/lldb/source/Symbol/Symbol.cpp

//===-- Symbol.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/Symbol.h"

#include "lldb/Core/Address.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/Section.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Symtab.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/DataEncoder.h"
#include "lldb/Utility/Stream.h"
#include "llvm/ADT/StringSwitch.h"

usingnamespacelldb;
usingnamespacelldb_private;

Symbol::Symbol()
    :{}

Symbol::Symbol(uint32_t symID, llvm::StringRef name, SymbolType type,
               bool external, bool is_debug, bool is_trampoline,
               bool is_artificial, const lldb::SectionSP &section_sp,
               addr_t offset, addr_t size, bool size_is_valid,
               bool contains_linker_annotations, uint32_t flags)
    :{}

Symbol::Symbol(uint32_t symID, const Mangled &mangled, SymbolType type,
               bool external, bool is_debug, bool is_trampoline,
               bool is_artificial, const AddressRange &range,
               bool size_is_valid, bool contains_linker_annotations,
               uint32_t flags)
    :{}

Symbol::Symbol(const Symbol &rhs)
    :{}

const Symbol &Symbol::operator=(const Symbol &rhs) {}

llvm::Expected<Symbol> Symbol::FromJSON(const JSONSymbol &symbol,
                                        SectionList *section_list) {}

void Symbol::Clear() {}

bool Symbol::ValueIsAddress() const {}

ConstString Symbol::GetDisplayName() const {}

ConstString Symbol::GetReExportedSymbolName() const {}

FileSpec Symbol::GetReExportedSymbolSharedLibrary() const {}

void Symbol::SetReExportedSymbolName(ConstString name) {}

bool Symbol::SetReExportedSymbolSharedLibrary(const FileSpec &fspec) {}

uint32_t Symbol::GetSiblingIndex() const {}

bool Symbol::IsTrampoline() const {}

bool Symbol::IsIndirect() const {}

void Symbol::GetDescription(
    Stream *s, lldb::DescriptionLevel level, Target *target,
    std::optional<Stream::HighlightSettings> settings) const {}

void Symbol::Dump(Stream *s, Target *target, uint32_t index,
                  Mangled::NamePreference name_preference) const {}

uint32_t Symbol::GetPrologueByteSize() {}

bool Symbol::Compare(ConstString name, SymbolType type) const {}

#define ENUM_TO_CSTRING(x)

const char *Symbol::GetTypeAsString() const {}

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

ModuleSP Symbol::CalculateSymbolContextModule() {}

Symbol *Symbol::CalculateSymbolContextSymbol() {}

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

lldb::addr_t Symbol::GetByteSize() const {}

Symbol *Symbol::ResolveReExportedSymbolInModuleSpec(
    Target &target, ConstString &reexport_name, ModuleSpec &module_spec,
    ModuleList &seen_modules) const {}

Symbol *Symbol::ResolveReExportedSymbol(Target &target) const {}

lldb::addr_t Symbol::GetFileAddress() const {}

lldb::addr_t Symbol::GetLoadAddress(Target *target) const {}

ConstString Symbol::GetName() const {}

ConstString Symbol::GetNameNoArguments() const {}

lldb::addr_t Symbol::ResolveCallableAddress(Target &target) const {}

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

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

bool Symbol::ContainsFileAddress(lldb::addr_t file_addr) const {}

bool Symbol::IsSyntheticWithAutoGeneratedName() const {}

void Symbol::SynthesizeNameIfNeeded() const {}

bool Symbol::Decode(const DataExtractor &data, lldb::offset_t *offset_ptr,
                    const SectionList *section_list,
                    const StringTableReader &strtab) {}

/// The encoding format for the symbol is as follows:
///
/// uint32_t m_uid;
/// uint16_t m_type_data;
/// uint16_t bitfield_data;
/// Mangled mangled;
/// uint8_t is_addr;
/// uint64_t file_addr_or_value;
/// uint64_t size;
/// uint32_t flags;
///
/// The only tricky thing in this encoding is encoding all of the bits in the
/// bitfields. We use a trick to store all bitfields as a 16 bit value and we
/// do the same thing when decoding the symbol. There are test that ensure this
/// encoding works for each individual bit. Everything else is very easy to
/// store.
void Symbol::Encode(DataEncoder &file, ConstStringTable &strtab) const {}

bool Symbol::operator==(const Symbol &rhs) const {}

namespace llvm {
namespace json {

bool fromJSON(const llvm::json::Value &value, lldb_private::JSONSymbol &symbol,
              llvm::json::Path path) {}

bool fromJSON(const llvm::json::Value &value, lldb::SymbolType &type,
              llvm::json::Path path) {}
} // namespace json
} // namespace llvm