From b1816cb83716bf96557a2a36f25f6ca65f20dd8c Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Mon, 15 Nov 2004 20:30:51 -0500 Subject: [PATCH] Minor cleanup of symtab code/includes. base/loader/symtab.cc: base/loader/symtab.hh: Get rid of old unused calls. cpu/simple_cpu/simple_cpu.hh: No need to include base/loader/symtab.hh kern/linux/linux_system.cc: kern/tru64/tru64_system.cc: Include base/loader/symtab.hh (since it's no longer included in system.hh) sim/system.hh: Replace include of base/loader/symtab.hh with forward class decl. --HG-- extra : convert_revision : 3a778c2f409ec94e3b00eaa9b3859943cb39918c --- base/loader/symtab.cc | 16 ---------------- base/loader/symtab.hh | 3 --- cpu/simple_cpu/simple_cpu.hh | 1 - kern/linux/linux_system.cc | 1 + kern/tru64/tru64_system.cc | 1 + sim/system.hh | 2 +- 6 files changed, 3 insertions(+), 21 deletions(-) diff --git a/base/loader/symtab.cc b/base/loader/symtab.cc index c018ae4f8..2a29a8575 100644 --- a/base/loader/symtab.cc +++ b/base/loader/symtab.cc @@ -136,19 +136,3 @@ SymbolTable::findAddress(const string &symbol, Addr &address) const address = (*i).second; return true; } - -string -SymbolTable::find(Addr addr) const -{ - string s; - findSymbol(addr, s); - return s; -} - -Addr -SymbolTable::find(const string &symbol) const -{ - Addr a = 0; - findAddress(symbol, a); - return a; -} diff --git a/base/loader/symtab.hh b/base/loader/symtab.hh index df3783991..5ae29b057 100644 --- a/base/loader/symtab.hh +++ b/base/loader/symtab.hh @@ -72,9 +72,6 @@ class SymbolTable bool findSymbol(Addr address, std::string &symbol) const; bool findAddress(const std::string &symbol, Addr &address) const; - - std::string find(Addr addr) const; - Addr find(const std::string &symbol) const; }; /// Global unified debugging symbol table (for target). Conceptually diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh index 1610d6060..8ea100b22 100644 --- a/cpu/simple_cpu/simple_cpu.hh +++ b/cpu/simple_cpu/simple_cpu.hh @@ -31,7 +31,6 @@ #include "cpu/base_cpu.hh" #include "sim/eventq.hh" -#include "base/loader/symtab.hh" #include "cpu/pc_event.hh" #include "base/statistics.hh" #include "cpu/exec_context.hh" diff --git a/kern/linux/linux_system.cc b/kern/linux/linux_system.cc index a8ab12f98..4342463c3 100644 --- a/kern/linux/linux_system.cc +++ b/kern/linux/linux_system.cc @@ -35,6 +35,7 @@ * up boot time. */ +#include "base/loader/symtab.hh" #include "base/trace.hh" #include "cpu/exec_context.hh" #include "cpu/base_cpu.hh" diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc index 0380c9478..c6435cb18 100644 --- a/kern/tru64/tru64_system.cc +++ b/kern/tru64/tru64_system.cc @@ -26,6 +26,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "base/loader/symtab.hh" #include "base/trace.hh" #include "cpu/exec_context.hh" #include "kern/tru64/tru64_events.hh" diff --git a/sim/system.hh b/sim/system.hh index 61784b044..07881ff01 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -32,7 +32,6 @@ #include #include -#include "base/loader/symtab.hh" #include "base/statistics.hh" #include "cpu/pc_event.hh" #include "kern/system_events.hh" @@ -43,6 +42,7 @@ class PhysicalMemory; class Platform; class RemoteGDB; class GDBListener; +class SymbolTable; class ObjectFile; class ExecContext; namespace Kernel { class Binning; } -- 2.30.2