blob: f8d106f42bc62804b2e9284ef00540819f566b53 [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include "byte_block.h"
namespace debugger_utils {
// The API for accessing a file via the "byte block" interface.
// This is a fixed size block of contiguous bytes.
class FileByteBlock final : public ByteBlock {
// This consumes fd;
explicit FileByteBlock(int fd);
bool Read(uintptr_t address, void* out_buffer, size_t length) const override;
bool Write(uintptr_t address, const void* buffer, size_t length) const override;
int fd_;
} // namespace debugger_utils