symtab.cc (10905:a6ca6831e775) symtab.cc (11537:93e2bd032c3b)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 42 unchanged lines hidden (view full) ---

51}
52
53bool
54SymbolTable::insert(Addr address, string symbol)
55{
56 if (symbol.empty())
57 return false;
58
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 42 unchanged lines hidden (view full) ---

51}
52
53bool
54SymbolTable::insert(Addr address, string symbol)
55{
56 if (symbol.empty())
57 return false;
58
59 if (!addrTable.insert(make_pair(address, symbol)).second)
60 return false;
61
62 if (!symbolTable.insert(make_pair(symbol, address)).second)
63 return false;
64
59 if (!symbolTable.insert(make_pair(symbol, address)).second)
60 return false;
61
62 // There can be multiple symbols for the same address, so always
63 // update the addrTable multimap when we see a new symbol name.
64 addrTable.insert(make_pair(address, symbol));
65
65 return true;
66}
67
68
69bool
70SymbolTable::load(const string &filename)
71{
72 string buffer;

--- 66 unchanged lines hidden ---
66 return true;
67}
68
69
70bool
71SymbolTable::load(const string &filename)
72{
73 string buffer;

--- 66 unchanged lines hidden ---