AddrLookup.h   AddrLookup.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 36 skipping to change at line 36
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef __AddrLookup_H__ #ifndef __AddrLookup_H__
#define __AddrLookup_H__ #define __AddrLookup_H__
#include "Annotatable.h" #include "Annotatable.h"
#include <map>
namespace Dyninst { namespace Dyninst {
namespace SymtabAPI {
class AddressTranslate; class AddressTranslate;
class LoadedLib; class LoadedLib;
//Needed for Linux and Solaris namespace SymtabAPI {
class ProcessReader {
public:
PID pid;
const std::string executable;
ProcessReader(PID pid_, std::string exe="");
ProcessReader();
virtual bool start() = 0;
virtual bool readAddressSpace(Address inTraced, unsigned amount,
void *inSelf) = 0;
virtual bool done() = 0;
virtual ~ProcessReader() {}
};
typedef struct { typedef struct {
std::string name; std::string name;
Address codeAddr; Address codeAddr;
Address dataAddr; Address dataAddr;
} LoadedLibrary; } LoadedLibrary;
class AddressLookup : public AnnotatableSparse class AddressLookup : public AnnotatableSparse
{ {
private: private:
AddressTranslate *translator; AddressTranslate *translator;
AddressLookup(AddressTranslate *trans); AddressLookup(AddressTranslate *trans);
static dyn_hash_map<std::string, std::vector<Symbol *> > syms; static dyn_hash_map<std::string, std::vector<Symbol *> > syms;
int getSymsVector(std::string str); int getSymsVector(std::string str);
std::vector<Symbol *> *getSymsVector(LoadedLib *lib); std::vector<Symbol *> *getSymsVector(LoadedLib *lib);
std::map<Symtab *, LoadedLib *> sym_to_ll;
std::map<LoadedLib *, Symtab *> ll_to_sym;
LoadedLib *getLoadedLib(Symtab *sym);
Dyninst::Address symToAddress(LoadedLib *ll, Symbol *sym);
Symtab *getSymtab(LoadedLib *);
public: public:
SYMTAB_EXPORT static AddressLookup *createAddressLookup(ProcessReader *r eader = NULL); SYMTAB_EXPORT static AddressLookup *createAddressLookup(ProcessReader *r eader = NULL);
SYMTAB_EXPORT static AddressLookup *createAddressLookup(PID pid, Process Reader *reader = NULL); SYMTAB_EXPORT static AddressLookup *createAddressLookup(PID pid, Process Reader *reader = NULL);
SYMTAB_EXPORT static AddressLookup *createAddressLookup(const std::vecto r<LoadedLibrary> &name_addrs); SYMTAB_EXPORT static AddressLookup *createAddressLookup(const std::vecto r<LoadedLibrary> &name_addrs);
SYMTAB_EXPORT bool getAddress(Symtab *tab, Symbol *sym, Address &addr); SYMTAB_EXPORT bool getAddress(Symtab *tab, Symbol *sym, Address &addr);
SYMTAB_EXPORT bool getAddress(Symtab *tab, Offset off, Address &addr); SYMTAB_EXPORT bool getAddress(Symtab *tab, Offset off, Address &addr);
SYMTAB_EXPORT bool getSymbol(Address addr, Symbol* &sym, Symtab* &tab, b ool close = false); SYMTAB_EXPORT bool getSymbol(Address addr, Symbol* &sym, Symtab* &tab, b ool close = false);
SYMTAB_EXPORT bool getOffset(Address addr, Symtab* &tab, Offset &off); SYMTAB_EXPORT bool getOffset(Address addr, Symtab* &tab, Offset &off);
SYMTAB_EXPORT bool getAllSymtabs(std::vector<Symtab *> &tabs); SYMTAB_EXPORT bool getAllSymtabs(std::vector<Symtab *> &tabs);
SYMTAB_EXPORT bool getLoadAddress(Symtab* sym, Address &load_addr); SYMTAB_EXPORT bool getLoadAddress(Symtab* sym, Address &load_addr);
SYMTAB_EXPORT bool getDataLoadAddress(Symtab* sym, Address &load_addr); SYMTAB_EXPORT bool getDataLoadAddress(Symtab* sym, Address &load_addr);
SYMTAB_EXPORT bool getLoadAddresses(std::vector<LoadedLibrary> &name_add rs); SYMTAB_EXPORT bool getLoadAddresses(std::vector<LoadedLibrary> &name_add rs);
SYMTAB_EXPORT bool getExecutable(LoadedLibrary &lib); SYMTAB_EXPORT bool getExecutable(LoadedLibrary &lib);
SYMTAB_EXPORT bool getOffset(Address addr, LoadedLibrary &lib, Offset &o ff);
SYMTAB_EXPORT bool refresh(); SYMTAB_EXPORT bool refresh();
SYMTAB_EXPORT Address getLibraryTrapAddrSysV(); SYMTAB_EXPORT Address getLibraryTrapAddrSysV();
SYMTAB_EXPORT virtual ~AddressLookup(); SYMTAB_EXPORT virtual ~AddressLookup();
}; };
} }
} }
 End of changes. 6 change blocks. 
17 lines changed or deleted 10 lines changed or added


 Aggregate.h   Aggregate.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 56 skipping to change at line 56
SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const Dyninst::Sym tabAPI::Aggregate &); SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const Dyninst::Sym tabAPI::Aggregate &);
namespace Dyninst{ namespace Dyninst{
namespace SymtabAPI{ namespace SymtabAPI{
class Symbol; class Symbol;
class Module; class Module;
class Symtab; class Symtab;
class Region; class Region;
class Aggregate; class Aggregate;
struct SymbolCompareByAddr;
class Aggregate /*: public AnnotatableSparse */ class Aggregate /*: public AnnotatableSparse */
{ {
friend class Symtab; friend class Symtab;
friend struct SymbolCompareByAddr;
friend std::ostream &::operator<<(std::ostream &os, const Dyninst::S ymtabAPI::Aggregate &); friend std::ostream &::operator<<(std::ostream &os, const Dyninst::S ymtabAPI::Aggregate &);
protected: protected:
SYMTAB_EXPORT Aggregate(); SYMTAB_EXPORT Aggregate();
SYMTAB_EXPORT Aggregate(Symbol *sym); SYMTAB_EXPORT Aggregate(Symbol *sym);
public: public:
virtual ~Aggregate() {}; virtual ~Aggregate() {};
SYMTAB_EXPORT Offset getOffset() const; SYMTAB_EXPORT Offset getOffset() const;
SYMTAB_EXPORT unsigned getSize() const; SYMTAB_EXPORT unsigned getSize() const;
SYMTAB_EXPORT Module * getModule() const { return module_; } SYMTAB_EXPORT Module * getModule() const { return module_; }
SYMTAB_EXPORT Region * getRegion() const; SYMTAB_EXPORT Region * getRegion() const;
/***** Symbol Collection Management *****/ /***** Symbol Collection Management *****/
skipping to change at line 110 skipping to change at line 114
SYMTAB_EXPORT bool removeSymbolInt(Symbol *sym); SYMTAB_EXPORT bool removeSymbolInt(Symbol *sym);
SYMTAB_EXPORT virtual bool changeSymbolOffset(Symbol *sym); SYMTAB_EXPORT virtual bool changeSymbolOffset(Symbol *sym);
// Offset comes from a symbol // Offset comes from a symbol
// Module we keep here so we can have the correct "primary" // Module we keep here so we can have the correct "primary"
// (AKA 'not DEFAULT_MODULE') module // (AKA 'not DEFAULT_MODULE') module
Module *module_; Module *module_;
std::vector<Symbol *> symbols_; std::vector<Symbol *> symbols_;
Symbol *firstSymbol; // cached for speed
Offset offset_; // cached for speed
std::vector<std::string> mangledNames_; std::vector<std::string> mangledNames_;
std::vector<std::string> prettyNames_; std::vector<std::string> prettyNames_;
std::vector<std::string> typedNames_; std::vector<std::string> typedNames_;
void restore_type_by_id(SerializerBase *, Type *&, unsigned) THROW _SPEC (SerializerError); void restore_type_by_id(SerializerBase *, Type *&, unsigned) THROW _SPEC (SerializerError);
void restore_module_by_name(SerializerBase *, std::string &) THROW _SPEC (SerializerError); void restore_module_by_name(SerializerBase *, std::string &) THROW _SPEC (SerializerError);
//void rebuild_symbol_vector(SerializerBase *, std::vector<Offset> *) THROW_SPEC (SerializerError); //void rebuild_symbol_vector(SerializerBase *, std::vector<Offset> *) THROW_SPEC (SerializerError);
void rebuild_symbol_vector(SerializerBase *, std::vector<Address> &) THROW_SPEC (SerializerError); void rebuild_symbol_vector(SerializerBase *, std::vector<Address> &) THROW_SPEC (SerializerError);
SYMTAB_EXPORT void serialize_aggregate(SerializerBase *, const cha r * = "Aggregate") THROW_SPEC (SerializerError); SYMTAB_EXPORT void serialize_aggregate(SerializerBase *, const cha r * = "Aggregate") THROW_SPEC (SerializerError);
 End of changes. 6 change blocks. 
1 lines changed or deleted 7 lines changed or added


 Annotatable.h   Annotatable.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 38 skipping to change at line 38
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef __ANNOTATABLE_H__ #ifndef __ANNOTATABLE_H__
#define __ANNOTATABLE_H__ #define __ANNOTATABLE_H__
#if defined (MSC_VER) #if defined (MSC_VER)
#define DYN_DETAIL_BOOST_NO_INTRINSIC_WCHAR_T 1 #define DYN_DETAIL_BOOST_NO_INTRINSIC_WCHAR_T 1
#endif #endif
#include "dyntypes.h"
#include <vector> #include <vector>
#include <map> #include <map>
#include <typeinfo> #include <typeinfo>
#include <string> #include <string>
#include <string.h> // for strrchr() #include <string.h> // for strrchr()
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "dyntypes.h"
#include "util.h" #include "util.h"
#include "dyn_detail/boost/type_traits/is_base_of.hpp" #include "dyn_detail/boost/type_traits/is_base_of.hpp"
#include "dyn_detail/boost/type_traits/is_pointer.hpp" #include "dyn_detail/boost/type_traits/is_pointer.hpp"
#include "dyn_detail/boost/type_traits/remove_pointer.hpp" #include "dyn_detail/boost/type_traits/remove_pointer.hpp"
#define serialize_printf serializer_printf #define serialize_printf serializer_printf
namespace Dyninst namespace Dyninst
{ {
COMMON_EXPORT int serializer_printf(const char *format, ...); COMMON_EXPORT int serializer_printf(const char *format, ...);
skipping to change at line 88 skipping to change at line 88
COMMON_EXPORT static void clearAnnotationIDMap(); COMMON_EXPORT static void clearAnnotationIDMap();
#endif #endif
anno_cmp_func_t cmp_func; anno_cmp_func_t cmp_func;
AnnotationClassID id; AnnotationClassID id;
std::string name; std::string name;
protected: protected:
ser_func_t serialize_func; ser_func_t serialize_func;
COMMON_EXPORT AnnotationClassBase(std::string n, COMMON_EXPORT AnnotationClassBase(std::string n,
anno_cmp_func_t cmp_func_ = NULL, ser_func_t sf_ = NULL); anno_cmp_func_t cmp_func_ = NULL,
ser_func_t sf_ = NULL);
COMMON_EXPORT virtual ~AnnotationClassBase(); COMMON_EXPORT virtual ~AnnotationClassBase();
public: public:
COMMON_EXPORT static AnnotationClassBase *findAnnotationClass(unsigne d int id); COMMON_EXPORT static AnnotationClassBase *findAnnotationClass(unsigne d int id);
COMMON_EXPORT static void dumpAnnotationClasses(); COMMON_EXPORT static void dumpAnnotationClasses();
COMMON_EXPORT AnnotationClassID getID() { return id; } COMMON_EXPORT AnnotationClassID getID() { return id; }
COMMON_EXPORT std::string &getName() {return name;} COMMON_EXPORT std::string &getName() {return name;}
skipping to change at line 164 skipping to change at line 165
size_t size() {return sizeof(T);} size_t size() {return sizeof(T);}
#if 0 #if 0
bool isSparselyAnnotatable(); bool isSparselyAnnotatable();
bool isDenselyAnnotatable(); bool isDenselyAnnotatable();
#endif #endif
}; };
typedef enum { typedef enum {
sparse, sparse,
dense, dense
} sparse_or_dense_anno_t; } sparse_or_dense_anno_t;
typedef struct { typedef struct {
AnnotationClassBase *acb; AnnotationClassBase *acb;
void *data; void *data;
void *parent_id; void *parent_id;
sparse_or_dense_anno_t sod; sparse_or_dense_anno_t sod;
} ser_rec_t; } ser_rec_t;
typedef enum { typedef enum {
 End of changes. 5 change blocks. 
5 lines changed or deleted 6 lines changed or added


 Archive.h   Archive.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 44 skipping to change at line 44
using namespace std; using namespace std;
class MappedFile; class MappedFile;
namespace Dyninst{ namespace Dyninst{
namespace SymtabAPI{ namespace SymtabAPI{
class Symtab; class Symtab;
/**
* Helps facilitate lazy parsing and quick lookup once parsing is finished
*/
class ArchiveMember {
public:
ArchiveMember() : name_(""), offset_(0), member_(NULL) {}
ArchiveMember(const string name, const Offset offset,
Symtab * img = NULL) :
name_(name),
offset_(offset),
member_(img)
{}
~ArchiveMember() {
if( member_ != NULL ) {
delete member_;
member_ = NULL;
}
}
const string& getName() { return name_; }
Offset getOffset() { return offset_; }
Symtab * getSymtab() { return member_; }
void setSymtab(Symtab *img) { member_ = img; }
private:
const string name_;
Offset offset_;
Symtab *member_;
};
class Archive : public AnnotatableSparse { class Archive : public AnnotatableSparse {
public: public:
Archive() {} static bool openArchive(Archive *&img, string filename);
static bool openArchive(Archive *&img, std::string filename);
#if 0
static bool openArchive(Archive *&img, char *mem_image, size_t image_ size); static bool openArchive(Archive *&img, char *mem_image, size_t image_ size);
#endif
bool getMember(Symtab *&img, std::string memberName);
bool getAllMembers(std::vector <Symtab *> &members);
bool isMemberInArchive(std::string member_name);
bool findMemberWithDefinition(Symtab *&obj, std::string name);
static SymtabError getLastError(); static SymtabError getLastError();
static std::string printError(SymtabError serr); static string printError(SymtabError err);
~Archive(); ~Archive();
bool getMember(Symtab *&img, string& member_name);
bool getMemberByOffset(Symtab *&img, Offset memberOffset);
bool getMemberByGlobalSymbol(Symtab *&img, string& symbol_name);
bool getAllMembers(vector<Symtab *> &members);
bool isMemberInArchive(string& member_name);
bool findMemberWithDefinition(Symtab *&obj, string& name);
std::string name();
private: private:
Archive(std::string &filename, bool &err); Archive(string &filename, bool &err);
Archive(char *mem_image, size_t image_size, bool &err); Archive(char *mem_image, size_t image_size, bool &err);
private: /**
* This method is architecture specific
*
* Post-condition:
* sets serr and errMsg if there is an error
* sets Symtab field of passed ArchiveMember
*/
bool parseMember(Symtab *&img, ArchiveMember *member);
/**
* This method is architecture specific
*
* Post-condition:
* sets serr and errMsg if there is an error
*/
bool parseSymbolTable();
MappedFile *mf; MappedFile *mf;
char *mem_image_;
//architecture specific data - //architecture specific data -
//For ELF the elf pointer for the archive //For ELF the elf pointer for the archive
//NONE as of now for xcoff //NONE as of now for xcoff
void *basePtr; void *basePtr;
dyn_hash_map <std::string, Symtab *> membersByName;
dyn_hash_map <std::string, Offset> memberToOffsetMapping;
// A vector of all Archive. Used to avoid duplicating dyn_hash_map<string, ArchiveMember *> membersByName;
// a Archive that already exists. dyn_hash_map<Offset, ArchiveMember *> membersByOffset;
static std::vector<Archive *> allArchives; std::multimap<string, ArchiveMember *> membersBySymbol;
// The symbol table is lazily parsed
bool symbolTableParsed;
// A vector of all Archives. Used to avoid duplicating
// an Archive that already exists.
static vector<Archive *> allArchives;
static SymtabError serr;
static std::string errMsg;
}; };
}//namespace SymtabAPI }//namespace SymtabAPI
}//namespace Dyninst }//namespace Dyninst
#endif #endif
 End of changes. 11 change blocks. 
20 lines changed or deleted 74 lines changed or added


 BPatch.h   BPatch.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 42 skipping to change at line 42
#ifndef _BPatch_h_ #ifndef _BPatch_h_
#define _BPatch_h_ #define _BPatch_h_
#include <stdio.h> #include <stdio.h>
#include "BPatch_dll.h" #include "BPatch_dll.h"
#include "BPatch_Vector.h" #include "BPatch_Vector.h"
#include "BPatch_thread.h" #include "BPatch_thread.h"
#include "BPatch_type.h" #include "BPatch_type.h"
#include "BPatch_eventLock.h" #include "BPatch_eventLock.h"
#include "BPatch_process.h" #include "BPatch_process.h"
#include "BPatch_hybridAnalysis.h"
class BPatch_typeCollection; class BPatch_typeCollection;
class BPatch_libInfo; class BPatch_libInfo;
class BPatch_module; class BPatch_module;
class int_function; class int_function;
class process; class process;
//Keep old versions defined, that way someone can test if we're more //Keep old versions defined, that way someone can test if we're more
// at or more recent than version 5.1 with '#if defined(DYNINST_5_1)' // at or more recent than version 5.1 with '#if defined(DYNINST_5_1)'
//If they want to get the current version, they should use DYNINST_MAJOR, //If they want to get the current version, they should use DYNINST_MAJOR,
// DYNINST_MINOR, and DYNINST_SUBMINOR // DYNINST_MINOR, and DYNINST_SUBMINOR
#define DYNINST_5_1 #define DYNINST_5_1
#define DYNINST_5_2 #define DYNINST_5_2
#define DYNINST_6_0 #define DYNINST_6_0
#define DYNINST_6_1 #define DYNINST_6_1
#define DYNINST_7_0
#define DYNINST_MAJOR 6 #define DYNINST_MAJOR 7
#define DYNINST_MINOR 1 #define DYNINST_MINOR 0
#define DYNINST_SUBMINOR 0 #define DYNINST_SUBMINOR 0
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
typedef void *BPatch_Address; typedef void *BPatch_Address;
#endif #endif
// BPatch_stats is a collection of instrumentation statistics. // BPatch_stats is a collection of instrumentation statistics.
// Introduced to export this information to paradyn, which // Introduced to export this information to paradyn, which
// produces a summary of these numbers upon application exit. // produces a summary of these numbers upon application exit.
// It probably makes more sense to maintain such numbers on a // It probably makes more sense to maintain such numbers on a
skipping to change at line 83 skipping to change at line 85
typedef struct { typedef struct {
unsigned int pointsUsed; unsigned int pointsUsed;
unsigned int totalMiniTramps; unsigned int totalMiniTramps;
unsigned int trampBytes; unsigned int trampBytes;
unsigned int ptraceOtherOps; unsigned int ptraceOtherOps;
unsigned int ptraceOps; unsigned int ptraceOps;
unsigned int ptraceBytes; unsigned int ptraceBytes;
unsigned int insnGenerated; unsigned int insnGenerated;
} BPatch_stats; } BPatch_stats;
// --------------------------------------------------------------------
// This is a purposefully undocumented prototype of a "remote debugging"
// interface. Meant to generalize debuggers like remote gdb and wtx.
typedef enum {
BPATCH_REMOTE_DEBUG_WTX,
BPATCH_REMOTE_DEBUG_END
} BPatch_remote_t;
typedef struct {
char *target;
char *tool;
char *host;
} BPatch_remoteWtxInfo;
typedef struct {
BPatch_remote_t type;
void *info;
} BPatch_remoteHost;
// --------------------------------------------------------------------
class EventRecord; class EventRecord;
#ifdef DYNINST_CLASS_NAME #ifdef DYNINST_CLASS_NAME
#undef DYNINST_CLASS_NAME #undef DYNINST_CLASS_NAME
#endif #endif
#define DYNINST_CLASS_NAME BPatch #define DYNINST_CLASS_NAME BPatch
class BPATCH_DLL_EXPORT BPatch : public BPatch_eventLock { class BPATCH_DLL_EXPORT BPatch : public BPatch_eventLock {
friend class BPatch_thread; friend class BPatch_thread;
friend class BPatch_process; friend class BPatch_process;
friend class BPatch_point; friend class BPatch_point;
skipping to change at line 118 skipping to change at line 142
bool trampRecursiveOn; bool trampRecursiveOn;
bool forceRelocation_NP; bool forceRelocation_NP;
/* If true, allows automatic relocation of functions if dyninst /* If true, allows automatic relocation of functions if dyninst
deems it necessary. Defaults to true */ deems it necessary. Defaults to true */
bool autoRelocation_NP; bool autoRelocation_NP;
/* If true, we save FPRs in situations we normally would /* If true, we save FPRs in situations we normally would
Defaults to true */ Defaults to true */
bool saveFloatingPointsOn; bool saveFloatingPointsOn;
bool forceSaveFloatingPointsOn;
/* If true, we will use liveness calculations to avoid saving /* If true, we will use liveness calculations to avoid saving
registers on platforms that support it. registers on platforms that support it.
Defaults to true. */ Defaults to true. */
bool livenessAnalysisOn_; bool livenessAnalysisOn_;
/* How far through the CFG do we follow calls? */ /* How far through the CFG do we follow calls? */
int livenessAnalysisDepth_; int livenessAnalysisDepth_;
/* If true, override requests to block while waiting for events, /* If true, override requests to block while waiting for events,
polling instead */ polling instead */
skipping to change at line 270 skipping to change at line 295
API_EXPORT(Int, (), API_EXPORT(Int, (),
bool,isMergeTramp,()); bool,isMergeTramp,());
// BPatch::saveFPROn: // BPatch::saveFPROn:
// returns whether base tramp and mini-tramp is merged // returns whether base tramp and mini-tramp is merged
API_EXPORT(Int, (), API_EXPORT(Int, (),
bool,isSaveFPROn,()); bool,isSaveFPROn,());
// BPatch::forceSaveFPROn:
// returns whether base tramp and mini-tramp is merged
API_EXPORT(Int, (),
bool,isForceSaveFPROn,());
// BPatch::hasForcedRelocation_NP: // BPatch::hasForcedRelocation_NP:
// returns whether all instrumented functions will be relocated // returns whether all instrumented functions will be relocated
API_EXPORT(Int, (), API_EXPORT(Int, (),
bool,hasForcedRelocation_NP,()); bool,hasForcedRelocation_NP,());
// BPatch::autoRelocationsOn: // BPatch::autoRelocationsOn:
// returns whether functions will be relocated when appropriate // returns whether functions will be relocated when appropriate
API_EXPORT(Int, (), API_EXPORT(Int, (),
skipping to change at line 394 skipping to change at line 425
// syscalls signal() or sigaction(), or the default system // syscalls signal() or sigaction(), or the default system
// handler, in which case we return an empty vector. // handler, in which case we return an empty vector.
API_EXPORT(Int, (cb,signal_numbers), API_EXPORT(Int, (cb,signal_numbers),
bool,registerSignalHandlerCallback, bool,registerSignalHandlerCallback,
(BPatchSignalHandlerCallback cb, (BPatchSignalHandlerCallback cb,
BPatch_Set<long> *signal_numbers)); BPatch_Set<long> *signal_numbers));
API_EXPORT(Int, (cb), API_EXPORT(Int, (cb),
bool,removeSignalHandlerCallback,(BPatchSignalHandlerCallback cb)); bool,removeSignalHandlerCallback,(BPatchSignalHandlerCallback cb));
// BPatch::getThreads: API_EXPORT(Int, (cb),
// Get a vector of all threads bool,registerCodeDiscoveryCallback,(BPatchCodeDiscoveryCallback cb));
API_EXPORT(Int, (), API_EXPORT(Int, (cb),
BPatch_Vector<BPatch_thread*> *,getThreads,()); bool,removeCodeDiscoveryCallback,(BPatchCodeDiscoveryCallback cb));
// BPatch::getThreads: // BPatch::registerCodeOverwriteCallbacks
//
// Registers a callback at the beginning and end of overwrite events
API_EXPORT(Int, (cbBegin, cbEnd),
bool,registerCodeOverwriteCallbacks,
(BPatchCodeOverwriteBeginCallback cbBegin,
BPatchCodeOverwriteEndCallback cbEnd));
// BPatch::getProcesses:
// Get a vector of all processes // Get a vector of all processes
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_Vector<BPatch_process*> *,getProcesses,()); BPatch_Vector<BPatch_process*> *,getProcesses,());
// //
// General BPatch parameter settings: // General BPatch parameter settings:
// //
// BPatch::setDebugParsing: // BPatch::setDebugParsing:
// Turn on/off parsing of debug section(s) // Turn on/off parsing of debug section(s)
skipping to change at line 456 skipping to change at line 495
API_EXPORT_V(Int, (x), API_EXPORT_V(Int, (x),
void,setMergeTramp,(bool x)); void,setMergeTramp,(bool x));
// BPatch::setSaveFPR: // BPatch::setSaveFPR:
// Turn on/off merged base & mini-tramps // Turn on/off merged base & mini-tramps
API_EXPORT_V(Int, (x), API_EXPORT_V(Int, (x),
void,setSaveFPR,(bool x)); void,setSaveFPR,(bool x));
// BPatch::forceSaveFPR:
// Force Turn on/off merged base & mini-tramps - ignores isConservativ
e
API_EXPORT_V(Int, (x),
void,forceSaveFPR,(bool x));
// BPatch::setForcedRelocation_NP: // BPatch::setForcedRelocation_NP:
// Turn on/off forced relocation of instrumted functions // Turn on/off forced relocation of instrumted functions
API_EXPORT_V(Int, (x), API_EXPORT_V(Int, (x),
void,setForcedRelocation_NP,(bool x)); void,setForcedRelocation_NP,(bool x));
// BPatch::setAutoRelocation_NP: // BPatch::setAutoRelocation_NP:
// Turn on/off function relocations, performed when necessary // Turn on/off function relocations, performed when necessary
API_EXPORT_V(Int, (x), API_EXPORT_V(Int, (x),
skipping to change at line 483 skipping to change at line 528
// Liveness... // Liveness...
API_EXPORT_V(Int, (x), API_EXPORT_V(Int, (x),
void, setLivenessAnalysis, (bool x)); void, setLivenessAnalysis, (bool x));
API_EXPORT_V(Int, (x), API_EXPORT_V(Int, (x),
void, setLivenessAnalysisDepth, (int x)); void, setLivenessAnalysisDepth, (int x));
// BPatch::processCreate: // BPatch::processCreate:
// Create a new mutatee process // Create a new mutatee process
API_EXPORT(Int, (path, argv, envp, stdin_fd, stdout_fd, stderr_fd), API_EXPORT(Int, (path, argv, envp, stdin_fd, stdout_fd, stderr_fd, mode ),
BPatch_process *,processCreate,(const char *path, BPatch_process *,processCreate,(const char *path,
const char *argv[], const char *argv[],
const char **envp = NULL, const char **envp = NULL,
int stdin_fd=0, int stdin_fd=0,
int stdout_fd=1, int stdout_fd=1,
int stderr_fd=2)); int stderr_fd=2,
BPatch_hybridMode mode=BPatch_normalMod
e));
// BPatch::processAttach // BPatch::processAttach
// Attach to mutatee process // Attach to mutatee process
API_EXPORT(Int, (path, pid), API_EXPORT(Int, (path, pid, mode),
BPatch_process *,processAttach,(const char *path, int pid)); BPatch_process *,processAttach,(const char *path, int pid,
BPatch_hybridMode mode=BPatch_normalMod
// BPatch::createProcess: e));
// Create a new mutatee process
API_EXPORT(Int, (path, argv, envp, stdin_fd, stdout_fd, stderr_fd),
BPatch_thread *,createProcess,(const char *path,
const char *argv[],
const char **envp = NULL,
int stdin_fd=0,
int stdout_fd=1,
int stderr_fd=2));
// BPatch::openBinary // BPatch::openBinary
// Open a binary for static instrumentation // Open a binary for static instrumentation
// //
// The second parameter really should be a boolean, but the value // The second parameter really should be a boolean, but the value
// gets reset between the openBinary and openBinaryInt calls--is // gets reset between the openBinary and openBinaryInt calls--is
// this a gcc bug??? // this a gcc bug???
// //
API_EXPORT(Int, (path, openDependencies), API_EXPORT(Int, (path, openDependencies),
BPatch_binaryEdit *, openBinary, (const char *path, bool ope nDependencies = false)); BPatch_binaryEdit *, openBinary, (const char *path, bool ope nDependencies = false));
// BPatch::attachProcess:
// Attach to mutatee process
API_EXPORT(Int, (path, pid),
BPatch_thread *,attachProcess,(const char *path, int pid));
// BPatch::createEnum: // BPatch::createEnum:
// Create Enum types. // Create Enum types.
API_EXPORT(Int, (name, elementNames, elementIds), API_EXPORT(Int, (name, elementNames, elementIds),
BPatch_type *,createEnum,(const char * name, BPatch_Vector<char *> &ele mentNames, BPatch_type *,createEnum,(const char * name, BPatch_Vector<char *> &ele mentNames,
BPatch_Vector<int> &elementIds)); BPatch_Vector<int> &elementIds));
// BPatch::createEnum: // BPatch::createEnum:
// API selects elementIds // API selects elementIds
API_EXPORT(AutoId, (name, elementNames), API_EXPORT(AutoId, (name, elementNames),
skipping to change at line 613 skipping to change at line 645
// BPatch::getBPatchStatistics: // BPatch::getBPatchStatistics:
// Get Instrumentation statistics // Get Instrumentation statistics
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_stats &,getBPatchStatistics,()); BPatch_stats &,getBPatchStatistics,());
API_EXPORT_V(Int, (major, minor, subminor), API_EXPORT_V(Int, (major, minor, subminor),
void ,getBPatchVersion,(int &major, int &minor, int &subminor)); void ,getBPatchVersion,(int &major, int &minor, int &subminor));
// These three should probably be moved into their own BPatch_* class.
// Perhaps BPatch_remoteDebug?
API_EXPORT(Int, (),
bool, isConnected, ());
API_EXPORT(Int, (remote),
bool, remoteConnect, (BPatch_remoteHost &remote));
API_EXPORT(Int, (remote, pidlist),
bool,getPidList,(BPatch_remoteHost &remote, BPatch_Vector<unsigned int>
&pidlist));
API_EXPORT(Int, (remote, pid, pidStr),
bool,getPidInfo,(BPatch_remoteHost &remote, unsigned int pid, std::stri
ng &pidStr));
API_EXPORT(Int, (remote),
bool, remoteDisconnect, (BPatch_remoteHost &remote));
// BPatch::addNonReturningFunc:
// Globally specify that any function with a given name will not retur
n
API_EXPORT_V(Int, (name),
void, addNonReturningFunc, (std::string name));
}; };
#endif /* _BPatch_h_ */ #endif /* _BPatch_h_ */
 End of changes. 15 change blocks. 
27 lines changed or deleted 86 lines changed or added


 BPatch_Set.h   BPatch_Set.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 90 skipping to change at line 90
* the type of the elements in the BPatch_Set and the second one is the te mplate * the type of the elements in the BPatch_Set and the second one is the te mplate
* structure that is used to compare the elements of the BPatch_Set. The t emplate * structure that is used to compare the elements of the BPatch_Set. The t emplate
* structure has to overload () for comparison of two elements as explaine d above * structure has to overload () for comparison of two elements as explaine d above
*/ */
typedef enum { RED, BLACK } bpatch_entry_color_type; typedef enum { RED, BLACK } bpatch_entry_color_type;
template<class T,class Compare = comparison<T> > template<class T,class Compare = comparison<T> >
class BPATCH_DLL_EXPORT BPatch_Set { class BPATCH_DLL_EXPORT BPatch_Set {
private:
/** tree implementation structure. Used to implement the RB tree */ /** tree implementation structure. Used to implement the RB tree */
typedef struct entry { typedef struct entry {
T data; /* data element */ T data; /* data element */
bpatch_entry_color_type color; /* color of the node */ bpatch_entry_color_type color; /* color of the node */
struct entry* left; /* left child */ struct entry* left; /* left child */
struct entry* right; /* right child */ struct entry* right; /* right child */
struct entry* parent; /* parent of the node */ struct entry* parent; /* parent of the node */
/** constructor for structure */ /** constructor for structure */
entry() entry()
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 BPatch_Vector.h   BPatch_Vector.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_addressSpace.h   BPatch_addressSpace.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 40 skipping to change at line 40
*/ */
#ifndef _BPatch_addressSpace_h_ #ifndef _BPatch_addressSpace_h_
#define _BPatch_addressSpace_h_ #define _BPatch_addressSpace_h_
#include "BPatch_snippet.h" #include "BPatch_snippet.h"
#include "BPatch_dll.h" #include "BPatch_dll.h"
#include "BPatch_Vector.h" #include "BPatch_Vector.h"
#include "BPatch_eventLock.h" #include "BPatch_eventLock.h"
#include "BPatch_point.h" #include "BPatch_point.h"
#include "BPatch_instruction.h" // for register type #include "BPatch_instruction.h" // for register type
#include "BPatch_callbacks.h" #include "BPatch_callbacks.h"
#include <vector> #include <vector>
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
class AddressSpace; class AddressSpace;
skipping to change at line 81 skipping to change at line 80
friend class BPatch_addressSpace; friend class BPatch_addressSpace;
friend class BPatch_thread; friend class BPatch_thread;
private: private:
// Address Space snippet belogns to // Address Space snippet belogns to
BPatch_addressSpace *addSpace_; BPatch_addressSpace *addSpace_;
// low-level mappings for removal // low-level mappings for removal
BPatch_Vector<miniTramp *> mtHandles_; BPatch_Vector<miniTramp *> mtHandles_;
// a flag for catchuo // a flag for catchup
bool catchupNeeded; bool catchupNeeded;
// and a list of threads to apply catchup to // and a list of threads to apply catchup to
BPatch_Vector<BPatch_thread *> catchup_threads; BPatch_Vector<BPatch_thread *> catchup_threads;
BPatchSnippetHandle(BPatch_addressSpace * addSpace); BPatchSnippetHandle(BPatch_addressSpace * addSpace);
void addMiniTramp(miniTramp *m) { mtHandles_.push_back(m); } void addMiniTramp(miniTramp *m) { mtHandles_.push_back(m); }
public: public:
skipping to change at line 176 skipping to change at line 175
virtual ~BPatch_addressSpace(); virtual ~BPatch_addressSpace();
// Distinguishes between BPatch_process and BPatch_binaryEdit // Distinguishes between BPatch_process and BPatch_binaryEdit
virtual bool getType() = 0; virtual bool getType() = 0;
// Returns back bools for variables that are BPatch_process member variab les, // Returns back bools for variables that are BPatch_process member variab les,
// the return value is hardcoded for BPatch_binaryEdit // the return value is hardcoded for BPatch_binaryEdit
virtual bool getTerminated() = 0; virtual bool getTerminated() = 0;
virtual bool getMutationsActive() = 0; virtual bool getMutationsActive() = 0;
// internal functions, do not use //
BPatch_module *findModuleByAddr(Dyninst::Address addr);//doesn't cause pa
rsing
bool findFuncsByRange(Dyninst::Address startAddr,
Dyninst::Address endAddr,
std::set<BPatch_function*> &funcs);
// end internal functions........ //
// BPatch_addressSpace::insertSnippet // BPatch_addressSpace::insertSnippet
// //
// Insert new code into the mutatee // Insert new code into the mutatee
API_EXPORT_VIRT(Int, (expr, point, order), API_EXPORT_VIRT(Int, (expr, point, order),
BPatchSnippetHandle *,insertSnippet,(const BPatch_snippet &expr, BPatchSnippetHandle *,insertSnippet,(const BPatch_snippet &expr,
BPatch_point &point, BPatch_point &point,
BPatch_snippetOrder order = BPatch_firstSnippet)); BPatch_snippetOrder order = BPatch_firstSnippet));
//BPatch_addressSpace::insertSnippet //BPatch_addressSpace::insertSnippet
skipping to change at line 274 skipping to change at line 280
API_EXPORT(Int, (fileName, lineNo, ranges), API_EXPORT(Int, (fileName, lineNo, ranges),
bool,getAddressRanges,(const char * fileName, unsigned int lineNo, std: :vector< std::pair< unsigned long, unsigned long > > & ranges )); bool,getAddressRanges,(const char * fileName, unsigned int lineNo, std: :vector< std::pair< unsigned long, unsigned long > > & ranges ));
// BPatch_addressSpace::findFunctionByAddr // BPatch_addressSpace::findFunctionByAddr
// //
// Returns the function containing an address // Returns the function containing an address
API_EXPORT(Int, (addr), API_EXPORT(Int, (addr),
BPatch_function *,findFunctionByAddr,(void *addr)); BPatch_function *,findFunctionByAddr,(void *addr));
// BPatch_addressSpace::findFunctionsByAddr
//
// Returns the functions containing an address
// (this is possible if there is shared code
API_EXPORT(Int, (addr,funcs),
bool, findFunctionsByAddr,(Dyninst::Address addr,
std::vector<BPatch_function*> &funcs));
// BPatch_addressSpace::getImage // BPatch_addressSpace::getImage
// //
// Obtain BPatch_image associated with this BPatch_addressSpace // Obtain BPatch_image associated with this BPatch_addressSpace
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_image *,getImage,()); BPatch_image *,getImage,());
// BPatch_addressSpace::malloc // BPatch_addressSpace::malloc
// //
// Allocate memory for a new variable in the mutatee process // Allocate memory for a new variable in the mutatee process
API_EXPORT(Int, (n), API_EXPORT(Int, (n, name),
BPatch_variableExpr *,malloc,(int n)); BPatch_variableExpr *,malloc,(int n, std::string name = std:
:string("")));
// BPatch_addressSpace::malloc // BPatch_addressSpace::malloc
// //
// Allocate memory for a new variable in the mutatee process // Allocate memory for a new variable in the mutatee process
API_EXPORT(ByType, (type), API_EXPORT(ByType, (type, name),
BPatch_variableExpr *,malloc,(const BPatch_type &type)); BPatch_variableExpr *,malloc,(const BPatch_type &type, std::
string name = std::string("")));
API_EXPORT(Int, (at_addr, type, var_name, in_module), API_EXPORT(Int, (at_addr, type, var_name, in_module),
BPatch_variableExpr *, createVariable,(Dyninst::Address at_addr, BPatch_variableExpr *, createVariable,(Dyninst::Address at_addr,
BPatch_type *type, BPatch_type *type,
std::string var_name = std::stri ng(""), std::string var_name = std::stri ng(""),
BPatch_module *in_module = NULL) ); BPatch_module *in_module = NULL) );
// BPatch_addressSpace::free // BPatch_addressSpace::free
// //
// Free memory allocated by Dyninst in the mutatee process // Free memory allocated by Dyninst in the mutatee process
skipping to change at line 318 skipping to change at line 332
// BPatch_addressSpace::createVariable // BPatch_addressSpace::createVariable
// //
// Wrap an existing piece of allocated memory with a BPatch_variableExp r. // Wrap an existing piece of allocated memory with a BPatch_variableExp r.
// Used (for instance) by the shared memory library to wrap its externa lly // Used (for instance) by the shared memory library to wrap its externa lly
// allocated memory for use by BPatch. // allocated memory for use by BPatch.
API_EXPORT(Int, (name, addr, type), API_EXPORT(Int, (name, addr, type),
BPatch_variableExpr *, createVariable, BPatch_variableExpr *, createVariable,
(std::string name, Dyninst::Address addr, BPatch_type *type = NULL)); (std::string name, Dyninst::Address addr, BPatch_type *type = NULL));
API_EXPORT(Int, (regs), API_EXPORT(Int, (regs, includeSPRs),
bool, getRegisters, (std::vector<BPatch_register> &regs)); bool, getRegisters, (std::vector<BPatch_register> &regs, boo
l includeSPRs = false));
API_EXPORT(Int, (regName, reg), API_EXPORT(Int, (regName, reg),
bool, createRegister_NP, (std::string regName, BPatch_register &reg)); bool, createRegister_NP, (std::string regName, BPatch_register &reg));
API_EXPORT_V(Int, (allowtraps), API_EXPORT_V(Int, (allowtraps),
void, allowTraps, (bool allowtraps)); void, allowTraps, (bool allowtraps));
// BPatch_addressSpace::loadLibrary // BPatch_addressSpace::loadLibrary
// //
// Load a shared library into the mutatee's address space // Load a shared library into the mutatee's address space
skipping to change at line 341 skipping to change at line 355
// //
// the reload argument is used by save the world to determine // the reload argument is used by save the world to determine
// if this library should be reloaded by the mutated binary // if this library should be reloaded by the mutated binary
// when it starts up. this is up to the user because loading // when it starts up. this is up to the user because loading
// an extra shared library could hide access to the 'correct' // an extra shared library could hide access to the 'correct'
// function by redefining a function // function by redefining a function
API_EXPORT_VIRT(Int, (libname, reload), API_EXPORT_VIRT(Int, (libname, reload),
bool, loadLibrary,(const char *libname, bool reload = false)); bool, loadLibrary,(const char *libname, bool reload = false));
// BPatch_addressSpace::isStaticExecutable
//
// Returns true if the underlying image represents a
// statically-linked executable, false otherwise
API_EXPORT(Int, (),
bool, isStaticExecutable,());
}; };
#endif #endif
 End of changes. 9 change blocks. 
9 lines changed or deleted 33 lines changed or added


 BPatch_basicBlock.h   BPatch_basicBlock.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 124 skipping to change at line 124
BPatch_basicBlock(int_basicBlock *ib, BPatch_flowGraph *fg); BPatch_basicBlock(int_basicBlock *ib, BPatch_flowGraph *fg);
BPatch_Vector<BPatch_point*>* BPatch_Vector<BPatch_point*>*
findPointByPredicate(insnPredicate& f); findPointByPredicate(insnPredicate& f);
public: public:
// Internal functions. Don't use these unless you know what you're // Internal functions. Don't use these unless you know what you're
// doing. // doing.
int_basicBlock *lowlevel_block() { return iblock; } int_basicBlock *lowlevel_block() { return iblock; }
void setlowlevel_block(int_basicBlock *b) { iblock = b; }
void getAllPoints(std::vector<BPatch_point*>& allPoints);
BPatch_function *getCallTarget();
// end internal functions
/** BPatch_basicBlock::getSources */ /** BPatch_basicBlock::getSources */
/** method that returns the predecessors of the basic block */ /** method that returns the predecessors of the basic block */
API_EXPORT_V(Int, (srcs), API_EXPORT_V(Int, (srcs),
void,getSources,(BPatch_Vector<BPatch_basicBlock*> &srcs)); void,getSources,(BPatch_Vector<BPatch_basicBlock*> &srcs));
/** BPatch_basicBlock::getTargets */ /** BPatch_basicBlock::getTargets */
/** method that returns the successors of the basic block */ /** method that returns the successors of the basic block */
skipping to change at line 293 skipping to change at line 297
/** BPatch_basicBlock::getOutgoingEdges */ /** BPatch_basicBlock::getOutgoingEdges */
/** returns the outgoming edges */ /** returns the outgoming edges */
API_EXPORT_V(Int, (out), API_EXPORT_V(Int, (out),
void,getOutgoingEdges,(BPatch_Vector<BPatch_edge*> &out)); void,getOutgoingEdges,(BPatch_Vector<BPatch_edge*> &out));
int blockNo() const; int blockNo() const;
struct compare { struct compare {
int operator()(const BPatch_basicBlock *b1, int operator()(CONST_EXPORT BPatch_basicBlock *b1,
const BPatch_basicBlock *b2) const CONST_EXPORT BPatch_basicBlock *b2) CONST_EXPORT
{ {
if (b1->blockNo() < b2->blockNo()) if (b1->getStartAddress() < b2->getStartAddress())
return -1; return -1;
if (b1->blockNo() > b2->blockNo()) if (b1->getStartAddress() > b2->getStartAddress())
return 1; return 1;
return 0; return 0;
//if (b1->blockNo() < b2->blockNo())
// return -1;
//if (b1->blockNo() > b2->blockNo())
// return 1;
//return 0;
} }
}; };
}; };
template <>
struct comparison <BPatch_basicBlock *> {
int operator()(const BPatch_basicBlock * const &x,
const BPatch_basicBlock * const &y) const {
if (x->getStartAddress() < y->getStartAddress()) return -1;
if (x->getStartAddress() > y->getStartAddress()) return 1;
return 0;
};
};
#endif /* _BPatch_basicBlock_h_ */ #endif /* _BPatch_basicBlock_h_ */
 End of changes. 7 change blocks. 
5 lines changed or deleted 24 lines changed or added


 BPatch_basicBlockLoop.h   BPatch_basicBlockLoop.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 71 skipping to change at line 71
public BPatch_eventLock, public BPatch_eventLock,
public Dyninst::AnnotatableSparse public Dyninst::AnnotatableSparse
{ {
friend class BPatch_flowGraph; friend class BPatch_flowGraph;
friend std::ostream& operator<<(std::ostream&,BPatch_basicBlockLoop& ); friend std::ostream& operator<<(std::ostream&,BPatch_basicBlockLoop& );
friend void dfsCreateLoopHierarchy(BPatch_loopTreeNode * parent, friend void dfsCreateLoopHierarchy(BPatch_loopTreeNode * parent,
BPatch_Vector<BPatch_basicBlockL oop *> &loops, BPatch_Vector<BPatch_basicBlockL oop *> &loops,
std::string level); std::string level);
private: private:
BPatch_edge *backEdge; std::set<BPatch_edge*> backEdges;
// the flow graph this loop is part of // the flow graph this loop is part of
BPatch_flowGraph *flowGraph; BPatch_flowGraph *flowGraph;
/** set of loops that are contained (nested) in this loop. */ /** set of loops that are contained (nested) in this loop. */
BPatch_Set<BPatch_basicBlockLoop*> containedLoops; BPatch_Set<BPatch_basicBlockLoop*> containedLoops;
/** the basic blocks in the loop */ /** the basic blocks in the loop */
BPatch_Set<BPatch_basicBlock*> basicBlocks; BPatch_Set<BPatch_basicBlock*> basicBlocks;
/** this func is only invoked by BPatch_flowGraph::createLoops */
void addBackEdges(std::vector<BPatch_edge*> &edges);
public: public:
/** If loop which directly encloses this loop. NULL if no such loop */ /** If loop which directly encloses this loop. NULL if no such loop */
BPatch_basicBlockLoop* parent; BPatch_basicBlockLoop* parent;
/** BPatch_basicBlockLoop::containsAddress */ /** BPatch_basicBlockLoop::containsAddress */
/** Return true if the given address is within the range of /** Return true if the given address is within the range of
this loop's basicBlocks */ this loop's basicBlocks */
API_EXPORT(Int, (addr), API_EXPORT(Int, (addr),
bool,containsAddress,(unsigned long addr)); bool,containsAddress,(unsigned long addr));
/** Return true if the given address is within the range of /** Return true if the given address is within the range of
this loop's basicBlocks or its children */ this loop's basicBlocks or its children */
API_EXPORT(Int, (addr), API_EXPORT(Int, (addr),
bool,containsAddressInclusive,(unsigned long addr)); bool,containsAddressInclusive,(unsigned long addr));
/** BPatch_basicBlockLoop::getBackEdge */ /** BPatch_basicBlockLoop::getBackEdge */
/** return the back edge which defines this loop */ /** return a back edge that defines this loop */
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_edge *,getBackEdge,()); BPatch_edge *,getBackEdge,());
/** BPatch_basicBlockLoop::getBackEdges */
/** Sets edges to the set of back edges that define this loop,
returns the number of back edges that define this loop */
API_EXPORT(Int, (edges),
int,getBackEdges,(BPatch_Vector<BPatch_edge*> &edges));
/** BPatch_basicBlockLoop::getContainedLoops */ /** BPatch_basicBlockLoop::getContainedLoops */
/** returns vector of contained loops */ /** returns vector of contained loops */
API_EXPORT(Int, (loops), API_EXPORT(Int, (loops),
bool,getContainedLoops,(BPatch_Vector<BPatch_basicBlockLoop*> &loop s)); bool,getContainedLoops,(BPatch_Vector<BPatch_basicBlockLoop*> &loop s));
/** BPatch_basicBlockLoop::getOuterLoops */ /** BPatch_basicBlockLoop::getOuterLoops */
/** returns vector of outer contained loops */ /** returns vector of outer contained loops */
API_EXPORT(Int, (loops), API_EXPORT(Int, (loops),
 End of changes. 5 change blocks. 
3 lines changed or deleted 12 lines changed or added


 BPatch_binaryEdit.h   BPatch_binaryEdit.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 85 skipping to change at line 85
friend class BPatch_funcCallExpr; friend class BPatch_funcCallExpr;
friend class BPatch_instruction; friend class BPatch_instruction;
friend class AstNode; // AST needs to translate instPoint to friend class AstNode; // AST needs to translate instPoint to
friend class AstOperatorNode; friend class AstOperatorNode;
friend class AstMemoryNode; friend class AstMemoryNode;
private: private:
std::map<std::string, BinaryEdit *> llBinEdits; std::map<std::string, BinaryEdit *> llBinEdits;
BinaryEdit *origBinEdit; BinaryEdit *origBinEdit;
BinaryEdit *rtLib; std::vector<BinaryEdit *> rtLib;
BPatch_binaryEdit(const char *path, bool openDependencies); BPatch_binaryEdit(const char *path, bool openDependencies);
bool creation_error; bool creation_error;
bool replaceTrapHandler(); bool replaceTrapHandler();
protected: protected:
void getAS(std::vector<AddressSpace *> &as); void getAS(std::vector<AddressSpace *> &as);
public: public:
skipping to change at line 147 skipping to change at line 147
API_EXPORT(Int, (atomic, modified), API_EXPORT(Int, (atomic, modified),
bool, finalizeInsertionSet, (bool atomic, bool *modified = N ULL)); bool, finalizeInsertionSet, (bool atomic, bool *modified = N ULL));
// BPatch_binaryEdit::loadLibrary // BPatch_binaryEdit::loadLibrary
// //
// Load a shared library into the mutatee's address space // Load a shared library into the mutatee's address space
// Returns true if successful // Returns true if successful
API_EXPORT_VIRT(Int, (libname, reload), API_EXPORT_VIRT(Int, (libname, reload),
bool, loadLibrary,(const char *libname, bool reload = false)); bool, loadLibrary,(const char *libname, bool reload = false));
}; };
#endif /* BPatch_binaryEdit_h_ */ #endif /* BPatch_binaryEdit_h_ */
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 BPatch_callbacks.h   BPatch_callbacks.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 35 skipping to change at line 35
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _BPATCH_ERROR_H_ #ifndef _BPATCH_ERROR_H_
#define _BPATCH_ERROR_H_ #define _BPATCH_ERROR_H_
#include "BPatch_Vector.h"
class BPatch_process; class BPatch_process;
class BPatch_thread; class BPatch_thread;
class BPatch_module; class BPatch_module;
class BPatch_point; class BPatch_point;
class BPatch_function; class BPatch_function;
class BPatch_basicBlock;
typedef enum { typedef enum {
BPatchFatal, BPatchSerious, BPatchWarning, BPatchInfo BPatchFatal, BPatchSerious, BPatchWarning, BPatchInfo
} BPatchErrorLevel; } BPatchErrorLevel;
typedef enum { typedef enum {
NoExit, NoExit,
ExitedNormally, ExitedNormally,
ExitedViaSignal ExitedViaSignal
} BPatch_exitType; } BPatch_exitType;
skipping to change at line 84 skipping to change at line 86
typedef void (*BPatchDynamicCallSiteCallback)(BPatch_point *at_point, typedef void (*BPatchDynamicCallSiteCallback)(BPatch_point *at_point,
BPatch_function *called_funct ion); BPatch_function *called_funct ion);
typedef void (*BPatchStopThreadCallback)(BPatch_point *at_point, typedef void (*BPatchStopThreadCallback)(BPatch_point *at_point,
void *returnValue); void *returnValue);
typedef void (*BPatchSignalHandlerCallback)(BPatch_point *at_point, typedef void (*BPatchSignalHandlerCallback)(BPatch_point *at_point,
long signum, BPatch_Vector<Dyninst::Address> *hand lers); long signum, BPatch_Vector<Dyninst::Address> *hand lers);
typedef void (*InternalSignalHandlerCallback)
(BPatch_point *at_point, long signum,
BPatch_Vector<Dyninst::Address> &handlers);
typedef void (*InternalCodeOverwriteCallback)
(BPatch_point *fault_instruc, Dyninst::Address viol_target);
//This callback is invoked whenever previously un-analyzed code is discover
ed through runtime
//analysis, and delivers a vector of functions whose analysis has been mod
ified and a vector
//of functions that are newly discovered.
typedef void (*BPatchCodeDiscoveryCallback)
(BPatch_Vector<BPatch_function*> &newFuncs,
BPatch_Vector<BPatch_function*> &modFuncs);
//This callback allows the user to remove any instrumentation when the prog
ram
//starts writing to a code page, which may be desirable as instrumentation
//cannot be removed during the overwrite loop's execution, and any breakpoi
nt
//instrumentation will dramatically slow the loop's execution. Only invoke
d
//if hybrid analysis mode is set to BPatch_defensiveMode.
typedef void (*BPatchCodeOverwriteBeginCallback)
(BPatch_Vector<BPatch_basicBlock*> &overwriteLoopBlocks);
//This callback delivers the effects of the overwrite loop when it is done
//executing. In many cases no code will have changed. This function is on
ly
//called if Dyninst's hybrid analysis mode is set to BPatch_defensiveMode.
typedef void (*BPatchCodeOverwriteEndCallback)
(BPatch_Vector<Dyninst::Address> &deadBlockAddrs,
BPatch_Vector<BPatch_function*> &owFuncs,
BPatch_Vector<BPatch_function*> &modFuncs,
BPatch_Vector<BPatch_function*> &newFuncs );
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 40 lines changed or added


 BPatch_dll.h   BPatch_dll.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_edge.h   BPatch_edge.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_eventLock.h   BPatch_eventLock.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 43 skipping to change at line 43
#define _BPatch_eventLock_h_ #define _BPatch_eventLock_h_
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include "BPatch_dll.h" #include "BPatch_dll.h"
#if defined (_MSC_VER) #if defined (_MSC_VER)
#define CONST_EXPORT #define CONST_EXPORT const
#else #else
#define CONST_EXPORT const #define CONST_EXPORT const
#endif #endif
#if defined (_MSC_VER) #if defined (_MSC_VER)
#define CONST_ARG #define CONST_ARG
#else #else
#define CONST_ARG const #define CONST_ARG const
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 BPatch_flowGraph.h   BPatch_flowGraph.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 81 skipping to change at line 81
friend class int_function; // This is illegal here... keeps us from havin g to friend class int_function; // This is illegal here... keeps us from havin g to
// have a public constructor... PDSEP // have a public constructor... PDSEP
friend std::ostream& operator<<(std::ostream&,BPatch_flowGraph&); friend std::ostream& operator<<(std::ostream&,BPatch_flowGraph&);
friend void dfsCreateLoopHierarchy(BPatch_loopTreeNode * parent, friend void dfsCreateLoopHierarchy(BPatch_loopTreeNode * parent,
BPatch_Vector<BPatch_basicBlockLoop *> &loops, BPatch_Vector<BPatch_basicBlockLoop *> &loops,
std::string level); std::string level);
BPatch_flowGraph (BPatch_function *func, bool &valid); BPatch_flowGraph (BPatch_function *func, bool &valid);
int_function *ll_func() const; int_function *ll_func() const;
bool isValid_;
public: public:
//BPatch_process *getBProcess() const { return bproc; } //BPatch_process *getBProcess() const { return bproc; }
BPatch_addressSpace *getAddSpace() const { return addSpace; } BPatch_addressSpace *getAddSpace() const { return addSpace; }
AddressSpace *getllAddSpace() const; AddressSpace *getllAddSpace() const;
BPatch_function *getBFunction() const { return func_; } BPatch_function *getBFunction() const { return func_; }
BPatch_module *getModule() const { return mod; } BPatch_module *getModule() const { return mod; }
BPatch_basicBlock *findBlockByAddr(Dyninst::Address addr);
void invalidate(); // invoked when additional parsing takes place
// End of deprecated function // End of deprecated function
// Functions for use by Dyninst users // Functions for use by Dyninst users
API_EXPORT_DTOR(_dtor, (), API_EXPORT_DTOR(_dtor, (),
~,BPatch_flowGraph,()); ~,BPatch_flowGraph,());
/** returns the set of all basic blocks in the CFG */ /** returns the set of all basic blocks in the CFG */
API_EXPORT(Int, (blocks), API_EXPORT(Int, (blocks),
bool,getAllBasicBlocks,(BPatch_Set<BPatch_basicBlock*> &blocks)); bool,getAllBasicBlocks,(BPatch_Set<BPatch_basicBlock*> &blocks));
skipping to change at line 154 skipping to change at line 157
API_EXPORT_V(Int, (), API_EXPORT_V(Int, (),
void,printLoops,()); void,printLoops,());
API_EXPORT(Int, (name), API_EXPORT(Int, (name),
BPatch_basicBlockLoop *,findLoop,(const char *name)); BPatch_basicBlockLoop *,findLoop,(const char *name));
// Deprecated - this should not be an API method // Deprecated - this should not be an API method
//API_EXPORT_V(Int, (), //API_EXPORT_V(Int, (),
//void, initLivenessInfo,()); //void, initLivenessInfo,());
API_EXPORT(Int, (),
bool,isValid,());
/* /*
API_EXPORT(Int, (edge), API_EXPORT(Int, (edge),
BPatch_point *,createInstPointAtEdge,(BPatch_edge *edge)); BPatch_point *,createInstPointAtEdge,(BPatch_edge *edge));
*/ */
// Deprecated... use BPatch_edge->point() instead // Deprecated... use BPatch_edge->point() instead
/** find instrumentation points specified by loc, add to points*/ /** find instrumentation points specified by loc, add to points*/
API_EXPORT(Int, (loc, loop), API_EXPORT(Int, (loc, loop),
BPatch_Vector<BPatch_point*> *, BPatch_Vector<BPatch_point*> *,
findLoopInstPoints,(CONST_EXPORT BPatch_procedureLocation loc, findLoopInstPoints,(CONST_EXPORT BPatch_procedureLocation loc,
 End of changes. 4 change blocks. 
1 lines changed or deleted 7 lines changed or added


 BPatch_frame.h   BPatch_frame.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_function.h   BPatch_function.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 60 skipping to change at line 60
class BPatch_localVarCollection; class BPatch_localVarCollection;
class BPatch_function; class BPatch_function;
class BPatch_point; class BPatch_point;
class BPatch_flowGraph; class BPatch_flowGraph;
class BPatchTranslatorBase; class BPatchTranslatorBase;
class ParameterType; class ParameterType;
class ReturnParameterType; class ReturnParameterType;
namespace Dyninst {
namespace ParseAPI {
class Function;
};
};
#ifdef DYNINST_CLASS_NAME #ifdef DYNINST_CLASS_NAME
#undef DYNINST_CLASS_NAME #undef DYNINST_CLASS_NAME
#endif #endif
#define DYNINST_CLASS_NAME BPatch_function #define DYNINST_CLASS_NAME BPatch_function
class BPATCH_DLL_EXPORT BPatch_function : class BPATCH_DLL_EXPORT BPatch_function :
public BPatch_sourceObj, public BPatch_sourceObj,
public BPatch_eventLock, public BPatch_eventLock,
public Dyninst::AnnotatableSparse public Dyninst::AnnotatableSparse
{ {
skipping to change at line 106 skipping to change at line 112
BPatch_point* createMemInstPoint(void *addr, BPatch_memoryAccess* ma); BPatch_point* createMemInstPoint(void *addr, BPatch_memoryAccess* ma);
int_function *func; int_function *func;
bool varsAndParamsValid; bool varsAndParamsValid;
private: private:
void constructVarsAndParams(); void constructVarsAndParams();
void identifyParamDependencies(BPatch_function* callee, void* calleeAddr ess); void identifyParamDependencies(BPatch_function* callee, void* calleeAddr ess);
public:
//dynC internal use only
bool hasParamDebugInfo();
public: public:
virtual ~BPatch_function(); virtual ~BPatch_function();
// The following are for internal use by the library only: // The following are for internal use by the library only:
int_function *lowlevel_func() const { return func; } int_function *lowlevel_func() const { return func; }
BPatch_process *getProc() const; BPatch_process *getProc() const;
BPatch_addressSpace *getAddSpace() const { return addSpace; } BPatch_addressSpace *getAddSpace() const { return addSpace; }
BPatch_function(BPatch_addressSpace *_addSpace, int_function *_func, BPatch_function(BPatch_addressSpace *_addSpace, int_function *_func,
BPatch_module *mod = NULL); BPatch_module *mod = NULL);
BPatch_function(BPatch_addressSpace *_addSpace, int_function *_func, BPatch_function(BPatch_addressSpace *_addSpace, int_function *_func,
BPatch_type * _retType, BPatch_type * _retType,
BPatch_module *); BPatch_module *);
bool getSourceObj(BPatch_Vector<BPatch_sourceObj *> &); bool getSourceObj(BPatch_Vector<BPatch_sourceObj *> &);
BPatch_sourceObj *getObjParent(); BPatch_sourceObj *getObjParent();
BPatch_localVarCollection * localVariables; BPatch_localVarCollection * localVariables;
BPatch_localVarCollection * funcParameters; BPatch_localVarCollection * funcParameters;
void setReturnType(BPatch_type * _retType){retType = _retType;} void setReturnType(BPatch_type * _retType){retType = _retType;}
void setModule(BPatch_module *module) { if (this->mod == NULL) this->mo d = module;} void setModule(BPatch_module *module) { if (this->mod == NULL) this->mo d = module;}
void removeCFG() { cfg = NULL; }
void getUnresolvedControlTransfers(BPatch_Vector<BPatch_point *> &unres
olvedCF);
void getAbruptEndPoints(BPatch_Vector<BPatch_point *> &abruptEnds);
void getCallerPoints(std::vector<BPatch_point*>& callerPoints);
void getAllPoints(std::vector<BPatch_point*>& allPoints);
bool setHandlerFaultAddrAddr(Dyninst::Address addr, bool set);
void fixHandlerReturnAddr(Dyninst::Address addr);
bool removeInstrumentation();
bool parseNewEdge(Dyninst::Address source, Dyninst::Address target);
void addParam(Dyninst::SymtabAPI::localVar *lvar); void addParam(Dyninst::SymtabAPI::localVar *lvar);
// void addParam(const char * _name, BPatch_type *_type, int _linenum, // void addParam(const char * _name, BPatch_type *_type, int _linenum,
// long _frameOffset, int _reg = -1, // long _frameOffset, int _reg = -1,
// BPatch_storageClass _sc = BPatch_storageFrameOffset); // BPatch_storageClass _sc = BPatch_storageFrameOffset);
void fixupUnknown(BPatch_module *); void fixupUnknown(BPatch_module *);
// This isn't so much for internal use only, but it *should* // This isn't so much for internal use only, but it *should*
// remain undocumented for now. // remain undocumented for now.
bool containsSharedBlocks(); bool containsSharedBlocks();
// End of functions for internal use only // End of functions for internal use only
// For users of the library: // For users of the library:
// This function should be deprecated. API_EXPORT(Str, (), std::string, getName, ());
API_EXPORT(Int, (start, end, filename, max),
bool,getLineAndFile,( unsigned int & start, unsigned int & en
d,
char * filename, unsigned int max ));
// This function should be deprecated.
API_EXPORT(Int, (lineNo, buffer, exactMatch),
bool,getLineToAddr,( unsigned short lineNo, BPatch_Vector< unsigned
long > & buffer, bool exactMatch = true ));
// BPatch_function::getName // BPatch_function::getName
// Returns <demangled> name of function // Returns <demangled> name of function
API_EXPORT(Buffer, (s, len), API_EXPORT(Buffer, (s, len),
char *,getName,(char *s, int len)); char *,getName,(char *s, int len));
// BPatch_function::getMangledName // BPatch_function::getMangledName
// Returns mangled name of function, same as getName for non-c++ mutat ees // Returns mangled name of function, same as getName for non-c++ mutat ees
API_EXPORT(Int, (s, len), API_EXPORT(Int, (s, len),
skipping to change at line 318 skipping to change at line 330
const char *, addName, (const char *name, bool isPrimary = true, bool i sMangled = false)); const char *, addName, (const char *name, bool isPrimary = true, bool i sMangled = false));
// Return native pointer to the function. // Return native pointer to the function.
// Allocates and returns a special type of BPatch_variableExpr. // Allocates and returns a special type of BPatch_variableExpr.
API_EXPORT( Int, (), BPatch_variableExpr *, getFunctionRef, () ); API_EXPORT( Int, (), BPatch_variableExpr *, getFunctionRef, () );
// Get all functions that share a block (or any code, but it will // Get all functions that share a block (or any code, but it will
// always be a block) with this function. // always be a block) with this function.
API_EXPORT( Int, (funcs), bool, findOverlapping, (BPatch_Vector<BPatch_ function *> &funcs)); API_EXPORT( Int, (funcs), bool, findOverlapping, (BPatch_Vector<BPatch_ function *> &funcs));
// Get the underlying ParseAPI Function
API_EXPORT( Int, (), Dyninst::ParseAPI::Function *, getParseAPIFunc, ()
);
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
API_EXPORT(Int, (start, end), API_EXPORT(Int, (start, end),
bool,getLineNumbers,(unsigned int &start, unsigned int &end)); bool,getLineNumbers,(unsigned int &start, unsigned int &end));
API_EXPORT(Int, (), API_EXPORT(Int, (),
void *,getAddress,()); void *,getAddress,());
API_EXPORT(Int, (start, end), API_EXPORT(Int, (start, end),
 End of changes. 6 change blocks. 
11 lines changed or deleted 26 lines changed or added


 BPatch_image.h   BPatch_image.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 91 skipping to change at line 91
BPatch_variableExpr *findOrCreateVariable(int_variable *); BPatch_variableExpr *findOrCreateVariable(int_variable *);
public: public:
// The following functions are for internal use by the library only: // The following functions are for internal use by the library only:
// As such, these functions are not locked. // As such, these functions are not locked.
//BPatch_image(BPatch_process *_proc); //BPatch_image(BPatch_process *_proc);
BPatch_image(BPatch_addressSpace *addSpace); BPatch_image(BPatch_addressSpace *addSpace);
BPatch_image(); BPatch_image();
virtual ~BPatch_image(); virtual ~BPatch_image();
void getNewCodeRegions
(std::vector<BPatch_function*>&newFuncs,
std::vector<BPatch_function*>&modFuncs);
void clearNewCodeRegions();
// End functions for internal use only // End functions for internal use only
// BPatch_image::getThr // BPatch_image::getThr
// //
// return the BPatch_thread associated with this image // return the BPatch_thread associated with this image
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_thread *,getThr,()); BPatch_thread *,getThr,());
// BPatch_image::getAddressSpace() // BPatch_image::getAddressSpace()
// //
skipping to change at line 249 skipping to change at line 252
// //
// Returns global variable matching <name> in the image. NULL if not found. // Returns global variable matching <name> in the image. NULL if not found.
API_EXPORT(Int, (name, showError), API_EXPORT(Int, (name, showError),
BPatch_variableExpr *,findVariable,(const char *name, bool showError=tr ue)); BPatch_variableExpr *,findVariable,(const char *name, bool showError=tr ue));
// BPatch_image::findVariable // BPatch_image::findVariable
// //
// Returns local variable matching name <nm> in function scope of // Returns local variable matching name <nm> in function scope of
// provided BPatch_point. // provided BPatch_point.
API_EXPORT(InScope, (scp,nm), API_EXPORT(InScope, (scp, nm, showError),
BPatch_variableExpr *,findVariable,(BPatch_point &scp, const char *nm)) ; BPatch_variableExpr *,findVariable,(BPatch_point &scp, const char *nm, bool showError=true));
// BPatch_image::findType // BPatch_image::findType
// //
// Returns a BPatch_type corresponding to <name>, if exists, NULL if n ot found // Returns a BPatch_type corresponding to <name>, if exists, NULL if n ot found
API_EXPORT(Int, (name), API_EXPORT(Int, (name),
BPatch_type *,findType,(const char *name)); BPatch_type *,findType,(const char *name));
// BPatch_image::getAddressRanges // BPatch_image::getAddressRanges
// //
skipping to change at line 311 skipping to change at line 314
* file version of the binary. * file version of the binary.
* *
* Return value: This value is true if a new module was created or if * Return value: This value is true if a new module was created or if
* new code was parsed in an existing module * new code was parsed in an existing module
*/ */
API_EXPORT(Int, (affectedModules, funcEntryAddrs), API_EXPORT(Int, (affectedModules, funcEntryAddrs),
bool ,parseNewFunctions, bool ,parseNewFunctions,
(BPatch_Vector<BPatch_module*> &affectedModules, (BPatch_Vector<BPatch_module*> &affectedModules,
const BPatch_Vector<Dyninst::Address> &funcEntryAddrs)); const BPatch_Vector<Dyninst::Address> &funcEntryAddrs));
// BPatch_image::GetUnresolvedControlFlow
//
// Every call instruction that calls into a region of memory that
// is not recognized by Dyninst as pertaining to a code region in
// an existing program module is tracked. This function returns
// a list of all such call targets
API_EXPORT(Int, (),
BPatch_Vector<BPatch_point *> *,getUnresolvedControlFlow, ());
// //
// Reads a string from the target process // Reads a string from the target process
API_EXPORT(Int, (addr, str, size_limit), API_EXPORT(Int, (addr, str, size_limit),
bool, readString,(Dyninst::Address addr, std::string &str, bool, readString,(Dyninst::Address addr, std::string &str,
unsigned size_limit = 0)); unsigned size_limit = 0));
API_EXPORT(Int, (expr, str, size_limit), API_EXPORT(Int, (expr, str, size_limit),
bool, readString,(BPatch_variableExpr *expr, std::string &st r, bool, readString,(BPatch_variableExpr *expr, std::string &st r,
unsigned size_limit = 0)); unsigned size_limit = 0));
 End of changes. 5 change blocks. 
13 lines changed or deleted 7 lines changed or added


 BPatch_instruction.h   BPatch_instruction.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 43 skipping to change at line 43
#define _BPatch_instruction_h_ #define _BPatch_instruction_h_
#include "BPatch_dll.h" #include "BPatch_dll.h"
#include "BPatch_eventLock.h" #include "BPatch_eventLock.h"
#include <string> #include <string>
class InstrucIter; class InstrucIter;
class BPatch_basicBlock; class BPatch_basicBlock;
class BPatch_point; class BPatch_point;
class instruction;
class internal_instruction;
#ifdef DYNINST_CLASS_NAME #ifdef DYNINST_CLASS_NAME
#undef DYNINST_CLASS_NAME #undef DYNINST_CLASS_NAME
#endif #endif
#define DYNINST_CLASS_NAME BPatch_instruction #define DYNINST_CLASS_NAME BPatch_instruction
class BPATCH_DLL_EXPORT BPatch_instruction : public BPatch_eventLock{ class BPATCH_DLL_EXPORT BPatch_instruction : public BPatch_eventLock{
friend class BPatch_basicBlock; friend class BPatch_basicBlock;
public: public:
// maximum number of memory accesses per instruction; platform dependent // maximum number of memory accesses per instruction; platform dependent
static const unsigned int nmaxacc_NP; static const unsigned int nmaxacc_NP;
protected: protected:
unsigned int nacc; unsigned int nacc;
instruction *insn_; internal_instruction *insn_;
bool *isLoad; bool *isLoad;
bool *isStore; bool *isStore;
int *preFcn; // prefetch function (-1 = none) int *preFcn; // prefetch function (-1 = none)
int *condition; // -1 means no condition, all other values are machine specific int *condition; // -1 means no condition, all other values are machine specific
// conditions, currently (8/13/02) the tttn field on x86 // conditions, currently (8/13/02) the tttn field on x86
bool *nonTemporal; // non-temporal (cache non-polluting) write on x86 bool *nonTemporal; // non-temporal (cache non-polluting) write on x86
BPatch_basicBlock *parent; BPatch_basicBlock *parent;
long unsigned int addr; long unsigned int addr;
public: public:
BPatch_instruction(instruction *insn, BPatch_instruction(internal_instruction *insn,
long unsigned int _addr); long unsigned int _addr);
virtual ~BPatch_instruction(); virtual ~BPatch_instruction();
void getInstruction(const unsigned char *&_buffer, unsigned char &_length ); void getInstruction(const unsigned char *&_buffer, unsigned char &_length );
instruction *insn(); internal_instruction *insn();
// Not yet implemented // Not yet implemented
char *getMnemonic() const { return NULL; } char *getMnemonic() const { return NULL; }
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_point *,getInstPoint,()); BPatch_point *,getInstPoint,());
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_basicBlock *,getParent,()); BPatch_basicBlock *,getParent,());
API_EXPORT(Int, (), API_EXPORT(Int, (),
skipping to change at line 126 skipping to change at line 127
bool isConditional_NP(int which = 0) const { return condition[which] >= 0 ; } bool isConditional_NP(int which = 0) const { return condition[which] >= 0 ; }
bool isNonTemporal_NP(int which = 0) const { return nonTemporal[which]; } bool isNonTemporal_NP(int which = 0) const { return nonTemporal[which]; }
int prefetchType_NP(int which = 0) const { return preFcn[which]; } int prefetchType_NP(int which = 0) const { return preFcn[which]; }
int conditionCode_NP(int which = 0) const { return condition[which]; } int conditionCode_NP(int which = 0) const { return condition[which]; }
}; };
class BPATCH_DLL_EXPORT BPatch_branchInstruction : public BPatch_instructio n{ class BPATCH_DLL_EXPORT BPatch_branchInstruction : public BPatch_instructio n{
friend class BPatch_basicBlock; friend class BPatch_basicBlock;
public: public:
BPatch_branchInstruction(instruction *insn, BPatch_branchInstruction(internal_instruction *insn,
long unsigned int _addr, long unsigned int _addr,
void *target) : void *target) :
BPatch_instruction(insn, _addr), BPatch_instruction(insn, _addr),
target_(target) {} target_(target) {}
~BPatch_branchInstruction() {}; ~BPatch_branchInstruction() {};
void *getTarget() { return target_; } void *getTarget() { return target_; }
protected: protected:
 End of changes. 6 change blocks. 
6 lines changed or deleted 7 lines changed or added


 BPatch_loopTreeNode.h   BPatch_loopTreeNode.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_memoryAccess_NP.h   BPatch_memoryAccess_NP.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 42 skipping to change at line 42
/* $Id: BPatch_memoryAccess_NP.h,v 1.23 2008/02/21 21:27:47 legendre Exp $ */ /* $Id: BPatch_memoryAccess_NP.h,v 1.23 2008/02/21 21:27:47 legendre Exp $ */
#ifndef _MemoryAccess_h_ #ifndef _MemoryAccess_h_
#define _MemoryAccess_h_ #define _MemoryAccess_h_
#include "BPatch_Vector.h" #include "BPatch_Vector.h"
#include <stdlib.h> #include <stdlib.h>
#include "BPatch_instruction.h" #include "BPatch_instruction.h"
class BPatch_point; class BPatch_point;
class instruction; class internal_instruction;
/* Pseudoregisters definitions */ /* Pseudoregisters definitions */
#define POWER_XER2531 9999 #define POWER_XER2531 9999
#define IA32_EMULATE 1000 #define IA32_EMULATE 1000
#define IA32_ESCAS 1000 #define IA32_ESCAS 1000
#define IA32_NESCAS 1001 #define IA32_NESCAS 1001
#define IA32_ECMPS 1002 #define IA32_ECMPS 1002
#define IA32_NECMPS 1003 #define IA32_NECMPS 1003
skipping to change at line 124 skipping to change at line 124
long _imm_s, int _ra_s, int _rb_s, long _imm_s, int _ra_s, int _rb_s,
long _imm_c, int _ra_c = -1, int _rb_c = -1, long _imm_c, int _ra_c = -1, int _rb_c = -1,
unsigned int _scale_s = 0, int _preFcn = -1, unsigned int _scale_s = 0, int _preFcn = -1,
int _cond = -1, bool _nt = false); int _cond = -1, bool _nt = false);
public: public:
static BPatch_memoryAccess* const none; static BPatch_memoryAccess* const none;
static BPatch_memoryAccess* init_tables(); static BPatch_memoryAccess* init_tables();
// initializes only the first access; #bytes is a constant // initializes only the first access; #bytes is a constant
BPatch_memoryAccess(instruction *, long unsigned int _addr, BPatch_memoryAccess(internal_instruction *, long unsigned int _addr,
bool _isLoad, bool _isStore, unsigned int _bytes, bool _isLoad, bool _isStore, unsigned int _bytes,
long _imm, int _ra, int _rb, unsigned int _scale = 0, long _imm, int _ra, int _rb, unsigned int _scale = 0,
int _cond = -1, bool _nt = false); int _cond = -1, bool _nt = false);
// initializes only the first access; #bytes is an expression w/scale // initializes only the first access; #bytes is an expression w/scale
BPatch_memoryAccess(instruction *insn, long unsigned int _addr, BPatch_memoryAccess(internal_instruction *insn, long unsigned int _addr,
bool _isLoad, bool _isStore, bool _isinternal_Load, bool _isStore,
long _imm_s, int _ra_s, int _rb_s, unsigned int _scal e_s, long _imm_s, int _ra_s, int _rb_s, unsigned int _scal e_s,
long _imm_c, int _ra_c, int _rb_c, unsigned int _scal e_c, long _imm_c, int _ra_c, int _rb_c, unsigned int _scal e_c,
int _cond, bool _nt, int _preFcn = -1); int _cond, bool _nt, int _preFcn = -1);
// initializes only the first access; #bytes is an expression // initializes only the first access; #bytes is an expression
BPatch_memoryAccess(instruction *insn, long unsigned int _addr, BPatch_memoryAccess(internal_instruction *insn, long unsigned int _addr,
bool _isLoad, bool _isStore, bool _isPrefetch, bool _isLoad, bool _isStore, bool _isPrefetch,
long _imm_s, int _ra_s, int _rb_s, long _imm_s, int _ra_s, int _rb_s,
long _imm_c, int _ra_c, int _rb_c, long _imm_c, int _ra_c, int _rb_c,
unsigned short _preFcn); unsigned short _preFcn);
// initializes only the first access; #bytes is an expression & not a pre fetch // initializes only the first access; #bytes is an expression & not a pre fetch
BPatch_memoryAccess(instruction *insn, long unsigned int _addr, BPatch_memoryAccess(internal_instruction *insn, long unsigned int _addr,
bool _isLoad, bool _isStore, long _imm_s, int _ra_s, i nt _rb_s, bool _isLoad, bool _isStore, long _imm_s, int _ra_s, i nt _rb_s,
long _imm_c, int _ra_c, int _rb_c); long _imm_c, int _ra_c, int _rb_c);
// sets 2nd access; #bytes is constant // sets 2nd access; #bytes is constant
void set2nd(bool _isLoad, bool _isStore, unsigned int _bytes, void set2nd(bool _isLoad, bool _isStore, unsigned int _bytes,
long _imm, int _ra, int _rb, unsigned int _scale = 0); long _imm, int _ra, int _rb, unsigned int _scale = 0);
// sets 2nd access; #bytes is an expression w/scale // sets 2nd access; #bytes is an expression w/scale
void set2nd(bool _isLoad, bool _isStore, void set2nd(bool _isLoad, bool _isStore,
long _imm_s, int _ra_s, int _rb_s, unsigned int _scale_s, long _imm_s, int _ra_s, int _rb_s, unsigned int _scale_s,
long _imm_c, int _ra_c, int _rb_c, unsigned int _scale_c, long _imm_c, int _ra_c, int _rb_c, unsigned int _scale_c,
int _cond, bool _nt); int _cond, bool _nt);
// initializes both accesses; #bytes is a constant // initializes both accesses; #bytes is a constant
BPatch_memoryAccess(instruction *insn, long unsigned int _addr, BPatch_memoryAccess(internal_instruction *insn, long unsigned int _addr,
bool _isLoad, bool _isStore, unsigned int _bytes, bool _isLoad, bool _isStore, unsigned int _bytes,
long _imm, int _ra, int _rb, unsigned int _scale, long _imm, int _ra, int _rb, unsigned int _scale,
bool _isLoad2, bool _isStore2, unsigned int _bytes2, bool _isLoad2, bool _isStore2, unsigned int _bytes2,
long _imm2, int _ra2, int _rb2, unsigned int _scale2) ; long _imm2, int _ra2, int _rb2, unsigned int _scale2) ;
// initializes both accesses; #bytes is an expression & not a prefetch // initializes both accesses; #bytes is an expression & not a prefetch
BPatch_memoryAccess(instruction *insn, long unsigned int _addr, bool _isL oad, bool _isStore, BPatch_memoryAccess(internal_instruction *insn, long unsigned int _addr, bool _isLoad, bool _isStore,
long _imm_s, int _ra_s, int _rb_s, unsigned int _scal e_s, long _imm_s, int _ra_s, int _rb_s, unsigned int _scal e_s,
long _imm_c, int _ra_c, int _rb_c, unsigned int _scal e_c, long _imm_c, int _ra_c, int _rb_c, unsigned int _scal e_c,
bool _isLoad2, bool _isStore2, long _imm2_s, int _ra2 _s, bool _isLoad2, bool _isStore2, long _imm2_s, int _ra2 _s,
int _rb2_s, unsigned int _scale2_s, long _imm2_c, int _rb2_s, unsigned int _scale2_s, long _imm2_c,
int _ra2_c, int _rb2_c, unsigned int _scale2_c); int _ra2_c, int _rb2_c, unsigned int _scale2_c);
virtual ~BPatch_memoryAccess(); virtual ~BPatch_memoryAccess();
bool equals(const BPatch_memoryAccess* mp) const; bool equals(const BPatch_memoryAccess* mp) const;
bool equals(const BPatch_memoryAccess& rp) const; bool equals(const BPatch_memoryAccess& rp) const;
 End of changes. 8 change blocks. 
9 lines changed or deleted 9 lines changed or added


 BPatch_module.h   BPatch_module.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 38 skipping to change at line 38
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _BPatch_module_h_ #ifndef _BPatch_module_h_
#define _BPatch_module_h_ #define _BPatch_module_h_
#include "BPatch_dll.h" #include "BPatch_dll.h"
#include "BPatch_Vector.h" #include "BPatch_Vector.h"
#include "BPatch_sourceObj.h" #include "BPatch_sourceObj.h"
#include "BPatch_eventLock.h" #include "BPatch_eventLock.h"
#include "BPatch_hybridAnalysis.h"
#include "dyntypes.h" #include "dyntypes.h"
#include <vector> #include <vector>
#include <map> #include <map>
#if defined(IBM_BPATCH_COMPAT) #if defined(IBM_BPATCH_COMPAT)
#include <string> #include <string>
#endif #endif
class mapped_module; class mapped_module;
class process; class process;
skipping to change at line 62 skipping to change at line 63
class BPatch_addressSpace; class BPatch_addressSpace;
class BPatch_process; class BPatch_process;
class BPatch_statement; class BPatch_statement;
class int_function; class int_function;
class int_variable; class int_variable;
class instPoint; class instPoint;
class AddressSpace; class AddressSpace;
class BPatch_snippet; class BPatch_snippet;
class BPatchSnippetHandle; class BPatchSnippetHandle;
namespace Dyninst { namespace ParseAPI { class CodeObject; }}
extern BPatch_builtInTypeCollection * builtInTypes; extern BPatch_builtInTypeCollection * builtInTypes;
#ifdef DYNINST_CLASS_NAME #ifdef DYNINST_CLASS_NAME
#undef DYNINST_CLASS_NAME #undef DYNINST_CLASS_NAME
#endif #endif
#define DYNINST_CLASS_NAME BPatch_module #define DYNINST_CLASS_NAME BPatch_module
class BPATCH_DLL_EXPORT BPatch_module: public BPatch_sourceObj, public BPat ch_eventLock{ class BPATCH_DLL_EXPORT BPatch_module: public BPatch_sourceObj, public BPat ch_eventLock{
friend class process; friend class process;
skipping to change at line 109 skipping to change at line 112
AddressSpace *as, AddressSpace *as,
mapped_module *_mod, mapped_module *_mod,
BPatch_image *img); BPatch_image *img);
virtual ~BPatch_module(); virtual ~BPatch_module();
bool getSourceObj(BPatch_Vector<BPatch_sourceObj *>&); bool getSourceObj(BPatch_Vector<BPatch_sourceObj *>&);
BPatch_sourceObj *getObjParent(); BPatch_sourceObj *getObjParent();
void parseTypes(); void parseTypes();
char *parseStabStringSymbol(int line, char *stabstr, void *stabptr); char *parseStabStringSymbol(int line, char *stabstr, void *stabptr);
void setDefaultNamespacePrefix(char *name); void setDefaultNamespacePrefix(char *name);
void handleUnload(); void handleUnload();
bool isExploratoryModeOn();// true if exploratory or defensive mode is
on
bool protectAnalyzedCode();// pages that have analyzed code become read
-only
bool isSystemLib();
// End functions for internal use only // End functions for internal use only
// BPatch_module::getName // BPatch_module::getName
// Returns file name associated with module // Returns file name associated with module
API_EXPORT(Int, (buffer, length), API_EXPORT(Int, (buffer, length),
char *,getName,(char *buffer, int length)); char *,getName,(char *buffer, int length));
// BPatch_module::getFullName // BPatch_module::getFullName
// Returns full path name of module, when available // Returns full path name of module, when available
skipping to change at line 205 skipping to change at line 210
bool,isSharedLib,()); bool,isSharedLib,());
// BPatch_module::isNativeCompiler // BPatch_module::isNativeCompiler
// Returns true if this module was compiled with a native compiler for // Returns true if this module was compiled with a native compiler for
// the particular platform // the particular platform
API_EXPORT(Int, (), API_EXPORT(Int, (),
bool,isNativeCompiler,()); bool,isNativeCompiler,());
// This function should be deprecated.
API_EXPORT(Int, (lineNo, buffer, exactMatch),
bool,getLineToAddr,(unsigned int lineNo, BPatch_Vector<unsigned long
> & buffer, bool exactMatch = true ));
// BPatch_module::getAddressRanges // BPatch_module::getAddressRanges
// //
// function to get addresses for a line of the module // function to get addresses for a line of the module
// if fileName is NULL, uses the name of the module // if fileName is NULL, uses the name of the module
API_EXPORT(Int, (fileName, lineNo, ranges), API_EXPORT(Int, (fileName, lineNo, ranges),
bool,getAddressRanges,( const char * fileName, unsigned int lineNo, std ::vector< std::pair< unsigned long, unsigned long > > & ranges )); bool,getAddressRanges,( const char * fileName, unsigned int lineNo, std ::vector< std::pair< unsigned long, unsigned long > > & ranges ));
// BPatch_module::getSourceLines // BPatch_module::getSourceLines
// //
skipping to change at line 251 skipping to change at line 251
// BPatch_module::getSize // BPatch_module::getSize
// Returns the size of the module; defined as the end of the last // Returns the size of the module; defined as the end of the last
// function minus the start of the first function. // function minus the start of the first function.
API_EXPORT(Int, (), API_EXPORT(Int, (),
unsigned long, getSize, (void)); unsigned long, getSize, (void));
API_EXPORT(Int, (), API_EXPORT(Int, (),
bool, isValid, ()); bool, isValid, ());
// BPatch_module::GetUnresolvedControlFlow // BPastch_module::getHybridMode
// // returns the hybrid Analysis mode: normal, exploratory, defensive
// Every call instruction that calls into a region of memory that API_EXPORT(Int, (), BPatch_hybridMode, getHybridMode,());
// is not recognized by Dyninst as pertaining to a code region in
// an existing program module is tracked. This function returns
// a list of all such calls being made in this module
API_EXPORT(Int, (),
BPatch_Vector<BPatch_point *> *,getUnresolvedControlFlow, ());
API_EXPORT(Int, (callback), API_EXPORT(Int, (callback),
BPatchSnippetHandle*, insertInitCallback, (BPatch_snippet& c allback)); BPatchSnippetHandle*, insertInitCallback, (BPatch_snippet& c allback));
API_EXPORT(Int, (callback), API_EXPORT(Int, (callback),
BPatchSnippetHandle*, insertFiniCallback, (BPatch_snippet& c allback)); BPatchSnippetHandle*, insertFiniCallback, (BPatch_snippet& c allback));
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
API_EXPORT(Int, (start, end), API_EXPORT(Int, (start, end),
bool,getLineNumbers,(unsigned int &start, unsigned int &end)); bool,getLineNumbers,(unsigned int &start, unsigned int &end));
skipping to change at line 297 skipping to change at line 292
unsigned long end; // Ending address for this statement unsigned long end; // Ending address for this statement
std::string path; // Path name of this statement's source file std::string path; // Path name of this statement's source file
int line; // Line number of the statement int line; // Line number of the statement
int column; // Column number of the statement int column; // Column number of the statement
} Statement; } Statement;
API_EXPORT(Int, (), API_EXPORT(Int, (),
std::vector<struct BPatch_module::Statement>, getStatements, ()); std::vector<struct BPatch_module::Statement>, getStatements, ());
#endif #endif
// Tentative ParseAPI exposure
API_EXPORT(Int, (),
Dyninst::ParseAPI::CodeObject *, getCodeObject, ());
private: private:
// Parse wrapper // Parse wrapper
bool parseTypesIfNecessary(); bool parseTypesIfNecessary();
BPatch_typeCollection *moduleTypes; BPatch_typeCollection *moduleTypes;
// In particular, we understand the type information // In particular, we understand the type information
// in both DWARF and STABS format. // in both DWARF and STABS format.
void parseStabTypes(); void parseStabTypes();
void parseDwarfTypes(); void parseDwarfTypes();
bool isSystemLib();
// vector of unresolved control flow instructions
BPatch_Vector<BPatch_point *> unresolvedCF;
BPatch_funcMap func_map; BPatch_funcMap func_map;
BPatch_instpMap instp_map; BPatch_instpMap instp_map;
BPatch_varMap var_map; BPatch_varMap var_map;
bool full_func_parse; bool full_func_parse;
bool full_var_parse; bool full_var_parse;
}; };
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
 End of changes. 8 change blocks. 
19 lines changed or deleted 16 lines changed or added


 BPatch_parRegion.h   BPatch_parRegion.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_point.h   BPatch_point.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 198 skipping to change at line 198
BPatch_Vector<BPatchSnippetHandle *> preSnippets; BPatch_Vector<BPatchSnippetHandle *> preSnippets;
BPatch_Vector<BPatchSnippetHandle *> postSnippets; BPatch_Vector<BPatchSnippetHandle *> postSnippets;
BPatch_Vector<BPatchSnippetHandle *> allSnippets; BPatch_Vector<BPatchSnippetHandle *> allSnippets;
// If we're edge inst // If we're edge inst
BPatch_edge *edge_; BPatch_edge *edge_;
void recordSnippet(BPatch_callWhen, BPatch_snippetOrder, void recordSnippet(BPatch_callWhen, BPatch_snippetOrder,
BPatchSnippetHandle*); BPatchSnippetHandle*);
bool deleteSnippet(BPatchSnippetHandle* handle);
void attachMemAcc(BPatch_memoryAccess *memacc); void attachMemAcc(BPatch_memoryAccess *memacc);
AddressSpace *getAS(); AddressSpace *getAS();
public: public:
//~BPatch_point() { delete memacc; }; //~BPatch_point() { delete memacc; };
// Internal functions, DO NOT USE.
// Hack to get edge information. DO NOT USE. // Hack to get edge information. DO NOT USE.
const BPatch_edge *edge() const { return edge_; } const BPatch_edge *edge() const { return edge_; }
bool isReturnInstruction();
static BPatch_procedureLocation convertInstPointType_t(int intType);
instPoint *llpoint() { return point; }
bool getCFTargets(BPatch_Vector<Dyninst::Address> &targets);
Dyninst::Address getCallFallThroughAddr();
void setResolved();
Dyninst::Address getSavedTarget();
// End internal functions
//Added for DynC...
API_EXPORT(Int, (),
BPatch_addressSpace *, getAddressSpace, ());
// Get the loop ID // Get the loop ID
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_basicBlockLoop *, getLoop, ()); BPatch_basicBlockLoop *, getLoop, ());
// BPatch_point::getPointType // BPatch_point::getPointType
// //
API_EXPORT(Int, (), API_EXPORT(Int, (),
BPatch_procedureLocation,getPointType,()); BPatch_procedureLocation,getPointType,());
skipping to change at line 327 skipping to change at line 342
// BPatch_point::usesTrap_NP // BPatch_point::usesTrap_NP
// Returns true if this point is or would be instrumented with a trap, rather // Returns true if this point is or would be instrumented with a trap, rather
// than a jump to the base tramp, false otherwise. On platforms that do not // than a jump to the base tramp, false otherwise. On platforms that do not
// use traps (everything other than x86), it always returns false; // use traps (everything other than x86), it always returns false;
API_EXPORT(Int, (), API_EXPORT(Int, (),
bool,usesTrap_NP,()); bool,usesTrap_NP,());
// BPatch_point::getCFTarget
// Returns true if the point corresponds to a control flow
// instruction whose target can be statically determined, in
// which case "target" is set to the target of the control flow
// instruction
API_EXPORT(Int, (targets),
bool, getCFTarget, (BPatch_Vector<Dyninst::Address> *targets));
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
void *getPointAddress() { return getAddress(); } void *getPointAddress() { return getAddress(); }
int getPointLine() { return -1; } int getPointLine() { return -1; }
BPatch_function *getContainingFunction() { return const_cast<BPatch_fun ction*>(getFunction()); }; BPatch_function *getContainingFunction() { return const_cast<BPatch_fun ction*>(getFunction()); };
#endif #endif
}; };
#endif /* _BPatch_point_h_ */ #endif /* _BPatch_point_h_ */
 End of changes. 5 change blocks. 
9 lines changed or deleted 16 lines changed or added


 BPatch_process.h   BPatch_process.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 42 skipping to change at line 42
#ifndef _BPatch_process_h_ #ifndef _BPatch_process_h_
#define _BPatch_process_h_ #define _BPatch_process_h_
#include "BPatch_snippet.h" #include "BPatch_snippet.h"
#include "BPatch_dll.h" #include "BPatch_dll.h"
#include "BPatch_Vector.h" #include "BPatch_Vector.h"
#include "BPatch_image.h" #include "BPatch_image.h"
#include "BPatch_eventLock.h" #include "BPatch_eventLock.h"
#include "BPatch_point.h" #include "BPatch_point.h"
#include "BPatch_addressSpace.h" #include "BPatch_addressSpace.h"
#include "BPatch_hybridAnalysis.h"
#include "BPatch_callbacks.h" #include "BPatch_callbacks.h"
#include <vector> #include <vector>
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
class process; class process;
class AddressSpace; class AddressSpace;
class dyn_thread; class dyn_thread;
class miniTrampHandle; class miniTrampHandle;
class miniTramp; class miniTramp;
class BPatch; class BPatch;
class BPatch_thread; class BPatch_thread;
class BPatch_process; class BPatch_process;
class BPatch_funcMap; class BPatch_funcMap;
class BPatch_instpMap; class BPatch_instpMap;
class int_function; class int_function;
class rpcMgr; class rpcMgr;
class HybridAnalysis;
struct batchInsertionRecord; struct batchInsertionRecord;
typedef enum { typedef enum {
BPatch_nullEvent, BPatch_nullEvent,
BPatch_newConnectionEvent, BPatch_newConnectionEvent,
BPatch_internalShutDownEvent, BPatch_internalShutDownEvent,
BPatch_threadCreateEvent, BPatch_threadCreateEvent,
BPatch_threadDestroyEvent, BPatch_threadDestroyEvent,
BPatch_dynamicCallEvent, BPatch_dynamicCallEvent,
BPatch_userEvent, BPatch_userEvent,
skipping to change at line 226 skipping to change at line 228
bool statusIsStopped(); bool statusIsStopped();
bool statusIsTerminated(); bool statusIsTerminated();
bool getType(); bool getType();
bool getTerminated() {return terminated;} bool getTerminated() {return terminated;}
bool getMutationsActive() {return mutationsActive;} bool getMutationsActive() {return mutationsActive;}
int activeOneTimeCodes_; int activeOneTimeCodes_;
bool resumeAfterCompleted_; bool resumeAfterCompleted_;
HybridAnalysis *hybridAnalysis_;
static int oneTimeCodeCallbackDispatch(process *theProc, static int oneTimeCodeCallbackDispatch(process *theProc,
unsigned /* rpcid */, unsigned /* rpcid */,
void *userData, void *userData,
void *returnValue); void *returnValue);
void *oneTimeCodeInternal(const BPatch_snippet &expr, void *oneTimeCodeInternal(const BPatch_snippet &expr,
BPatch_thread *thread, // == NULL if proc-wid e BPatch_thread *thread, // == NULL if proc-wid e
void *userData, void *userData,
BPatchOneTimeCodeCallback cb = NULL, BPatchOneTimeCodeCallback cb = NULL,
bool synchronous = true, bool *err = NULL); bool synchronous = true, bool *err = NULL);
void oneTimeCodeCompleted(bool isSynchronous); void oneTimeCodeCompleted(bool isSynchronous);
protected: protected:
// for creating a process // for creating a process
BPatch_process(const char *path, const char *argv[], const char **envp BPatch_process(const char *path, const char *argv[],
= NULL, BPatch_hybridMode mode, const char **envp = NULL,
int stdin_fd = 0, int stdout_fd = 1, int stderr_fd = 2); int stdin_fd = 0, int stdout_fd = 1, int stderr_fd = 2);
// for attaching // for attaching
BPatch_process(const char *path, int pid); BPatch_process(const char *path, int pid, BPatch_hybridMode mode);
// for forking // for forking
BPatch_process(process *proc); BPatch_process(process *proc);
// Create a new thread in this proc // Create a new thread in this proc
BPatch_thread *createOrUpdateBPThread(int lwp, dynthread_t tid, unsigne d index, BPatch_thread *createOrUpdateBPThread(int lwp, dynthread_t tid, unsigne d index,
unsigned long stack_start, unsigned long stack_start,
unsigned long start_addr); unsigned long start_addr);
BPatch_thread *handleThreadCreate(unsigned index, int lwpid, dynthread_ t threadid, BPatch_thread *handleThreadCreate(unsigned index, int lwpid, dynthread_ t threadid,
unsigned long stack_top, unsigned long start_pc , process *proc = NULL); unsigned long stack_top, unsigned long start_pc , process *proc = NULL);
void deleteBPThread(BPatch_thread *thrd); void deleteBPThread(BPatch_thread *thrd);
bool updateThreadInfo(); bool updateThreadInfo();
public: public:
// DO NOT USE // Begin internal functions, DO NOT USE
//
// this function should go away as soon as Paradyn links against Dynins t // this function should go away as soon as Paradyn links against Dynins t
process *lowlevel_process() { return llproc; } process *lowlevel_process() { return llproc; }
// DO NOT USE
// These internal funcs trigger callbacks registered to matching events // These internal funcs trigger callbacks registered to matching events
bool triggerStopThread(instPoint *intPoint, int_function *intFunc, bool triggerStopThread(instPoint *intPoint, int_function *intFunc,
int cb_ID, void *retVal); int cb_ID, void *retVal);
bool triggerSignalHandlerCB(instPoint *point, int_function *func, long signum, bool triggerSignalHandlerCB(instPoint *point, int_function *func, long signum,
BPatch_Vector<Dyninst::Address> *handlers); BPatch_Vector<Dyninst::Address> *handlers);
bool triggerCodeOverwriteCB(Dyninst::Address fault_instruc,
Dyninst::Address viol_target);
bool setMemoryAccessRights(Dyninst::Address start, Dyninst::Address siz
e,
int rights);
unsigned char *makeShadowPage(Dyninst::Address pageAddress);
void overwriteAnalysisUpdate
( std::map<Dyninst::Address,unsigned char*>& owPages, //input
std::vector<Dyninst::Address>& deadBlockAddrs, //output
std::vector<BPatch_function*>& owFuncs, //output
bool &changedPages, bool &changedCode ); //output
// take a function and split off the blocks that correspond to the rang
e
bool removeFunctionSubRange
(BPatch_function &curFunc,
Dyninst::Address startAddr,
Dyninst::Address endAddr,
std::vector<Dyninst::Address> &blockAddrs);
HybridAnalysis *getHybridAnalysis() { return hybridAnalysis_; }
bool protectAnalyzedCode();
// DO NOT USE // DO NOT USE
// This is an internal debugging function // This is an internal debugging function
API_EXPORT_V(Int, (), API_EXPORT_V(Int, (),
void, debugSuicide,()); void, debugSuicide,());
//
// End internal functions
// BPatch_process::~BPatch_process // BPatch_process::~BPatch_process
// //
// Destructor // Destructor
API_EXPORT_DTOR(_dtor, (), API_EXPORT_DTOR(_dtor, (),
~,BPatch_process,()); ~,BPatch_process,());
// BPatch_process::getPid // BPatch_process::getPid
// //
// Get id of mutatee process // Get id of mutatee process
skipping to change at line 499 skipping to change at line 522
void *,oneTimeCode,(const BPatch_snippet &expr, bool *err = NULL)); void *,oneTimeCode,(const BPatch_snippet &expr, bool *err = NULL));
// BPatch_process::oneTimeCodeAsync // BPatch_process::oneTimeCodeAsync
// //
// Have the specified code be executed by the mutatee once. Dont wait until done. // Have the specified code be executed by the mutatee once. Dont wait until done.
API_EXPORT(Int, (expr, userData, cb), API_EXPORT(Int, (expr, userData, cb),
bool,oneTimeCodeAsync,(const BPatch_snippet &expr, void *userData = NUL L, bool,oneTimeCodeAsync,(const BPatch_snippet &expr, void *userData = NUL L,
BPatchOneTimeCodeCallback cb = NULL)); BPatchOneTimeCodeCallback cb = NULL));
// BPatch_process::setBeingDebuggedFlag // BPatch_process::hideDebugger()
// //
// This is a Windows only function that sets the user-space // This is a Windows only function that removes debugging artifacts tha
// debuggerPresent flag to 0 or 1, 0 meaning that the process is not t
// being debugged. The debugging process will still have debug // are added to user-space datastructures and the heap of the debugged
// access, but system calls that ask if the process is being debugged // process, by CreateProcess and DebugActiveProcess. Removing the arti
// will say that it is not because they merely return the value of the facts
// user-space beingDebugged flag. // doesn't have any effect on the process, as the kernel still knows th
API_EXPORT(Int, (debuggerPresent), at
bool,setBeingDebuggedFlag,(bool debuggerPresent)); // the process is being debugged. Three of the artifacts are flags tha
t can
// be reached through the Process Environment Block of the debuggee (PE
B):
// 1. BeingDebugged, one byte at offset 2 in the PEB.
// 2. NtGlobalFlags, at offset 0x68 in the PEB
// 3. There are two consecutive words of heap flags which are at offs
et 0x0c
// from the beginning of the heap. The heap base address is at of
fset
// 0x18 from the beginning of the PEB.
// The other thing this method does is clear the 0xabababababababab val
ue that
// it CreateProcess adds to the end of the heap section when creating a
debugged
// process, in response to the heap flag: HEAP_TAIL_CHECKING_ENABLED, w
hich it
// sets to true for debugged processes. We are clearing that flag, but
by the
// time we do, the value is already written to disk.
//
// Various system calls can still be used by the debuggee to recognize
that
// it is being debugged, so this is not a complete solution.
API_EXPORT(Int, (),
bool,hideDebugger,());
// BPatch_process::enableDumpPatchedImage // BPatch_process::enableDumpPatchedImage
// //
// //
API_EXPORT_V(Int, (), API_EXPORT_V(Int, (),
void,enableDumpPatchedImage,()); void,enableDumpPatchedImage,());
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
API_EXPORT(Int, (name, loadaddr), API_EXPORT(Int, (name, loadaddr),
bool,addSharedObject,(const char *name, const unsigned long loadaddr)); bool,addSharedObject,(const char *name, const unsigned long loadaddr));
 End of changes. 12 change blocks. 
18 lines changed or deleted 67 lines changed or added


 BPatch_snippet.h   BPatch_snippet.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 138 skipping to change at line 138
friend class BPatch_thread; friend class BPatch_thread;
friend class BPatch_arithExpr; friend class BPatch_arithExpr;
friend class BPatch_boolExpr; friend class BPatch_boolExpr;
friend class BPatch_funcCallExpr; friend class BPatch_funcCallExpr;
friend class BPatch_variableExpr; friend class BPatch_variableExpr;
friend class BPatch_ifExpr; friend class BPatch_ifExpr;
friend class BPatch_ifMachineConditionExpr; friend class BPatch_ifMachineConditionExpr;
friend class BPatch_sequence; friend class BPatch_sequence;
friend class BPatch_insnExpr; friend class BPatch_insnExpr;
friend class BPatch_stopThreadExpr; friend class BPatch_stopThreadExpr;
friend class BPatch_utilExpr;
friend AstNodePtr generateArrayRef(const BPatch_snippet &lOperand, friend AstNodePtr generateArrayRef(const BPatch_snippet &lOperand,
const BPatch_snippet &rOperand); const BPatch_snippet &rOperand);
friend AstNodePtr generateFieldRef(const BPatch_snippet &lOperand, friend AstNodePtr generateFieldRef(const BPatch_snippet &lOperand,
const BPatch_snippet &rOperand); const BPatch_snippet &rOperand);
friend AstNodePtr generateVariableBase(const BPatch_snippet &lOperand); friend AstNodePtr generateVariableBase(const BPatch_snippet &lOperand);
public: public:
int PDSEP_astMinCost(); // This will go away too int PDSEP_astMinCost(); // This will go away too
// BPatch_snippet::BPatch_snippet // BPatch_snippet::BPatch_snippet
// Default constructor // Default constructor
BPatch_snippet(); BPatch_snippet();
BPatch_snippet(AstNodePtr ast) {BPatch_snippet(); ast_wrapper = ast;}
// BPatch_snippet::BPatch_snippet // BPatch_snippet::BPatch_snippet
// Copy constructor // Copy constructor
public: BPatch_snippet(const BPatch_snippet &src) : BPatch_eventLock(s rc) public: BPatch_snippet(const BPatch_snippet &src) : BPatch_eventLock(s rc)
{ LOCK_FUNCTION_V(BPatch_snippetInt,(src)); } { LOCK_FUNCTION_V(BPatch_snippetInt,(src)); }
private: void BPatch_snippetInt(const BPatch_snippet &src);
public:
//DynC internal use only
// BPatch_snippet::getType
// Returns the type of the underlying AST
API_EXPORT(Int, (),
BPatch_type *,getType,());
private:
void BPatch_snippetInt(const BPatch_snippet &src);
void BPatch_snippetInt(const AstNodePtr &node);
// BPatch_snippet:operator= // BPatch_snippet:operator=
// Assign one BPatch_snippet to another // Assign one BPatch_snippet to another
API_EXPORT_OPER(_equals, (src), API_EXPORT_OPER(_equals, (src),
BPatch_snippet &,operator=,(const BPatch_snippet &src)); BPatch_snippet &,operator=,(const BPatch_snippet &src));
// BPatch_snippet::~BPatch_snippet // BPatch_snippet::~BPatch_snippet
// Destructor, decrements reference count to snippet, deleting when no ne are left // Destructor, decrements reference count to snippet, deleting when no ne are left
API_EXPORT_DTOR(_dtor, (), API_EXPORT_DTOR(_dtor, (),
skipping to change at line 690 skipping to change at line 702
// Replace the effective address of a load with the provided snippet // Replace the effective address of a load with the provided snippet
API_EXPORT(Int, (l), API_EXPORT(Int, (l),
bool, overrideLoadAddress, (BPatch_snippet &l)); bool, overrideLoadAddress, (BPatch_snippet &l));
// Replace the effective address of a store with the provided snippet // Replace the effective address of a store with the provided snippet
API_EXPORT(Int, (s), API_EXPORT(Int, (s),
bool, overrideStoreAddress, (BPatch_snippet &s)); bool, overrideStoreAddress, (BPatch_snippet &s));
}; };
typedef enum {
BPatch_noInterp,
BPatch_interpAsTarget,
BPatch_interpAsReturnAddr,
} BPatch_stInterpret;
#ifdef DYNINST_CLASS_NAME #ifdef DYNINST_CLASS_NAME
#undef DYNINST_CLASS_NAME #undef DYNINST_CLASS_NAME
#endif #endif
#define DYNINST_CLASS_NAME BPatch_stopThreadExpr #define DYNINST_CLASS_NAME BPatch_stopThreadExpr
class BPATCH_DLL_EXPORT BPatch_stopThreadExpr : public BPatch_snippet { class BPATCH_DLL_EXPORT BPatch_stopThreadExpr : public BPatch_snippet {
// BPatch_stopThreadExpr // BPatch_stopThreadExpr
// This snippet type stops the thread that executes it. It // This snippet type stops the thread that executes it. It
// evaluates a calculation snippet and triggers a callback to the // evaluates a calculation snippet and triggers a callback to the
// user program with the result of the calculation and a pointer to // user program with the result of the calculation and a pointer to
// the BPatch_point at which the snippet was inserted // the BPatch_point at which the snippet was inserted
API_EXPORT_CTOR(Int, (cb, calculation), API_EXPORT_CTOR(Int, (cb, calculation, useCache, interp),
BPatch_stopThreadExpr, BPatch_stopThreadExpr,
(const BPatchStopThreadCallback &cb, (const BPatchStopThreadCallback &cb,
const BPatch_snippet &calculation)); const BPatch_snippet &calculation,
bool useCache = false,
BPatch_stInterpret interp = BPatch_noInterp));
}; };
#ifdef DYNINST_CLASS_NAME #ifdef DYNINST_CLASS_NAME
#undef DYNINST_CLASS_NAME #undef DYNINST_CLASS_NAME
#endif #endif
#define DYNINST_CLASS_NAME BPatch_originalAddressExpr #define DYNINST_CLASS_NAME BPatch_originalAddressExpr
class BPATCH_DLL_EXPORT BPatch_originalAddressExpr : public BPatch_snippet class BPATCH_DLL_EXPORT BPatch_originalAddressExpr : public BPatch_snippet
{ {
 End of changes. 8 change blocks. 
4 lines changed or deleted 25 lines changed or added


 BPatch_sourceBlock.h   BPatch_sourceBlock.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_sourceObj.h   BPatch_sourceObj.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_statement.h   BPatch_statement.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BPatch_thread.h   BPatch_thread.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 102 skipping to change at line 102
//Generator for above constructor //Generator for above constructor
static BPatch_thread *createNewThread(BPatch_process *proc, int ind, static BPatch_thread *createNewThread(BPatch_process *proc, int ind,
int lwp_id, dynthread_t async_tid ); int lwp_id, dynthread_t async_tid );
void deleteThread(bool cleanup = true); void deleteThread(bool cleanup = true);
void removeThreadFromProc(); void removeThreadFromProc();
void updateValues(dynthread_t tid, unsigned long stack_start, void updateValues(dynthread_t tid, unsigned long stack_start,
BPatch_function *initial_func, int lwp_id); BPatch_function *initial_func, int lwp_id);
public: public:
/**
* The following functions are all deprecated. They've been replaced
* by equivently named functions in BPatch_process. See BPatch_process
.h
* for documentation.
**/
BPatch_image *getImage() { return proc->getImage(); }
int getPid() { return proc->getPid(); }
bool stopExecution() { return proc->stopExecution(); }
bool continueExecution() { return proc->continueExecution(); }
bool terminateExecution() { return proc->terminateExecution(); }
bool isStopped() { return proc->isStopped(); }
int stopSignal() { return proc->stopSignal(); }
bool isTerminated() { return proc->isTerminated(); }
BPatch_exitType terminationStatus() { return proc->terminationStatus();
}
int getExitCode() { return proc->getExitCode(); }
int getExitSignal() { return proc->getExitSignal(); }
bool detach(bool cont) { return proc->detach(cont); }
bool isDetached() { return proc->isDetached(); }
bool dumpCore(const char *file, bool terminate)
{ return proc->dumpCore(file, terminate); }
bool dumpImage(const char *file) { return proc->dumpImage(file); }
char *dumpPatchedImage(const char *file)
{ return proc->dumpPatchedImage(file); }
BPatch_variableExpr *malloc(int n) { return proc->malloc(n); }
BPatch_variableExpr *malloc(const BPatch_type &type)
{ return proc->malloc(type); }
bool free(BPatch_variableExpr &ptr) { return proc->free(ptr); }
BPatch_variableExpr *getInheritedVariable(BPatch_variableExpr &pVar)
{ return proc->getInheritedVariable(pVar); }
BPatchSnippetHandle *getInheritedSnippet(BPatchSnippetHandle &parentSni
ppet)
{ return proc->getInheritedSnippet(parentSnippet); }
BPatchSnippetHandle *insertSnippet(const BPatch_snippet &expr,
BPatch_point &point, BPatch_snippetOrder order = BPatch_firstSnip
pet)
{ return proc->insertSnippet(expr, point, order); }
BPatchSnippetHandle *insertSnippet(const BPatch_snippet &expr,
BPatch_point &point, BPatch_callWhen when,
BPatch_snippetOrder order = BPatch_firstSnippet)
{ return proc->insertSnippet(expr, point, when, order); }
BPatchSnippetHandle *insertSnippet(const BPatch_snippet &expr,
const BPatch_Vector<BPatch_point *> &
points,
BPatch_snippetOrder order = BPatch_fi
rstSnippet)
{ return proc->insertSnippet(expr, points, order); }
BPatchSnippetHandle *insertSnippet(const BPatch_snippet &expr,
const BPatch_Vector<BPatch_point *> &
points, BPatch_callWhen when,
BPatch_snippetOrder order = BPatch_fi
rstSnippet)
{ return proc->insertSnippet(expr, points, when, order); }
bool deleteSnippet(BPatchSnippetHandle *handle)
{ return proc->deleteSnippet(handle); }
bool setMutationsActive(bool activate)
{ return proc->setMutationsActive(activate); }
bool replaceFunctionCall(BPatch_point &point, BPatch_function &newFunc)
{ return proc->replaceFunctionCall(point, newFunc); }
bool removeFunctionCall(BPatch_point &point)
{ return proc->removeFunctionCall(point); }
bool replaceFunction(BPatch_function &oldFunc, BPatch_function &newFunc
)
{ return proc->replaceFunction(oldFunc, newFunc); }
bool loadLibrary(const char *libname, bool reload = false)
{ return proc->loadLibrary(libname, reload); }
bool getSourceLines( unsigned long addr, BPatch_Vector< BPatch_statemen
t > & lines )
{ return proc->getSourceLines( addr, lines ); }
bool getAddressRanges( const char * fileName, unsigned int lineNo, std:
:vector< std::pair< unsigned long, unsigned long > > & ranges )
{ return proc->getAddressRanges( fileName, lineNo, ranges ); }
// getLineAndFile() should be deprecated.
bool getLineAndFile( unsigned long addr, unsigned short & lineNo, char
* fileName, int length );
BPatch_function *findFunctionByAddr(void *addr)
{ return proc->findFunctionByAddr(addr); }
void enableDumpPatchedImage() { proc->enableDumpPatchedImage(); }
#ifdef IBM_BPATCH_COMPAT
bool addSharedObject(const char *name, const unsigned long loadaddr)
{ return proc->addSharedObject(name, loadaddr); }
#endif
void markVisiblyStopped(bool new_state); void markVisiblyStopped(bool new_state);
bool isVisiblyStopped(); bool isVisiblyStopped();
// BPatch_thread::getCallStack // BPatch_thread::getCallStack
// Returns a vector of BPatch_frame, representing the current call sta ck // Returns a vector of BPatch_frame, representing the current call sta ck
API_EXPORT(Int, (stack), API_EXPORT(Int, (stack),
bool,getCallStack,(BPatch_Vector<BPatch_frame>& stack)); bool,getCallStack,(BPatch_Vector<BPatch_frame>& stack));
// BPatch_thread::getProcess // BPatch_thread::getProcess
// Returns a pointer to the process that owns this thread // Returns a pointer to the process that owns this thread
 End of changes. 2 change blocks. 
84 lines changed or deleted 1 lines changed or added


 BPatch_type.h   BPatch_type.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 333 skipping to change at line 333
//Define all of these in .C //Define all of these in .C
const char *getName() const; const char *getName() const;
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
char *getName(char *buffer, int max) const; char *getName(char *buffer, int max) const;
BPatch_dataClass type() const { return type_; } BPatch_dataClass type() const { return type_; }
#endif #endif
BPatch_dataClass getDataClass() const { return type_; } BPatch_dataClass getDataClass() const { return type_; }
//TODO - implement these functions later -- giri unsigned long getLow() const;
const char *getLow() const; unsigned long getHigh() const;
const char *getHigh() const;
BPatch_Vector<BPatch_field *> * getComponents() const; BPatch_Vector<BPatch_field *> * getComponents() const;
API_EXPORT(Int, (otype), API_EXPORT(Int, (otype),
bool, isCompatible, (BPatch_type * otype)); bool, isCompatible, (BPatch_type * otype));
BPatch_type *getConstituentType() const; BPatch_type *getConstituentType() const;
BPatch_Vector<BPatch_cblock *> *getCblocks() const; BPatch_Vector<BPatch_cblock *> *getCblocks() const;
// INTERNAL METHODS // INTERNAL METHODS
void incrRefCount() { ++refCount; } void incrRefCount() { ++refCount; }
void decrRefCount() { assert(refCount > 0); if (!--refCount) delete this; } void decrRefCount() { assert(refCount > 0); if (!--refCount) delete this; }
skipping to change at line 380 skipping to change at line 379
// Internal use only // Internal use only
BPatch_localVar(Dyninst::SymtabAPI::localVar *lVar_); BPatch_localVar(Dyninst::SymtabAPI::localVar *lVar_);
~BPatch_localVar(); ~BPatch_localVar();
BPatch_localVar() {} BPatch_localVar() {}
void fixupUnknown(BPatch_module *); void fixupUnknown(BPatch_module *);
Dyninst::SymtabAPI::localVar *getSymtabVar(); Dyninst::SymtabAPI::localVar *getSymtabVar();
BPatch_storageClass convertToBPatchStorage(Dyninst::SymtabAPI::Variable Location *loc); BPatch_storageClass convertToBPatchStorage(Dyninst::SymtabAPI::Variable Location *loc);
public: public:
// end of functions for nternal use only // end of functions for internal use only
const char * getName(); const char * getName();
BPatch_type * getType(); BPatch_type * getType();
int getLineNum(); int getLineNum();
long getFrameOffset(); long getFrameOffset();
int getRegister(); int getRegister();
BPatch_storageClass getStorageClass(); BPatch_storageClass getStorageClass();
}; };
#endif /* _BPatch_type_h_ */ #endif /* _BPatch_type_h_ */
 End of changes. 3 change blocks. 
5 lines changed or deleted 4 lines changed or added


 BinaryFunction.h   BinaryFunction.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 54 skipping to change at line 54
using std::vector; using std::vector;
/// A %BinaryFunction object represents a function that can combine two %Expressions and produce another %ValueComputation. /// A %BinaryFunction object represents a function that can combine two %Expressions and produce another %ValueComputation.
/// ///
/// For the purposes of representing a single operand of an instruction , the %BinaryFunctions of interest are addition and multiplication of /// For the purposes of representing a single operand of an instruction , the %BinaryFunctions of interest are addition and multiplication of
/// integer values; this allows a %Expression to represent all addressi ng modes on the architectures currently /// integer values; this allows a %Expression to represent all addressi ng modes on the architectures currently
/// supported by the %Instruction API. /// supported by the %Instruction API.
class INSTRUCTION_EXPORT BinaryFunction : public Expression class INSTRUCTION_EXPORT BinaryFunction : public Expression
{ {
public: public:
class funcT class INSTRUCTION_EXPORT funcT
{ {
public: public:
funcT(std::string name) : m_name(name) funcT(std::string name) : m_name(name)
{ {
} }
virtual ~funcT() virtual ~funcT()
{ {
} }
virtual Result operator()(const Result& arg1, const Result& arg2) co nst = 0; virtual Result operator()(const Result& arg1, const Result& arg2) co nst = 0;
skipping to change at line 150 skipping to change at line 150
virtual const Result& eval() const; virtual const Result& eval() const;
/// The children of a %BinaryFunction are its two arguments. /// The children of a %BinaryFunction are its two arguments.
/// \param children Appends the children of this %BinaryFunction to \ c children. /// \param children Appends the children of this %BinaryFunction to \ c children.
virtual void getChildren(vector<InstructionAST::Ptr>& children) const virtual void getChildren(vector<InstructionAST::Ptr>& children) const
{ {
children.push_back(m_arg1); children.push_back(m_arg1);
children.push_back(m_arg2); children.push_back(m_arg2);
return; return;
} }
virtual void getChildren(vector<Expression::Ptr>& children) const
{
children.push_back(m_arg1);
children.push_back(m_arg2);
return;
}
/// The use set of a %BinaryFunction is the union of the use sets of its children. /// The use set of a %BinaryFunction is the union of the use sets of its children.
/// \param uses Appends the use set of this %BinaryFunction to \c use s. /// \param uses Appends the use set of this %BinaryFunction to \c use s.
virtual void getUses(set<InstructionAST::Ptr>& uses) virtual void getUses(set<InstructionAST::Ptr>& uses)
{ {
m_arg1->getUses(uses); m_arg1->getUses(uses);
m_arg2->getUses(uses); m_arg2->getUses(uses);
return; return;
} }
/// \c isUsed returns true if \c findMe is an argument of this %Binar yFunction, /// \c isUsed returns true if \c findMe is an argument of this %Binar yFunction,
/// or if it is in the use set of either argument. /// or if it is in the use set of either argument.
virtual bool isUsed(InstructionAST::Ptr findMe) const virtual bool isUsed(InstructionAST::Ptr findMe) const
{ {
return m_arg1->isUsed(findMe) || m_arg2->isUsed(findMe) return m_arg1->isUsed(findMe) || m_arg2->isUsed(findMe)
|| (*m_arg1 == *findMe) || (*m_arg2 == *findMe) || (*findMe == *this); || (*m_arg1 == *findMe) || (*m_arg2 == *findMe) || (*findMe == *this);
} }
virtual std::string format() const virtual std::string format(formatStyle how) const
{ {
std::stringstream retVal; std::stringstream retVal;
retVal << m_arg1->format() << " " << m_funcPtr->format() << " " << m if(how == memoryAccessStyle)
_arg2->format(); {
retVal << m_arg2->format() << "(" << m_arg1->format() << ")";
}
else
{
retVal << m_arg1->format() << " " << m_funcPtr->format() << " "
<< m_arg2->format();
}
return retVal.str(); return retVal.str();
} }
virtual bool bind(Expression* expr, const Result& value); virtual bool bind(Expression* expr, const Result& value);
virtual void apply(Visitor* v); virtual void apply(Visitor* v);
bool isAdd() const; bool isAdd() const;
bool isMultiply() const; bool isMultiply() const;
protected: protected:
virtual bool isStrictEqual(const InstructionAST& rhs) const virtual bool isStrictEqual(const InstructionAST& rhs) const
{ {
const BinaryFunction& other(dynamic_cast<const BinaryFunction&>(rhs) ); const BinaryFunction& other(dynamic_cast<const BinaryFunction&>(rhs) );
 End of changes. 5 change blocks. 
5 lines changed or deleted 19 lines changed or added


 Collections.h   Collections.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 39 skipping to change at line 39
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _Collections_h_ #ifndef _Collections_h_
#define _Collections_h_ #define _Collections_h_
#include "Type.h" #include "Type.h"
#include "Variable.h" #include "Variable.h"
#include "Serialization.h" #include "Serialization.h"
using namespace std;
namespace Dyninst { namespace Dyninst {
namespace SymtabAPI { namespace SymtabAPI {
class Module; class Module;
class Symtab; class Symtab;
class localVar; class localVar;
/* /*
* This class contains a collection of local variables. * This class contains a collection of local variables.
* Each function will have one of these objects associated with it. * Each function will have one of these objects associated with it.
* This object will store all the local variables within this function. * This object will store all the local variables within this function.
* Note: This class is unaware of scope. * Note: This class is unaware of scope.
*/ */
class localVarCollection : public AnnotationContainer<localVar *> { class localVarCollection : public AnnotationContainer<localVar *> {
dyn_hash_map<std::string, localVar *> localVariablesByName; std::vector<localVar *> localVars;
vector<localVar *> localVars;
SYMTAB_EXPORT bool addItem_impl(localVar *); SYMTAB_EXPORT bool addItem_impl(localVar *);
public: public:
SYMTAB_EXPORT localVarCollection(){} SYMTAB_EXPORT localVarCollection(){}
SYMTAB_EXPORT ~localVarCollection(); SYMTAB_EXPORT ~localVarCollection();
SYMTAB_EXPORT void addLocalVar(localVar * var); SYMTAB_EXPORT void addLocalVar(localVar * var);
SYMTAB_EXPORT localVar * findLocalVar(std::string &name); SYMTAB_EXPORT localVar * findLocalVar(std::string &name);
SYMTAB_EXPORT vector<localVar *> *getAllVars(); SYMTAB_EXPORT std::vector<localVar *> *getAllVars();
SYMTAB_EXPORT Serializable *ac_serialize_impl(SerializerBase *, const cha r * = "localVarCollection") THROW_SPEC (SerializerError); SYMTAB_EXPORT Serializable *ac_serialize_impl(SerializerBase *, const cha r * = "localVarCollection") THROW_SPEC (SerializerError);
}; };
/* /*
* Due to DWARF weirdness, this can be shared between multiple BPatch_modul es. * Due to DWARF weirdness, this can be shared between multiple BPatch_modul es.
* So we reference-count to make life easier. * So we reference-count to make life easier.
*/ */
class typeCollection : public Serializable//, public AnnotatableSparse class typeCollection : public Serializable//, public AnnotatableSparse
{ {
 End of changes. 4 change blocks. 
5 lines changed or deleted 3 lines changed or added


 Dereference.h   Dereference.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 86 skipping to change at line 86
virtual ~Dereference() virtual ~Dereference()
{ {
} }
/// A %Dereference has one child, which represents the address being dereferenced. /// A %Dereference has one child, which represents the address being dereferenced.
/// \param children Appends the child of this %Dereference to \c chil dren. /// \param children Appends the child of this %Dereference to \c chil dren.
virtual void getChildren(vector<InstructionAST::Ptr>& children) const virtual void getChildren(vector<InstructionAST::Ptr>& children) const
{ {
children.push_back(addressToDereference); children.push_back(addressToDereference);
return; return;
} }
virtual void getChildren(vector<Expression::Ptr>& children) const
{
children.push_back(addressToDereference);
return;
}
/// The use set of a %Dereference is the same as the use set of its c hildren. /// The use set of a %Dereference is the same as the use set of its c hildren.
/// \param uses The use set of this %Dereference is inserted into \c uses. /// \param uses The use set of this %Dereference is inserted into \c uses.
virtual void getUses(set<InstructionAST::Ptr>& uses) virtual void getUses(set<InstructionAST::Ptr>& uses)
{ {
addressToDereference->getUses(uses); addressToDereference->getUses(uses);
return; return;
} }
/// An %InstructionAST is used by a %Dereference if it is equivalent to the /// An %InstructionAST is used by a %Dereference if it is equivalent to the
/// %Dereference or it is used by the lone child of the %Dereference /// %Dereference or it is used by the lone child of the %Dereference
virtual bool isUsed(InstructionAST::Ptr findMe) const virtual bool isUsed(InstructionAST::Ptr findMe) const
{ {
return addressToDereference->isUsed(findMe) || *findMe == *this; return addressToDereference->isUsed(findMe) || *findMe == *this;
} }
virtual std::string format() const virtual std::string format(formatStyle) const
{ {
std::stringstream retVal; std::stringstream retVal;
retVal << "[" << addressToDereference->format() << "]"; #if defined(DEBUG_MEMORY_ACCESS_WIDTH)
return retVal.str(); switch(Expression::userSetValue.type)
{
case u8:
retVal << "u8 @ ";
break;
case s8:
retVal << "s8 @ ";
break;
case u16:
retVal << "u16 @ ";
break;
case s16:
retVal << "s16 @ ";
break;
case u32:
retVal << "u32 @ ";
break;
case s32:
retVal << "s32 @ ";
break;
case u64:
retVal << "u64 @ ";
break;
case s64:
retVal << "s64 @ ";
break;
case sp_float:
retVal << "float @ ";
break;
case dp_float:
retVal << "double @ ";
break;
case dbl128:
retVal << "packed double @ ";
break;
default:
retVal << "UNKNOWN SIZE @ ";
break;
}
#endif
// retVal << "[" << addressToDereference->format() << "]";
retVal << addressToDereference->format(memoryAccessStyle);
return retVal.str();
} }
virtual bool bind(Expression* expr, const Result& value) virtual bool bind(Expression* expr, const Result& value)
{ {
if(Expression::bind(expr, value)) if(Expression::bind(expr, value))
{ {
return true; return true;
} }
return addressToDereference->bind(expr, value); return addressToDereference->bind(expr, value);
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 51 lines changed or added


 Edge.h   Edge.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 44 skipping to change at line 44
#include "dyn_detail/boost/shared_ptr.hpp" #include "dyn_detail/boost/shared_ptr.hpp"
#include "dyn_detail/boost/weak_ptr.hpp" #include "dyn_detail/boost/weak_ptr.hpp"
#include <set> #include <set>
#include "Annotatable.h" #include "Annotatable.h"
namespace Dyninst { namespace Dyninst {
class Graph; class Graph;
class Node; class Node;
class Edge : public AnnotatableSparse { class COMMON_EXPORT Edge : public AnnotatableSparse {
friend class Node; friend class Node;
friend class Graph; friend class Graph;
friend class Creator; friend class Creator;
public: public:
typedef dyn_detail::boost::shared_ptr<Edge> Ptr; typedef dyn_detail::boost::shared_ptr<Edge> Ptr;
private: private:
typedef dyn_detail::boost::shared_ptr<Node> NodeSharedPtr; typedef dyn_detail::boost::shared_ptr<Node> NodeSharedPtr;
typedef dyn_detail::boost::weak_ptr<Node> NodePtr; typedef dyn_detail::boost::weak_ptr<Node> NodePtr;
public: public:
static Ptr createEdge(const NodeSharedPtr source, const NodeSharedPtr t arget); static Ptr createEdge(const NodeSharedPtr source, const NodeSharedPtr t arget);
NodeSharedPtr source() const { return source_.lock(); } NodeSharedPtr source() const { return source_.lock(); }
NodeSharedPtr target() const { return target_.lock(); } NodeSharedPtr target() const { return target_.lock(); }
private: void setSource(NodeSharedPtr source) { source_ = NodePtr(source); }
void setTarget(NodeSharedPtr target) { target_ = NodePtr(target); }
virtual ~Edge() {};
protected:
Edge(const NodePtr source, const NodePtr target); Edge(const NodePtr source, const NodePtr target);
Edge(); Edge();
NodePtr source_; NodePtr source_;
NodePtr target_; NodePtr target_;
}; };
class EdgeIteratorImpl; class EdgeIteratorImpl;
class EdgeIterator { class COMMON_EXPORT EdgeIterator {
friend class Node; friend class Node;
friend class Graph; friend class Graph;
friend class Edge; friend class Edge;
public: public:
EdgeIterator &operator++(); EdgeIterator &operator++();
EdgeIterator operator++(int); EdgeIterator operator++(int);
EdgeIterator &operator--(); EdgeIterator &operator--();
EdgeIterator operator--(int); EdgeIterator operator--(int);
skipping to change at line 96 skipping to change at line 101
EdgeIterator &operator=(const EdgeIterator &rhs); EdgeIterator &operator=(const EdgeIterator &rhs);
Edge::Ptr operator*() const; Edge::Ptr operator*() const;
// Make sure this is explicitly _not_ allowed (no vectors of iterators) // Make sure this is explicitly _not_ allowed (no vectors of iterators)
EdgeIterator() : iter_(NULL) {}; EdgeIterator() : iter_(NULL) {};
EdgeIterator(const EdgeIterator &rhs); EdgeIterator(const EdgeIterator &rhs);
~EdgeIterator(); virtual ~EdgeIterator();
EdgeIterator(EdgeIteratorImpl *iter) : iter_(iter) {}; EdgeIterator(EdgeIteratorImpl *iter) : iter_(iter) {};
protected: protected:
// Main constructor // Main constructor
// The iter parameter becomes owned by the iterator and will be destroy ed // The iter parameter becomes owned by the iterator and will be destroy ed
// when the iterator is destroyed. // when the iterator is destroyed.
// We hide the internal iteration behavior behind a pointer. // We hide the internal iteration behavior behind a pointer.
 End of changes. 5 change blocks. 
5 lines changed or deleted 10 lines changed or added


 Expression.h   Expression.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 128 skipping to change at line 128
/// unknown" /// unknown"
/// ///
class INSTRUCTION_EXPORT Expression : public InstructionAST class INSTRUCTION_EXPORT Expression : public InstructionAST
{ {
public: public:
/// \brief A type definition for a reference counted pointer to a %Ex pression. /// \brief A type definition for a reference counted pointer to a %Ex pression.
typedef dyn_detail::boost::shared_ptr<Expression> Ptr; typedef dyn_detail::boost::shared_ptr<Expression> Ptr;
friend class Operation; friend class Operation;
protected: protected:
Expression(Result_Type t); Expression(Result_Type t);
Expression(MachRegister r);
public: public:
virtual ~Expression(); virtual ~Expression();
/// \brief If the %Expression can be evaluated, returns a %Result con taining its value. /// \brief If the %Expression can be evaluated, returns a %Result con taining its value.
/// Otherwise returns an undefined %Result. /// Otherwise returns an undefined %Result.
virtual const Result& eval() const; virtual const Result& eval() const;
/// \param knownValue Sets the result of \c eval for this %Expression /// \param knownValue Sets the result of \c eval for this %Expression
/// to \c knownValue /// to \c knownValue
void setValue(const Result& knownValue); void setValue(const Result& knownValue);
skipping to change at line 157 skipping to change at line 158
/// this %Expression, and sets the result of \c eval for those subexp ressions /// this %Expression, and sets the result of \c eval for those subexp ressions
/// to \c value. \c bind returns true if at least one instance of \c expr /// to \c value. \c bind returns true if at least one instance of \c expr
/// was found in this %Expression. /// was found in this %Expression.
/// ///
/// \c bind does not operate on subexpressions that happen to evaluat e to /// \c bind does not operate on subexpressions that happen to evaluat e to
/// the same value. For example, if a dereference of 0xDEADBEEF is b ound to /// the same value. For example, if a dereference of 0xDEADBEEF is b ound to
/// 0, and a register is bound to 0xDEADBEEF, a dereference of that r egister is not /// 0, and a register is bound to 0xDEADBEEF, a dereference of that r egister is not
/// bound to 0. /// bound to 0.
virtual bool bind(Expression* expr, const Result& value); virtual bool bind(Expression* expr, const Result& value);
/// \c apply applies a %Visitor to this expression. %Visitors perfor
m postfix-order
/// traversal of the ASTs represented by an %Expression, with user-de
fined actions performed
/// at each node of the tree.
virtual void apply(Visitor*) {} virtual void apply(Visitor*) {}
/// \c getChildren may be called on an %Expression taking a vector of
%Expression::Ptrs,
/// rather than %InstructionAST::Ptrs. All children which are %Expre
ssions will be appended to \c children.
virtual void getChildren(std::vector<Expression::Ptr>& children) cons
t = 0;
using InstructionAST::getChildren;
protected: protected:
virtual bool isFlag() const; virtual bool isFlag() const;
private:
Result userSetValue; Result userSetValue;
}; };
class INSTRUCTION_EXPORT DummyExpr : public Expression class INSTRUCTION_EXPORT DummyExpr : public Expression
{ {
public: public:
virtual void getChildren(vector<InstructionAST::Ptr>& ) const { }; virtual void getChildren(vector<InstructionAST::Ptr>& ) const { };
virtual void getChildren(vector<Expression::Ptr>& ) const {};
virtual void getUses(set<InstructionAST::Ptr>& ) {}; virtual void getUses(set<InstructionAST::Ptr>& ) {};
virtual bool isUsed(InstructionAST::Ptr ) const { return true;} ; virtual bool isUsed(InstructionAST::Ptr ) const { return true;} ;
virtual std::string format() const { return "[WILDCARD]";}; virtual std::string format(formatStyle) const { return "[WILDCA RD]";};
DummyExpr() : Expression(u8) {} DummyExpr() : Expression(u8) {}
protected: protected:
virtual bool checkRegID(MachRegister, unsigned int = 0, unsigne d int = 0) const;
virtual bool isStrictEqual(const InstructionAST& rhs) const; virtual bool isStrictEqual(const InstructionAST& rhs) const;
virtual bool checkRegID(unsigned int id) const;
}; };
}; };
}; };
#endif //!defined(VALUECOMPUTATION_H) #endif //!defined(VALUECOMPUTATION_H)
 End of changes. 9 change blocks. 
4 lines changed or deleted 18 lines changed or added


 Function.h   Function.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 55 skipping to change at line 55
SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const Dyninst::Sym tabAPI::Function &); SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const Dyninst::Sym tabAPI::Function &);
namespace Dyninst{ namespace Dyninst{
namespace SymtabAPI{ namespace SymtabAPI{
class Symbol; class Symbol;
class Type; class Type;
class Function : public Aggregate, public Serializable, public AnnotatableS parse class Function : public Aggregate, public Serializable, public AnnotatableS parse
{ {
friend class Symtab; friend class Symtab;
friend std::ostream &::operator<<(std::ostream &os, const Dyninst::S ymtabAPI::Function &); friend std::ostream &::operator<<(std::ostream &os, const Dyninst::S ymtabAPI::Function &);
private: private:
SYMTAB_EXPORT Function(Symbol *sym); SYMTAB_EXPORT Function(Symbol *sym);
public: public:
SYMTAB_EXPORT Function(); SYMTAB_EXPORT Function();
SYMTAB_EXPORT virtual ~Function(); SYMTAB_EXPORT virtual ~Function();
skipping to change at line 77 skipping to change at line 77
SYMTAB_EXPORT bool removeSymbol(Symbol *sym); SYMTAB_EXPORT bool removeSymbol(Symbol *sym);
/***** Return Type Information *****/ /***** Return Type Information *****/
SYMTAB_EXPORT Type * getReturnType() const; SYMTAB_EXPORT Type * getReturnType() const;
SYMTAB_EXPORT bool setReturnType(Type *); SYMTAB_EXPORT bool setReturnType(Type *);
/***** IA64-Specific Frame Pointer Information *****/ /***** IA64-Specific Frame Pointer Information *****/
SYMTAB_EXPORT bool setFramePtrRegnum(int regnum); SYMTAB_EXPORT bool setFramePtrRegnum(int regnum);
SYMTAB_EXPORT int getFramePtrRegnum() const; SYMTAB_EXPORT int getFramePtrRegnum() const;
/***** PPC64 Linux Specific Information *****/
SYMTAB_EXPORT Offset getPtrOffset() const;
SYMTAB_EXPORT Offset getTOCOffset() const;
/***** Frame Pointer Information *****/ /***** Frame Pointer Information *****/
SYMTAB_EXPORT bool setFramePtr(std::vector<VariableLocation> *locs); SYMTAB_EXPORT bool setFramePtr(std::vector<VariableLocation> *locs);
SYMTAB_EXPORT std::vector<VariableLocation> &getFramePtr(); SYMTAB_EXPORT std::vector<VariableLocation> &getFramePtr();
/***** Local Variable Information *****/ /***** Local Variable Information *****/
SYMTAB_EXPORT bool findLocalVariable(std::vector<localVar *>&vars, std:: string name); SYMTAB_EXPORT bool findLocalVariable(std::vector<localVar *>&vars, std:: string name);
SYMTAB_EXPORT bool getLocalVariables(std::vector<localVar *>&vars); SYMTAB_EXPORT bool getLocalVariables(std::vector<localVar *>&vars);
SYMTAB_EXPORT bool getParams(std::vector<localVar *>&params); SYMTAB_EXPORT bool getParams(std::vector<localVar *>&params);
SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb, SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb,
const char *tag = "Function") THROW_SPEC (S erializerError); const char *tag = "Function") THROW_SPEC (S erializerError);
SYMTAB_EXPORT unsigned getSize(); SYMTAB_EXPORT unsigned getSize();
SYMTAB_EXPORT bool operator==(const Function &); SYMTAB_EXPORT bool operator==(const Function &);
/* internal helper functions */ /* internal helper functions */
bool addLocalVar(localVar *); bool addLocalVar(localVar *);
bool addParam(localVar *); bool addParam(localVar *);
bool setupParams();
private: private:
Type *retType_; Type *retType_;
int framePtrRegNum_; int framePtrRegNum_;
std::vector<VariableLocation> *locs_; std::vector<VariableLocation> *locs_;
unsigned functionSize_; unsigned functionSize_;
}; };
} }
} }
 End of changes. 4 change blocks. 
2 lines changed or deleted 7 lines changed or added


 Graph.h   Graph.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 37 skipping to change at line 37
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
// Graph class // Graph class
#if !defined(GRAPH_H) #if !defined(GRAPH_H)
#define GRAPH_H #define GRAPH_H
#include "dyntypes.h"
#include "dyn_detail/boost/shared_ptr.hpp" #include "dyn_detail/boost/shared_ptr.hpp"
#include <set> #include <set>
#include <list> #include <list>
#include <queue> #include <queue>
#include <map>
#include "Annotatable.h" #include "Annotatable.h"
#include "Node.h" #include "Node.h"
namespace Dyninst { namespace Dyninst {
class Edge; class Edge;
class Graph; class Graph;
class Node; class Node;
class NodeIterator; class NodeIterator;
class EdgeIterator; class EdgeIterator;
class Graph : public AnnotatableSparse { class COMMON_EXPORT Graph : public AnnotatableSparse {
friend class Edge; friend class Edge;
friend class Node; friend class Node;
friend class Creator; friend class Creator;
friend class Iterator; friend class Iterator;
protected: protected:
typedef dyn_detail::boost::shared_ptr<Node> NodePtr; typedef dyn_detail::boost::shared_ptr<Node> NodePtr;
typedef dyn_detail::boost::shared_ptr<Edge> EdgePtr; typedef dyn_detail::boost::shared_ptr<Edge> EdgePtr;
skipping to change at line 108 skipping to change at line 110
virtual bool find(NodePredicate::Ptr, NodeIterator &begin, NodeIterator &end); virtual bool find(NodePredicate::Ptr, NodeIterator &begin, NodeIterator &end);
virtual bool find(NodePredicateFunc, void *user_arg, NodeIterator &begi n, NodeIterator &end); virtual bool find(NodePredicateFunc, void *user_arg, NodeIterator &begi n, NodeIterator &end);
bool printDOT(const std::string fileName); bool printDOT(const std::string fileName);
virtual ~Graph() {}; virtual ~Graph() {};
// We create an empty graph and then add nodes and edges. // We create an empty graph and then add nodes and edges.
static Ptr createGraph(); static Ptr createGraph();
// We effectively build the graph by specifying all edges, void insertPair(NodePtr source, NodePtr target, EdgePtr edge = EdgePtr(
// since it is meaningless to have a disconnected node. ));
void insertPair(NodePtr source, NodePtr target);
virtual void insertEntryNode(NodePtr entry); virtual void insertEntryNode(NodePtr entry);
virtual void insertExitNode(NodePtr exit); virtual void insertExitNode(NodePtr exit);
virtual void markAsEntryNode(NodePtr entry);
virtual void markAsExitNode(NodePtr exit);
void deleteNode(NodePtr node);
void addNode(NodePtr node); void addNode(NodePtr node);
virtual void removeAnnotation() {}; virtual void removeAnnotation() {};
bool isEntryNode(NodePtr node);
bool isExitNode(NodePtr node);
protected: protected:
static const Address INITIAL_ADDR; static const Address INITIAL_ADDR;
// Create graph, add nodes. // Create graph, add nodes.
Graph(); Graph();
// We also need to point to all Nodes to keep them alive; we can't // We also need to point to all Nodes to keep them alive; we can't
// pervasively use shared_ptr within the graph because we're likely // pervasively use shared_ptr within the graph because we're likely
// to have cycles. // to have cycles.
 End of changes. 7 change blocks. 
5 lines changed or deleted 14 lines changed or added


 Immediate.h   Immediate.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 87 skipping to change at line 87
/// be created to represent the new value. /// be created to represent the new value.
class INSTRUCTION_EXPORT Immediate : public Expression class INSTRUCTION_EXPORT Immediate : public Expression
{ {
public: public:
Immediate(const Result& val); Immediate(const Result& val);
virtual ~Immediate(); virtual ~Immediate();
/// By definition, an %Immediate has no children. /// By definition, an %Immediate has no children.
virtual void getChildren(vector<InstructionAST::Ptr>& /*children*/) c onst; virtual void getChildren(vector<InstructionAST::Ptr>& /*children*/) c onst;
virtual void getChildren(vector<Expression::Ptr>& /*children*/) const ;
/// By definition, an %Immediate uses no registers. /// By definition, an %Immediate uses no registers.
virtual void getUses(set<InstructionAST::Ptr>& /*uses*/); virtual void getUses(set<InstructionAST::Ptr>& /*uses*/);
/// \c isUsed, when called on an %Immediate, will return true if \c f indMe represents an %Immediate with the same value. /// \c isUsed, when called on an %Immediate, will return true if \c f indMe represents an %Immediate with the same value.
/// While this convention may seem arbitrary, it allows \c isUsed to follow a natural rule: an %InstructionAST is used /// While this convention may seem arbitrary, it allows \c isUsed to follow a natural rule: an %InstructionAST is used
/// by another %InstructionAST if and only if the first %InstructionA ST is a subtree of the second one. /// by another %InstructionAST if and only if the first %InstructionA ST is a subtree of the second one.
virtual bool isUsed(InstructionAST::Ptr findMe) const; virtual bool isUsed(InstructionAST::Ptr findMe) const;
virtual std::string format() const; virtual std::string format(formatStyle) const;
static Immediate::Ptr makeImmediate(const Result& val); static Immediate::Ptr makeImmediate(const Result& val);
virtual void apply(Visitor* v); virtual void apply(Visitor* v);
protected: protected:
virtual bool isStrictEqual(const InstructionAST& rhs) const; virtual bool isStrictEqual(const InstructionAST& rhs) const;
}; };
}; };
}; };
#endif // !defined(IMMEDIATE_H) #endif // !defined(IMMEDIATE_H)
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 Instruction.h   Instruction.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 37 skipping to change at line 37
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#if !defined(INSTRUCTION_H) #if !defined(INSTRUCTION_H)
#define INSTRUCTION_H #define INSTRUCTION_H
#include <vector> #include <vector>
#include <set> #include <set>
#include <list>
#include "Expression.h" #include "Expression.h"
#include "Operation.h" #include "Operation.h"
#include "Operand.h" #include "Operand.h"
#include "InstructionCategories.h" #include "InstructionCategories.h"
#include "util.h" #include "util.h"
namespace Dyninst namespace Dyninst
{ {
namespace InstructionAPI namespace InstructionAPI
{ {
class InstructionDecoder;
/// The %Instruction class is a generic instruction representation that contains operands, /// The %Instruction class is a generic instruction representation that contains operands,
/// read/write semantic information about those operands, and informati on about /// read/write semantic information about those operands, and informati on about
/// what other registers and memory locations are affected by the opera tion the instruction performs. /// what other registers and memory locations are affected by the opera tion the instruction performs.
/// ///
/// The purpose of an %Instruction object is to join an %Operation with a sequence of %Operands, and provide /// The purpose of an %Instruction object is to join an %Operation with a sequence of %Operands, and provide
/// an interface for some common summary analyses (namely, the read/wri te sets, memory access information, /// an interface for some common summary analyses (namely, the read/wri te sets, memory access information,
/// and control flow information). /// and control flow information).
/// ///
/// The %Operation contains knowledge about its mnemonic and sufficient semantic /// The %Operation contains knowledge about its mnemonic and sufficient semantic
/// details to answer the following questions: /// details to answer the following questions:
skipping to change at line 74 skipping to change at line 76
/// - Registers read /// - Registers read
/// - Registers written /// - Registers written
/// - Whether memory is read or written /// - Whether memory is read or written
/// - Which memory addresses are read or written, given the state of all relevant registers /// - Which memory addresses are read or written, given the state of all relevant registers
/// ///
/// Instructions should be constructed from an \c unsigned \c char* poi nting to machine language, using the /// Instructions should be constructed from an \c unsigned \c char* poi nting to machine language, using the
/// %InstructionDecoder class. See InstructionDecoder for more details . /// %InstructionDecoder class. See InstructionDecoder for more details .
/// ///
class Instruction class Instruction
{ {
/// Component version information corresponding to \c libInstructio
nAPI.so.(major).(minor).(maintenance)
/// Note that \c maintenance may be absent from the binary (in whic
h case, it will be zero in the interface).
INSTRUCTION_EXPORT static void version(int& major, int& minor, int&
maintenance);
union raw_insn_T union raw_insn_T
{ {
unsigned int small_insn; unsigned int small_insn;
unsigned char* large_insn; unsigned char* large_insn;
}; };
public: public:
friend class InstructionDecoder_x86;
friend class InstructionDecoder_power;
struct CFT
{
Expression::Ptr target;
bool isCall;
bool isIndirect;
bool isConditional;
bool isFallthrough;
CFT(Expression::Ptr t, bool call, bool indir, bool cond, bool f
t) :
target(t), isCall(call), isIndirect(indir), isCondition
al(cond), isFallthrough(ft) {}
};
/// \param what Opcode of the instruction /// \param what Opcode of the instruction
/// \param operandSource Contains the %Expressions to be transformed into %Operands /// \param operandSource Contains the %Expressions to be transformed into %Operands
/// \param size Contains the number of bytes occupied by the correspo nding machine instruction /// \param size Contains the number of bytes occupied by the correspo nding machine instruction
/// \param raw Contains a pointer to the buffer from which this instr uction object /// \param raw Contains a pointer to the buffer from which this instr uction object
/// was decoded. /// was decoded.
/// ///
/// Construct an %Instruction from an %Operation and a collection of %Expressions. This /// Construct an %Instruction from an %Operation and a collection of %Expressions. This
/// method is not intended to be used except by the %InstructionDecod er class, which serves as a /// method is not intended to be used except by the %InstructionDecod er class, which serves as a
/// factory class for producing %Instruction objects. While an %Inst ruction object may be built /// factory class for producing %Instruction objects. While an %Inst ruction object may be built
/// "by hand" if desired, using the decoding interface ensures that t he operation and operands /// "by hand" if desired, using the decoding interface ensures that t he operation and operands
/// are a sensible combination, and that the size reported is based o n the actual size of a legal /// are a sensible combination, and that the size reported is based o n the actual size of a legal
/// encoding of the machine instruction represented. /// encoding of the machine instruction represented.
/// In the course of constructing an %Instruction, the %Expressions i n \c operandSource /// In the course of constructing an %Instruction, the %Expressions i n \c operandSource
/// will be transformed to %Operand objects. This transformation wil l map the semantic information about /// will be transformed to %Operand objects. This transformation wil l map the semantic information about
/// which operands are read and written /// which operands are read and written
/// in the %Operation object \c what to the value computations in \c operandSource. /// in the %Operation object \c what to the value computations in \c operandSource.
INSTRUCTION_EXPORT Instruction(Operation::Ptr what, const std::vector INSTRUCTION_EXPORT Instruction(Operation::Ptr what, size_t size, cons
<Expression::Ptr>& operandSource, size_t size, t unsigned char* raw,
const unsigned char* raw, unsigned int opsema); Dyninst::Architecture arch);
INSTRUCTION_EXPORT Instruction(Operation::Ptr what, size_t size, cons
t unsigned char* raw);
INSTRUCTION_EXPORT Instruction(); INSTRUCTION_EXPORT Instruction();
INSTRUCTION_EXPORT virtual ~Instruction(); INSTRUCTION_EXPORT virtual ~Instruction();
INSTRUCTION_EXPORT Instruction(const Instruction& o); INSTRUCTION_EXPORT Instruction(const Instruction& o);
INSTRUCTION_EXPORT const Instruction& operator=(const Instruction& rh s); INSTRUCTION_EXPORT const Instruction& operator=(const Instruction& rh s);
/// \return The %Operation used by the %Instruction /// \return The %Operation used by the %Instruction
/// ///
/// See Operation for details of the %Operation interface. /// See Operation for details of the %Operation interface.
skipping to change at line 235 skipping to change at line 252
INSTRUCTION_EXPORT std::string format() const; INSTRUCTION_EXPORT std::string format() const;
/// Returns true if this %Instruction object is valid. Invalid instr uctions indicate that /// Returns true if this %Instruction object is valid. Invalid instr uctions indicate that
/// an %InstructionDecoder has reached the end of its assigned range, and that decoding should terminate. /// an %InstructionDecoder has reached the end of its assigned range, and that decoding should terminate.
INSTRUCTION_EXPORT bool isValid() const; INSTRUCTION_EXPORT bool isValid() const;
/// Returns true if this %Instruction object represents a legal instr uction, as specified by the architecture /// Returns true if this %Instruction object represents a legal instr uction, as specified by the architecture
/// used to decode this instruction. /// used to decode this instruction.
INSTRUCTION_EXPORT bool isLegalInsn() const; INSTRUCTION_EXPORT bool isLegalInsn() const;
INSTRUCTION_EXPORT Architecture getArch() const;
/// ALPHA: Returns the category that an instruction falls into. This feature is presently incomplete, and we welcome feedback /// ALPHA: Returns the category that an instruction falls into. This feature is presently incomplete, and we welcome feedback
/// on ways to extend it usefully. /// on ways to extend it usefully.
/// ///
/// Currently, the valid categories are c_CallInsn, c_ReturnInsn, c_B ranchInsn, c_CompareInsn, /// Currently, the valid categories are c_CallInsn, c_ReturnInsn, c_B ranchInsn, c_CompareInsn,
/// and c_NoCategory, as defined in %InstructionCategories.h. /// and c_NoCategory, as defined in %InstructionCategories.h.
INSTRUCTION_EXPORT InsnCategory getCategory() const; INSTRUCTION_EXPORT InsnCategory getCategory() const;
typedef dyn_detail::boost::shared_ptr<Instruction> Ptr; typedef std::list<CFT>::const_iterator cftConstIter;
INSTRUCTION_EXPORT cftConstIter cft_begin() const {
return m_Successors.begin();
}
INSTRUCTION_EXPORT cftConstIter cft_end() const {
return m_Successors.end();
}
typedef dyn_detail::boost::shared_ptr<Instruction> Ptr;
public:
//Should be private, but we're working around some compilers mis-u
sing the 'friend' declaration.
void appendOperand(Expression::Ptr e, bool isRead, bool isWritten) co
nst;
private: private:
void decodeOperands() const; void decodeOperands() const;
void addSuccessor(Expression::Ptr e, bool isCall, bool isIndirect, bo ol isConditional, bool isFallthrough) const;
void copyRaw(size_t size, const unsigned char* raw); void copyRaw(size_t size, const unsigned char* raw);
Expression::Ptr makeReturnExpression() const; Expression::Ptr makeReturnExpression() const;
mutable std::vector<Operand> m_Operands; mutable std::list<Operand> m_Operands;
Operation::Ptr m_InsnOp; Operation::Ptr m_InsnOp;
bool m_Valid; bool m_Valid;
raw_insn_T m_RawInsn; raw_insn_T m_RawInsn;
unsigned int m_size; unsigned int m_size;
Architecture arch_decoded_from;
mutable std::list<CFT> m_Successors;
static int numInsnsAllocated;
}; };
}; };
}; };
#endif //!defined(INSTRUCTION_H) #endif //!defined(INSTRUCTION_H)
 End of changes. 13 change blocks. 
9 lines changed or deleted 48 lines changed or added


 InstructionAST.h   InstructionAST.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 58 skipping to change at line 58
namespace Dyninst namespace Dyninst
{ {
namespace InstructionAPI namespace InstructionAPI
{ {
class InstructionAST; class InstructionAST;
using std::vector; using std::vector;
using std::set; using std::set;
enum formatStyle
{
defaultStyle,
memoryAccessStyle
};
/// The %InstructionAST class is the base class for all nodes in the AS Ts used by the %Operand class. /// The %InstructionAST class is the base class for all nodes in the AS Ts used by the %Operand class.
/// It defines the necessary interfaces for traversing and searching /// It defines the necessary interfaces for traversing and searching
/// an abstract syntax tree representing an operand. /// an abstract syntax tree representing an operand.
/// For the purposes of searching an %InstructionAST, we provide two re lated interfaces. The first, /// For the purposes of searching an %InstructionAST, we provide two re lated interfaces. The first,
/// \c getUses, will return the registers that appear in a given tree. The second, \c isUsed, will /// \c getUses, will return the registers that appear in a given tree. The second, \c isUsed, will
/// take as input another tree and return true if that tree is a (not n ecessarily proper) subtree of this one. /// take as input another tree and return true if that tree is a (not n ecessarily proper) subtree of this one.
/// \c isUsed requires us to define an equality relation on these abstr act /// \c isUsed requires us to define an equality relation on these abstr act
/// syntax trees, and the equality operator is provided by the %Instruc tionAST, with the details /// syntax trees, and the equality operator is provided by the %Instruc tionAST, with the details
/// implemented by the classes derived from %InstructionAST. Two AST n odes are equal if the following conditions hold: /// implemented by the classes derived from %InstructionAST. Two AST n odes are equal if the following conditions hold:
/// - They are of the same type /// - They are of the same type
skipping to change at line 110 skipping to change at line 114
/// \param findMe AST node to find in the use set of this node /// \param findMe AST node to find in the use set of this node
/// ///
/// Unlike \c getUses, \c isUsed looks for \c findMe as a subtree /// Unlike \c getUses, \c isUsed looks for \c findMe as a subtree
/// of the current tree. \c getUses is designed to return a minimal /// of the current tree. \c getUses is designed to return a minimal
/// set of registers used in this tree, whereas \c isUsed is designed /// set of registers used in this tree, whereas \c isUsed is designed
/// to allow searches for arbitrary subexpressions /// to allow searches for arbitrary subexpressions
virtual bool isUsed(InstructionAST::Ptr findMe) const = 0; virtual bool isUsed(InstructionAST::Ptr findMe) const = 0;
/// The \c format interface returns the contents of an %InstructionAS T /// The \c format interface returns the contents of an %InstructionAS T
/// object as a string. By default, \c format() produces assembly la nguage. /// object as a string. By default, \c format() produces assembly la nguage.
virtual std::string format() const = 0; virtual std::string format(formatStyle how = defaultStyle) const = 0;
protected: protected:
friend class RegisterAST; friend class RegisterAST;
friend class Immediate; friend class Immediate;
virtual bool isStrictEqual(const InstructionAST& rhs) const= 0; virtual bool isStrictEqual(const InstructionAST& rhs) const= 0;
virtual bool checkRegID(unsigned int id) const; virtual bool checkRegID(MachRegister, unsigned int = 0, unsigned int = 0) const;
virtual const Result& eval() const = 0; virtual const Result& eval() const = 0;
}; };
}; };
}; };
#if defined(_MSC_VER) #if defined(_MSC_VER)
// reenable warning // reenable warning
#pragma warning(default:4251) #pragma warning(default:4251)
#endif #endif
#endif //!defined(INSTRUCTIONAST_H) #endif //!defined(INSTRUCTIONAST_H)
 End of changes. 4 change blocks. 
4 lines changed or deleted 8 lines changed or added


 InstructionCategories.h   InstructionCategories.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 36 skipping to change at line 36
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#if !defined(INSTRUCTION_CATEGORIES_H) #if !defined(INSTRUCTION_CATEGORIES_H)
#define INSTRUCTION_CATEGORIES_H #define INSTRUCTION_CATEGORIES_H
#include "util.h" #include "util.h"
#include "entryIDs-IA32.h" #include "entryIDs.h"
namespace Dyninst namespace Dyninst
{ {
namespace InstructionAPI namespace InstructionAPI
{ {
enum InsnCategory enum InsnCategory
{ {
c_CallInsn, c_CallInsn,
c_ReturnInsn, c_ReturnInsn,
c_BranchInsn, c_BranchInsn,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 InstructionDecoder.h   InstructionDecoder.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 35 skipping to change at line 35
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#if !defined(INSTRUCTION_DECODER_H) #if !defined(INSTRUCTION_DECODER_H)
#define INSTRUCTION_DECODER_H #define INSTRUCTION_DECODER_H
#include "InstructionAST.h"
#include "Expression.h"
#include "Operation.h"
#include "Operand.h"
#include "Instruction.h" #include "Instruction.h"
#include <vector>
struct ia32_locations;
struct ia32_condition;
struct ia32_operand;
class ia32_instruction;
struct ia32_memacc;
namespace Dyninst namespace Dyninst
{ {
namespace InstructionAPI namespace InstructionAPI
{ {
/// The %InstructionDecoder class decodes instructions, given a buffer
/// The %InstructionDecoder class decodes instructions, given a buffer of bytes and a length, and
of bytes and a length, /// the architecture for which to decode instructions,
/// and constructs an %Instruction. /// and constructs shared pointers to %Instruction objects representing
/// The %InstructionDecoder will, by default, be constructed to decode those instructions.
machine language
/// on the platform on which it has been compiled. The buffer
/// will be treated as if there is an instruction stream starting at th
e beginning of the buffer.
/// %InstructionDecoder objects are given a buffer from which to decode at construction. /// %InstructionDecoder objects are given a buffer from which to decode at construction.
/// Calls to \c decode will proceed to decode instructions sequentially from that buffer until its /// Calls to \c decode will proceed to decode instructions sequentially from that buffer until its
/// end is reached. At that point, all subsequent calls to \c decode w /// end is reached. At that point, all subsequent calls to \c decode w
ill return an invalid ill return a null %Instruction pointer.
/// %Instruction object.
/// ///
/// An %InstructionDecoder object may alternately be constructed withou class InstructionDecoderImpl;
t designating a buffer,
/// and the buffer may be specified at the time \c decode is called. T
his method of use may be
/// more convenient for users who are decoding non-contiguous instructi
ons.
class InstructionDecoder class INSTRUCTION_EXPORT InstructionDecoder
{ {
friend class Instruction; friend class Instruction;
public:
static const unsigned int maxInstructionLength = 16;
/// Construct an %InstructionDecoder object that decodes \c arch from
\c buffer, up to \c size bytes.
/// Valid values for \c arch are \c Arch_x86, \c Arch_x86_64, \c Arch
_ppc32, and \c Arch_ppc64.
InstructionDecoder(const unsigned char* buffer, size_t size, Architec
ture arch);
InstructionDecoder(const void* buffer, size_t size, Architecture arch
);
public: ~InstructionDecoder();
/// Construct an %InstructionDecoder object that decodes from \c buff InstructionDecoder(const InstructionDecoder& o);
er, up to \c size bytes.
INSTRUCTION_EXPORT InstructionDecoder(const unsigned char* buffer, si
ze_t size);
/// Construct an %InstructionDecoder object with no buffer specified.
INSTRUCTION_EXPORT InstructionDecoder();
INSTRUCTION_EXPORT ~InstructionDecoder();
INSTRUCTION_EXPORT InstructionDecoder(const InstructionDecoder& o);
/// Decode the current instruction in this %InstructionDecoder object 's buffer, interpreting it as /// Decode the current instruction in this %InstructionDecoder object 's buffer, interpreting it as
/// machine language of the type understood by this %InstructionDecod er. /// machine language of the type understood by this %InstructionDecod er.
/// If the buffer does not contain a valid instruction stream, a null %Instruction pointer /// If the buffer does not contain a valid instruction stream, a null %Instruction pointer
/// will be returned. The %Instruction's \c size field will contain the size of the instruction decoded. /// will be returned. The %Instruction's \c size field will contain the size of the instruction decoded.
INSTRUCTION_EXPORT Instruction::Ptr decode(); Instruction::Ptr decode();
/// Decode the instruction at \c buffer, interpreting it as machine l anguage of the type /// Decode the instruction at \c buffer, interpreting it as machine l anguage of the type
/// understood by this %InstructionDecoder. If the buffer does not c ontain a valid instruction stream, /// understood by this %InstructionDecoder. If the buffer does not c ontain a valid instruction stream,
/// a null %Instruction pointer will be returned. The %Instruction's \c size field will contain /// a null %Instruction pointer will be returned. The %Instruction's \c size field will contain
/// the size of the instruction decoded. /// the size of the instruction decoded.
INSTRUCTION_EXPORT Instruction::Ptr decode(const unsigned char* buffe Instruction::Ptr decode(const unsigned char* buffer);
r); void doDelayedDecode(const Instruction* insn_to_complete);
struct INSTRUCTION_EXPORT buffer
INSTRUCTION_EXPORT void setMode(bool is64); {
const unsigned char* start;
protected: const unsigned char* end;
void resetBuffer(const unsigned char* buffer, unsigned int size); buffer(const unsigned char* b, unsigned int len) :
start(b), end(b+len) {}
bool decodeOperands(std::vector<Expression::Ptr>& operands); buffer(const void* b, unsigned int len) :
start(reinterpret_cast<const unsigned char*>(b)), end(start+len) {}
bool decodeOneOperand(const ia32_operand& operand, buffer(const unsigned char* b, const unsigned char* e) :
std::vector<Expression::Ptr>& outputOperands); start(b), end(e) {}
unsigned int decodeOpcode(); };
Expression::Ptr makeSIBExpression(unsigned int opType); private:
Expression::Ptr makeModRMExpression(unsigned int opType); buffer m_buf;
Expression::Ptr makeAddExpression(Expression::Ptr lhs, Expression::Pt const unsigned char* rawInstruction;
r rhs, Result_Type resultType); dyn_detail::boost::shared_ptr<InstructionDecoderImpl> m_Impl;
Expression::Ptr makeMultiplyExpression(Expression::Ptr lhs, Expressio
n::Ptr rhs, Result_Type resultType);
Expression::Ptr getModRMDisplacement();
int makeRegisterID(unsigned int intelReg, unsigned int opType, bool i
sExtendedReg = false);
Expression::Ptr decodeImmediate(unsigned int opType, unsigned int pos
ition, bool isSigned = false);
Result_Type makeSizeType(unsigned int opType);
private:
void doIA32Decode();
ia32_locations* locs;
ia32_condition* cond;
ia32_memacc* mac;
ia32_instruction* decodedInstruction;
Operation::Ptr m_Operation;
bool is32BitMode;
bool sizePrefixPresent;
const unsigned char* bufferBegin;
size_t bufferSize;
const unsigned char* rawInstruction;
}; };
}; };
}; };
#endif //!defined(INSTRUCTION_DECODER_H) #endif //!defined(INSTRUCTION_DECODER_H)
 End of changes. 12 change blocks. 
85 lines changed or deleted 42 lines changed or added


 LineInformation.h   LineInformation.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 41 skipping to change at line 41
#if ! defined( LINE_INFORMATION_H ) #if ! defined( LINE_INFORMATION_H )
#define LINE_INFORMATION_H #define LINE_INFORMATION_H
#include "symutil.h" #include "symutil.h"
#include "RangeLookup.h" #include "RangeLookup.h"
#include "Serialization.h" #include "Serialization.h"
#include "Annotatable.h" #include "Annotatable.h"
#include "Module.h" #include "Module.h"
#define NEW_GETSOURCELINES_INTERFACE
namespace Dyninst{ namespace Dyninst{
namespace SymtabAPI{ namespace SymtabAPI{
class SourceLineInternalTableWrapper;
class LineInformation : public AnnotationContainer<Statement>, class LineInformation : public AnnotationContainer<Statement>,
private RangeLookup< Statement, Statement::Statemen tLess > private RangeLookup< Statement, Statement::Statemen tLess >
{ {
SYMTAB_EXPORT bool addItem_impl(Statement); SYMTAB_EXPORT bool addItem_impl(Statement);
SYMTAB_EXPORT Serializable *ac_serialize_impl(SerializerBase *, cons t char * = "lineInformation") THROW_SPEC (SerializerError); SYMTAB_EXPORT Serializable *ac_serialize_impl(SerializerBase *, cons t char * = "lineInformation") THROW_SPEC (SerializerError);
public: public:
typedef RangeLookup< Statement, Statement::StatementLess >::const_ite rator const_iterator; typedef RangeLookup< Statement, Statement::StatementLess >::const_ite rator const_iterator;
typedef RangeLookup< Statement, Statement::StatementLess >::AddressRa nge AddressRange; typedef RangeLookup< Statement, Statement::StatementLess >::AddressRa nge AddressRange;
SYMTAB_EXPORT LineInformation(); SYMTAB_EXPORT LineInformation();
skipping to change at line 74 skipping to change at line 74
SYMTAB_EXPORT void addLineInfo(LineInformation *lineInfo); SYMTAB_EXPORT void addLineInfo(LineInformation *lineInfo);
SYMTAB_EXPORT bool addAddressRange( Offset lowInclusiveAddr, SYMTAB_EXPORT bool addAddressRange( Offset lowInclusiveAddr,
Offset highExclusiveAddr, Offset highExclusiveAddr,
const char * lineSource, const char * lineSource,
unsigned int lineNo, unsigned int lineNo,
unsigned int lineOffset = 0 ); unsigned int lineOffset = 0 );
/* You MUST NOT deallocate the strings returned. */ /* You MUST NOT deallocate the strings returned. */
SYMTAB_EXPORT bool getSourceLines( Offset addressInRange, std::vector < Statement *> & lines ); SYMTAB_EXPORT bool getSourceLines( Offset addressInRange, std::vector < Statement *> & lines );
SYMTAB_EXPORT bool getSourceLines( Offset addressInRange, std::vector
< LineNoTuple > & lines);
SYMTAB_EXPORT bool getAddressRanges( const char * lineSource, unsigne d int LineNo, std::vector< AddressRange > & ranges ); SYMTAB_EXPORT bool getAddressRanges( const char * lineSource, unsigne d int LineNo, std::vector< AddressRange > & ranges );
SYMTAB_EXPORT const_iterator begin() const; SYMTAB_EXPORT const_iterator begin() const;
SYMTAB_EXPORT const_iterator end() const; SYMTAB_EXPORT const_iterator end() const;
SYMTAB_EXPORT unsigned getSize() const; SYMTAB_EXPORT unsigned getSize() const;
SYMTAB_EXPORT ~LineInformation(); SYMTAB_EXPORT ~LineInformation();
// double secret private:
SourceLineInternalTableWrapper *getSourceLineNamesW();
SourceLineInternalTableWrapper *sourceLineNamesPtr;
protected: protected:
/* We maintain internal copies of all the source file names. Because /* We maintain internal copies of all the source file names. Because
both directions of the mapping include pointers to these names, both directions of the mapping include pointers to these names,
maintain a separate list of them, and only ever deallocate those maintain a separate list of them, and only ever deallocate those
(in the destructor). Note that it speeds and simplifies things (in the destructor). Note that it speeds and simplifies things
to have the string pointers be the same. */ to have the string pointers be the same. */
unsigned size_; unsigned size_;
}; /* end class LineInformation */ }; /* end class LineInformation */
 End of changes. 5 change blocks. 
7 lines changed or deleted 6 lines changed or added


 Module.h   Module.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 56 skipping to change at line 56
class localVar; class localVar;
class Symtab; class Symtab;
class Statement : public AnnotatableSparse, public Serializable class Statement : public AnnotatableSparse, public Serializable
{ {
friend class Module; friend class Module;
friend class std::vector<Statement>; friend class std::vector<Statement>;
friend class LineInformation; friend class LineInformation;
Statement(const char *file, unsigned int line, unsigned int col = 0, Statement(const char *file, unsigned int line, unsigned int col = 0,
Offset start_addr = (Offset) -1L, Offset end_addr = Offset start_addr = (Offset) -1L, Offset end_addr = (Offset) -
(Offset) -1L) : 1L) :
file_(file ? std::string(file) : std::string()), file_(file ? std::string(file) : std::string()),
line_(line), line_(line),
column(col), start_addr_(start_addr),
start_addr_(start_addr), end_addr_(end_addr),
end_addr_(end_addr), first(file_.c_str()),
first(file_.c_str()), second(line_),
second(line_) {} column(col)
{
}
std::string file_; // Maybe this should be module? std::string file_; // Maybe this should be module?
unsigned int line_; unsigned int line_;
unsigned int column;
Offset start_addr_; Offset start_addr_;
Offset end_addr_; Offset end_addr_;
public:
const char *first; const char *first;
unsigned int &second; unsigned int second;
unsigned int column;
public:
Statement() : first(NULL), second(line_) {} Statement() : first(NULL), second(line_) {}
struct StatementLess { struct StatementLess {
bool operator () ( const Statement &lhs, const Statement &rh s ) const; bool operator () ( const Statement &lhs, const Statement &rh s ) const;
}; };
typedef StatementLess LineNoTupleLess; typedef StatementLess LineNoTupleLess;
bool operator==(const Statement &cmp) const; bool operator==(const Statement &cmp) const;
~Statement() {} ~Statement() {}
skipping to change at line 114 skipping to change at line 116
class Module : public LookupInterface, class Module : public LookupInterface,
public Serializable, public Serializable,
public MODULE_ANNOTATABLE_CLASS public MODULE_ANNOTATABLE_CLASS
{ {
friend class Symtab; friend class Symtab;
public: public:
SYMTAB_EXPORT Module(); SYMTAB_EXPORT Module();
SYMTAB_EXPORT Module(supportedLanguages lang, Offset adr, std::strin g fullNm, SYMTAB_EXPORT Module(supportedLanguages lang, Offset adr, std::strin g fullNm,
Symtab *img); Symtab *img);
SYMTAB_EXPORT Module(const Module &mod); SYMTAB_EXPORT Module(const Module &mod);
SYMTAB_EXPORT bool operator==(Module &mod); SYMTAB_EXPORT bool operator==(Module &mod);
SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb, cons t char *tag = "Module") THROW_SPEC (SerializerError); SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb, cons t char *tag = "Module") THROW_SPEC (SerializerError);
SYMTAB_EXPORT const std::string &fileName() const; SYMTAB_EXPORT const std::string &fileName() const;
SYMTAB_EXPORT const std::string &fullName() const; SYMTAB_EXPORT const std::string &fullName() const;
SYMTAB_EXPORT bool setName(std::string newName); SYMTAB_EXPORT bool setName(std::string newName);
SYMTAB_EXPORT supportedLanguages language() const; SYMTAB_EXPORT supportedLanguages language() const;
skipping to change at line 177 skipping to change at line 179
SYMTAB_EXPORT typeCollection *getModuleTypes(); SYMTAB_EXPORT typeCollection *getModuleTypes();
/***** Local Variable Information *****/ /***** Local Variable Information *****/
SYMTAB_EXPORT bool findLocalVariable(std::vector<localVar *>&vars, std:: string name); SYMTAB_EXPORT bool findLocalVariable(std::vector<localVar *>&vars, std:: string name);
/***** Line Number Information *****/ /***** Line Number Information *****/
SYMTAB_EXPORT bool getAddressRanges(std::vector<std::pair<Offset, Offset > >&ranges, SYMTAB_EXPORT bool getAddressRanges(std::vector<std::pair<Offset, Offset > >&ranges,
std::string lineSource, unsigned int LineNo); std::string lineSource, unsigned int LineNo);
SYMTAB_EXPORT bool getSourceLines(std::vector<Statement *> &lines, SYMTAB_EXPORT bool getSourceLines(std::vector<Statement *> &lines,
Offset addressInRange); Offset addressInRange);
SYMTAB_EXPORT bool getSourceLines(std::vector<LineNoTuple> &lines,
Offset addressInRange);
SYMTAB_EXPORT bool getStatements(std::vector<Statement *> &statements); SYMTAB_EXPORT bool getStatements(std::vector<Statement *> &statements);
SYMTAB_EXPORT LineInformation *getLineInformation(); SYMTAB_EXPORT LineInformation *getLineInformation();
SYMTAB_EXPORT bool hasLineInformation(); SYMTAB_EXPORT bool hasLineInformation();
SYMTAB_EXPORT bool setDefaultNamespacePrefix(std::string str); SYMTAB_EXPORT bool setDefaultNamespacePrefix(std::string str);
// Deprecated methods // Deprecated methods
SYMTAB_EXPORT virtual bool findSymbolByType(std::vector<Symbol *> &ret, SYMTAB_EXPORT virtual bool findSymbolByType(std::vector<Symbol *> &ret,
const std::string name, const std::string name,
Symbol::SymbolType sType, Symbol::SymbolType sType,
 End of changes. 8 change blocks. 
14 lines changed or deleted 18 lines changed or added


 Node.h   Node.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 52 skipping to change at line 52
class BPatch_function; class BPatch_function;
class BPatch_basicBlock; class BPatch_basicBlock;
namespace Dyninst { namespace Dyninst {
class Edge; class Edge;
class Graph; class Graph;
class NodeIterator; class NodeIterator;
class EdgeIterator; class EdgeIterator;
class Node : public AnnotatableSparse { class COMMON_EXPORT Node {
friend class Edge; friend class Edge;
friend class Graph; friend class Graph;
typedef dyn_detail::boost::shared_ptr<Edge> EdgePtr; typedef dyn_detail::boost::shared_ptr<Edge> EdgePtr;
typedef dyn_detail::boost::shared_ptr<Graph> GraphPtr; typedef dyn_detail::boost::shared_ptr<Graph> GraphPtr;
typedef std::set<EdgePtr> EdgeSet; typedef std::set<EdgePtr> EdgeSet;
public: public:
typedef dyn_detail::boost::shared_ptr<Node> Ptr; typedef dyn_detail::boost::shared_ptr<Node> Ptr;
void ins(EdgeIterator &begin, EdgeIterator &end); void ins(EdgeIterator &begin, EdgeIterator &end);
void outs(EdgeIterator &begin, EdgeIterator &end); void outs(EdgeIterator &begin, EdgeIterator &end);
void ins(NodeIterator &begin, NodeIterator &end); void ins(NodeIterator &begin, NodeIterator &end);
void outs(NodeIterator &begin, NodeIterator &end); void outs(NodeIterator &begin, NodeIterator &end);
bool hasInEdges(); bool hasInEdges();
bool hasOutEdges(); bool hasOutEdges();
void deleteInEdge(EdgeIterator e);
void deleteOutEdge(EdgeIterator e);
void forwardClosure(NodeIterator &begin, NodeIterator &end); void forwardClosure(NodeIterator &begin, NodeIterator &end);
void backwardClosure(NodeIterator &begin, NodeIterator &end); void backwardClosure(NodeIterator &begin, NodeIterator &end);
GraphPtr forwardSubgraph(); GraphPtr forwardSubgraph();
GraphPtr backwardSubgraph(); GraphPtr backwardSubgraph();
virtual Address addr() const { return INVALID_ADDR; } virtual Address addr() const { return INVALID_ADDR; }
virtual std::string format() const = 0; virtual std::string format() const = 0;
skipping to change at line 106 skipping to change at line 109
EdgeSet ins_; EdgeSet ins_;
EdgeSet outs_; EdgeSet outs_;
void addInEdge(const EdgePtr in) { ins_.insert(in); } void addInEdge(const EdgePtr in) { ins_.insert(in); }
void addOutEdge(const EdgePtr out) { outs_.insert(out); } void addOutEdge(const EdgePtr out) { outs_.insert(out); }
static const Address INVALID_ADDR; static const Address INVALID_ADDR;
}; };
class PhysicalNode : public Node { class COMMON_EXPORT PhysicalNode : public Node {
public: public:
typedef dyn_detail::boost::shared_ptr<PhysicalNode> Ptr; typedef dyn_detail::boost::shared_ptr<PhysicalNode> Ptr;
static Node::Ptr createNode(Address addr); static Node::Ptr createNode(Address addr);
virtual Address addr() const { return addr_; } virtual Address addr() const { return addr_; }
virtual std::string format() const; virtual std::string format() const;
virtual bool isVirtual() const { return false; } virtual bool isVirtual() const { return false; }
skipping to change at line 128 skipping to change at line 131
virtual ~PhysicalNode() {}; virtual ~PhysicalNode() {};
virtual Node::Ptr copy(); virtual Node::Ptr copy();
protected: protected:
PhysicalNode(Address addr) : addr_(addr) {}; PhysicalNode(Address addr) : addr_(addr) {};
Address addr_; Address addr_;
}; };
class VirtualNode : public Node { class COMMON_EXPORT VirtualNode : public Node {
friend class Edge; friend class Edge;
friend class Graph; friend class Graph;
public: public:
typedef dyn_detail::boost::shared_ptr<VirtualNode> Ptr; typedef dyn_detail::boost::shared_ptr<VirtualNode> Ptr;
static Node::Ptr createNode(); static Node::Ptr createNode();
static Node::Ptr createNode(std::string name); static Node::Ptr createNode(std::string name);
virtual std::string format() const; virtual std::string format() const;
virtual Node::Ptr copy(); virtual Node::Ptr copy();
virtual bool isVirtual() const { return true; } virtual bool isVirtual() const { return true; }
virtual ~VirtualNode() {}; virtual ~VirtualNode() {};
VirtualNode(std::string name) : name_(name) {}; VirtualNode(std::string name) : name_(name) {};
VirtualNode() : name_(defaultName) {}; VirtualNode() : name_(defaultName) {};
static std::string defaultName; static std::string defaultName;
// DOT output methods... // DOT output methods...
virtual std::string DOTshape() const; virtual std::string DOTshape() const;
private: private:
std::string name_; std::string name_;
}; };
class NodeIteratorImpl; class NodeIteratorImpl;
class NodeIterator { class COMMON_EXPORT NodeIterator {
friend class Node; friend class Node;
friend class Graph; friend class Graph;
friend class Edge; friend class Edge;
public: public:
NodeIterator &operator++(); NodeIterator &operator++();
NodeIterator operator++(int); NodeIterator operator++(int);
NodeIterator &operator--(); NodeIterator &operator--();
 End of changes. 7 change blocks. 
6 lines changed or deleted 9 lines changed or added


 Operand.h   Operand.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 62 skipping to change at line 62
/// An %Operand, given full knowledge of the values of the leaves of th e AST, and knowledge of /// An %Operand, given full knowledge of the values of the leaves of th e AST, and knowledge of
/// the logic associated with the tree's internal nodes, can determine the /// the logic associated with the tree's internal nodes, can determine the
/// result of any computations that are encoded in it. It will rarely be the case /// result of any computations that are encoded in it. It will rarely be the case
/// that an %Instruction is built with its %Operands' state fully speci fied. This mechanism is /// that an %Instruction is built with its %Operands' state fully speci fied. This mechanism is
/// instead intended to allow a user to fill in knowledge about the sta te of the processor /// instead intended to allow a user to fill in knowledge about the sta te of the processor
/// at the time the %Instruction is executed. /// at the time the %Instruction is executed.
class Operand class Operand
{ {
public: public:
typedef dyn_detail::boost::shared_ptr<Operand> Ptr;
Operand() : m_isRead(false), m_isWritten(false) {}
/// \brief Create an operand from a %Expression and flags describing whether the %ValueComputation /// \brief Create an operand from a %Expression and flags describing whether the %ValueComputation
/// is read, written or both. /// is read, written or both.
/// \param val Reference-counted pointer to the %Expression that will be contained in the %Operand being constructed /// \param val Reference-counted pointer to the %Expression that will be contained in the %Operand being constructed
/// \param read True if this operand is read /// \param read True if this operand is read
/// \param written True if this operand is written /// \param written True if this operand is written
Operand(Expression::Ptr val, bool read, bool written) : op_value(val) , m_isRead(read), m_isWritten(written) Operand(Expression::Ptr val, bool read, bool written) : op_value(val) , m_isRead(read), m_isWritten(written)
{ {
} }
virtual ~Operand() virtual ~Operand()
{ {
skipping to change at line 99 skipping to change at line 100
INSTRUCTION_EXPORT void getReadSet(std::set<RegisterAST::Ptr>& regsRe ad) const; INSTRUCTION_EXPORT void getReadSet(std::set<RegisterAST::Ptr>& regsRe ad) const;
/// \brief Get the registers written by this operand /// \brief Get the registers written by this operand
/// \param regsWritten Has the registers written inserted into it /// \param regsWritten Has the registers written inserted into it
INSTRUCTION_EXPORT void getWriteSet(std::set<RegisterAST::Ptr>& regsW ritten) const; INSTRUCTION_EXPORT void getWriteSet(std::set<RegisterAST::Ptr>& regsW ritten) const;
/// Returns true if this operand is read /// Returns true if this operand is read
INSTRUCTION_EXPORT bool isRead(Expression::Ptr candidate) const; INSTRUCTION_EXPORT bool isRead(Expression::Ptr candidate) const;
/// Returns true if this operand is written /// Returns true if this operand is written
INSTRUCTION_EXPORT bool isWritten(Expression::Ptr candidate) const; INSTRUCTION_EXPORT bool isWritten(Expression::Ptr candidate) const;
INSTRUCTION_EXPORT bool isRead() const {
return m_isRead; }
INSTRUCTION_EXPORT bool isWritten() const {
return m_isWritten; }
/// Returns true if this operand reads memory /// Returns true if this operand reads memory
INSTRUCTION_EXPORT bool readsMemory() const; INSTRUCTION_EXPORT bool readsMemory() const;
/// Returns true if this operand writes memory /// Returns true if this operand writes memory
INSTRUCTION_EXPORT bool writesMemory() const; INSTRUCTION_EXPORT bool writesMemory() const;
/// \brief Inserts the effective addresses read by this operand into memAccessors /// \brief Inserts the effective addresses read by this operand into memAccessors
/// \param memAccessors If this is a memory read operand, insert the \c %Expression::Ptr representing /// \param memAccessors If this is a memory read operand, insert the \c %Expression::Ptr representing
/// the address being read into \c memAccessors. /// the address being read into \c memAccessors.
INSTRUCTION_EXPORT void addEffectiveReadAddresses(std::set<Expression ::Ptr>& memAccessors) const; INSTRUCTION_EXPORT void addEffectiveReadAddresses(std::set<Expression ::Ptr>& memAccessors) const;
/// \brief Inserts the effective addresses written by this operand in to memAccessors /// \brief Inserts the effective addresses written by this operand in to memAccessors
/// \param memAccessors If this is a memory write operand, insert the \c %Expression::Ptr representing /// \param memAccessors If this is a memory write operand, insert the \c %Expression::Ptr representing
 End of changes. 3 change blocks. 
2 lines changed or deleted 8 lines changed or added


 Operation.h   Operation.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 37 skipping to change at line 37
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#if !defined(DYN_OPERATION_H) #if !defined(DYN_OPERATION_H)
#define DYN_OPERATION_H #define DYN_OPERATION_H
#include "Register.h" #include "Register.h"
#include "Expression.h" #include "Expression.h"
#include "entryIDs-IA32.h" #include "entryIDs.h"
#include "Result.h"
#include <set> #include <set>
#include "util.h" #include "util.h"
// OpCode = operation + encoding // OpCode = operation + encoding
// contents: // contents:
// hex value // hex value
// information on how to decode operands // information on how to decode operands
// operation encoded // operation encoded
// Operation = what an instruction does // Operation = what an instruction does
// contents: // contents:
// read/write semantics on explicit operands // read/write semantics on explicit operands
// register implicit read/write lists, including flags // register implicit read/write lists, including flags
// string/enum representation of the operation // string/enum representation of the operation
// Use cases: // Use cases:
// OpCode + raw instruction -> Operation + ExpressionPtrs // OpCode + raw instruction -> Operation + ExpressionPtrs
// Operation + ExpressionPtrs -> Instruction + Operands // Operation + ExpressionPtrs -> Instruction + Operands
namespace NS_x86 {
struct ia32_entry; struct ia32_entry;
class ia32_prefixes; class ia32_prefixes;
struct ia32_locations; }
class ia32_locations;
namespace Dyninst namespace Dyninst
{ {
namespace InstructionAPI namespace InstructionAPI
{ {
/// An %Operation object represents a family of opcodes (operation enco dings) /// An %Operation object represents a family of opcodes (operation enco dings)
/// that perform the same task (e.g. the \c MOV family). It includes /// that perform the same task (e.g. the \c MOV family). It includes
/// information about the number of operands, their read/write semantic s, /// information about the number of operands, their read/write semantic s,
/// the implicit register reads and writes, and the control flow behavi or /// the implicit register reads and writes, and the control flow behavi or
/// of a particular assembly language operation. It additionally provi des /// of a particular assembly language operation. It additionally provi des
skipping to change at line 96 skipping to change at line 100
/// ///
/// %Operations are constructed by the %InstructionDecoder as part of t he process /// %Operations are constructed by the %InstructionDecoder as part of t he process
/// of constructing an %Instruction. /// of constructing an %Instruction.
class Operation class Operation
{ {
public: public:
typedef std::set<RegisterAST::Ptr> registerSet; typedef std::set<RegisterAST::Ptr> registerSet;
typedef std::set<Expression::Ptr> VCSet; typedef std::set<Expression::Ptr> VCSet;
typedef dyn_detail::boost::shared_ptr<Operation> Ptr; typedef dyn_detail::boost::shared_ptr<Operation> Ptr;
friend class InstructionDecoder_power; // for editing mnemonics after creation
public: public:
INSTRUCTION_EXPORT Operation(ia32_entry* e, ia32_prefixes* p = NULL, INSTRUCTION_EXPORT Operation(NS_x86::ia32_entry* e, NS_x86::ia32_pref
ia32_locations* l = NULL); ixes* p = NULL, ia32_locations* l = NULL,
Architecture arch = Arch_none);
INSTRUCTION_EXPORT Operation(const Operation& o); INSTRUCTION_EXPORT Operation(const Operation& o);
INSTRUCTION_EXPORT Operation(); INSTRUCTION_EXPORT Operation();
INSTRUCTION_EXPORT Operation(entryID id, const char* mnem, Architectu re arch);
INSTRUCTION_EXPORT const Operation& operator=(const Operation& o); INSTRUCTION_EXPORT const Operation& operator=(const Operation& o);
/// Returns the set of registers implicitly read (i.e. those not incl uded in the operands, but read anyway) /// Returns the set of registers implicitly read (i.e. those not incl uded in the operands, but read anyway)
INSTRUCTION_EXPORT const registerSet& implicitReads() const; INSTRUCTION_EXPORT const registerSet& implicitReads() const;
/// Returns the set of registers implicitly written (i.e. those not i ncluded in the operands, but written anyway) /// Returns the set of registers implicitly written (i.e. those not i ncluded in the operands, but written anyway)
INSTRUCTION_EXPORT const registerSet& implicitWrites() const; INSTRUCTION_EXPORT const registerSet& implicitWrites() const;
/// Returns the mnemonic for the operation. Like \c instruction::for mat, this is exposed for debugging /// Returns the mnemonic for the operation. Like \c instruction::for mat, this is exposed for debugging
/// and will be replaced with stream operators in the public interfac e. /// and will be replaced with stream operators in the public interfac e.
INSTRUCTION_EXPORT std::string format() const; INSTRUCTION_EXPORT std::string format() const;
/// Returns the entry ID corresponding to this operation. Entry IDs are enumerated values that correspond /// Returns the entry ID corresponding to this operation. Entry IDs are enumerated values that correspond
/// to assembly mnemonics. /// to assembly mnemonics.
INSTRUCTION_EXPORT entryID getID() const; INSTRUCTION_EXPORT entryID getID() const;
/// Returns the prefix entry ID corresponding to this operation, if a
ny.
/// Prefix IDs are enumerated values that correspond to assembly pref
ix mnemonics.
INSTRUCTION_EXPORT prefixEntryID getPrefixID() const;
/// Returns true if the expression represented by \c candidate is rea d implicitly. /// Returns true if the expression represented by \c candidate is rea d implicitly.
INSTRUCTION_EXPORT bool isRead(Expression::Ptr candidate) const; INSTRUCTION_EXPORT bool isRead(Expression::Ptr candidate) const;
/// Returns true if the expression represented by \c candidate is wri tten implicitly. /// Returns true if the expression represented by \c candidate is wri tten implicitly.
INSTRUCTION_EXPORT bool isWritten(Expression::Ptr candidate) const; INSTRUCTION_EXPORT bool isWritten(Expression::Ptr candidate) const;
/// Returns the set of memory locations implicitly read. /// Returns the set of memory locations implicitly read.
INSTRUCTION_EXPORT const VCSet& getImplicitMemReads() const; INSTRUCTION_EXPORT const VCSet& getImplicitMemReads() const;
/// Returns the set of memory locations implicitly written. /// Returns the set of memory locations implicitly written.
INSTRUCTION_EXPORT const VCSet& getImplicitMemWrites() const; INSTRUCTION_EXPORT const VCSet& getImplicitMemWrites() const;
private: private:
void SetUpNonOperandData(bool doFlags = false) const; void SetUpNonOperandData(bool doFlags = false) const;
mutable registerSet otherRead; mutable registerSet otherRead;
mutable registerSet otherWritten; mutable registerSet otherWritten;
mutable VCSet otherEffAddrsRead; mutable VCSet otherEffAddrsRead;
mutable VCSet otherEffAddrsWritten; mutable VCSet otherEffAddrsWritten;
mutable std::string mnemonic;
entryID operationID; entryID operationID;
mutable bool doneOtherSetup; mutable bool doneOtherSetup;
mutable bool doneFlagsSetup; mutable bool doneFlagsSetup;
Architecture archDecodedFrom;
prefixEntryID prefixID;
Result_Type addrWidth;
}; };
}; };
}; };
#endif //!defined(DYN_OPERATION_H) #endif //!defined(DYN_OPERATION_H)
 End of changes. 10 change blocks. 
5 lines changed or deleted 21 lines changed or added


 RangeLookup.h   RangeLookup.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 Region.h   Region.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 80 skipping to change at line 80
RT_SYMVERSIONS, RT_SYMVERSIONS,
RT_SYMVERDEF, RT_SYMVERDEF,
RT_SYMVERNEEDED, RT_SYMVERNEEDED,
RT_REL, RT_REL,
RT_RELA, RT_RELA,
RT_PLTREL, RT_PLTREL,
RT_PLTRELA, RT_PLTRELA,
RT_DYNAMIC, RT_DYNAMIC,
RT_HASH, RT_HASH,
RT_GNU_HASH, RT_GNU_HASH,
RT_OTHER RT_OTHER,
RT_INVALID = -1
}; };
static const char *regionType2Str(RegionType); static const char *regionType2Str(RegionType);
SYMTAB_EXPORT Region(); SYMTAB_EXPORT Region();
SYMTAB_EXPORT static bool createRegion( Offset diskOff, perm_t perms, Re SYMTAB_EXPORT static Region *createRegion(Offset diskOff, perm_t perms,
gionType regType, RegionType regType,
unsigned long diskSize = 0, Offset memOff = 0, unsigned long memSi unsigned long diskSize = 0, Offset memOff = 0, unsigned lon
ze = 0, g memSize = 0,
std::string name = "", char *rawDataPtr = NULL); std::string name = "", char *rawDataPtr = NULL, bool isLoad
able = false,
bool isTLS = false, unsigned long memAlign = sizeof(unsigne
d));
SYMTAB_EXPORT Region(const Region &reg); SYMTAB_EXPORT Region(const Region &reg);
SYMTAB_EXPORT Region& operator=(const Region &reg); SYMTAB_EXPORT Region& operator=(const Region &reg);
SYMTAB_EXPORT std::ostream& operator<< (std::ostream &os); SYMTAB_EXPORT std::ostream& operator<< (std::ostream &os);
SYMTAB_EXPORT bool operator== (const Region &reg); SYMTAB_EXPORT bool operator== (const Region &reg);
SYMTAB_EXPORT ~Region(); SYMTAB_EXPORT ~Region();
SYMTAB_EXPORT unsigned getRegionNumber() const; SYMTAB_EXPORT unsigned getRegionNumber() const;
SYMTAB_EXPORT bool setRegionNumber(unsigned regnumber); SYMTAB_EXPORT bool setRegionNumber(unsigned regnumber);
SYMTAB_EXPORT std::string getRegionName() const; SYMTAB_EXPORT std::string getRegionName() const;
// getRegionAddr returns diskOffset on unixes, memory offset on windows // getRegionAddr returns diskOffset on unixes, memory offset on windows
SYMTAB_EXPORT Offset getRegionAddr() const; SYMTAB_EXPORT Offset getRegionAddr() const;
SYMTAB_EXPORT unsigned long getRegionSize() const; SYMTAB_EXPORT unsigned long getRegionSize() const;
SYMTAB_EXPORT Offset getDiskOffset() const; SYMTAB_EXPORT Offset getDiskOffset() const;
SYMTAB_EXPORT unsigned long getDiskSize() const; SYMTAB_EXPORT unsigned long getDiskSize() const;
SYMTAB_EXPORT Offset getMemOffset() const; SYMTAB_EXPORT Offset getMemOffset() const;
SYMTAB_EXPORT unsigned long getMemSize() const; SYMTAB_EXPORT unsigned long getMemSize() const;
SYMTAB_EXPORT unsigned long getMemAlignment() const;
SYMTAB_EXPORT void setMemOffset(Offset);
SYMTAB_EXPORT void setMemSize(long);
SYMTAB_EXPORT void *getPtrToRawData() const; SYMTAB_EXPORT void *getPtrToRawData() const;
SYMTAB_EXPORT bool setPtrToRawData(void *, unsigned long); SYMTAB_EXPORT bool setPtrToRawData(void *, unsigned long);
SYMTAB_EXPORT bool isBSS() const; SYMTAB_EXPORT bool isBSS() const;
SYMTAB_EXPORT bool isText() const; SYMTAB_EXPORT bool isText() const;
SYMTAB_EXPORT bool isData() const; SYMTAB_EXPORT bool isData() const;
SYMTAB_EXPORT bool isTLS() const;
SYMTAB_EXPORT bool isOffsetInRegion(const Offset &offset) const; SYMTAB_EXPORT bool isOffsetInRegion(const Offset &offset) const;
SYMTAB_EXPORT bool isLoadable() const; SYMTAB_EXPORT bool isLoadable() const;
SYMTAB_EXPORT bool setLoadable(bool isLoadable); SYMTAB_EXPORT bool setLoadable(bool isLoadable);
SYMTAB_EXPORT bool isDirty() const; SYMTAB_EXPORT bool isDirty() const;
SYMTAB_EXPORT std::vector<relocationEntry> &getRelocations(); SYMTAB_EXPORT std::vector<relocationEntry> &getRelocations();
SYMTAB_EXPORT bool patchData(Offset off, void *buf, unsigned size); SYMTAB_EXPORT bool patchData(Offset off, void *buf, unsigned size);
SYMTAB_EXPORT bool isStandardCode();
SYMTAB_EXPORT perm_t getRegionPermissions() const; SYMTAB_EXPORT perm_t getRegionPermissions() const;
SYMTAB_EXPORT bool setRegionPermissions(perm_t newPerms); SYMTAB_EXPORT bool setRegionPermissions(perm_t newPerms);
SYMTAB_EXPORT RegionType getRegionType() const; SYMTAB_EXPORT RegionType getRegionType() const;
SYMTAB_EXPORT bool addRelocationEntry(Offset relocationAddr, Symbol *dyn ref, unsigned long relType, Region::RegionType rtype = Region::RT_REL); SYMTAB_EXPORT bool addRelocationEntry(Offset relocationAddr, Symbol *dyn ref, unsigned long relType, Region::RegionType rtype = Region::RT_REL);
SYMTAB_EXPORT bool addRelocationEntry(const relocationEntry& rel);
SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb, SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb,
const char *tag = "Region") THROW_SPEC (SerializerError); const char *tag = "Region") THROW_SPEC (SerializerError);
protected: protected:
SYMTAB_EXPORT Region(unsigned regnum, std::string name, Offset diskOff, SYMTAB_EXPORT Region(unsigned regnum, std::string name, Offset diskOff,
unsigned long diskSize, Offset memOff, unsigned long memSize, unsigned long diskSize, Offset memOff, unsigned long memSize,
char *rawDataPtr, perm_t perms, RegionType regType, bool isLoadabl char *rawDataPtr, perm_t perms, RegionType regType, bool isLoadabl
e = false); e = false,
bool isTLS = false, unsigned long memAlign = sizeof(unsigned));
private: private:
unsigned regNum_; unsigned regNum_;
std::string name_; std::string name_;
Offset diskOff_; Offset diskOff_;
unsigned long diskSize_; unsigned long diskSize_;
Offset memOff_; Offset memOff_;
unsigned long memSize_; unsigned long memSize_;
void *rawDataPtr_; void *rawDataPtr_;
perm_t permissions_; perm_t permissions_;
RegionType rType_; RegionType rType_;
bool isDirty_; bool isDirty_;
std::vector<relocationEntry> rels_; std::vector<relocationEntry> rels_;
char *buffer_; //To hold dirty data char *buffer_; //To hold dirty data
bool isLoadable_; bool isLoadable_;
bool isTLS_;
unsigned long memAlign_;
}; };
}//namespace SymtabAPI }//namespace SymtabAPI
}//namespace Dyninst }//namespace Dyninst
#endif #endif
 End of changes. 10 change blocks. 
9 lines changed or deleted 24 lines changed or added


 Register.h   Register.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 40 skipping to change at line 40
*/ */
#if !defined(REGISTER_H) #if !defined(REGISTER_H)
#define REGISTER_H #define REGISTER_H
#include "Expression.h" #include "Expression.h"
#include <vector> #include <vector>
#include <map> #include <map>
#include <sstream> #include <sstream>
#include "RegisterIDs-x86.h" #include "dyn_regs.h"
namespace Dyninst namespace Dyninst
{ {
namespace InstructionAPI namespace InstructionAPI
{ {
/// A %RegisterAST object represents a register contained in an operand . /// A %RegisterAST object represents a register contained in an operand .
/// As a %RegisterAST is a %Expression, it may contain the physical reg ister's contents if /// As a %RegisterAST is a %Expression, it may contain the physical reg ister's contents if
/// they are known. /// they are known.
/// ///
class INSTRUCTION_EXPORT RegisterAST : public Expression class INSTRUCTION_EXPORT RegisterAST : public Expression
{ {
public: public:
/// \brief A type definition for a reference-counted pointer to a %Re gisterAST. /// \brief A type definition for a reference-counted pointer to a %Re gisterAST.
typedef dyn_detail::boost::shared_ptr<RegisterAST> Ptr; typedef dyn_detail::boost::shared_ptr<RegisterAST> Ptr;
/// Construct a register, assigning it the ID \c id. /// Construct a register, assigning it the ID \c id.
RegisterAST(int id); RegisterAST(MachRegister r);
RegisterAST(MachRegister r, unsigned int lowbit, unsigned int highbit
);
virtual ~RegisterAST(); virtual ~RegisterAST();
/// By definition, a %RegisterAST object has no children. /// By definition, a %RegisterAST object has no children.
/// \param children Since a %RegisterAST has no children, the \c chil dren parameter is unchanged by this method. /// \param children Since a %RegisterAST has no children, the \c chil dren parameter is unchanged by this method.
virtual void getChildren(vector<InstructionAST::Ptr>& children) const ; virtual void getChildren(vector<InstructionAST::Ptr>& children) const ;
virtual void getChildren(vector<Expression::Ptr>& children) const;
/// By definition, the use set of a %RegisterAST object is itself. /// By definition, the use set of a %RegisterAST object is itself.
/// \param uses This %RegisterAST will be inserted into \c uses. /// \param uses This %RegisterAST will be inserted into \c uses.
virtual void getUses(set<InstructionAST::Ptr>& uses); virtual void getUses(set<InstructionAST::Ptr>& uses);
/// \c isUsed returns true if \c findMe is a %RegisterAST that repres ents /// \c isUsed returns true if \c findMe is a %RegisterAST that repres ents
/// the same register as this %RegisterAST, and false otherwise. /// the same register as this %RegisterAST, and false otherwise.
virtual bool isUsed(InstructionAST::Ptr findMe) const; virtual bool isUsed(InstructionAST::Ptr findMe) const;
/// The \c format method on a %RegisterAST object returns the name as sociated with its ID. /// The \c format method on a %RegisterAST object returns the name as sociated with its ID.
virtual std::string format() const; virtual std::string format(formatStyle how = defaultStyle) const;
/// Utility function to get a Register object that represents the pro gram counter. /// Utility function to get a Register object that represents the pro gram counter.
/// ///
/// \c makePC is provided to support platform-independent control flo w analysis. /// \c makePC is provided to support platform-independent control flo w analysis.
static RegisterAST makePC(); static RegisterAST makePC(Dyninst::Architecture arch);
/// We define a partial ordering on registers by their register numbe r so that they may be placed into sets /// We define a partial ordering on registers by their register numbe r so that they may be placed into sets
/// or other sorted containers. /// or other sorted containers.
bool operator<(const RegisterAST& rhs) const; bool operator<(const RegisterAST& rhs) const;
/// The \c getID function returns the ID number of a register. /// The \c getID function returns the ID number of a register.
unsigned int getID() const; MachRegister getID() const;
unsigned int lowBit() const {
return m_Low; }
unsigned int highBit() const {
return m_High; }
/// Utility function to hide aliasing complexity on platforms (IA-32) that allow addressing part /// Utility function to hide aliasing complexity on platforms (IA-32) that allow addressing part
/// or all of a register /// or all of a register
// Note: not const because it may return *this... // Note: not const because it may return *this...
static RegisterAST::Ptr promote(const InstructionAST::Ptr reg); static RegisterAST::Ptr promote(const InstructionAST::Ptr reg);
static RegisterAST::Ptr promote(const RegisterAST* reg); static RegisterAST::Ptr promote(const RegisterAST* reg);
virtual void apply(Visitor* v); virtual void apply(Visitor* v);
virtual bool bind(Expression* e, const Result& val);
protected: protected:
virtual bool isStrictEqual(const InstructionAST& rhs) const; virtual bool isStrictEqual(const InstructionAST& rhs) const;
virtual bool isFlag() const; virtual bool isFlag() const;
virtual bool checkRegID(unsigned int id) const; virtual bool checkRegID(MachRegister id, unsigned int low, unsigned i
int getPromotedID() const; nt high) const;
MachRegister getPromotedReg() const;
private: private:
unsigned int registerID; MachRegister m_Reg;
unsigned int m_Low;
unsigned int m_High;
}; };
}; };
}; };
#endif // !defined(REGISTER_H) #endif // !defined(REGISTER_H)
 End of changes. 10 change blocks. 
9 lines changed or deleted 20 lines changed or added


 Result.h   Result.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 191 skipping to change at line 191
// machine states. From this, you may construct abstractions to repres ent the set of possible results. // machine states. From this, you may construct abstractions to repres ent the set of possible results.
// Alternately, you may use instrumentation to determine the exact mach ine state at the time an // Alternately, you may use instrumentation to determine the exact mach ine state at the time an
// instruction executes, which will allow you to evaluate the %Result o f an %Expression in its actual context. // instruction executes, which will allow you to evaluate the %Result o f an %Expression in its actual context.
class INSTRUCTION_EXPORT Result class INSTRUCTION_EXPORT Result
{ {
public: public:
Result_Value val; Result_Value val;
Result_Type type; Result_Type type;
bool defined; bool defined;
Result() :
type(u32), defined(false)
{
val.u32val = 0;
}
Result(const Result& o) :
val(o.val), type(o.type), defined(o.defined)
{
}
const Result& operator=(const Result& rhs)
{
val = rhs.val;
type = rhs.type;
defined = rhs.defined;
return *this;
}
/// A %Result may be constructed from a type without providing a valu e. /// A %Result may be constructed from a type without providing a valu e.
/// This constructor creates a %Result of type \c t with undefined co ntents. /// This constructor creates a %Result of type \c t with undefined co ntents.
Result(Result_Type t) : Result(Result_Type t) :
type(t), defined(false) type(t), defined(false)
{ {
val.u32val = 0;
} }
/// A %Result may be constructed from a type and any value convertibl e to the type that the /// A %Result may be constructed from a type and any value convertibl e to the type that the
/// tag represents. /// tag represents.
/// This constructor creates a %Result of type \c t and contents \c v for any \c v that is implicitly /// This constructor creates a %Result of type \c t and contents \c v for any \c v that is implicitly
/// convertible to type \c t. Attempting to construct a %Result with a value that is incompatible with /// convertible to type \c t. Attempting to construct a %Result with a value that is incompatible with
/// its type will result in a compile-time error. /// its type will result in a compile-time error.
template<typename T> template<typename T>
Result(Result_Type t, T v) : Result(Result_Type t, T v) :
type(t), defined(true) type(t), defined(true)
skipping to change at line 361 skipping to change at line 380
/// The type of the %Result is not included in the output. /// The type of the %Result is not included in the output.
std::string format() const std::string format() const
{ {
if(!defined) if(!defined)
{ {
return "[empty]"; return "[empty]";
} }
else else
{ {
std::stringstream ret; std::stringstream ret;
ret << std::hex << "0x"; // ret << std::hex << "0x";
switch(type) switch(type)
{ {
case u8: case u8:
// Type promote the characters so that they're treated as integr al, not as strings // Type promote the characters so that they're treated as integr al, not as strings
ret << (unsigned long)(val.u8val); ret << (unsigned long)(val.u8val);
break; break;
case s8: case s8:
ret << (long)(val.s8val); ret << (long)(val.s8val);
break; break;
case u16: case u16:
 End of changes. 5 change blocks. 
3 lines changed or deleted 22 lines changed or added


 Serialization.h   Serialization.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 138 skipping to change at line 138
COMMON_EXPORT std::string msg() const {return msg__;} COMMON_EXPORT std::string msg() const {return msg__;}
COMMON_EXPORT const char* what() const {return msg__.c_str();} COMMON_EXPORT const char* what() const {return msg__.c_str();}
COMMON_EXPORT int line() const {return line__;} COMMON_EXPORT int line() const {return line__;}
COMMON_EXPORT SerializerErrorType code() const {return err__;} COMMON_EXPORT SerializerErrorType code() const {return err__;}
}; };
COMMON_EXPORT void printSerErr(const SerializerError &err); COMMON_EXPORT void printSerErr(const SerializerError &err);
typedef enum { typedef enum {
ser_bin, ser_bin,
ser_xml, ser_xml
} ser_type_t; } ser_type_t;
class SerContextBase class SerContextBase
{ {
friend class Serializable; friend class Serializable;
friend class SerializerBase; friend class SerializerBase;
COMMON_EXPORT static std::vector<std::pair<std::string, dyn_hash_map <std::string, short>*> > ser_control_map; COMMON_EXPORT static std::vector<std::pair<std::string, dyn_hash_map <std::string, short>*> > ser_control_map;
std::string fname; std::string fname;
std::string serfilename; std::string serfilename;
static dyn_hash_map<std::string, short> *getMapForType(std::string); static dyn_hash_map<std::string, short> *getMapForType(std::string);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Symbol.h   Symbol.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 93 skipping to change at line 93
public: public:
enum SymbolType { enum SymbolType {
ST_UNKNOWN, ST_UNKNOWN,
ST_FUNCTION, ST_FUNCTION,
ST_OBJECT, ST_OBJECT,
ST_MODULE, ST_MODULE,
ST_SECTION, ST_SECTION,
ST_TLS, ST_TLS,
ST_DELETED, ST_DELETED,
ST_NOTYPE, ST_NOTYPE
}; };
static const char *symbolType2Str(SymbolType t); static const char *symbolType2Str(SymbolType t);
enum SymbolLinkage { enum SymbolLinkage {
SL_UNKNOWN, SL_UNKNOWN,
SL_GLOBAL, SL_GLOBAL,
SL_LOCAL, SL_LOCAL,
SL_WEAK SL_WEAK
}; };
skipping to change at line 140 skipping to change at line 140
SymbolType t, SymbolType t,
SymbolLinkage l, SymbolLinkage l,
SymbolVisibility v, SymbolVisibility v,
Offset o, Offset o,
Module *module = NULL, Module *module = NULL,
Region *r = NULL, Region *r = NULL,
unsigned s = 0, unsigned s = 0,
bool d = false, bool d = false,
bool a = false, bool a = false,
int index= -1, int index= -1,
int strindex = -1); int strindex = -1,
bool cs = false);
SYMTAB_EXPORT ~Symbol(); SYMTAB_EXPORT ~Symbol();
SYMTAB_EXPORT bool operator== (const Symbol &) const; SYMTAB_EXPORT bool operator== (const Symbol &) const;
/*********************************************************** /***********************************************************
Name Output Functions Name Output Functions
***********************************************************/ ***********************************************************/
SYMTAB_EXPORT const std::string& getMangledName () const; SYMTAB_EXPORT const std::string& getMangledName () const;
SYMTAB_EXPORT const std::string& getPrettyName() const; SYMTAB_EXPORT const std::string& getPrettyName() const;
SYMTAB_EXPORT const std::string& getTypedName() const; SYMTAB_EXPORT const std::string& getTypedName() const;
SYMTAB_EXPORT Module *getModule() const { return module_; } SYMTAB_EXPORT Module *getModule() const { return module_; }
SYMTAB_EXPORT Symtab *getSymtab() const; SYMTAB_EXPORT Symtab *getSymtab() const;
SYMTAB_EXPORT SymbolType getType () const { return type_; } SYMTAB_EXPORT SymbolType getType () const { return type_; }
SYMTAB_EXPORT SymbolLinkage getLinkage () const { return linkage_; } SYMTAB_EXPORT SymbolLinkage getLinkage () const { return linkage_; }
SYMTAB_EXPORT Offset getOffset() const { return offset_; } SYMTAB_EXPORT Offset getOffset() const { return offset_; }
SYMTAB_EXPORT Offset getPtrOffset() const { return ptr_offset_; } SYMTAB_EXPORT Offset getPtrOffset() const { return ptr_offset_; }
SYMTAB_EXPORT Offset getLocalTOC() const { return localTOC_; }
SYMTAB_EXPORT unsigned getSize() const { return size_; } SYMTAB_EXPORT unsigned getSize() const { return size_; }
SYMTAB_EXPORT Region *getRegion() const { return region_; } SYMTAB_EXPORT Region *getRegion() const { return region_; }
SYMTAB_EXPORT bool isInDynSymtab() const { return (type_ != ST_DELETED) && isDynamic_; } SYMTAB_EXPORT bool isInDynSymtab() const { return (type_ != ST_DELETED) && isDynamic_; }
SYMTAB_EXPORT bool isInSymtab() const { return (type_ != ST_DELETED) && !isDynamic_; } SYMTAB_EXPORT bool isInSymtab() const { return (type_ != ST_DELETED) && !isDynamic_; }
SYMTAB_EXPORT bool isAbsolute() const { return isAbsolute_; } SYMTAB_EXPORT bool isAbsolute() const { return isAbsolute_; }
SYMTAB_EXPORT bool isCommonStorage() const { return isCommonStorage_; }
SYMTAB_EXPORT bool isFunction() const; SYMTAB_EXPORT bool isFunction() const;
SYMTAB_EXPORT bool setFunction(Function * func); SYMTAB_EXPORT bool setFunction(Function * func);
SYMTAB_EXPORT Function * getFunction() const; SYMTAB_EXPORT Function * getFunction() const;
SYMTAB_EXPORT bool isVariable() const; SYMTAB_EXPORT bool isVariable() const;
SYMTAB_EXPORT bool setVariable(Variable *var); SYMTAB_EXPORT bool setVariable(Variable *var);
SYMTAB_EXPORT Variable * getVariable() const; SYMTAB_EXPORT Variable * getVariable() const;
SYMTAB_EXPORT SymbolVisibility getVisibility() const { return visibility _; } SYMTAB_EXPORT SymbolVisibility getVisibility() const { return visibility _; }
skipping to change at line 185 skipping to change at line 188
SYMTAB_EXPORT int getIndex() const { return index_; } SYMTAB_EXPORT int getIndex() const { return index_; }
SYMTAB_EXPORT bool setIndex(int index) { index_ = index; return true; } SYMTAB_EXPORT bool setIndex(int index) { index_ = index; return true; }
SYMTAB_EXPORT int getStrIndex() const { return strindex_; } SYMTAB_EXPORT int getStrIndex() const { return strindex_; }
SYMTAB_EXPORT bool setStrIndex(int strindex) { strindex_ = strindex; ret urn true; } SYMTAB_EXPORT bool setStrIndex(int strindex) { strindex_ = strindex; ret urn true; }
SYMTAB_EXPORT void setReferringSymbol (Symbol *referringSymbol); SYMTAB_EXPORT void setReferringSymbol (Symbol *referringSymbol);
SYMTAB_EXPORT Symbol* getReferringSymbol (); SYMTAB_EXPORT Symbol* getReferringSymbol ();
//////////////// Modification //////////////// Modification
SYMTAB_EXPORT bool setOffset (Offset newOffset); SYMTAB_EXPORT bool setOffset (Offset newOffset);
SYMTAB_EXPORT bool setPtrOffset (Offset newOffset); SYMTAB_EXPORT bool setPtrOffset (Offset newOffset);
SYMTAB_EXPORT bool setLocalTOC (Offset localTOC);
SYMTAB_EXPORT bool setSize(unsigned ns); SYMTAB_EXPORT bool setSize(unsigned ns);
SYMTAB_EXPORT bool setRegion(Region *r);
SYMTAB_EXPORT bool setModule(Module *mod); SYMTAB_EXPORT bool setModule(Module *mod);
SYMTAB_EXPORT bool setMangledName(std::string &name); SYMTAB_EXPORT bool setMangledName(std::string &name);
SYMTAB_EXPORT bool setPrettyName(std::string &name); SYMTAB_EXPORT bool setPrettyName(std::string &name);
SYMTAB_EXPORT bool setTypedName(std::string &name); SYMTAB_EXPORT bool setTypedName(std::string &name);
SYMTAB_EXPORT bool setSymbolType(SymbolType sType); SYMTAB_EXPORT bool setSymbolType(SymbolType sType);
SYMTAB_EXPORT SymbolTag tag () const; SYMTAB_EXPORT SymbolTag tag () const;
SYMTAB_EXPORT bool setDynamic(bool d) { isDynamic_ = d; return true;} SYMTAB_EXPORT bool setDynamic(bool d) { isDynamic_ = d; return true;}
SYMTAB_EXPORT bool setAbsolute(bool a) { isAbsolute_ = a; return true; } SYMTAB_EXPORT bool setAbsolute(bool a) { isAbsolute_ = a; return true; }
SYMTAB_EXPORT bool setCommonStorage(bool cs) { isCommonStorage_ = cs; r eturn true; }
SYMTAB_EXPORT bool setVersionFileName(std::string &fileName); SYMTAB_EXPORT bool setVersionFileName(std::string &fileName);
SYMTAB_EXPORT bool setVersions(std::vector<std::string> &vers); SYMTAB_EXPORT bool setVersions(std::vector<std::string> &vers);
SYMTAB_EXPORT bool setVersionNum(unsigned verNum); SYMTAB_EXPORT bool setVersionNum(unsigned verNum);
SYMTAB_EXPORT void setVersionHidden() { versionHidden_ = true; }
SYMTAB_EXPORT bool getVersionFileName(std::string &fileName); SYMTAB_EXPORT bool getVersionFileName(std::string &fileName);
SYMTAB_EXPORT bool getVersions(std::vector<std::string> *&vers); SYMTAB_EXPORT bool getVersions(std::vector<std::string> *&vers);
SYMTAB_EXPORT bool getVersionNum(unsigned &verNum); SYMTAB_EXPORT bool getVersionNum(unsigned &verNum);
SYMTAB_EXPORT bool getVersionHidden() { return versionHidden_; }
friend friend
std::ostream& operator<< (std::ostream &os, const Symbol &s); std::ostream& operator<< (std::ostream &os, const Symbol &s);
//////////// DEPRECATED //////////// DEPRECATED
SYMTAB_EXPORT Region *getSec () const { r eturn getRegion(); } SYMTAB_EXPORT Region *getSec () const { r eturn getRegion(); }
SYMTAB_EXPORT Offset getAddr () const { return g etOffset(); } SYMTAB_EXPORT Offset getAddr () const { return g etOffset(); }
SYMTAB_EXPORT const std::string&getModuleName () const; SYMTAB_EXPORT const std::string&getModuleName () const;
SYMTAB_EXPORT const std::string &getName() const { return getMangledName (); } SYMTAB_EXPORT const std::string &getName() const { return getMangledName (); }
SYMTAB_EXPORT bool setAddr (Offset newAddr) { return setOffset(newAddr); } SYMTAB_EXPORT bool setAddr (Offset newAddr) { return setOffset(newAddr); }
skipping to change at line 231 skipping to change at line 239
private: private:
Module* module_; Module* module_;
SymbolType type_; SymbolType type_;
int internal_type_; int internal_type_;
SymbolLinkage linkage_; SymbolLinkage linkage_;
SymbolVisibility visibility_; SymbolVisibility visibility_;
Offset offset_; Offset offset_;
Offset ptr_offset_; // Function descriptor offset. Not availabl e on all platforms. Offset ptr_offset_; // Function descriptor offset. Not availabl e on all platforms.
Offset localTOC_;
Region* region_; Region* region_;
Symbol* referring_; Symbol* referring_;
unsigned size_; // size of this symbol. This is NOT available on a ll platforms. unsigned size_; // size of this symbol. This is NOT available on a ll platforms.
bool isDynamic_; bool isDynamic_;
bool isAbsolute_; bool isAbsolute_;
Aggregate * aggregate_; // Pointer to Function or Variable container, if appropriate. Aggregate * aggregate_; // Pointer to Function or Variable container, if appropriate.
std::string mangledName_; std::string mangledName_;
std::string prettyName_; std::string prettyName_;
std::string typedName_; std::string typedName_;
SymbolTag tag_; SymbolTag tag_;
int index_; int index_;
int strindex_; int strindex_;
bool isCommonStorage_;
std::vector<std::string> verNames_; std::vector<std::string> verNames_;
bool versionHidden_;
void restore_module_and_region(SerializerBase *, void restore_module_and_region(SerializerBase *,
std::string &, Offset) THROW_SPEC (SerializerError); std::string &, Offset) THROW_SPEC (SerializerError);
public: public:
SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *, SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *,
const char *tag = "Symbol") THROW_SPEC (SerializerError); const char *tag = "Symbol") THROW_SPEC (SerializerError);
}; };
class LookupInterface class LookupInterface
skipping to change at line 277 skipping to change at line 290
Symbol::SymbolType sType, Symbol::SymbolType sType,
bool isMangled = false, bool isMangled = false,
bool isRegex = false, bool isRegex = false,
bool checkCase = false) = 0; bool checkCase = false) = 0;
SYMTAB_EXPORT virtual bool findType(Type *&type, std::string name) = 0; SYMTAB_EXPORT virtual bool findType(Type *&type, std::string name) = 0;
SYMTAB_EXPORT virtual bool findVariableType(Type *&type, std::string name)= 0; SYMTAB_EXPORT virtual bool findVariableType(Type *&type, std::string name)= 0;
SYMTAB_EXPORT virtual ~LookupInterface(); SYMTAB_EXPORT virtual ~LookupInterface();
}; };
std::ostream& operator<< (std::ostream &os, const Symbol &s);
}//namespace SymtabAPI }//namespace SymtabAPI
}//namespace Dyninst }//namespace Dyninst
#endif /* !defined(_Symbol_h_) */ #endif /* !defined(_Symbol_h_) */
 End of changes. 14 change blocks. 
3 lines changed or deleted 18 lines changed or added


 Symtab.h   Symtab.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 35 skipping to change at line 35
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef __SYMTAB_H__ #ifndef __SYMTAB_H__
#define __SYMTAB_H__ #define __SYMTAB_H__
#include <set>
#include "Symbol.h" #include "Symbol.h"
#include "Module.h" #include "Module.h"
#include "Region.h" #include "Region.h"
#include "Annotatable.h" #include "Annotatable.h"
#include "Serialization.h" #include "Serialization.h"
#include "ProcReader.h"
class MappedFile; class MappedFile;
namespace Dyninst{ #define SYM_MAJOR 6
namespace SymtabAPI{ #define SYM_MINOR 2
#define SYM_BETA 1
namespace Dyninst {
namespace SymtabAPI {
class Archive; class Archive;
class builtInTypeCollection; class builtInTypeCollection;
class ExceptionBlock; class ExceptionBlock;
class Object; class Object;
class localVar; class localVar;
class relocationEntry; class relocationEntry;
class Type; class Type;
class MemRegReader { typedef Dyninst::ProcessReader MemRegReader;
public:
virtual bool ReadMem(Address addr, void *buffer, unsigned size) = 0;
virtual bool GetReg(MachRegister reg, MachRegisterVal &val) = 0;
virtual ~MemRegReader();
};
class Symtab : public LookupInterface, class Symtab : public LookupInterface,
public Serializable, public Serializable,
public AnnotatableSparse public AnnotatableSparse
{ {
friend class Archive; friend class Archive;
friend class Symbol; friend class Symbol;
friend class Function; friend class Function;
friend class Variable; friend class Variable;
friend class Module; friend class Module;
friend class Region; friend class Region;
friend class emitElf; friend class emitElf;
friend class emitElf64; friend class emitElf64;
friend class emitElfStatic;
friend class emitWin; friend class emitWin;
friend class Aggregate; friend class Aggregate;
friend class relocationEntry; friend class relocationEntry;
public: public:
/***** Public Member Functions *****/ /***** Public Member Functions *****/
public: public:
SYMTAB_EXPORT static void version(int& major, int& minor, int& maintenan ce);
SYMTAB_EXPORT Symtab(MappedFile *); SYMTAB_EXPORT Symtab(MappedFile *);
SYMTAB_EXPORT Symtab(); SYMTAB_EXPORT Symtab();
SYMTAB_EXPORT Symtab(const Symtab& obj); SYMTAB_EXPORT Symtab(const Symtab& obj);
SYMTAB_EXPORT Symtab(char *mem_image, size_t image_size, bool &err);
SYMTAB_EXPORT static bool openFile(Symtab *&obj, std::string filename); SYMTAB_EXPORT static bool openFile(Symtab *&obj, std::string filename);
SYMTAB_EXPORT static bool openFile(Symtab *&obj,char *mem_image, size_t size); SYMTAB_EXPORT static bool openFile(Symtab *&obj,char *mem_image, size_t size);
SYMTAB_EXPORT static Symtab *findOpenSymtab(std::string filename); SYMTAB_EXPORT static Symtab *findOpenSymtab(std::string filename);
SYMTAB_EXPORT static bool closeSymtab(Symtab *); SYMTAB_EXPORT static bool closeSymtab(Symtab *);
SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb, SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb,
const char *tag = "Symtab") THROW_SPEC (SerializerError); const char *tag = "Symtab") THROW_SPEC (SerializerError);
void rebuild_symbol_hashes(SerializerBase *); void rebuild_symbol_hashes(SerializerBase *);
void rebuild_funcvar_hashes(SerializerBase *); void rebuild_funcvar_hashes(SerializerBase *);
skipping to change at line 201 skipping to change at line 207
SYMTAB_EXPORT Function *createFunction(std::string name, Offset offset, size_t size, Module *mod = NULL); SYMTAB_EXPORT Function *createFunction(std::string name, Offset offset, size_t size, Module *mod = NULL);
SYMTAB_EXPORT Variable *createVariable(std::string name, Offset offset, size_t size, Module *mod = NULL); SYMTAB_EXPORT Variable *createVariable(std::string name, Offset offset, size_t size, Module *mod = NULL);
SYMTAB_EXPORT bool deleteFunction(Function *func); SYMTAB_EXPORT bool deleteFunction(Function *func);
SYMTAB_EXPORT bool deleteVariable(Variable *var); SYMTAB_EXPORT bool deleteVariable(Variable *var);
/*****Query Functions*****/ /*****Query Functions*****/
SYMTAB_EXPORT bool isExec() const; SYMTAB_EXPORT bool isExec() const;
SYMTAB_EXPORT bool isStripped(); SYMTAB_EXPORT bool isStripped();
SYMTAB_EXPORT ObjectType getObjectType() const; SYMTAB_EXPORT ObjectType getObjectType() const;
SYMTAB_EXPORT Dyninst::Architecture getArchitecture();
SYMTAB_EXPORT bool isCode(const Offset where) const; SYMTAB_EXPORT bool isCode(const Offset where) const;
SYMTAB_EXPORT bool isData(const Offset where) const; SYMTAB_EXPORT bool isData(const Offset where) const;
SYMTAB_EXPORT bool isValidOffset(const Offset where) const; SYMTAB_EXPORT bool isValidOffset(const Offset where) const;
SYMTAB_EXPORT bool isNativeCompiler() const; SYMTAB_EXPORT bool isNativeCompiler() const;
SYMTAB_EXPORT bool getMappedRegions(std::vector<Region *> &mappedRegs) c onst; SYMTAB_EXPORT bool getMappedRegions(std::vector<Region *> &mappedRegs) c onst;
/***** Line Number Information *****/ /***** Line Number Information *****/
SYMTAB_EXPORT bool getAddressRanges(std::vector<std::pair<Offset, Offset > >&ranges, SYMTAB_EXPORT bool getAddressRanges(std::vector<std::pair<Offset, Offset > >&ranges,
std::string lineSource, unsigned int LineNo); std::string lineSource, unsigned int LineNo);
SYMTAB_EXPORT bool getSourceLines(std::vector<Statement *> &lines, SYMTAB_EXPORT bool getSourceLines(std::vector<Statement *> &lines,
Offset addressInRange); Offset addressInRange);
SYMTAB_EXPORT bool getSourceLines(std::vector<LineNoTuple> &lines,
Offset addressInRange);
SYMTAB_EXPORT bool addLine(std::string lineSource, unsigned int lineNo, SYMTAB_EXPORT bool addLine(std::string lineSource, unsigned int lineNo,
unsigned int lineOffset, Offset lowInclAddr, unsigned int lineOffset, Offset lowInclAddr,
Offset highExclAddr); Offset highExclAddr);
SYMTAB_EXPORT bool addAddressRange(Offset lowInclAddr, Offset highExclAd dr, std::string lineSource, SYMTAB_EXPORT bool addAddressRange(Offset lowInclAddr, Offset highExclAd dr, std::string lineSource,
unsigned int lineNo, unsigned int lineOffset = 0); unsigned int lineNo, unsigned int lineOffset = 0);
SYMTAB_EXPORT void setTruncateLinePaths(bool value);
SYMTAB_EXPORT bool getTruncateLinePaths();
/***** Type Information *****/ /***** Type Information *****/
SYMTAB_EXPORT virtual bool findType(Type *&type, std::string name); SYMTAB_EXPORT virtual bool findType(Type *&type, std::string name);
SYMTAB_EXPORT virtual Type *findType(unsigned type_id); SYMTAB_EXPORT virtual Type *findType(unsigned type_id);
SYMTAB_EXPORT virtual bool findVariableType(Type *&type, std::string nam e); SYMTAB_EXPORT virtual bool findVariableType(Type *&type, std::string nam e);
SYMTAB_EXPORT bool addType(Type *typ); SYMTAB_EXPORT bool addType(Type *typ);
SYMTAB_EXPORT static std::vector<Type *> *getAllstdTypes(); SYMTAB_EXPORT static std::vector<Type *> *getAllstdTypes();
SYMTAB_EXPORT static std::vector<Type *> *getAllbuiltInTypes(); SYMTAB_EXPORT static std::vector<Type *> *getAllbuiltInTypes();
skipping to change at line 248 skipping to change at line 258
SYMTAB_EXPORT bool hasReldyn() const; SYMTAB_EXPORT bool hasReldyn() const;
SYMTAB_EXPORT bool hasReladyn() const; SYMTAB_EXPORT bool hasReladyn() const;
SYMTAB_EXPORT bool hasRelplt() const; SYMTAB_EXPORT bool hasRelplt() const;
SYMTAB_EXPORT bool hasRelaplt() const; SYMTAB_EXPORT bool hasRelaplt() const;
SYMTAB_EXPORT bool isStaticBinary() const; SYMTAB_EXPORT bool isStaticBinary() const;
/***** Write Back binary functions *****/ /***** Write Back binary functions *****/
SYMTAB_EXPORT bool emitSymbols(Object *linkedFile, std::string filename, unsigned flag = 0); SYMTAB_EXPORT bool emitSymbols(Object *linkedFile, std::string filename, unsigned flag = 0);
SYMTAB_EXPORT bool addRegion(Offset vaddr, void *data, unsigned int data Size, SYMTAB_EXPORT bool addRegion(Offset vaddr, void *data, unsigned int data Size,
std::string name, Region::RegionType rType_, bool loadable = false std::string name, Region::RegionType rType_, bool loadable = false
); ,
unsigned long memAlign = sizeof(unsigned), bool tls = false);
SYMTAB_EXPORT bool addRegion(Region *newreg); SYMTAB_EXPORT bool addRegion(Region *newreg);
SYMTAB_EXPORT bool emit(std::string filename, unsigned flag = 0); SYMTAB_EXPORT bool emit(std::string filename, unsigned flag = 0);
SYMTAB_EXPORT void addDynLibSubstitution(std::string oldName, std::strin g newName); SYMTAB_EXPORT void addDynLibSubstitution(std::string oldName, std::strin g newName);
SYMTAB_EXPORT std::string getDynLibSubstitution(std::string name); SYMTAB_EXPORT std::string getDynLibSubstitution(std::string name);
SYMTAB_EXPORT bool getSegments(std::vector<Segment> &segs) const; SYMTAB_EXPORT bool getSegments(std::vector<Segment> &segs) const;
SYMTAB_EXPORT void fixup_code_and_data(Offset newImageOffset,
Offset newImageLength,
Offset newDataOffset,
Offset newDataLength);
SYMTAB_EXPORT bool fixup_RegionAddr(const char* name, Offset memOffset,
long memSize);
SYMTAB_EXPORT bool fixup_SymbolAddr(const char* name, Offset newOffset);
SYMTAB_EXPORT bool updateRegion(const char* name, void *buffer, unsigned size); SYMTAB_EXPORT bool updateRegion(const char* name, void *buffer, unsigned size);
SYMTAB_EXPORT bool updateCode(void *buffer, unsigned size); SYMTAB_EXPORT bool updateCode(void *buffer, unsigned size);
SYMTAB_EXPORT bool updateData(void *buffer, unsigned size); SYMTAB_EXPORT bool updateData(void *buffer, unsigned size);
SYMTAB_EXPORT Offset getFreeOffset(unsigned size); SYMTAB_EXPORT Offset getFreeOffset(unsigned size);
SYMTAB_EXPORT bool addLibraryPrereq(std::string libname); SYMTAB_EXPORT bool addLibraryPrereq(std::string libname);
SYMTAB_EXPORT bool addSysVDynamic(long name, long value); SYMTAB_EXPORT bool addSysVDynamic(long name, long value);
SYMTAB_EXPORT bool addLinkingResource(Archive *library);
SYMTAB_EXPORT bool getLinkingResources(std::vector<Archive *> &libs);
SYMTAB_EXPORT bool addExternalSymbolReference(Symbol *externalSym, Regio
n *localRegion, relocationEntry localRel);
/***** Data Member Access *****/ /***** Data Member Access *****/
SYMTAB_EXPORT std::string file() const; SYMTAB_EXPORT std::string file() const;
SYMTAB_EXPORT std::string name() const; SYMTAB_EXPORT std::string name() const;
SYMTAB_EXPORT std::string memberName() const;
SYMTAB_EXPORT char *mem_image() const; SYMTAB_EXPORT char *mem_image() const;
SYMTAB_EXPORT Offset imageOffset() const; SYMTAB_EXPORT Offset imageOffset() const;
SYMTAB_EXPORT Offset dataOffset() const; SYMTAB_EXPORT Offset dataOffset() const;
SYMTAB_EXPORT Offset dataLength() const; SYMTAB_EXPORT Offset dataLength() const;
SYMTAB_EXPORT Offset imageLength() const; SYMTAB_EXPORT Offset imageLength() const;
// SYMTAB_EXPORT char* image_ptr () const; // SYMTAB_EXPORT char* image_ptr () const;
// SYMTAB_EXPORT char* data_ptr () const; // SYMTAB_EXPORT char* data_ptr () const;
SYMTAB_EXPORT Offset getInitOffset(); SYMTAB_EXPORT Offset getInitOffset();
skipping to change at line 294 skipping to change at line 319
SYMTAB_EXPORT Offset getTOCoffset() const; SYMTAB_EXPORT Offset getTOCoffset() const;
SYMTAB_EXPORT Address getLoadAddress(); SYMTAB_EXPORT Address getLoadAddress();
SYMTAB_EXPORT std::string getDefaultNamespacePrefix() const; SYMTAB_EXPORT std::string getDefaultNamespacePrefix() const;
SYMTAB_EXPORT unsigned getNumberofRegions() const; SYMTAB_EXPORT unsigned getNumberofRegions() const;
SYMTAB_EXPORT unsigned getNumberofSymbols() const; SYMTAB_EXPORT unsigned getNumberofSymbols() const;
SYMTAB_EXPORT std::vector<std::string> &getDependencies(); SYMTAB_EXPORT std::vector<std::string> &getDependencies();
SYMTAB_EXPORT Archive *getParentArchive() const;
/***** Error Handling *****/ /***** Error Handling *****/
SYMTAB_EXPORT static SymtabError getLastSymtabError(); SYMTAB_EXPORT static SymtabError getLastSymtabError();
SYMTAB_EXPORT static std::string printError(SymtabError serr); SYMTAB_EXPORT static std::string printError(SymtabError serr);
SYMTAB_EXPORT ~Symtab(); SYMTAB_EXPORT ~Symtab();
bool delSymbol(Symbol *sym) { return deleteSymbol(sym); } bool delSymbol(Symbol *sym) { return deleteSymbol(sym); }
bool deleteSymbol(Symbol *sym); bool deleteSymbol(Symbol *sym);
static builtInTypeCollection *builtInTypes; static builtInTypeCollection *builtInTypes;
static typeCollection *stdTypes; static typeCollection *stdTypes;
Symbol *getSymbolByIndex(unsigned); Symbol *getSymbolByIndex(unsigned);
protected: protected:
Symtab(std::string filename, std::string member_name, Offset offset, boo l &err, void *base = NULL); Symtab(std::string filename, std::string member_name, Offset offset, boo l &err, void *base = NULL);
Symtab(char *img, size_t size, std::string member_name, Offset offset, b ool &err, void *base = NULL); Symtab(char *img, size_t size, std::string member_name, Offset offset, b ool &err, void *base = NULL);
/***** Private Member Functions *****/ /***** Private Member Functions *****/
private: private:
SYMTAB_EXPORT Symtab(std::string filename, bool &err); SYMTAB_EXPORT Symtab(std::string filename, bool &err);
SYMTAB_EXPORT Symtab(char *mem_image, size_t image_size, bool &err);
SYMTAB_EXPORT bool extractInfo(Object *linkedFile); SYMTAB_EXPORT bool extractInfo(Object *linkedFile);
// Parsing code // Parsing code
bool extractSymbolsFromFile(Object *linkedFile, std::vector<Symbol *> &r aw_syms); bool extractSymbolsFromFile(Object *linkedFile, std::vector<Symbol *> &r aw_syms);
bool fixSymModules(std::vector<Symbol *> &raw_syms); bool fixSymModules(std::vector<Symbol *> &raw_syms);
bool demangleSymbols(std::vector<Symbol *> &rawsyms); bool demangleSymbols(std::vector<Symbol *> &rawsyms);
bool createIndices(std::vector<Symbol *> &raw_syms); bool createIndices(std::vector<Symbol *> &raw_syms);
bool createAggregates(); bool createAggregates();
bool fixSymModule(Symbol *&sym); bool fixSymModule(Symbol *&sym);
bool demangleSymbol(Symbol *&sym); bool demangleSymbol(Symbol *&sym);
bool addSymbolToIndices(Symbol *&sym); bool addSymbolToIndices(Symbol *&sym);
bool addSymbolToAggregates(Symbol *&sym); bool addSymbolToAggregates(Symbol *&sym);
bool doNotAggregate(Symbol *&sym);
bool updateIndices(Symbol *sym, std::string newName, NameType nameType); bool updateIndices(Symbol *sym, std::string newName, NameType nameType);
void setModuleLanguages(dyn_hash_map<std::string, supportedLanguages> *m od_langs); void setModuleLanguages(dyn_hash_map<std::string, supportedLanguages> *m od_langs);
void setupTypes(); void setupTypes();
static void setupStdTypes(); static void setupStdTypes();
bool buildDemangledName( const std::string &mangled, bool buildDemangledName( const std::string &mangled,
std::string &pretty, std::string &pretty,
std::string &typed, std::string &typed,
skipping to change at line 385 skipping to change at line 412
void parseTypes(); void parseTypes();
bool setDefaultNamespacePrefix(std::string &str); bool setDefaultNamespacePrefix(std::string &str);
bool addUserRegion(Region *newreg); bool addUserRegion(Region *newreg);
bool addUserType(Type *newtypeg); bool addUserType(Type *newtypeg);
/***** Private Data Members *****/ /***** Private Data Members *****/
private: private:
std::string member_name_; std::string member_name_;
Offset member_offset_; Offset member_offset_;
Archive * parentArchive_;
MappedFile *mf; MappedFile *mf;
MappedFile *mfForDebugInfo; MappedFile *mfForDebugInfo;
Offset imageOffset_; Offset imageOffset_;
unsigned imageLen_; unsigned imageLen_;
Offset dataOffset_; Offset dataOffset_;
unsigned dataLen_; unsigned dataLen_;
bool is_a_out; bool is_a_out;
Offset main_call_addr_; // address of call to main() Offset main_call_addr_; // address of call to main()
skipping to change at line 504 skipping to change at line 532
*/ */
//dyn_hash_map <std::string, std::vector <Symbol *> *> modsByName; //dyn_hash_map <std::string, std::vector <Symbol *> *> modsByName;
//std::vector<Module *> _mods; //std::vector<Module *> _mods;
std::vector<relocationEntry > relocation_table_; std::vector<relocationEntry > relocation_table_;
std::vector<ExceptionBlock *> excpBlocks; std::vector<ExceptionBlock *> excpBlocks;
std::vector<std::string> deps_; std::vector<std::string> deps_;
// This set is used during static linking to satisfy dependencies
std::vector<Archive *> linkingResources_;
// This set represents Symtabs referenced by a new external Symbol
bool getExplicitSymtabRefs(std::set<Symtab *> &refs);
std::set<Symtab *> explicitSymtabRefs_;
//Line Information valid flag; //Line Information valid flag;
bool isLineInfoValid_; bool isLineInfoValid_;
//type info valid flag //type info valid flag
bool isTypeInfoValid_; bool isTypeInfoValid_;
int nlines_; int nlines_;
unsigned long fdptr_; unsigned long fdptr_;
char *lines_; char *lines_;
char *stabstr_; char *stabstr_;
int nstabs_; int nstabs_;
skipping to change at line 540 skipping to change at line 575
private: private:
Object *obj_private; Object *obj_private;
// dynamic library name substitutions // dynamic library name substitutions
std::map <std::string, std::string> dynLibSubs; std::map <std::string, std::string> dynLibSubs;
public: public:
static Type *type_Error; static Type *type_Error;
static Type *type_Untyped; static Type *type_Untyped;
private:
unsigned _ref_cnt;
public: public:
/********************************************************************/ /********************************************************************/
/**** DEPRECATED ****************************************************/ /**** DEPRECATED ****************************************************/
/********************************************************************/ /********************************************************************/
dyn_hash_map <std::string, Module *> &getModsByFileName() dyn_hash_map <std::string, Module *> &getModsByFileName()
{ {
return modsByFileName; return modsByFileName;
} }
dyn_hash_map <std::string, Module *> &getModsByFullName() dyn_hash_map <std::string, Module *> &getModsByFullName()
{ {
skipping to change at line 610 skipping to change at line 648
class relocationEntry : public Serializable, public AnnotatableSparse { class relocationEntry : public Serializable, public AnnotatableSparse {
public: public:
SYMTAB_EXPORT relocationEntry(); SYMTAB_EXPORT relocationEntry();
SYMTAB_EXPORT relocationEntry(Offset ta, Offset ra, Offset add, SYMTAB_EXPORT relocationEntry(Offset ta, Offset ra, Offset add,
std::string n, Symbol *dynref = NULL, unsigned lon g relType = 0); std::string n, Symbol *dynref = NULL, unsigned lon g relType = 0);
SYMTAB_EXPORT relocationEntry(Offset ta, Offset ra, std::string n, SYMTAB_EXPORT relocationEntry(Offset ta, Offset ra, std::string n,
Symbol *dynref = NULL, unsigned long relType = 0); Symbol *dynref = NULL, unsigned long relType = 0);
SYMTAB_EXPORT relocationEntry(Offset ra, std::string n, Symbol *dynre f = NULL, SYMTAB_EXPORT relocationEntry(Offset ra, std::string n, Symbol *dynre f = NULL,
unsigned long relType = 0, Region::RegionType rtyp e = Region::RT_REL); unsigned long relType = 0, Region::RegionType rtyp e = Region::RT_REL);
SYMTAB_EXPORT relocationEntry(Offset ta, Offset ra, Offset add,
std::string n, Symbol *dynref = NULL, unsigned lo
ng relType = 0,
Region::RegionType rtype = Region::RT_REL);
SYMTAB_EXPORT const relocationEntry& operator= (const relocationEntry &ra); SYMTAB_EXPORT const relocationEntry& operator= (const relocationEntry &ra);
SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb, SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *sb,
const char *tag = "relocationEntry") THROW_SPEC (S erializerError); const char *tag = "relocationEntry") THROW_SPEC (S erializerError);
SYMTAB_EXPORT Offset target_addr() const; SYMTAB_EXPORT Offset target_addr() const;
SYMTAB_EXPORT Offset rel_addr() const; SYMTAB_EXPORT Offset rel_addr() const;
SYMTAB_EXPORT Offset addend() const; SYMTAB_EXPORT Offset addend() const;
SYMTAB_EXPORT Region::RegionType regionType() const; SYMTAB_EXPORT Region::RegionType regionType() const;
SYMTAB_EXPORT const std::string &name() const; SYMTAB_EXPORT const std::string &name() const;
SYMTAB_EXPORT Symbol *getDynSym() const; SYMTAB_EXPORT Symbol *getDynSym() const;
SYMTAB_EXPORT bool addDynSym(Symbol *dynref); SYMTAB_EXPORT bool addDynSym(Symbol *dynref);
SYMTAB_EXPORT unsigned long getRelType() const; SYMTAB_EXPORT unsigned long getRelType() const;
SYMTAB_EXPORT void setTargetAddr(const Offset); SYMTAB_EXPORT void setTargetAddr(const Offset);
SYMTAB_EXPORT void setRelAddr(const Offset); SYMTAB_EXPORT void setRelAddr(const Offset);
SYMTAB_EXPORT void setAddend(const Offset); SYMTAB_EXPORT void setAddend(const Offset);
SYMTAB_EXPORT void setRegionType(const Region::RegionType); SYMTAB_EXPORT void setRegionType(const Region::RegionType);
SYMTAB_EXPORT void setName(const std::string &newName);
// dump output. Currently setup as a debugging aid, not really // dump output. Currently setup as a debugging aid, not really
// for object persistance.... // for object persistance....
//SYMTAB_EXPORT std::ostream & operator<<(std::ostream &s) const; //SYMTAB_EXPORT std::ostream & operator<<(std::ostream &s) const;
friend SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const relocationEntry &q); friend SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const relocationEntry &q);
enum {pltrel = 1, dynrel = 2} relocationType; enum {pltrel = 1, dynrel = 2} relocationType;
SYMTAB_EXPORT bool operator==(const relocationEntry &) const;
SYMTAB_EXPORT bool operator==(const relocationEntry &) const; // Architecture-specific functions
SYMTAB_EXPORT static unsigned long getGlobalRelType(unsigned addressW
idth);
static const char *relType2Str(unsigned long r, unsigned addressWidth
= sizeof(Address));
private: private:
Offset target_addr_; // target address of call instruction Offset target_addr_; // target address of call instruction
Offset rel_addr_; // address of corresponding relocati on entry Offset rel_addr_; // address of corresponding relocati on entry
Offset addend_; // addend (from RELA entries) Offset addend_; // addend (from RELA entries)
Region::RegionType rtype_; // RT_REL vs. RT_RELA Region::RegionType rtype_; // RT_REL vs. RT_RELA
std::string name_; std::string name_;
Symbol *dynref_; Symbol *dynref_;
unsigned long relType_; unsigned long relType_;
}; };
 End of changes. 26 change blocks. 
14 lines changed or deleted 65 lines changed or added


 Type.h   Type.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 239 skipping to change at line 239
class fieldListInterface { class fieldListInterface {
public: public:
SYMTAB_EXPORT virtual ~fieldListInterface() {}; SYMTAB_EXPORT virtual ~fieldListInterface() {};
SYMTAB_EXPORT virtual std::vector<Field *> *getComponents() const = 0; SYMTAB_EXPORT virtual std::vector<Field *> *getComponents() const = 0;
}; };
class rangedInterface { class rangedInterface {
public: public:
SYMTAB_EXPORT virtual ~rangedInterface() {}; SYMTAB_EXPORT virtual ~rangedInterface() {};
SYMTAB_EXPORT virtual long getLow() const = 0; SYMTAB_EXPORT virtual unsigned long getLow() const = 0;
SYMTAB_EXPORT virtual long getHigh() const = 0; SYMTAB_EXPORT virtual unsigned long getHigh() const = 0;
}; };
class derivedInterface{ class derivedInterface{
public: public:
SYMTAB_EXPORT virtual ~derivedInterface() {}; SYMTAB_EXPORT virtual ~derivedInterface() {};
SYMTAB_EXPORT virtual Type *getConstituentType() const = 0; SYMTAB_EXPORT virtual Type *getConstituentType() const = 0;
}; };
// Intermediate types (interfaces + Type) // Intermediate types (interfaces + Type)
skipping to change at line 284 skipping to change at line 284
SYMTAB_EXPORT void addField(unsigned num, Field *fld); SYMTAB_EXPORT void addField(unsigned num, Field *fld);
SYMTAB_EXPORT void serialize_fieldlist(Dyninst::SerializerBase *, SYMTAB_EXPORT void serialize_fieldlist(Dyninst::SerializerBase *,
const char * = "fieldListType") THROW_SPEC (SerializerErr or); const char * = "fieldListType") THROW_SPEC (SerializerErr or);
// void addField(const std::string &fieldname, dataClass typeDes, // void addField(const std::string &fieldname, dataClass typeDes,
// Type *type, int offset, int size, visibility_t vis = vis Unknown); // Type *type, int offset, int size, visibility_t vis = vis Unknown);
}; };
class rangedType : public Type, public rangedInterface { class rangedType : public Type, public rangedInterface {
protected: protected:
long low_; unsigned long low_;
long hi_; unsigned long hi_;
//char *low;
//char *hi;
protected: protected:
//rangedType(const std::string &name, typeId_t ID, dataClass typeDes, in t size, const char *low, const char *hi); //rangedType(const std::string &name, typeId_t ID, dataClass typeDes, in t size, const char *low, const char *hi);
SYMTAB_EXPORT rangedType(std::string &name, typeId_t ID, dataClass typeD SYMTAB_EXPORT rangedType(std::string &name, typeId_t ID, dataClass typeD
es, int size, long low, long hi); es, int size, unsigned long low, unsigned long hi);
SYMTAB_EXPORT rangedType(std::string &name, dataClass typeDes, int size, SYMTAB_EXPORT rangedType(std::string &name, dataClass typeDes, int size,
long low, long hi); unsigned long low, unsigned long hi);
SYMTAB_EXPORT void serialize_ranged(SerializerBase *, SYMTAB_EXPORT void serialize_ranged(SerializerBase *,
const char * = "rangedType") THROW_SPEC (SerializerError) ; const char * = "rangedType") THROW_SPEC (SerializerError) ;
public: public:
SYMTAB_EXPORT rangedType(); SYMTAB_EXPORT rangedType();
SYMTAB_EXPORT ~rangedType(); SYMTAB_EXPORT ~rangedType();
SYMTAB_EXPORT bool operator==(const Type &) const; SYMTAB_EXPORT bool operator==(const Type &) const;
SYMTAB_EXPORT long getLow() const { return low_; } SYMTAB_EXPORT unsigned long getLow() const { return low_; }
SYMTAB_EXPORT long getHigh() const { return hi_; } SYMTAB_EXPORT unsigned long getHigh() const { return hi_; }
}; };
class derivedType : public Type, public derivedInterface { class derivedType : public Type, public derivedInterface {
protected: protected:
Type *baseType_; Type *baseType_;
protected: protected:
SYMTAB_EXPORT derivedType(std::string &name, typeId_t id, int size, data Class typeDes); SYMTAB_EXPORT derivedType(std::string &name, typeId_t id, int size, data Class typeDes);
SYMTAB_EXPORT derivedType(std::string &name, int size, dataClass typeDes ); SYMTAB_EXPORT derivedType(std::string &name, int size, dataClass typeDes );
public: public:
SYMTAB_EXPORT derivedType(); SYMTAB_EXPORT derivedType();
 End of changes. 5 change blocks. 
13 lines changed or deleted 11 lines changed or added


 Variable.h   Variable.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 39 skipping to change at line 39
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#if !defined(_Variable_h_) #if !defined(_Variable_h_)
#define _Variable_h_ #define _Variable_h_
#include "Annotatable.h" #include "Annotatable.h"
#include "Serialization.h" #include "Serialization.h"
#include "Symtab.h" #include "Symtab.h"
#include "Aggregate.h" #include "Aggregate.h"
#include "dyn_regs.h"
//class Dyninst::SymtabAPI::Variable; //class Dyninst::SymtabAPI::Variable;
SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const Dyninst::Sym tabAPI::Variable &); SYMTAB_EXPORT std::ostream &operator<<(std::ostream &os, const Dyninst::Sym tabAPI::Variable &);
namespace Dyninst { namespace Dyninst {
namespace SymtabAPI { namespace SymtabAPI {
/* /*
* storageClass: Encodes how a variable is stored. * storageClass: Encodes how a variable is stored.
* *
skipping to change at line 76 skipping to change at line 77
* storageNoRef - No reference. Value can be obtained using storageCla ss. * storageNoRef - No reference. Value can be obtained using storageCla ss.
*/ */
typedef enum { typedef enum {
storageRef, storageRef,
storageNoRef storageNoRef
} storageRefClass; } storageRefClass;
const char *storageRefClass2Str(storageRefClass sc); const char *storageRefClass2Str(storageRefClass sc);
//location for a variable //location for a variable
//Use mr_reg instead of reg for new code. reg left in for backwards
// compatibility.
class VariableLocation : public Serializable { class VariableLocation : public Serializable {
public: public:
storageClass stClass; storageClass stClass;
storageRefClass refClass; storageRefClass refClass;
int reg; int reg;
MachRegister mr_reg;
long frameOffset; long frameOffset;
Address lowPC; Address lowPC;
Address hiPC; Address hiPC;
SYMTAB_EXPORT bool operator==(const VariableLocation &); SYMTAB_EXPORT bool operator==(const VariableLocation &);
SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *, SYMTAB_EXPORT Serializable * serialize_impl(SerializerBase *,
const char *tag = "VariableLocation") THROW_SPEC (Se rializerError); const char *tag = "VariableLocation") THROW_SPEC (Se rializerError);
}; };
class Symbol; class Symbol;
class Symtab; class Symtab;
skipping to change at line 143 skipping to change at line 147
public: public:
SYMTAB_EXPORT localVar() {} SYMTAB_EXPORT localVar() {}
// Internal use only // Internal use only
localVar(std::string name, Type *typ, std::string fileName, localVar(std::string name, Type *typ, std::string fileName,
int lineNum, Function *f, int lineNum, Function *f,
std::vector<VariableLocation> *locs = NULL); std::vector<VariableLocation> *locs = NULL);
// Copy constructor // Copy constructor
localVar(localVar &lvar); localVar(localVar &lvar);
bool addLocation(VariableLocation &location); bool addLocation(VariableLocation &location);
~localVar(); SYMTAB_EXPORT ~localVar();
SYMTAB_EXPORT void fixupUnknown(Module *); SYMTAB_EXPORT void fixupUnknown(Module *);
public: public:
// end of functions for internal use only // end of functions for internal use only
SYMTAB_EXPORT std::string &getName(); SYMTAB_EXPORT std::string &getName();
SYMTAB_EXPORT Type *getType(); SYMTAB_EXPORT Type *getType();
SYMTAB_EXPORT bool setType(Type *newType); SYMTAB_EXPORT bool setType(Type *newType);
SYMTAB_EXPORT int getLineNum(); SYMTAB_EXPORT int getLineNum();
SYMTAB_EXPORT std::string &getFileName(); SYMTAB_EXPORT std::string &getFileName();
SYMTAB_EXPORT std::vector<VariableLocation> &getLocationLists(); SYMTAB_EXPORT std::vector<VariableLocation> &getLocationLists();
 End of changes. 5 change blocks. 
2 lines changed or deleted 6 lines changed or added


 Visitor.h   Visitor.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 45 skipping to change at line 45
{ {
namespace InstructionAPI namespace InstructionAPI
{ {
class BinaryFunction; class BinaryFunction;
class Immediate; class Immediate;
class RegisterAST; class RegisterAST;
class Dereference; class Dereference;
class Visitor class Visitor
{ {
/// A %Visitor performs postfix-order traversal of the AST represen
ted by
/// an %Expression. The %Visitor class specifies the interface fro
m which
/// users may derive %Visitors that perform specific tasks.
///
/// The %visit method must be overridden for each type of %Expressi
on node
/// (%BinaryFunction, %Immediate, %RegisterAST, and %Dereference).
Any state that
/// the %Visitor needs to preserve between nodes must be kept withi
n the class.
/// %Visitors are invoked by calling %Expression::apply(%Visitor* v
); the %visit method
/// should not be invoked by user code ordinarily.
public: public:
Visitor() {} Visitor() {}
virtual ~Visitor() {} virtual ~Visitor() {}
virtual void visit(BinaryFunction* b) = 0; virtual void visit(BinaryFunction* b) = 0;
virtual void visit(Immediate* i) = 0; virtual void visit(Immediate* i) = 0;
virtual void visit(RegisterAST* r) = 0; virtual void visit(RegisterAST* r) = 0;
virtual void visit(Dereference* d) = 0; virtual void visit(Dereference* d) = 0;
}; };
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 17 lines changed or added


 dyn_regs.h   dyn_regs.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 31 skipping to change at line 31
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#if !defined(DYN_REGS_H_)
#define DYN_REGS_H_
#include "util.h"
#include <assert.h>
#include <map>
namespace Dyninst namespace Dyninst
{ {
typedef signed int MachRegister; //Values below typedef unsigned long MachRegisterVal;
const signed int MachRegInvalid = -1;
const signed int MachRegReturn = -2; //Virtual register on some syste typedef enum
ms {
const signed int MachRegFrameBase = -3; //Virtual register on some syste Arch_none = 0x00000000,
ms Arch_x86 = 0x14000000,
const signed int MachRegPC = -4; Arch_x86_64 = 0x18000000,
const signed int MachRegStackBase = -5; //Virtual register on some syste Arch_ppc32 = 0x24000000,
ms Arch_ppc64 = 0x28000000
} Architecture;
unsigned getArchAddressWidth(Dyninst::Architecture arch);
class COMMON_EXPORT MachRegister {
private:
signed int reg;
static std::map<signed int, const char *> *names;
public:
MachRegister();
explicit MachRegister(signed int r);
explicit MachRegister(signed int r, const char *n);
MachRegister getBaseRegister() const;
Architecture getArchitecture() const;
bool isValid() const;
MachRegisterVal getSubRegValue(const MachRegister subreg, MachRegiste
rVal &orig) const;
const char *name() const;
unsigned int size() const;
bool operator<(const MachRegister &a) const;
bool operator==(const MachRegister &a) const;
operator signed int() const;
signed int val() const;
unsigned int regClass() const;
static MachRegister getPC(Dyninst::Architecture arch);
static MachRegister getFramePointer(Dyninst::Architecture arch);
static MachRegister getStackPointer(Dyninst::Architecture arch);
bool isPC() const;
bool isFramePointer() const;
bool isStackPointer() const;
void getROSERegister(int &c, int &n, int &p);
static MachRegister DwarfEncToReg(int encoding, Dyninst::Architecture
arch);
int getDwarfEnc() const;
};
/**
* DEF_REGISTER will define its first parameter as the name of the objec
t
* it's declaring, and 'i<name>' as the integer value representing that
object.
* As an example, the name of a register may be
* x86::EAX
* with that register having a value of
* x86::iEAX
*
* The value is mostly useful in the 'case' part switch statements.
**/
#if defined(DYN_DEFINE_REGS)
//DYN_DEFINE_REGS Should only be defined in libcommon.
//We want one definition, which will be in libcommon, and declarations
//for everyone else.
//
//I wanted these to be const MachRegister objects, but that changes the
//linker scope. Instead they're non-const. Every accessor function is
//const anyways, so we'll just close our eyes and pretend they're declar
ed
//const.
#define DEF_REGISTER(name, value, Arch) \
const signed int i##name = (value); \
COMMON_EXPORT MachRegister name(i##name, Arch "::" #name);
#else
#define DEF_REGISTER(name, value, Arch) \
const signed int i##name = (value); \
COMMON_EXPORT extern MachRegister name;
#endif
/**
* For interpreting constants:
* Lowest 16 bits (0x000000ff) is base register ID
* Next 16 bits (0x0000ff00) is the aliasing and subrange ID-
* used on x86/x86_64 to distinguish between things like EAX and AH
* Next 16 bits (0x00ff0000) are the register category, GPR/FPR/MMX/...
* Top 16 bits (0xff000000) are the architecture.
*
* These values/layout are not guaranteed to remain the same as part of
the
* public interface, and may change.
**/
//Abstract registers used for stackwalking
DEF_REGISTER(InvalidReg, 0 | Arch_none, "abstract");
DEF_REGISTER(FrameBase, 1 | Arch_none, "abstract");
DEF_REGISTER(ReturnAddr, 2 | Arch_none, "abstract");
DEF_REGISTER(StackTop, 3 | Arch_none, "abstract");
namespace x86 namespace x86
{ {
const signed int L_REG = 0x10; //8-bit, first byte const signed int L_REG = 0x00000100; //8-bit, first byte
const signed int H_REG = 0x20; //8-bit, second byte const signed int H_REG = 0x00000200; //8-bit, second byte
const signed int W_REG = (H_REG | L_REG); //16-bit, first word const signed int W_REG = 0x00000300; //16-bit, first word
const signed int FULL = 0x00000000; //32 bits
const signed int EAX = 0x0; const signed int QUAD = 0x00004000; //64 bits
const signed int ECX = 0x1; const signed int OCT = 0x00002000; //128 bits
const signed int EDX = 0x2; const signed int FPDBL = 0x00001000; // 80 bits
const signed int EBX = 0x3; const signed int BIT = 0x00008000; // 1 bit
const signed int ESP = 0x4; const signed int GPR = 0x00010000;
const signed int EBP = 0x5; const signed int SEG = 0x00020000;
const signed int ESI = 0x6; const signed int FLAG = 0x00030000;
const signed int EDI = 0x7; const signed int MISC = 0x00040000;
const signed int AH = (H_REG | EAX); const signed int XMM = 0x00050000;
const signed int AL = (L_REG | EAX); const signed int MMX = 0x00060000;
const signed int AX = (W_REG | EAX); const signed int CTL = 0x00070000;
const signed int CH = (H_REG | ECX); const signed int DBG = 0x00080000;
const signed int CL = (L_REG | ECX); const signed int TST = 0x00090000;
const signed int CX = (W_REG | ECX); const signed int BASEA = 0x0;
const signed int DH = (H_REG | EDX); const signed int BASEC = 0x1;
const signed int DL = (L_REG | EDX); const signed int BASED = 0x2;
const signed int DX = (W_REG | EDX); const signed int BASEB = 0x3;
const signed int BH = (H_REG | EBX); const signed int BASESP = 0x4;
const signed int BL = (L_REG | EBX); const signed int BASEBP = 0x5;
const signed int BX = (W_REG | EBX); const signed int BASESI = 0x6;
const signed int BASEDI = 0x7;
const signed int FLAGS = 0x0;
const signed int CF = 0x0;
const signed int PF = 0x2;
const signed int AF = 0x4;
const signed int ZF = 0x6;
const signed int SF = 0x7;
const signed int TF = 0x8;
const signed int IF = 0x9;
const signed int DF = 0xa;
const signed int OF = 0xb;
const signed int NT = 0xe;
const signed int RF = 0x10;
DEF_REGISTER(eax, BASEA | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(ecx, BASEC | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(edx, BASED | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(ebx, BASEB | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(esp, BASESP | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(ebp, BASEBP | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(esi, BASESI | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(edi, BASEDI | FULL | GPR | Arch_x86, "x86");
DEF_REGISTER(ah, BASEA | H_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(al, BASEA | L_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(ax, BASEA | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(ch, BASEC | H_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(cl, BASEC | L_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(cx, BASEC | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(dh, BASED | H_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(dl, BASED | L_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(dx, BASED | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(bh, BASEB | H_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(bl, BASEB | L_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(bx, BASEB | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(sp, BASESP | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(bp, BASEBP | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(si, BASESI | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(di, BASEDI | W_REG | GPR | Arch_x86, "x86");
DEF_REGISTER(eip, 0x10 | FULL | Arch_x86, "x86");
DEF_REGISTER(flags, FLAGS | FULL | FLAG | Arch_x86, "x86");
DEF_REGISTER(cf, CF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(pf, PF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(af, AF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(zf, ZF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(sf, SF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(tf, TF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(if_, IF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(df, DF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(of, OF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(nt_, NT | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(rf, RF | BIT | FLAG | Arch_x86, "x86");
DEF_REGISTER(ds, 0x0 | FULL | SEG | Arch_x86, "x86");
DEF_REGISTER(es, 0x1 | FULL | SEG | Arch_x86, "x86");
DEF_REGISTER(fs, 0x2 | FULL | SEG | Arch_x86, "x86");
DEF_REGISTER(gs, 0x3 | FULL | SEG | Arch_x86, "x86");
DEF_REGISTER(cs, 0x4 | FULL | SEG | Arch_x86, "x86");
DEF_REGISTER(ss, 0x5 | FULL | SEG | Arch_x86, "x86");
DEF_REGISTER(oeax, 0x0 | FULL | MISC | Arch_x86, "x86");
DEF_REGISTER(fsbase, 0x1 | FULL | MISC | Arch_x86, "x86");
DEF_REGISTER(gsbase, 0x2 | FULL | MISC | Arch_x86, "x86");
DEF_REGISTER(xmm0, 0x0 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(xmm1, 0x1 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(xmm2, 0x2 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(xmm3, 0x3 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(xmm4, 0x4 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(xmm5, 0x5 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(xmm6, 0x6 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(xmm7, 0x7 | OCT | XMM | Arch_x86, "x86");
DEF_REGISTER(mm0, 0x0 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(mm1, 0x1 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(mm2, 0x2 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(mm3, 0x3 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(mm4, 0x4 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(mm5, 0x5 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(mm6, 0x6 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(mm7, 0x7 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(cr0, 0x0 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(cr1, 0x1 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(cr2, 0x2 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(cr3, 0x3 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(cr4, 0x4 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(cr5, 0x5 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(cr6, 0x6 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(cr7, 0x7 | FULL | CTL | Arch_x86, "x86");
DEF_REGISTER(dr0, 0x0 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(dr1, 0x1 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(dr2, 0x2 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(dr3, 0x3 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(dr4, 0x4 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(dr5, 0x5 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(dr6, 0x6 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(dr7, 0x7 | FULL | DBG | Arch_x86, "x86");
DEF_REGISTER(tr0, 0x0 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(tr1, 0x1 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(tr2, 0x2 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(tr3, 0x3 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(tr4, 0x4 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(tr5, 0x5 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(tr6, 0x6 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(tr7, 0x7 | FULL | TST | Arch_x86, "x86");
DEF_REGISTER(st0, 0x0 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(st1, 0x1 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(st2, 0x2 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(st3, 0x3 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(st4, 0x4 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(st5, 0x5 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(st6, 0x6 | FPDBL | MMX | Arch_x86, "x86");
DEF_REGISTER(st7, 0x7 | FPDBL | MMX | Arch_x86, "x86");
} }
namespace x86_64 namespace x86_64
{ {
const signed int L_REG = 0x10; //8-bit, first byte const signed int L_REG = 0x00000100; //8-bit, first byte
const signed int H_REG = 0x20; //8-bit, second byte const signed int H_REG = 0x00000200; //8-bit, second byte
const signed int W_REG = (H_REG | L_REG); //16 bit, first work const signed int W_REG = 0x00000300; //16 bit, first work
const signed int D_REG = 0x40; //32 bit, first double word const signed int D_REG = 0x00000f00; //32 bit, first double word
const signed int FULL = 0x00000000; //64 bit
const signed int RAX = 0x0; const signed int FPDBL = 0x00001000; // 80 bits
const signed int RCX = 0x1; const signed int OCT = 0x00002000; //128 bits
const signed int RDX = 0x2; const signed int BIT = 0x00008000; // 1 bit
const signed int RBX = 0x3; const signed int GPR = 0x00010000;
const signed int RSP = 0x4; const signed int SEG = 0x00020000;
const signed int RBP = 0x5; const signed int FLAG = 0x00030000;
const signed int RSI = 0x6; const signed int MISC = 0x00040000;
const signed int RDI = 0x7; const signed int XMM = 0x00050000;
const signed int R8 = 0x8; const signed int MMX = 0x00060000;
const signed int R9 = 0x9; const signed int CTL = 0x00070000;
const signed int R10 = 0xa; const signed int DBG = 0x00080000;
const signed int R11 = 0xb; const signed int TST = 0x00090000;
const signed int R12 = 0xc; const signed int FLAGS = 0x00000000;
const signed int R13 = 0xd; const signed int BASEA = 0x0;
const signed int R14 = 0xe; const signed int BASEC = 0x1;
const signed int R15 = 0xf; const signed int BASED = 0x2;
const signed int AH = (H_REG | RAX); const signed int BASEB = 0x3;
const signed int AL = (L_REG | RAX); const signed int BASESP = 0x4;
const signed int AX = (W_REG | RAX); const signed int BASEBP = 0x5;
const signed int EAX = (D_REG | RAX); const signed int BASESI = 0x6;
const signed int CH = (H_REG | RCX); const signed int BASEDI = 0x7;
const signed int CL = (L_REG | RCX); const signed int BASE8 = 0x8;
const signed int CX = (W_REG | RCX); const signed int BASE9 = 0x9;
const signed int ECX = (D_REG | RCX); const signed int BASE10 = 0xa;
const signed int DH = (H_REG | RDX); const signed int BASE11 = 0xb;
const signed int DL = (L_REG | RDX); const signed int BASE12 = 0xc;
const signed int DX = (W_REG | RDX); const signed int BASE13 = 0xd;
const signed int EDX = (D_REG | RDX); const signed int BASE14 = 0xe;
const signed int BH = (H_REG | RBX); const signed int BASE15 = 0xf;
const signed int BL = (L_REG | RBX);
const signed int BX = (W_REG | RBX);
const signed int EBX = (D_REG | RBX);
const signed int SPL = (L_REG | RSP);
const signed int SP = (W_REG | RSP);
const signed int ESP = (D_REG | RSP);
const signed int BPL = (L_REG | RBP);
const signed int BP = (W_REG | RBP);
const signed int EBP = (D_REG | RBP);
const signed int DIL = (L_REG | RDI);
const signed int DI = (W_REG | RDI);
const signed int SIL = (L_REG | RSI);
const signed int SI = (W_REG | RSI);
const signed int R8B = (L_REG | R8);
const signed int R8W = (W_REG | R8);
const signed int R8D = (D_REG | R8);
const signed int R9B = (L_REG | R9);
const signed int R9W = (W_REG | R9);
const signed int R9D = (D_REG | R9);
const signed int R10B = (L_REG | R10);
const signed int R10W = (W_REG | R10);
const signed int R10D = (D_REG | R10);
const signed int R11B = (L_REG | R11);
const signed int R11W = (W_REG | R11);
const signed int R11D = (D_REG | R11);
const signed int R12B = (L_REG | R12);
const signed int R12W = (W_REG | R12);
const signed int R12D = (D_REG | R12);
const signed int R13B = (L_REG | R13);
const signed int R13W = (W_REG | R13);
const signed int R13D = (D_REG | R13);
const signed int R14B = (L_REG | R14);
const signed int R14W = (W_REG | R14);
const signed int R14D = (D_REG | R14);
const signed int R15B = (L_REG | R15);
const signed int R15W = (W_REG | R15);
const signed int R15D = (D_REG | R15);
const signed int CF = x86::CF;
const signed int PF = x86::PF;
const signed int AF = x86::AF;
const signed int ZF = x86::ZF;
const signed int SF = x86::SF;
const signed int TF = x86::TF;
const signed int IF = x86::IF;
const signed int DF = x86::DF;
const signed int OF = x86::OF;
const signed int NT = x86::NT;
const signed int RF = x86::RF;
DEF_REGISTER(rax, BASEA | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rcx, BASEC | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rdx, BASED | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rbx, BASEB | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rsp, BASESP | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rbp, BASEBP | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rsi, BASESI | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rdi, BASEDI | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r8, BASE8 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r9, BASE9 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r10, BASE10 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r11, BASE11 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r12, BASE12 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r13, BASE13 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r14, BASE14 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r15, BASE15 | FULL | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(ah, BASEA | H_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(al, BASEA | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(ax, BASEA | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(eax, BASEA | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(ch, BASEC | H_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(cl, BASEC | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(cx, BASEC | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(ecx, BASEC | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(dh, BASED | H_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(dl, BASED | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(dx, BASED | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(edx, BASED | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(bh, BASEB | H_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(bl, BASEB | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(bx, BASEB | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(ebx, BASEB | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(spl, BASESP | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(sp, BASESP | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(esp, BASESP | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(bpl, BASEBP | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(bp, BASEBP | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(ebp, BASEBP | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(dil, BASEDI | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(di, BASEDI | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(edi, BASEDI | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(sil, BASESI | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(si, BASESI | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(esi, BASESI | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r8b, BASE8 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r8w, BASE8 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r8d, BASE8 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r9b, BASE9 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r9w, BASE9 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r9d, BASE9 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r10b, BASE10 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r10w, BASE10 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r10d, BASE10 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r11b, BASE11 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r11w, BASE11 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r11d, BASE11 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r12b, BASE12 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r12w, BASE12 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r12d, BASE12 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r13b, BASE13 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r13w, BASE13 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r13d, BASE13 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r14b, BASE14 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r14w, BASE14 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r14d, BASE14 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r15b, BASE15 | L_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r15w, BASE15 | W_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(r15d, BASE15 | D_REG | GPR | Arch_x86_64, "x86_64");
DEF_REGISTER(rip, 0x10 | FULL | Arch_x86_64, "x86_64");
DEF_REGISTER(eip, 0x10 | D_REG | Arch_x86_64, "x86_64");
DEF_REGISTER(flags, FLAGS | FULL | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(cf, CF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(pf, PF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(af, AF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(zf, ZF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(sf, SF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(tf, TF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(if_, IF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(df, DF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(of, OF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(nt_, NT | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(rf, RF | BIT | FLAG | Arch_x86_64, "x86_64");
DEF_REGISTER(ds, 0x0 | FULL | SEG | Arch_x86_64, "x86_64");
DEF_REGISTER(es, 0x1 | FULL | SEG | Arch_x86_64, "x86_64");
DEF_REGISTER(fs, 0x2 | FULL | SEG | Arch_x86_64, "x86_64");
DEF_REGISTER(gs, 0x3 | FULL | SEG | Arch_x86_64, "x86_64");
DEF_REGISTER(cs, 0x4 | FULL | SEG | Arch_x86_64, "x86_64");
DEF_REGISTER(ss, 0x5 | FULL | SEG | Arch_x86_64, "x86_64");
DEF_REGISTER(orax, 0x0 | FULL | MISC | Arch_x86_64, "x86_64");
DEF_REGISTER(fsbase, 0x1 | FULL | MISC | Arch_x86_64, "x86_64");
DEF_REGISTER(gsbase, 0x2 | FULL | MISC | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm0, 0x0 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm1, 0x1 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm2, 0x2 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm3, 0x3 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm4, 0x4 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm5, 0x5 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm6, 0x6 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm7, 0x7 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm8, 0x8 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm9, 0x9 | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm10, 0xA | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm11, 0xB | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm12, 0xC | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm13, 0xD | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm14, 0xE | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(xmm15, 0xF | OCT | XMM | Arch_x86_64, "x86_64");
DEF_REGISTER(mm0, 0x0 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(mm1, 0x1 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(mm2, 0x2 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(mm3, 0x3 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(mm4, 0x4 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(mm5, 0x5 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(mm6, 0x6 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(mm7, 0x7 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(cr0, 0x0 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(cr1, 0x1 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(cr2, 0x2 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(cr3, 0x3 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(cr4, 0x4 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(cr5, 0x5 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(cr6, 0x6 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(cr7, 0x7 | FULL | CTL | Arch_x86_64, "x86_64");
DEF_REGISTER(dr0, 0x0 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(dr1, 0x1 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(dr2, 0x2 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(dr3, 0x3 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(dr4, 0x4 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(dr5, 0x5 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(dr6, 0x6 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(dr7, 0x7 | FULL | DBG | Arch_x86_64, "x86_64");
DEF_REGISTER(tr0, 0x0 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(tr1, 0x1 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(tr2, 0x2 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(tr3, 0x3 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(tr4, 0x4 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(tr5, 0x5 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(tr6, 0x6 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(tr7, 0x7 | FULL | TST | Arch_x86_64, "x86_64");
DEF_REGISTER(st0, 0x0 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(st1, 0x1 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(st2, 0x2 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(st3, 0x3 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(st4, 0x4 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(st5, 0x5 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(st6, 0x6 | FPDBL | MMX | Arch_x86_64, "x86_64");
DEF_REGISTER(st7, 0x7 | FPDBL | MMX | Arch_x86_64, "x86_64");
} }
typedef unsigned long MachRegisterVal; namespace ppc32 {
const signed int GPR = 0x00010000;
const signed int FPR = 0x00020000;
const signed int FSR = 0x00040000;
const signed int SPR = 0x00080000;
DEF_REGISTER(r0, 0 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r1, 1 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r2, 2 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r3, 3 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r4, 4 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r5, 5 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r6, 6 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r7, 7 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r8, 8 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r9, 9 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r10, 10 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r11, 11 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r12, 12 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r13, 13 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r14, 14 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r15, 15 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r16, 16 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r17, 17 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r18, 18 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r19, 19 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r20, 20 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r21, 21 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r22, 22 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r23, 23 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r24, 24 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r25, 25 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r26, 26 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r27, 27 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r28, 28 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r29, 29 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r30, 30 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(r31, 31 | GPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr0, 0 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr1, 1 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr2, 2 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr3, 3 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr4, 4 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr5, 5 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr6, 6 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr7, 7 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr8, 8 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr9, 9 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr10, 10 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr11, 11 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr12, 12 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr13, 13 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr14, 14 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr15, 15 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr16, 16 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr17, 17 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr18, 18 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr19, 19 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr20, 20 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr21, 21 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr22, 22 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr23, 23 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr24, 24 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr25, 25 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr26, 26 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr27, 27 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr28, 28 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr29, 29 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr30, 30 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpr31, 31 | FPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr0, 0 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr1, 1 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr2, 2 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr3, 3 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr4, 4 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr5, 5 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr6, 6 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr7, 7 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr8, 8 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr9, 9 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr10, 10 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr11, 11 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr12, 12 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr13, 13 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr14, 14 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr15, 15 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr16, 16 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr17, 17 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr18, 18 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr19, 19 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr20, 20 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr21, 21 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr22, 22 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr23, 23 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr24, 24 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr25, 25 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr26, 26 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr27, 27 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr28, 28 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr29, 29 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr30, 30 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(fsr31, 31 | FSR | Arch_ppc32, "ppc32");
DEF_REGISTER(mq, 0 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(xer, 1 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(lr, 8 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ctr, 9 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dsisr, 18 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dar, 19 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dec, 22 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(sdr1, 25 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(srr0, 26 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(srr1, 27 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(sprg0, 272 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(sprg1, 273 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(sprg2, 274 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(sprg3, 275 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ear, 282 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(tbl, 284 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(tbu, 285 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(pvr, 287 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat0u, 528 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat0l, 529 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat1u, 530 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat1l, 531 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat2u, 532 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat2l, 533 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat3u, 534 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ibat3l, 535 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat0u, 536 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat0l, 537 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat1u, 538 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat1l, 539 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat2u, 540 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat2l, 541 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat3u, 542 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(dbat3l, 543 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(pc, 600 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw, 601 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw0, 602 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw1, 603 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw2, 604 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw3, 605 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw4, 606 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw5, 607 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw6, 608 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(fpscw7, 609 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(msr, 610 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ivpr, 611 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(ivor8, 612 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg0, 613 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg1, 614 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg2, 615 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg3, 616 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg4, 617 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg5, 618 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg6, 619 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(seg7, 620 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr0, 621 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr1, 622 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr2, 623 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr3, 624 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr4, 625 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr5, 626 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr6, 627 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr7, 628 | SPR | Arch_ppc32, "ppc32");
DEF_REGISTER(cr, 629 | SPR | Arch_ppc32, "ppc32");
}
namespace ppc64 {
const signed int GPR = 0x00010000;
const signed int FPR = 0x00020000;
const signed int FSR = 0x00040000;
const signed int SPR = 0x00080000;
DEF_REGISTER(r0, 0 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r1, 1 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r2, 2 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r3, 3 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r4, 4 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r5, 5 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r6, 6 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r7, 7 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r8, 8 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r9, 9 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r10, 10 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r11, 11 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r12, 12 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r13, 13 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r14, 14 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r15, 15 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r16, 16 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r17, 17 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r18, 18 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r19, 19 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r20, 20 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r21, 21 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r22, 22 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r23, 23 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r24, 24 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r25, 25 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r26, 26 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r27, 27 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r28, 28 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r29, 29 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r30, 30 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(r31, 31 | GPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr0, 0 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr1, 1 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr2, 2 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr3, 3 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr4, 4 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr5, 5 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr6, 6 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr7, 7 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr8, 8 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr9, 9 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr10, 10 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr11, 11 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr12, 12 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr13, 13 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr14, 14 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr15, 15 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr16, 16 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr17, 17 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr18, 18 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr19, 19 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr20, 20 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr21, 21 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr22, 22 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr23, 23 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr24, 24 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr25, 25 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr26, 26 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr27, 27 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr28, 28 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr29, 29 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr30, 30 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpr31, 31 | FPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr0, 0 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr1, 1 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr2, 2 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr3, 3 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr4, 4 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr5, 5 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr6, 6 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr7, 7 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr8, 8 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr9, 9 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr10, 10 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr11, 11 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr12, 12 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr13, 13 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr14, 14 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr15, 15 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr16, 16 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr17, 17 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr18, 18 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr19, 19 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr20, 20 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr21, 21 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr22, 22 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr23, 23 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr24, 24 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr25, 25 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr26, 26 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr27, 27 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr28, 28 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr29, 29 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr30, 30 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(fsr31, 31 | FSR | Arch_ppc64, "ppc64");
DEF_REGISTER(mq, 0 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(xer, 1 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(lr, 8 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ctr, 9 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dsisr, 18 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dar, 19 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dec, 22 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(sdr1, 25 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(srr0, 26 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(srr1, 27 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(sprg0, 272 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(sprg1, 273 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(sprg2, 274 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(sprg3, 275 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ear, 282 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(tbl, 284 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(tbu, 285 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(pvr, 287 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat0u, 528 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat0l, 529 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat1u, 530 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat1l, 531 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat2u, 532 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat2l, 533 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat3u, 534 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ibat3l, 535 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat0u, 536 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat0l, 537 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat1u, 538 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat1l, 539 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat2u, 540 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat2l, 541 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat3u, 542 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(dbat3l, 543 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(pc, 600 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw, 601 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw0, 602 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw1, 603 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw2, 604 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw3, 605 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw4, 606 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw5, 607 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw6, 608 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(fpscw7, 609 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(msr, 610 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ivpr, 611 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(ivor8, 612 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg0, 613 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg1, 614 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg2, 615 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg3, 616 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg4, 617 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg5, 618 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg6, 619 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(seg7, 620 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr0, 621 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr1, 622 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr2, 623 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr3, 624 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr4, 625 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr5, 626 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr6, 627 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr7, 628 | SPR | Arch_ppc64, "ppc64");
DEF_REGISTER(cr, 629 | SPR | Arch_ppc64, "ppc64");
}
} }
#endif
 End of changes. 9 change blocks. 
106 lines changed or deleted 769 lines changed or added


 dyntypes.h   dyntypes.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 44 skipping to change at line 44
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#endif #endif
#ifndef FILE__ #ifndef FILE__
#define FILE__ strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE __ #define FILE__ strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE __
#endif #endif
#if defined(_POWER) && !defined(__GNUC__)
#define XLC
#endif
#if defined (_MSC_VER) #if defined (_MSC_VER)
//**************** Windows ******************** //**************** Windows ********************
#include <hash_map> #include <hash_map>
#if 1
#define dyn_hash_map stdext::hash_map #define dyn_hash_map stdext::hash_map
#else
#define dyn_hash_map std::hash_map
#endif
#define DECLTHROW(x) #define DECLTHROW(x)
#elif defined(__GNUC__) #elif defined(__GNUC__)
#include <functional> #include <functional>
#define DECLTHROW(x) throw(x) #define DECLTHROW(x) throw(x)
//***************** GCC *********************** //***************** GCC ***********************
#if (__GNUC__ > 4) || \ #if (__GNUC__ > 4) || \
(__GNUC__ == 4 && __GNUC_MINOR__ >= 3) (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
//**************** GCC >= 4.3.0 *********** //**************** GCC >= 4.3.0 ***********
#include <tr1/unordered_set> #include <tr1/unordered_set>
#include <tr1/unordered_map> #include <tr1/unordered_map>
skipping to change at line 95 skipping to change at line 95
}; };
template<> struct hash<void *> { template<> struct hash<void *> {
unsigned operator()(void *v) const unsigned operator()(void *v) const
{ {
return Dyninst::ptrHash(v); return Dyninst::ptrHash(v);
}; };
}; };
} }
#endif
#elif defined(XLC)
#define __IBMCPP_TR1__ 1
#endif #include <functional>
#include <unordered_set>
#include <unordered_map>
#define dyn_hash_set std::tr1::unordered_set
#define dyn_hash_map std::tr1::unordered_map
#define DECLTHROW(x)
#else #else
#error Unknown compiler #error Unknown compiler
#endif #endif
namespace Dyninst namespace Dyninst
{ {
typedef unsigned long Address; typedef unsigned long Address;
typedef unsigned long Offset; typedef unsigned long Offset;
#if defined(_MSC_VER) #if defined(_MSC_VER)
 End of changes. 6 change blocks. 
6 lines changed or deleted 14 lines changed or added


 fold_left.hpp   fold_left.hpp 
skipping to change at line 37 skipping to change at line 37
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT DYN_DETAIL_BOOST_PP_CAT(DYN_DET AIL_BOOST_PP_LIST_FOLD_LEFT_, DYN_DETAIL_BOOST_PP_AUTO_REC(DYN_DETAIL_BOOST _PP_WHILE_P, 256)) # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT DYN_DETAIL_BOOST_PP_CAT(DYN_DET AIL_BOOST_PP_LIST_FOLD_LEFT_, DYN_DETAIL_BOOST_PP_AUTO_REC(DYN_DETAIL_BOOST _PP_WHILE_P, 256))
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_257(o, s, l) DYN_DETAIL_BOOST_P P_ERROR(0x0004) # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_257(o, s, l) DYN_DETAIL_BOOST_P P_ERROR(0x0004)
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_D(d, o, s, l) DYN_DETAIL_BOOST_ PP_LIST_FOLD_LEFT_ ## d(o, s, l) # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_D(d, o, s, l) DYN_DETAIL_BOOST_ PP_LIST_FOLD_LEFT_ ## d(o, s, l)
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_2ND DYN_DETAIL_BOOST_PP_LIST_FO LD_LEFT # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_2ND DYN_DETAIL_BOOST_PP_LIST_FO LD_LEFT
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_2ND_D DYN_DETAIL_BOOST_PP_LIST_ FOLD_LEFT_D # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_2ND_D DYN_DETAIL_BOOST_PP_LIST_ FOLD_LEFT_D
# #
# if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG() # if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG()
# include <dyn_detail/boost/preprocessor/list/detail/edg/fold_left.hpp> # include <dyn_detail/boost/preprocessor/list/detail/fold_left.hpp>
# elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_DMC( ) # elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_DMC( )
# include <dyn_detail/boost/preprocessor/list/detail/dmc/fold_left.hpp> # include <dyn_detail/boost/preprocessor/list/detail/dmc/fold_left.hpp>
# else # else
# include <dyn_detail/boost/preprocessor/list/detail/fold_left.hpp> # include <dyn_detail/boost/preprocessor/list/detail/fold_left.hpp>
# endif # endif
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_CHECK_DYN_DETAIL_BOOST_PP_NIL 1 # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_CHECK_DYN_DETAIL_BOOST_PP_NIL 1
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_CHECK_DYN_DETAIL_BOOST_PP_LIST_ FOLD_LEFT_1(o, s, l) 0 # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_CHECK_DYN_DETAIL_BOOST_PP_LIST_ FOLD_LEFT_1(o, s, l) 0
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_CHECK_DYN_DETAIL_BOOST_PP_LIST_ FOLD_LEFT_2(o, s, l) 0 # define DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_CHECK_DYN_DETAIL_BOOST_PP_LIST_ FOLD_LEFT_2(o, s, l) 0
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 fold_right.hpp   fold_right.hpp 
skipping to change at line 35 skipping to change at line 35
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT DYN_DETAIL_BOOST_PP_CAT(DYN_DE TAIL_BOOST_PP_LIST_FOLD_RIGHT_, DYN_DETAIL_BOOST_PP_AUTO_REC(DYN_DETAIL_BOO ST_PP_WHILE_P, 256)) # define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT DYN_DETAIL_BOOST_PP_CAT(DYN_DE TAIL_BOOST_PP_LIST_FOLD_RIGHT_, DYN_DETAIL_BOOST_PP_AUTO_REC(DYN_DETAIL_BOO ST_PP_WHILE_P, 256))
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) DYN_DETAIL_BOOST_ PP_ERROR(0x0004) # define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) DYN_DETAIL_BOOST_ PP_ERROR(0x0004)
# #
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) DYN_DETAIL_BOOST _PP_LIST_FOLD_RIGHT_ ## d(o, s, l) # define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) DYN_DETAIL_BOOST _PP_LIST_FOLD_RIGHT_ ## d(o, s, l)
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_2ND DYN_DETAIL_BOOST_PP_LIST_F OLD_RIGHT # define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_2ND DYN_DETAIL_BOOST_PP_LIST_F OLD_RIGHT
# define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_2ND_D DYN_DETAIL_BOOST_PP_LIST _FOLD_RIGHT_D # define DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_2ND_D DYN_DETAIL_BOOST_PP_LIST _FOLD_RIGHT_D
# #
# if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG() # if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG()
# include <dyn_detail/boost/preprocessor/list/detail/edg/fold_right.hpp> # include <dyn_detail/boost/preprocessor/list/detail/fold_right.hpp>
# else # else
# include <dyn_detail/boost/preprocessor/list/detail/fold_right.hpp> # include <dyn_detail/boost/preprocessor/list/detail/fold_right.hpp>
# endif # endif
# #
# endif # endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 for.hpp   for.hpp 
skipping to change at line 36 skipping to change at line 36
# #
# define DYN_DETAIL_BOOST_PP_FOR DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_P P_FOR_, DYN_DETAIL_BOOST_PP_AUTO_REC(DYN_DETAIL_BOOST_PP_FOR_P, 256)) # define DYN_DETAIL_BOOST_PP_FOR DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_P P_FOR_, DYN_DETAIL_BOOST_PP_AUTO_REC(DYN_DETAIL_BOOST_PP_FOR_P, 256))
# #
# define DYN_DETAIL_BOOST_PP_FOR_P(n) DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BO OST_PP_FOR_CHECK_, DYN_DETAIL_BOOST_PP_FOR_ ## n(1, DYN_DETAIL_BOOST_PP_FOR _SR_P, DYN_DETAIL_BOOST_PP_FOR_SR_O, DYN_DETAIL_BOOST_PP_FOR_SR_M)) # define DYN_DETAIL_BOOST_PP_FOR_P(n) DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BO OST_PP_FOR_CHECK_, DYN_DETAIL_BOOST_PP_FOR_ ## n(1, DYN_DETAIL_BOOST_PP_FOR _SR_P, DYN_DETAIL_BOOST_PP_FOR_SR_O, DYN_DETAIL_BOOST_PP_FOR_SR_M))
# #
# define DYN_DETAIL_BOOST_PP_FOR_SR_P(r, s) s # define DYN_DETAIL_BOOST_PP_FOR_SR_P(r, s) s
# define DYN_DETAIL_BOOST_PP_FOR_SR_O(r, s) 0 # define DYN_DETAIL_BOOST_PP_FOR_SR_O(r, s) 0
# define DYN_DETAIL_BOOST_PP_FOR_SR_M(r, s) DYN_DETAIL_BOOST_PP_NIL # define DYN_DETAIL_BOOST_PP_FOR_SR_M(r, s) DYN_DETAIL_BOOST_PP_NIL
# #
# if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG() # if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG()
# include <dyn_detail/boost/preprocessor/repetition/detail/edg/for.hpp> # include <dyn_detail/boost/preprocessor/repetition/detail/for.hpp>
# elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_MSVC () # elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_MSVC ()
# include <dyn_detail/boost/preprocessor/repetition/detail/msvc/for.hpp> # include <dyn_detail/boost/preprocessor/repetition/detail/msvc/for.hpp>
# elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_DMC( ) # elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_DMC( )
# include <dyn_detail/boost/preprocessor/repetition/detail/dmc/for.hpp> # include <dyn_detail/boost/preprocessor/repetition/detail/dmc/for.hpp>
# else # else
# include <dyn_detail/boost/preprocessor/repetition/detail/for.hpp> # include <dyn_detail/boost/preprocessor/repetition/detail/for.hpp>
# endif # endif
# #
# define DYN_DETAIL_BOOST_PP_FOR_257(s, p, o, m) DYN_DETAIL_BOOST_PP_ERROR( 0x0002) # define DYN_DETAIL_BOOST_PP_FOR_257(s, p, o, m) DYN_DETAIL_BOOST_PP_ERROR( 0x0002)
# #
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 is_class.hpp   is_class.hpp 
skipping to change at line 130 skipping to change at line 130
struct is_class_impl struct is_class_impl
{ {
DYN_DETAIL_BOOST_STATIC_CONSTANT(bool, value = DYN_DETAIL_BOOST_IS_CLAS S(T)); DYN_DETAIL_BOOST_STATIC_CONSTANT(bool, value = DYN_DETAIL_BOOST_IS_CLAS S(T));
}; };
# endif // DYN_DETAIL_BOOST_IS_CLASS # endif // DYN_DETAIL_BOOST_IS_CLASS
} // namespace detail } // namespace detail
# ifdef __EDG_VERSION__ # ifdef __EDG_VERSION__
DYN_DETAIL_BOOST_TT_AUX_BOOL_TRAIT_DEF1( DYN_DETAIL_BOOST_TT_AUX_BOOL_TRAIT_DEF1(
is_class,T, dyn_detail::boost::detail::is_class_impl<typename dyn_detail ::boost::remove_cv<T>::type>::value) is_class,T, ::dyn_detail::boost::detail::is_class_impl<typename ::dyn_de tail::boost::remove_cv<T>::type>::value)
# else # else
DYN_DETAIL_BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::dyn_detail::boost::det ail::is_class_impl<T>::value) DYN_DETAIL_BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::dyn_detail::boost::det ail::is_class_impl<T>::value)
# endif # endif
} // namespace boost } // namespace boost
} // namespace dyn_detail } // namespace dyn_detail
#include <dyn_detail/boost/type_traits/detail/bool_trait_undef.hpp> #include <dyn_detail/boost/type_traits/detail/bool_trait_undef.hpp>
#endif // DYN_DETAIL_BOOST_TT_IS_CLASS_HPP_INCLUDED #endif // DYN_DETAIL_BOOST_TT_IS_CLASS_HPP_INCLUDED
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 stl_utils.h   stl_utils.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 symutil.h   symutil.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 72 skipping to change at line 72
lang_Fortran, lang_Fortran,
lang_Fortran_with_pretty_debug, lang_Fortran_with_pretty_debug,
lang_CMFortran lang_CMFortran
} supportedLanguages; } supportedLanguages;
const char *supportedLanguages2Str(supportedLanguages s); const char *supportedLanguages2Str(supportedLanguages s);
typedef enum { typedef enum {
obj_Unknown, obj_Unknown,
obj_SharedLib, obj_SharedLib,
obj_Executable obj_Executable,
obj_RelocatableFile
} ObjectType; } ObjectType;
typedef enum { typedef enum {
Obj_Parsing, Obj_Parsing,
Syms_To_Functions, Syms_To_Functions,
Build_Function_Lists, Build_Function_Lists,
No_Such_Function, No_Such_Function,
No_Such_Variable, No_Such_Variable,
No_Such_Module, No_Such_Module,
No_Such_Region, No_Such_Region,
No_Such_Symbol, No_Such_Symbol,
No_Such_Member, No_Such_Member,
Not_A_File, Not_A_File,
Not_An_Archive, Not_An_Archive,
Duplicate_Symbol,
Export_Error, Export_Error,
Emit_Error,
Invalid_Flags, Invalid_Flags,
Bad_Frame_Data, Bad_Frame_Data,
No_Frame_Entry, No_Frame_Entry,
Frame_Read_Error, Frame_Read_Error,
No_Error No_Error
} SymtabError; } SymtabError;
typedef struct{ typedef struct{
void *data; void *data;
Offset loadaddr; Offset loadaddr;
 End of changes. 4 change blocks. 
2 lines changed or deleted 5 lines changed or added


 util.h   util.h 
/* /*
* Copyright (c) 1996-2009 Barton P. Miller * Copyright (c) 1996-2011 Barton P. Miller
* *
* We provide the Paradyn Parallel Performance Tools (below * We provide the Paradyn Parallel Performance Tools (below
* described as "Paradyn") on an AS IS basis, and do not warrant its * described as "Paradyn") on an AS IS basis, and do not warrant its
* validity or performance. We reserve the right to update, modify, * validity or performance. We reserve the right to update, modify,
* or discontinue this software at any time. We shall have no * or discontinue this software at any time. We shall have no
* obligation to supply such updates or modifications or any other * obligation to supply such updates or modifications or any other
* form of support to you. * form of support to you.
* *
* By your use of Paradyn, you understand and agree that we (or any * By your use of Paradyn, you understand and agree that we (or any
* other person or entity with proprietary rights in Paradyn) are * other person or entity with proprietary rights in Paradyn) are
skipping to change at line 32 skipping to change at line 32
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef __UTIL_H__
#define __UTIL_H__
#include "dyntypes.h"
namespace Dyninst {
#if !defined(SYMTAB_EXPORT) #if !defined(SYMTAB_EXPORT)
#if defined(_MSC_VER) #if defined(_MSC_VER)
#if defined SYMTAB_LIB #if defined SYMTAB_LIB
#define SYMTAB_EXPORT __declspec(dllexport) #define SYMTAB_EXPORT __declspec(dllexport)
#else #else
#define SYMTAB_EXPORT __declspec(dllimport) #define SYMTAB_EXPORT __declspec(dllimport)
#endif #endif
#else #else
#define SYMTAB_EXPORT #define SYMTAB_EXPORT
#endif #endif
skipping to change at line 87 skipping to change at line 81
#if defined(INSTRUCTION_LIB) #if defined(INSTRUCTION_LIB)
#define INSTRUCTION_EXPORT __declspec(dllexport) #define INSTRUCTION_EXPORT __declspec(dllexport)
#else #else
#define INSTRUCTION_EXPORT __declspec(dllimport) #define INSTRUCTION_EXPORT __declspec(dllimport)
#endif #endif
#else #else
#define INSTRUCTION_EXPORT #define INSTRUCTION_EXPORT
#endif #endif
#endif #endif
#if !defined(PARSER_EXPORT)
#if defined(_MSC_VER)
#if defined(PARSER_LIB)
#define PARSER_EXPORT __declspec(dllexport)
#else
#define PARSER_EXPORT __declspec(dllimport)
#endif
#else
#define PARSER_EXPORT
#endif
#endif
#if !defined(DATAFLOW_EXPORT)
#if defined(_MSC_VER)
#if defined(DATAFLOW_LIB)
#define DATAFLOW_EXPORT __declspec(dllexport)
#else
#define DATAFLOW_EXPORT __declspec(dllimport)
#endif
#else
#define DATAFLOW_EXPORT
#endif
#endif
#if !defined(THROW) && !defined(THROW_SPEC)
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define THROW_SPEC(x) #define THROW_SPEC(x)
#define THROW #define THROW
#else #else
#define THROW_SPEC(x) throw (x) #define THROW_SPEC(x) throw (x)
#define THROW throw () #define THROW throw ()
#endif #endif
#endif
#ifndef __UTIL_H__
#define __UTIL_H__
#include "dyntypes.h"
namespace Dyninst {
COMMON_EXPORT unsigned addrHashCommon(const Address &addr); COMMON_EXPORT unsigned addrHashCommon(const Address &addr);
COMMON_EXPORT unsigned ptrHash(const void * addr); COMMON_EXPORT unsigned ptrHash(const void * addr);
COMMON_EXPORT unsigned ptrHash(void * addr); COMMON_EXPORT unsigned ptrHash(void * addr);
COMMON_EXPORT unsigned addrHash(const Address &addr); COMMON_EXPORT unsigned addrHash(const Address &addr);
COMMON_EXPORT unsigned addrHash4(const Address &addr); COMMON_EXPORT unsigned addrHash4(const Address &addr);
COMMON_EXPORT unsigned addrHash16(const Address &addr); COMMON_EXPORT unsigned addrHash16(const Address &addr);
COMMON_EXPORT unsigned stringhash(const std::string &s); COMMON_EXPORT unsigned stringhash(const std::string &s);
 End of changes. 4 change blocks. 
7 lines changed or deleted 33 lines changed or added


 while.hpp   while.hpp 
skipping to change at line 42 skipping to change at line 42
# #
# if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG() # if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG()
# define DYN_DETAIL_BOOST_PP_WHILE_P(n) DYN_DETAIL_BOOST_PP_BITAND(DYN_D ETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_WHILE_CHECK_, DYN_DETAIL_BOOST_PP_WH ILE_ ## n(DYN_DETAIL_BOOST_PP_WHILE_F, DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_ BOOST_PP_NIL)), DYN_DETAIL_BOOST_PP_BITAND(DYN_DETAIL_BOOST_PP_CAT(DYN_DETA IL_BOOST_PP_LIST_FOLD_LEFT_CHECK_, DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_ ## n (DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL) ), DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_CHECK_, DYN_ DETAIL_BOOST_PP_LIST_FOLD_RIGHT_ ## n(DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_B OOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL)))) # define DYN_DETAIL_BOOST_PP_WHILE_P(n) DYN_DETAIL_BOOST_PP_BITAND(DYN_D ETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_WHILE_CHECK_, DYN_DETAIL_BOOST_PP_WH ILE_ ## n(DYN_DETAIL_BOOST_PP_WHILE_F, DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_ BOOST_PP_NIL)), DYN_DETAIL_BOOST_PP_BITAND(DYN_DETAIL_BOOST_PP_CAT(DYN_DETA IL_BOOST_PP_LIST_FOLD_LEFT_CHECK_, DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_ ## n (DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL) ), DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_LIST_FOLD_RIGHT_CHECK_, DYN_ DETAIL_BOOST_PP_LIST_FOLD_RIGHT_ ## n(DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_B OOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL))))
# else # else
# define DYN_DETAIL_BOOST_PP_WHILE_P(n) DYN_DETAIL_BOOST_PP_BITAND(DYN_D ETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_WHILE_CHECK_, DYN_DETAIL_BOOST_PP_WH ILE_ ## n(DYN_DETAIL_BOOST_PP_WHILE_F, DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_ BOOST_PP_NIL)), DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_ CHECK_, DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_ ## n(DYN_DETAIL_BOOST_PP_NIL, D YN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL))) # define DYN_DETAIL_BOOST_PP_WHILE_P(n) DYN_DETAIL_BOOST_PP_BITAND(DYN_D ETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_WHILE_CHECK_, DYN_DETAIL_BOOST_PP_WH ILE_ ## n(DYN_DETAIL_BOOST_PP_WHILE_F, DYN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_ BOOST_PP_NIL)), DYN_DETAIL_BOOST_PP_CAT(DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_ CHECK_, DYN_DETAIL_BOOST_PP_LIST_FOLD_LEFT_ ## n(DYN_DETAIL_BOOST_PP_NIL, D YN_DETAIL_BOOST_PP_NIL, DYN_DETAIL_BOOST_PP_NIL)))
# endif # endif
# #
# define DYN_DETAIL_BOOST_PP_WHILE_F(d, _) 0 # define DYN_DETAIL_BOOST_PP_WHILE_F(d, _) 0
# #
# if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG() # if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG()
# include <dyn_detail/boost/preprocessor/control/detail/edg/while.hpp> # include <dyn_detail/boost/preprocessor/control/detail/while.hpp>
# elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_MSVC () # elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_MSVC ()
# include <dyn_detail/boost/preprocessor/control/detail/msvc/while.hpp> # include <dyn_detail/boost/preprocessor/control/detail/msvc/while.hpp>
# elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_DMC( ) # elif DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_DMC( )
# include <dyn_detail/boost/preprocessor/control/detail/dmc/while.hpp> # include <dyn_detail/boost/preprocessor/control/detail/dmc/while.hpp>
# else # else
# include <dyn_detail/boost/preprocessor/control/detail/while.hpp> # include <dyn_detail/boost/preprocessor/control/detail/while.hpp>
# endif # endif
# #
# define DYN_DETAIL_BOOST_PP_WHILE_257(p, o, s) DYN_DETAIL_BOOST_PP_ERROR(0 x0001) # define DYN_DETAIL_BOOST_PP_WHILE_257(p, o, s) DYN_DETAIL_BOOST_PP_ERROR(0 x0001)
# #
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/