addrtranslate-static.C

Go to the documentation of this file.
00001 /*
00002  * See the dyninst/COPYRIGHT file for copyright information.
00003  * 
00004  * We provide the Paradyn Tools (below described as "Paradyn")
00005  * on an AS IS basis, and do not warrant its validity or performance.
00006  * We reserve the right to update, modify, or discontinue this
00007  * software at any time.  We shall have no obligation to supply such
00008  * updates or modifications or any other form of support to you.
00009  * 
00010  * By your use of Paradyn, you understand and agree that we (or any
00011  * other person or entity with proprietary rights in Paradyn) are
00012  * under no obligation to provide either maintenance services,
00013  * update services, notices of latent defects, or correction of
00014  * defects for Paradyn.
00015  * 
00016  * This library is free software; you can redistribute it and/or
00017  * modify it under the terms of the GNU Lesser General Public
00018  * License as published by the Free Software Foundation; either
00019  * version 2.1 of the License, or (at your option) any later version.
00020  * 
00021  * This library is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024  * Lesser General Public License for more details.
00025  * 
00026  * You should have received a copy of the GNU Lesser General Public
00027  * License along with this library; if not, write to the Free Software
00028  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00029  */
00030 
00031 #include <stdio.h>
00032 
00033 #include <vector>
00034 #include <string>
00035 
00036 #include "common/h/headers.h"
00037 #include "addrtranslate.h"
00038 
00039 using namespace std;
00040 
00041 class AddressTranslateStatic : public AddressTranslate
00042 {
00043 public:
00044    virtual bool init();
00045    virtual bool refresh();
00046    AddressTranslateStatic(PID pid, PROC_HANDLE phand, std::string exename);
00047 };
00048 
00049 using namespace Dyninst;
00050 
00051 AddressTranslate *AddressTranslate::createAddressTranslator(PID pid_, ProcessReader *, SymbolReaderFactory *, PROC_HANDLE phand, std::string exename, Address)
00052 {
00053     AddressTranslateStatic *new_translate = new AddressTranslateStatic(pid_, phand, exename);
00054     return new_translate;
00055 }
00056 
00057 AddressTranslate *AddressTranslate::createAddressTranslator(ProcessReader *, SymbolReaderFactory *, std::string exename, Address)
00058 {
00059     return createAddressTranslator(0, NULL, exename);
00060 }
00061 
00062 bool AddressTranslateStatic::init()
00063 {
00064     return true;
00065 }
00066 
00067 bool AddressTranslateStatic::refresh()
00068 {
00069     return true;
00070 }
00071 
00072 vector< pair<Address, unsigned long> > *LoadedLib::getMappedRegions()
00073 {
00074    return &mapped_regions;
00075 }
00076 
00077 AddressTranslateStatic::AddressTranslateStatic(PID pid, PROC_HANDLE phand, std::string exename) :
00078     AddressTranslate(pid, phand, exename)
00079 {
00080 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1