summaryrefslogtreecommitdiff
path: root/base/loader/symtab.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-11-20 18:42:12 -0500
committerNathan Binkert <binkertn@umich.edu>2005-11-20 18:42:12 -0500
commit63bb46b6d8028ed9c759e4bd0822dd2ad25c926b (patch)
tree1d0a4d619ff214a92a448d06d78301dbb4aebb50 /base/loader/symtab.hh
parent4e393f38ec9f3995a8fbd61ffdb0fd6da40b2ee1 (diff)
downloadgem5-63bb46b6d8028ed9c759e4bd0822dd2ad25c926b.tar.xz
Serialize the symbol tables
base/loader/symtab.cc: Add support for clearing out the symbol table Add support for serializing the symbol table (clear on unserialize) Don't allow empty symbols to be entered into the table base/loader/symtab.hh: Add support for clearing out the symbol table Add support for serializing the symbol table sim/system.cc: Serialize the kernel, console, and palcode symbol tables so that we can capture any dynamic symbols that are added and so that we don't have to have the same kernel binary around to get the symbols right --HG-- extra : convert_revision : 779888c88aa530f3adcd37dc7600a335951d05f7
Diffstat (limited to 'base/loader/symtab.hh')
-rw-r--r--base/loader/symtab.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/loader/symtab.hh b/base/loader/symtab.hh
index dce3c978e..324fd8b45 100644
--- a/base/loader/symtab.hh
+++ b/base/loader/symtab.hh
@@ -29,9 +29,12 @@
#ifndef __SYMTAB_HH__
#define __SYMTAB_HH__
+#include <iosfwd>
#include <map>
+
#include "targetarch/isa_traits.hh" // for Addr
+class Checkpoint;
class SymbolTable
{
public:
@@ -61,6 +64,7 @@ class SymbolTable
SymbolTable(const std::string &file) { load(file); }
~SymbolTable() {}
+ void clear();
bool insert(Addr address, std::string symbol);
bool load(const std::string &file);
@@ -68,6 +72,11 @@ class SymbolTable
const STable &getSymbolTable() const { return symbolTable; }
public:
+ void serialize(const std::string &base, std::ostream &os);
+ void unserialize(const std::string &base, Checkpoint *cp,
+ const std::string &section);
+
+ public:
bool
findSymbol(Addr address, std::string &symbol) const
{