blob: 55f66ccb17d97da26c1f1ffa055e3a7aec107f15 [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 <cstdint>
#include <string>
#include <vector>
#include <zircon/types.h>
#include "src/lib/fxl/macros.h"
namespace debugger_utils {
struct LoadMap {
zx_koid_t pid;
uint64_t base_addr;
uint64_t load_addr;
uint64_t end_addr;
std::string name;
std::string so_name;
std::string build_id;
class LoadMapTable {
LoadMapTable() = default;
bool ReadLogListenerOutput(const std::string& file);
const LoadMap* LookupLoadMap(zx_koid_t pid, uint64_t addr);
void Clear();
void AddLoadMap(const LoadMap& map);
std::vector<LoadMap> maps_;
} // namespace debugger_utils