chromium/v8/src/diagnostics/eh-frame.cc

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/diagnostics/eh-frame.h"

#include <iomanip>
#include <ostream>

#include "src/codegen/code-desc.h"

#if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_ARM) &&     \
    !defined(V8_TARGET_ARCH_ARM64) && !defined(V8_TARGET_ARCH_S390X) && \
    !defined(V8_TARGET_ARCH_PPC64)

// Placeholders for unsupported architectures.

namespace v8 {
namespace internal {

const int EhFrameConstants::kCodeAlignmentFactor = 1;
const int EhFrameConstants::kDataAlignmentFactor = 1;

void EhFrameWriter::WriteReturnAddressRegisterCode() { UNIMPLEMENTED(); }

void EhFrameWriter::WriteInitialStateInCie() { UNIMPLEMENTED(); }

int EhFrameWriter::RegisterToDwarfCode(Register) {
  UNIMPLEMENTED();
}

#ifdef ENABLE_DISASSEMBLER

const char* EhFrameDisassembler::DwarfRegisterCodeToString(int) {
  UNIMPLEMENTED();
}

#endif

}  // namespace internal
}  // namespace v8

#endif

namespace v8 {
namespace internal {

STATIC_CONST_MEMBER_DEFINITION const int
    EhFrameConstants::kEhFrameTerminatorSize;
STATIC_CONST_MEMBER_DEFINITION const int EhFrameConstants::kEhFrameHdrVersion;
STATIC_CONST_MEMBER_DEFINITION const int EhFrameConstants::kEhFrameHdrSize;

STATIC_CONST_MEMBER_DEFINITION const uint32_t EhFrameWriter::kInt32Placeholder;

// static
void EhFrameWriter::WriteEmptyEhFrame(std::ostream& stream) {}

EhFrameWriter::EhFrameWriter(Zone* zone)
    :{}

void EhFrameWriter::Initialize() {}

void EhFrameWriter::WriteCie() {}

void EhFrameWriter::WriteFdeHeader() {}

void EhFrameWriter::WriteEhFrameHdr(int code_size) {}

void EhFrameWriter::WritePaddingToAlignedSize(int unpadded_size) {}

void EhFrameWriter::AdvanceLocation(int pc_offset) {}

void EhFrameWriter::SetBaseAddressOffset(int base_offset) {}

void EhFrameWriter::SetBaseAddressRegister(Register base_register) {}

void EhFrameWriter::SetBaseAddressRegisterAndOffset(Register base_register,
                                                    int base_offset) {}

void EhFrameWriter::RecordRegisterSavedToStack(int dwarf_register_code,
                                               int offset) {}

void EhFrameWriter::RecordRegisterNotModified(Register name) {}

void EhFrameWriter::RecordRegisterNotModified(int dwarf_register_code) {}

void EhFrameWriter::RecordRegisterFollowsInitialRule(Register name) {}

void EhFrameWriter::RecordRegisterFollowsInitialRule(int dwarf_register_code) {}

void EhFrameWriter::Finish(int code_size) {}

void EhFrameWriter::GetEhFrame(CodeDesc* desc) {}

void EhFrameWriter::WriteULeb128(uint32_t value) {}

void EhFrameWriter::WriteSLeb128(int32_t value) {}

uint32_t EhFrameIterator::GetNextULeb128() {}

int32_t EhFrameIterator::GetNextSLeb128() {}

// static
uint32_t EhFrameIterator::DecodeULeb128(const uint8_t* encoded,
                                        int* encoded_size) {}

// static
int32_t EhFrameIterator::DecodeSLeb128(const uint8_t* encoded,
                                       int* encoded_size) {}

#ifdef ENABLE_DISASSEMBLER

namespace {

class V8_NODISCARD StreamModifiersScope final {};

}  // namespace

// static
void EhFrameDisassembler::DumpDwarfDirectives(std::ostream& stream,
                                              const uint8_t* start,
                                              const uint8_t* end) {}

void EhFrameDisassembler::DisassembleToStream(std::ostream& stream) {}

#endif

}  // namespace internal
}  // namespace v8