Aggregate.h   Aggregate.h 
skipping to change at line 55 skipping to change at line 55
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;
class DwarfWalker;
struct SymbolCompareByAddr; struct SymbolCompareByAddr;
class Aggregate /*: public AnnotatableSparse */ class Aggregate
{ {
friend class Symtab; friend class Symtab;
friend struct SymbolCompareByAddr; 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 &);
friend class DwarfWalker;
protected: protected:
SYMTAB_EXPORT Aggregate(); SYMTAB_EXPORT Aggregate();
SYMTAB_EXPORT Aggregate(Symbol *sym); SYMTAB_EXPORT Aggregate(Symbol *sym);
SYMTAB_EXPORT Aggregate(Module *m);
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 *****/
SYMTAB_EXPORT bool addSymbol(Symbol *sym); SYMTAB_EXPORT bool addSymbol(Symbol *sym);
SYMTAB_EXPORT virtual bool removeSymbol(Symbol *sym) = 0; SYMTAB_EXPORT virtual bool removeSymbol(Symbol *sym) = 0;
SYMTAB_EXPORT bool getSymbols(std::vector<Symbol *>&syms) const; SYMTAB_EXPORT bool getSymbols(std::vector<Symbol *> &syms) const;
SYMTAB_EXPORT Symbol * getFirstSymbol() const; SYMTAB_EXPORT Symbol *getFirstSymbol() const;
/***** Symbol naming *****/ /***** Symbol naming *****/
SYMTAB_EXPORT const std::vector<std::string> &getAllMangledNames(); SYMTAB_EXPORT const std::vector<std::string> &getAllMangledNames();
SYMTAB_EXPORT const std::vector<std::string> &getAllPrettyNames(); SYMTAB_EXPORT const std::vector<std::string> &getAllPrettyNames();
SYMTAB_EXPORT const std::vector<std::string> &getAllTypedNames(); SYMTAB_EXPORT const std::vector<std::string> &getAllTypedNames();
/***** Aggregate updating *****/ /***** Aggregate updating *****/
SYMTAB_EXPORT virtual bool addMangledName(std::string name, bool isPr imary); SYMTAB_EXPORT virtual bool addMangledName(std::string name, bool isPr imary);
SYMTAB_EXPORT virtual bool addPrettyName(std::string name, bool isPri mary); SYMTAB_EXPORT virtual bool addPrettyName(std::string name, bool isPri mary);
SYMTAB_EXPORT virtual bool addTypedName(std::string name, bool isPrim ary); SYMTAB_EXPORT virtual bool addTypedName(std::string name, bool isPrim ary);
SYMTAB_EXPORT bool setModule(Module *mod); SYMTAB_EXPORT bool setModule(Module *mod);
SYMTAB_EXPORT bool setSize(unsigned size); SYMTAB_EXPORT bool setSize(unsigned size);
SYMTAB_EXPORT bool setOffset(unsigned offset); SYMTAB_EXPORT bool setOffset(unsigned offset);
bool operator==(const Aggregate &a); bool operator==(const Aggregate &a);
protected: protected:
bool addMangledNameInt(std::string name, bool isPrimary);
bool addPrettyNameInt(std::string name, bool isPrimary);
bool addTypedNameInt(std::string name, bool isPrimary);
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 Symbol *firstSymbol; // cached for speed
skipping to change at line 125 skipping to change at line 122
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);
bool addMangledNameInternal(std::string name, bool isPrimary, bool dem angle);
}; };
} }
} }
#endif #endif
 End of changes. 8 change blocks. 
14 lines changed or deleted 12 lines changed or added


 BPatch.h   BPatch.h 
skipping to change at line 65 skipping to change at line 65
//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_7_0
#define DYNINST_8_0 #define DYNINST_8_0
#define DYNINST_8_1 #define DYNINST_8_1
#define DYNINST_8_1_1 #define DYNINST_8_1_1
#define DYNINST_8_1_2
#define DYNINST_MAJOR 8 #define DYNINST_MAJOR 8
#define DYNINST_MINOR 1 #define DYNINST_MINOR 1
#define DYNINST_SUBMINOR 2 #define DYNINST_SUBMINOR 1
#ifdef IBM_BPATCH_COMPAT #ifdef IBM_BPATCH_COMPAT
typedef void *BPatch_Address; typedef void *BPatch_Address;
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4251) #pragma warning(disable:4251)
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 Event.h   Event.h 
skipping to change at line 93 skipping to change at line 93
class EventIntBootstrap; class EventIntBootstrap;
class EventNop; class EventNop;
class EventThreadDB; class EventThreadDB;
class EventWinStopThreadDestroy; class EventWinStopThreadDestroy;
class EventControlAuthority; class EventControlAuthority;
class EventAsyncIO; class EventAsyncIO;
class EventAsyncRead; class EventAsyncRead;
class EventAsyncWrite; class EventAsyncWrite;
class EventAsyncReadAllRegs; class EventAsyncReadAllRegs;
class EventAsyncSetAllRegs; class EventAsyncSetAllRegs;
class EventAsyncFileRead;
class PC_EXPORT Event : public boost::enable_shared_from_this<Event> class PC_EXPORT Event : public boost::enable_shared_from_this<Event>
{ {
friend void boost::checked_delete<Event>(Event *); friend void boost::checked_delete<Event>(Event *);
friend void boost::checked_delete<const Event>(const Event *); friend void boost::checked_delete<const Event>(const Event *);
friend class ::HandlerPool; friend class ::HandlerPool;
friend class ::int_process; friend class ::int_process;
friend class ::HandleCallbacks; friend class ::HandleCallbacks;
public: public:
typedef boost::shared_ptr<Event> ptr; typedef boost::shared_ptr<Event> ptr;
skipping to change at line 245 skipping to change at line 246
boost::shared_ptr<EventAsyncWrite> getEventAsyncWrite(); boost::shared_ptr<EventAsyncWrite> getEventAsyncWrite();
boost::shared_ptr<const EventAsyncWrite> getEventAsyncWrite() const; boost::shared_ptr<const EventAsyncWrite> getEventAsyncWrite() const;
boost::shared_ptr<EventAsyncReadAllRegs> getEventAsyncReadAllRegs(); boost::shared_ptr<EventAsyncReadAllRegs> getEventAsyncReadAllRegs();
boost::shared_ptr<const EventAsyncReadAllRegs> getEventAsyncReadAllRegs( ) const; boost::shared_ptr<const EventAsyncReadAllRegs> getEventAsyncReadAllRegs( ) const;
boost::shared_ptr<EventAsyncSetAllRegs> getEventAsyncSetAllRegs(); boost::shared_ptr<EventAsyncSetAllRegs> getEventAsyncSetAllRegs();
boost::shared_ptr<const EventAsyncSetAllRegs> getEventAsyncSetAllRegs() const; boost::shared_ptr<const EventAsyncSetAllRegs> getEventAsyncSetAllRegs() const;
boost::shared_ptr<EventAsyncFileRead> getEventAsyncFileRead();
boost::shared_ptr<const EventAsyncFileRead> getEventAsyncFileRead() cons
t;
//Not meant for public consumption //Not meant for public consumption
void setLastError(err_t ec, const char *es); void setLastError(err_t ec, const char *es);
protected: protected:
EventType etype; EventType etype;
Thread::const_ptr thread; Thread::const_ptr thread;
Process::const_ptr proc; Process::const_ptr proc;
SyncType stype; SyncType stype;
std::vector<Event::ptr> subservient_events; std::vector<Event::ptr> subservient_events;
Event::weak_ptr master_event; Event::weak_ptr master_event;
std::set<Handler *> handled_by; std::set<Handler *> handled_by;
skipping to change at line 823 skipping to change at line 827
friend void boost::checked_delete<EventAsyncSetAllRegs>(EventAsyncSetAll Regs *); friend void boost::checked_delete<EventAsyncSetAllRegs>(EventAsyncSetAll Regs *);
friend void boost::checked_delete<const EventAsyncSetAllRegs>(const Even tAsyncSetAllRegs *); friend void boost::checked_delete<const EventAsyncSetAllRegs>(const Even tAsyncSetAllRegs *);
public: public:
typedef boost::shared_ptr<EventAsyncSetAllRegs> ptr; typedef boost::shared_ptr<EventAsyncSetAllRegs> ptr;
typedef boost::shared_ptr<const EventAsyncSetAllRegs> const_ptr; typedef boost::shared_ptr<const EventAsyncSetAllRegs> const_ptr;
EventAsyncSetAllRegs(int_eventAsyncIO *iev_); EventAsyncSetAllRegs(int_eventAsyncIO *iev_);
~EventAsyncSetAllRegs(); ~EventAsyncSetAllRegs();
}; };
class int_eventAsyncFileRead;
class PC_EXPORT EventAsyncFileRead : public Event {
friend void boost::checked_delete<EventAsyncFileRead>(EventAsyncFileRead
*);
friend void boost::checked_delete<const EventAsyncFileRead>(const EventA
syncFileRead *);
int_eventAsyncFileRead *iev;
public:
typedef boost::shared_ptr<EventAsyncFileRead> ptr;
typedef boost::shared_ptr<const EventAsyncFileRead> const_ptr;
int_eventAsyncFileRead *getInternal();
EventAsyncFileRead(int_eventAsyncFileRead *iev_);
~EventAsyncFileRead();
std::string getFilename() const;
size_t getReadSize() const;
Dyninst::Offset getReadOffset() const;
void *getBuffer() const;
size_t getBufferSize() const;
bool isEOF() const;
int errorCode() const;
};
} }
} }
#endif #endif
 End of changes. 3 change blocks. 
0 lines changed or deleted 31 lines changed or added


 EventType.h   EventType.h 
skipping to change at line 66 skipping to change at line 66
static const int Breakpoint = 14; static const int Breakpoint = 14;
static const int RPC = 15; static const int RPC = 15;
static const int SingleStep = 16; static const int SingleStep = 16;
static const int Library = 17; static const int Library = 17;
static const int ForceTerminate = 18; static const int ForceTerminate = 18;
static const int ControlAuthority = 20; static const int ControlAuthority = 20;
static const int AsyncRead = 21; static const int AsyncRead = 21;
static const int AsyncWrite = 22; static const int AsyncWrite = 22;
static const int AsyncReadAllRegs = 23; static const int AsyncReadAllRegs = 23;
static const int AsyncSetAllRegs = 24; static const int AsyncSetAllRegs = 24;
static const int AsyncFileRead = 25;
//These aren't completely real events. They can have callbacks register ed, but won't be delivered. //These aren't completely real events. They can have callbacks register ed, but won't be delivered.
// Instead, a real event will be delivered to their callback. E.g, a ca llback registered for // Instead, a real event will be delivered to their callback. E.g, a ca llback registered for
// Terminate will actually get Exit or Crash events. // Terminate will actually get Exit or Crash events.
static const int Terminate = 400; static const int Terminate = 400;
static const int ThreadCreate = 401; static const int ThreadCreate = 401;
static const int ThreadDestroy = 402; static const int ThreadDestroy = 402;
static const int AsyncIO = 403; static const int AsyncIO = 403;
//Users do not recieve CBs for the below event types--ProcControlAPI int ernal //Users do not recieve CBs for the below event types--ProcControlAPI int ernal
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 Function.h   Function.h 
skipping to change at line 43 skipping to change at line 43
* Symbol.h: symbol table objects. * Symbol.h: symbol table objects.
************************************************************************/ ************************************************************************/
#if !defined(_Function_h_) #if !defined(_Function_h_)
#define _Function_h_ #define _Function_h_
#include "Annotatable.h" #include "Annotatable.h"
#include "Serialization.h" #include "Serialization.h"
#include "Aggregate.h" #include "Aggregate.h"
#include "Variable.h" #include "Variable.h"
#include "IBSTree.h"
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 FunctionBase;
class DwarfWalker;
class Function : public Aggregate, public Serializable, public AnnotatableS class FuncRange {
parse public:
FuncRange(Dyninst::Offset off_, size_t size_, FunctionBase *cont_) :
container(cont_),
off(off_),
size(size_)
{
}
FunctionBase *container;
Dyninst::Offset off;
unsigned long size;
//For interval tree
Dyninst::Offset low() const { return off; }
Dyninst::Offset high() const { return off + size; }
typedef Dyninst::Offset type;
};
typedef IBSTree<FuncRange> FuncRangeLookup;
typedef std::vector<FuncRange> FuncRangeCollection;
typedef std::vector<FunctionBase *> InlineCollection;
typedef std::vector<FuncRange> FuncRangeCollection;
class FunctionBase : public Aggregate
{
friend class InlinedFunction;
friend class Function;
friend class DwarfWalker;
public:
/***** Return Type Information *****/
SYMTAB_EXPORT Type * getReturnType() const;
/***** Local Variable Information *****/
SYMTAB_EXPORT bool findLocalVariable(std::vector<localVar *>&vars, std::
string name);
SYMTAB_EXPORT bool getLocalVariables(std::vector<localVar *>&vars);
SYMTAB_EXPORT bool getParams(std::vector<localVar *>&params);
SYMTAB_EXPORT bool operator==(const FunctionBase &);
SYMTAB_EXPORT FunctionBase *getInlinedParent();
SYMTAB_EXPORT const InlineCollection &getInlines();
SYMTAB_EXPORT const FuncRangeCollection &getRanges();
/***** Frame Pointer Information *****/
SYMTAB_EXPORT bool setFramePtr(std::vector<VariableLocation> *locs);
SYMTAB_EXPORT std::vector<VariableLocation> &getFramePtrRefForInit();
SYMTAB_EXPORT std::vector<VariableLocation> &getFramePtr();
/***** Opaque data object pointers, usable by user ****/
void *getData();
void setData(void *d);
/* internal helper functions */
bool addLocalVar(localVar *);
bool addParam(localVar *);
SYMTAB_EXPORT bool setReturnType(Type *);
protected:
SYMTAB_EXPORT FunctionBase(Symbol *);
SYMTAB_EXPORT FunctionBase(Module *);
SYMTAB_EXPORT FunctionBase();
SYMTAB_EXPORT ~FunctionBase();
localVarCollection *locals;
localVarCollection *params;
Type *retType_;
unsigned functionSize_;
InlineCollection inlines;
FunctionBase *inline_parent;
FuncRangeCollection ranges;
std::vector<VariableLocation> frameBase_;
bool frameBaseExpanded_;
void *data;
void expandLocation(const VariableLocation &loc,
std::vector<VariableLocation> &ret);
};
class Function : public FunctionBase
{ {
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();
/* Symbol management */ /* Symbol management */
SYMTAB_EXPORT bool removeSymbol(Symbol *sym); SYMTAB_EXPORT bool removeSymbol(Symbol *sym);
/***** Return Type Information *****/
SYMTAB_EXPORT Type * getReturnType() const;
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 *****/ /***** PPC64 Linux Specific Information *****/
SYMTAB_EXPORT Offset getPtrOffset() const; SYMTAB_EXPORT Offset getPtrOffset() const;
SYMTAB_EXPORT Offset getTOCOffset() const; SYMTAB_EXPORT Offset getTOCOffset() const;
/***** Frame Pointer Information *****/
SYMTAB_EXPORT bool setFramePtr(std::vector<VariableLocation> *locs);
SYMTAB_EXPORT std::vector<VariableLocation> &getFramePtrRefForInit();
SYMTAB_EXPORT std::vector<VariableLocation> &getFramePtr();
/***** Local Variable Information *****/
SYMTAB_EXPORT bool findLocalVariable(std::vector<localVar *>&vars, std::
string name);
SYMTAB_EXPORT bool getLocalVariables(std::vector<localVar *>&vars);
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 &); class InlinedFunction : public FunctionBase
/* internal helper functions */ {
bool addLocalVar(localVar *); friend class Symtab;
bool addParam(localVar *); friend class DwarfWalker;
bool setupParams(); protected:
private: InlinedFunction(FunctionBase *parent);
void expandLocation(const VariableLocation &loc, ~InlinedFunction();
std::vector<VariableLocation> &ret); public:
SYMTAB_EXPORT std::pair<std::string, Dyninst::Offset> getCallsite();
Type *retType_; SYMTAB_EXPORT virtual bool removeSymbol(Symbol *sym);
int framePtrRegNum_; private:
std::vector<VariableLocation> frameBase_; std::string callsite_file;
bool frameBaseExpanded_; Dyninst::Offset callsite_line;
unsigned functionSize_;
}; };
} }
} }
#endif #endif
 End of changes. 8 change blocks. 
32 lines changed or deleted 103 lines changed or added


 IBSTree.h   IBSTree.h 
skipping to change at line 50 skipping to change at line 50
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "dyntypes.h" #include "dyntypes.h"
#include <set> #include <set>
#include <limits> #include <limits>
using namespace std; using namespace std;
/** Templape class for Interval Binary Search Tree. The implementation is /** Template class for Interval Binary Search Tree. The implementation is
* based on a red-black tree (derived from our codeRange implementation) * based on a red-black tree (derived from our codeRange implementation)
* to control the tree height and thus insertion and search cost. * to control the tree height and thus insertion and search cost.
* *
* Unlike our codeRangeTree, this data structure can represent overlapping * Unlike our codeRangeTree, this data structure can represent overlapping
* intervals. It is useful for executing stabbing queries and more * intervals. It is useful for executing stabbing queries and more
* generally for finding invervals that overlap a particular interval. * generally for finding invervals that overlap a particular interval.
* A stabbing query requires O(log(N) + L) time in the worst case, where * A stabbing query requires O(log(N) + L) time in the worst case, where
* L is the number of overlapping intervals, and insertion requires * L is the number of overlapping intervals, and insertion requires
* O(log^2(N)) time (compare to O(log(N)) for a standard RB-tree). * O(log^2(N)) time (compare to O(log(N)) for a standard RB-tree).
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PCErrors.h   PCErrors.h 
skipping to change at line 138 skipping to change at line 138
const err_t err_notstopped = 0x1000b; const err_t err_notstopped = 0x1000b;
const err_t err_notrunning = 0x1000c; const err_t err_notrunning = 0x1000c;
const err_t err_noevents = 0x1000d; const err_t err_noevents = 0x1000d;
const err_t err_incallback = 0x1000e; const err_t err_incallback = 0x1000e;
const err_t err_nouserthrd = 0x1000f; const err_t err_nouserthrd = 0x1000f;
const err_t err_detached = 0x10010; const err_t err_detached = 0x10010;
const err_t err_attached = 0x10011; const err_t err_attached = 0x10011;
const err_t err_pendingirpcs = 0x10012; const err_t err_pendingirpcs = 0x10012;
const err_t err_bpfull = 0x10013; const err_t err_bpfull = 0x10013;
const err_t err_notfound = 0x10014; const err_t err_notfound = 0x10014;
//Next seven are BGQ errors. They usually indicates a problem
// on the system, not with user programs
const err_t err_cauthority = 0x10100;
const err_t err_dsigstop = 0x10101;
const err_t err_dthrdquery = 0x10102;
const err_t err_dthrdstop = 0x10103;
const err_t err_dattachack = 0x10104;
const err_t err_dcaack = 0x10105;
const err_t err_dstep = 0x10106;
const err_t err_dstack = 0x10107;
const err_t err_eof = 0x10108;
PC_EXPORT err_t getLastError(); PC_EXPORT err_t getLastError();
PC_EXPORT void clearLastError(); PC_EXPORT void clearLastError();
PC_EXPORT const char* getLastErrorMsg(); PC_EXPORT const char* getLastErrorMsg();
PC_EXPORT void globalSetLastError(err_t err, const char *msg = NULL); PC_EXPORT void globalSetLastError(err_t err, const char *msg = NULL);
PC_EXPORT void setDebugChannel(FILE *f); PC_EXPORT void setDebugChannel(FILE *f);
PC_EXPORT void setDebug(bool enable); PC_EXPORT void setDebug(bool enable);
PC_EXPORT const char *getGenericErrorMsg(err_t e); PC_EXPORT const char *getGenericErrorMsg(err_t e);
PC_EXPORT FILE *getDebugChannel(); PC_EXPORT FILE *getDebugChannel();
 End of changes. 1 change blocks. 
0 lines changed or deleted 11 lines changed or added


 PCProcess.h   PCProcess.h 
skipping to change at line 94 skipping to change at line 94
class RegisterPool; class RegisterPool;
class Breakpoint; class Breakpoint;
class ProcessSet; class ProcessSet;
class ThreadSet; class ThreadSet;
class LibraryTracking; class LibraryTracking;
class ThreadTracking; class ThreadTracking;
class LWPTracking; class LWPTracking;
class CallStackUnwinding; class CallStackUnwinding;
class FollowFork; class FollowFork;
class SignalMask; class SignalMask;
class BGQData;
class RemoteIO;
class ExecFileInfo; class ExecFileInfo;
class PC_EXPORT Breakpoint class PC_EXPORT Breakpoint
{ {
friend class ::int_breakpoint; friend class ::int_breakpoint;
friend void boost::checked_delete<Breakpoint>(Breakpoint *); friend void boost::checked_delete<Breakpoint>(Breakpoint *);
friend void boost::checked_delete<const Breakpoint>(const Breakpoint *); friend void boost::checked_delete<const Breakpoint>(const Breakpoint *);
private: private:
int_breakpoint *llbreakpoint_; int_breakpoint *llbreakpoint_;
skipping to change at line 145 skipping to change at line 147
friend void boost::checked_delete<const Library>(const Library *); friend void boost::checked_delete<const Library>(const Library *);
private: private:
int_library *lib; int_library *lib;
Library(); Library();
~Library(); ~Library();
public: public:
typedef boost::shared_ptr<Library> ptr; typedef boost::shared_ptr<Library> ptr;
typedef boost::shared_ptr<const Library> const_ptr; typedef boost::shared_ptr<const Library> const_ptr;
std::string getName() const; std::string getName() const;
std::string getAbsoluteName() const;
Dyninst::Address getLoadAddress() const; Dyninst::Address getLoadAddress() const;
Dyninst::Address getDataLoadAddress() const; Dyninst::Address getDataLoadAddress() const;
Dyninst::Address getDynamicAddress() const; Dyninst::Address getDynamicAddress() const;
int_library *debug() const { return lib; } int_library *debug() const { return lib; }
bool isSharedLib() const; bool isSharedLib() const;
void *getData() const; void *getData() const;
void setData(void *p) const; void setData(void *p) const;
}; };
skipping to change at line 468 skipping to change at line 471
bool readMemory(void *buffer, Dyninst::Address addr, size_t size) const; bool readMemory(void *buffer, Dyninst::Address addr, size_t size) const;
bool writeMemoryAsync(Dyninst::Address addr, const void *buffer, size_t size, void *opaque_val = NULL) const; bool writeMemoryAsync(Dyninst::Address addr, const void *buffer, size_t size, void *opaque_val = NULL) const;
bool readMemoryAsync(void *buffer, Dyninst::Address addr, size_t size, v oid *opaque_val = NULL) const; bool readMemoryAsync(void *buffer, Dyninst::Address addr, size_t size, v oid *opaque_val = NULL) const;
/** /**
* Currently Windows-only, needed for the test infrastructure but possib ly useful elsewhere * Currently Windows-only, needed for the test infrastructure but possib ly useful elsewhere
**/ **/
Dyninst::Address findFreeMemory(size_t size); Dyninst::Address findFreeMemory(size_t size);
bool getMemoryAccessRights(Dyninst::Address addr, size_t size, bool getMemoryAccessRights(Dyninst::Address addr, mem_perm& rights);
mem_perm& rights);
bool setMemoryAccessRights(Dyninst::Address addr, size_t size, bool setMemoryAccessRights(Dyninst::Address addr, size_t size,
mem_perm rights, mem_perm& oldRights); mem_perm rights, mem_perm& oldRights);
// MemoryRegion.first = startAddr, MemoryRegion.second = endAddr // MemoryRegion.first = startAddr, MemoryRegion.second = endAddr
typedef std::pair<Dyninst::Address, Dyninst::Address> MemoryRegion; typedef std::pair<Dyninst::Address, Dyninst::Address> MemoryRegion;
bool findAllocatedRegionAround(Dyninst::Address addr, MemoryRegion& memR egion); bool findAllocatedRegionAround(Dyninst::Address addr, MemoryRegion& memR egion);
/** /**
* Libraries * Libraries
**/ **/
skipping to change at line 527 skipping to change at line 529
/** /**
* Perform specific operations. Interface objects will only be returned * Perform specific operations. Interface objects will only be returned
* on appropriately supported platforms, others will return NULL. * on appropriately supported platforms, others will return NULL.
**/ **/
LibraryTracking *getLibraryTracking(); LibraryTracking *getLibraryTracking();
ThreadTracking *getThreadTracking(); ThreadTracking *getThreadTracking();
LWPTracking *getLWPTracking(); LWPTracking *getLWPTracking();
FollowFork *getFollowFork(); FollowFork *getFollowFork();
SignalMask *getSignalMask(); SignalMask *getSignalMask();
BGQData *getBGQ();
RemoteIO *getRemoteIO();
const LibraryTracking *getLibraryTracking() const; const LibraryTracking *getLibraryTracking() const;
const ThreadTracking *getThreadTracking() const; const ThreadTracking *getThreadTracking() const;
const LWPTracking *getLWPTracking() const; const LWPTracking *getLWPTracking() const;
const FollowFork *getFollowFork() const; const FollowFork *getFollowFork() const;
const SignalMask *getSignalMask() const; const SignalMask *getSignalMask() const;
const BGQData *getBGQ() const;
const RemoteIO *getRemoteIO() const;
/** /**
* Errors that occured on this process * Errors that occured on this process
**/ **/
ProcControlAPI::err_t getLastError() const; ProcControlAPI::err_t getLastError() const;
const char *getLastErrorMsg() const; const char *getLastErrorMsg() const;
/** /**
* Executable info * Executable info
**/ **/
ExecFileInfo* getExecutableInfo() const; ExecFileInfo* getExecutableInfo() const;
}; };
class PC_EXPORT Thread class PC_EXPORT Thread : public boost::enable_shared_from_this<Thread>
{ {
protected: protected:
friend class ::int_thread; friend class ::int_thread;
int_thread *llthread_; int_thread *llthread_;
thread_exitstate *exitstate_; thread_exitstate *exitstate_;
Thread(); Thread();
~Thread(); ~Thread();
friend void boost::checked_delete<Thread>(Thread *); friend void boost::checked_delete<Thread>(Thread *);
friend void boost::checked_delete<const Thread>(const Thread *); friend void boost::checked_delete<const Thread>(const Thread *);
skipping to change at line 583 skipping to change at line 589
bool isInitialThread() const; bool isInitialThread() const;
// Added for Windows. Windows creates internal threads which are bound t o // Added for Windows. Windows creates internal threads which are bound t o
// the process but are used for OS-level work. We hide these from the us er, // the process but are used for OS-level work. We hide these from the us er,
// but need to represent them in ProcControlAPI. // but need to represent them in ProcControlAPI.
bool isUser() const; bool isUser() const;
bool stopThread(); bool stopThread();
bool continueThread(); bool continueThread();
void setSingleStepMode(bool s) const; bool setSingleStepMode(bool s) const;
bool getSingleStepMode() const; bool getSingleStepMode() const;
bool getRegister(Dyninst::MachRegister reg, Dyninst::MachRegisterVal &va l) const; bool getRegister(Dyninst::MachRegister reg, Dyninst::MachRegisterVal &va l) const;
bool getAllRegisters(RegisterPool &pool) const; bool getAllRegisters(RegisterPool &pool) const;
bool setRegister(Dyninst::MachRegister reg, Dyninst::MachRegisterVal val ) const; bool setRegister(Dyninst::MachRegister reg, Dyninst::MachRegisterVal val ) const;
bool setAllRegisters(RegisterPool &pool) const; bool setAllRegisters(RegisterPool &pool) const;
bool getAllRegistersAsync(RegisterPool &pool, void *opaque_val = NULL) c onst; bool getAllRegistersAsync(RegisterPool &pool, void *opaque_val = NULL) c onst;
bool setAllRegistersAsync(RegisterPool &pool, void *opaque_val = NULL) c onst; bool setAllRegistersAsync(RegisterPool &pool, void *opaque_val = NULL) c onst;
/** /**
 End of changes. 7 change blocks. 
4 lines changed or deleted 10 lines changed or added


 PlatFeatures.h   PlatFeatures.h 
skipping to change at line 38 skipping to change at line 38
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "PCProcess.h" #include "PCProcess.h"
#include "ProcessSet.h" #include "ProcessSet.h"
#include <list> #include <list>
#include <vector> #include <vector>
#include <string> #include <string>
#if !defined(PROCESSPLAT_H_) #if !defined(PLATFEATURES_H_)
#define PROCESSPLAT_H_ #define PLATFEATURES_H_
class int_process; class int_process;
class sysv_process; class sysv_process;
class thread_db_process; class thread_db_process;
class linux_process; class linux_process;
class int_libraryTracking;
class int_LWPTracking;
class int_threadTracking;
class int_followFork;
class int_multiToolControl;
class int_signalMask;
class int_callStackUnwinding;
class int_BGQData;
class int_remoteIO;
namespace bgq { namespace bgq {
class bgq_process; class bgq_process;
}; };
class int_fileInfo;
#if !defined(_MSC_VER)
//For sigset_t //For sigset_t
#if !defined(_MSC_VER)
#include <signal.h> #include <signal.h>
#endif #endif
namespace Dyninst { namespace Dyninst {
namespace ProcControlAPI { namespace ProcControlAPI {
class PC_EXPORT LibraryTracking class PC_EXPORT LibraryTracking
{ {
friend class ::sysv_process; friend class ::int_libraryTracking;
friend class ::int_process;
protected: protected:
LibraryTracking(Process::ptr proc_); LibraryTracking(Process::ptr proc_);
~LibraryTracking(); ~LibraryTracking();
Process::weak_ptr proc; Process::weak_ptr proc;
static bool default_track_libs;
public: public:
static void setDefaultTrackLibraries(bool b); static void setDefaultTrackLibraries(bool b);
static bool getDefaultTrackLibraries(); static bool getDefaultTrackLibraries();
bool setTrackLibraries(bool b) const; bool setTrackLibraries(bool b) const;
bool getTrackLibraries() const; bool getTrackLibraries() const;
bool refreshLibraries(); bool refreshLibraries();
}; };
class PC_EXPORT LibraryTrackingSet class PC_EXPORT LibraryTrackingSet
{ {
friend class ProcessSet; friend class ProcessSet;
friend class PSetFeatures; friend class PSetFeatures;
friend class ::int_process;
protected: protected:
LibraryTrackingSet(ProcessSet::ptr ps_); LibraryTrackingSet(ProcessSet::ptr ps_);
~LibraryTrackingSet(); ~LibraryTrackingSet();
ProcessSet::weak_ptr wps; ProcessSet::weak_ptr wps;
public: public:
bool setTrackLibraries(bool b) const; bool setTrackLibraries(bool b) const;
bool refreshLibraries() const; bool refreshLibraries() const;
}; };
class PC_EXPORT LWPTracking class PC_EXPORT LWPTracking
{ {
friend class ::linux_process; friend class ::linux_process;
friend class ::int_process;
friend class bgq::bgq_process; friend class bgq::bgq_process;
friend class ::int_LWPTracking;
protected: protected:
LWPTracking(Process::ptr proc_); LWPTracking(Process::ptr proc_);
~LWPTracking(); ~LWPTracking();
Process::weak_ptr proc; Process::weak_ptr proc;
static bool default_track_lwps; static bool default_track_lwps;
public: public:
static void setDefaultTrackLWPs(bool b); static void setDefaultTrackLWPs(bool b);
static bool getDefaultTrackLWPs(); static bool getDefaultTrackLWPs();
void setTrackLWPs(bool b) const; void setTrackLWPs(bool b) const;
bool getTrackLWPs() const; bool getTrackLWPs() const;
bool refreshLWPs(); bool refreshLWPs();
}; };
class PC_EXPORT LWPTrackingSet class PC_EXPORT LWPTrackingSet
{ {
friend class ProcessSet; friend class ProcessSet;
friend class PSetFeatures; friend class PSetFeatures;
friend class ::int_process;
protected: protected:
LWPTrackingSet(ProcessSet::ptr ps_); LWPTrackingSet(ProcessSet::ptr ps_);
~LWPTrackingSet(); ~LWPTrackingSet();
ProcessSet::weak_ptr wps; ProcessSet::weak_ptr wps;
public: public:
bool setTrackLWPs(bool b) const; bool setTrackLWPs(bool b) const;
bool refreshLWPs() const; bool refreshLWPs() const;
}; };
class PC_EXPORT ThreadTracking class PC_EXPORT ThreadTracking
{ {
friend class ::int_process;
friend class ::thread_db_process; friend class ::thread_db_process;
friend class ::int_threadTracking;
protected: protected:
ThreadTracking(Process::ptr proc_); ThreadTracking(Process::ptr proc_);
~ThreadTracking(); ~ThreadTracking();
Process::weak_ptr proc; Process::weak_ptr proc;
static bool default_track_threads; static bool default_track_threads;
public: public:
static void setDefaultTrackThreads(bool b); static void setDefaultTrackThreads(bool b);
static bool getDefaultTrackThreads(); static bool getDefaultTrackThreads();
bool setTrackThreads(bool b) const; bool setTrackThreads(bool b) const;
bool getTrackThreads() const; bool getTrackThreads() const;
bool refreshThreads(); bool refreshThreads();
}; };
class PC_EXPORT ThreadTrackingSet class PC_EXPORT ThreadTrackingSet
{ {
friend class ProcessSet; friend class ProcessSet;
friend class PSetFeatures; friend class PSetFeatures;
friend class ::int_process;
protected: protected:
ThreadTrackingSet(ProcessSet::ptr ps_); ThreadTrackingSet(ProcessSet::ptr ps_);
~ThreadTrackingSet(); ~ThreadTrackingSet();
ProcessSet::weak_ptr wps; ProcessSet::weak_ptr wps;
public: public:
bool setTrackThreads(bool b) const; bool setTrackThreads(bool b) const;
bool refreshThreads() const; bool refreshThreads() const;
}; };
class PC_EXPORT FollowFork class PC_EXPORT FollowFork
{ {
friend class ::linux_process; friend class ::linux_process;
friend class ::int_process;
friend class ::int_followFork;
protected: protected:
FollowFork(Process::ptr proc_); FollowFork(Process::ptr proc_);
~FollowFork(); ~FollowFork();
Process::weak_ptr proc; Process::weak_ptr proc;
public: public:
typedef enum { typedef enum {
None, //Fork tracking not available on this plat form. None, //Fork tracking not available on this plat form.
ImmediateDetach, //Do not even attach to forked children. ImmediateDetach, //Do not even attach to forked children.
DisableBreakpointsDetach, //Remove inherited breakpoints from childr en, then detach. DisableBreakpointsDetach, //Remove inherited breakpoints from childr en, then detach.
skipping to change at line 200 skipping to change at line 220
bool top_first; bool top_first;
CallStackCallback(); CallStackCallback();
virtual bool beginStackWalk(Thread::ptr thr) = 0; virtual bool beginStackWalk(Thread::ptr thr) = 0;
virtual bool addStackFrame(Thread::ptr thr, Dyninst::Address ra, Dyninst ::Address sp, Dyninst::Address fp) = 0; virtual bool addStackFrame(Thread::ptr thr, Dyninst::Address ra, Dyninst ::Address sp, Dyninst::Address fp) = 0;
virtual void endStackWalk(Thread::ptr thr) = 0; virtual void endStackWalk(Thread::ptr thr) = 0;
virtual ~CallStackCallback(); virtual ~CallStackCallback();
}; };
class PC_EXPORT CallStackUnwinding class PC_EXPORT CallStackUnwinding
{ {
friend class ::int_process;
friend class ::int_thread;
friend class ::int_callStackUnwinding;
private: private:
Thread::weak_ptr wt; Thread::weak_ptr wt;
public: public:
CallStackUnwinding(Thread::ptr t); CallStackUnwinding(Thread::ptr t);
virtual ~CallStackUnwinding(); virtual ~CallStackUnwinding();
bool walkStack(CallStackCallback *stk_cb) const; bool walkStack(CallStackCallback *stk_cb) const;
}; };
class PC_EXPORT CallStackUnwindingSet class PC_EXPORT CallStackUnwindingSet
{ {
skipping to change at line 221 skipping to change at line 244
ThreadSet::weak_ptr wts; ThreadSet::weak_ptr wts;
public: public:
CallStackUnwindingSet(ThreadSet::ptr ts); CallStackUnwindingSet(ThreadSet::ptr ts);
~CallStackUnwindingSet(); ~CallStackUnwindingSet();
bool walkStack(CallStackCallback *stk_cb); bool walkStack(CallStackCallback *stk_cb);
}; };
class PC_EXPORT MultiToolControl class PC_EXPORT MultiToolControl
{ {
friend class bgq::bgq_process; friend class bgq::bgq_process;
friend class ::int_process;
friend class ::int_multiToolControl;
public: public:
typedef unsigned int priority_t; typedef unsigned int priority_t;
private: private:
Process::weak_ptr proc; Process::weak_ptr proc;
protected: protected:
MultiToolControl(Process::ptr p); MultiToolControl(Process::ptr p);
~MultiToolControl(); ~MultiToolControl();
static std::string default_tool_name; static std::string default_tool_name;
static priority_t default_tool_priority; static priority_t default_tool_priority;
public: public:
skipping to change at line 253 skipping to change at line 278
#if defined(_MSC_VER) #if defined(_MSC_VER)
typedef void* dyn_sigset_t; typedef void* dyn_sigset_t;
#else #else
typedef sigset_t dyn_sigset_t; typedef sigset_t dyn_sigset_t;
#endif #endif
//On posix system, the sigset referenced below is a pointer to a sigset_t //On posix system, the sigset referenced below is a pointer to a sigset_t
class PC_EXPORT SignalMask class PC_EXPORT SignalMask
{ {
friend class ::int_process; friend class ::int_process;
friend class ::int_signalMask;
protected: protected:
dyn_sigset_t the_sigset;
static dyn_sigset_t default_sigset; static dyn_sigset_t default_sigset;
static bool sigset_initialized; static bool sigset_initialized;
SignalMask(); private:
Process::weak_ptr proc;
SignalMask(Process::ptr proc_);
~SignalMask(); ~SignalMask();
public: public:
static dyn_sigset_t getDefaultSigMask(); static dyn_sigset_t getDefaultSigMask();
static void setDefaultSigMask(dyn_sigset_t s); static void setDefaultSigMask(dyn_sigset_t s);
dyn_sigset_t getSigMask() const; dyn_sigset_t getSigMask() const;
void setSigMask(dyn_sigset_t s); bool setSigMask(dyn_sigset_t s);
}; };
#if 0 class PC_EXPORT BGQData
//TO BE IMPLEMENTED {
friend class ::int_process;
friend class bgq::bgq_process;
friend class ::int_BGQData;
protected:
static const unsigned int startup_timeout_sec_default = 45;
static const bool block_for_ca_default = true;
BGQData(Process::ptr proc_);
~BGQData();
Process::weak_ptr proc;
public:
static void setStartupTimeout(unsigned int seconds);
static void setBlockForControlAuthority(bool block);
#if defined(_MSC_VER) //Five coordinates on torus (a, b, c, d, e), one on CN (t)
typedef void* stat_ret_t; bool getProcCoordinates(unsigned &a, unsigned &b, unsigned &c, unsigned
#else &d, unsigned &e, unsigned &t) const;
#include <sys/types.h>
#include <sys/stat.h> //All processes that share a CN will shared a ComputeNode ID
#include <unistd.h> unsigned int getComputeNodeID() const;
typedef struct stat stat_ret_t;
#endif bool getSharedMemRange(Dyninst::Address &start, Dyninst::Address &end) c
onst;
bool getPersistantMemRange(Dyninst::Address &start, Dyninst::Address &en
d) const;
bool getHeapMemRange(Dyninst::Address &start, Dyninst::Address &end) con
st;
};
/**
* This struct is copied from the GLIBC sources for 'struct stat64'. It is
* recreated here because this header is supposed to compile without ifdefs
* across platforms that may not have 'struct stat64'
**/
extern "C" struct stat64_ret_t {
unsigned long long st_dev;
unsigned long long st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned int st_uid;
unsigned int st_gid;
unsigned long long st_rdev;
unsigned short __pad2;
long long st_size;
int st_blksize;
long long st_blocks;
int st_atime_;
unsigned int st_atime_nsec;
int st_mtime_;
unsigned int st_mtime_nsec;
int st_ctime_;
unsigned int st_ctime_nsec;
unsigned int __unused4;
unsigned int __unused5;
};
typedef stat64_ret_t *stat64_ptr;
typedef boost::shared_ptr<int_fileInfo> int_fileInfo_ptr;
class RemoteIO;
class RemoteIOSet;
class FileInfo {
friend class ::int_remoteIO;
friend class RemoteIO;
friend class RemoteIOSet;
private:
mutable int_fileInfo_ptr info;
int_fileInfo_ptr getInfo() const;
public:
FileInfo(std::string fname);
FileInfo();
FileInfo(const FileInfo &fi);
~FileInfo();
std::string getFilename() const;
stat64_ptr getStatResults() const; //Filled in by getFileStatData
};
class PC_EXPORT RemoteIO : virtual public PlatformFeatures typedef std::multimap<Process::const_ptr, FileInfo> FileSet;
class PC_EXPORT RemoteIO
{ {
protected:
Process::weak_ptr proc;
public: public:
RemoteIO(Process::ptr proc);
virtual ~RemoteIO();
bool getFileNames(std::vector<std::string> &filenames); //Construct filesets based on filenames, without doing a getFileNames
static bool getFileNames(ProcessSet::ptr pset, std::map<Process::ptr, st // User is responsible for 'delete'ing the FileSet when done.
d::vector<std::string> > &all_filenames); FileSet *getFileSet(std::string filename) const;
FileSet *getFileSet(const std::set<std::string> &filenames) const;
bool addToFileSet(std::string filename, FileSet *fs) const;
bool getFileStatData(std::string filename, stat_ret_t &stat_results); //Fetches filenames from BGQ's persisent memory ramdisk
static bool getFileStatData(ProcessSet::ptr pset, std::string filename, bool getFileNames(FileSet *result) const;
std::map<Process::ptr, stat_ret_t> &stat_res
ults);
//Results of these two calls should be 'free()'d by the user //Get data as per a stat system call, fill in the FileInfo objects
bool readFileContents(std::string filename, size_t offset, size_t numbyt bool getFileStatData(FileSet *fset) const;
es, unsigned char* &result);
struct ReadT { //These are whole file reads and produce EventAsyncFileRead callbacks
Process::ptr proc; bool readFileContents(const FileSet *fset);
std::string filename; };
size_t offset;
size_t numbytes;
void *result; //Output parameter
};
static bool readFileContents(std::vector<ReadT> &targets);
RemoteIO(); class PC_EXPORT RemoteIOSet
virtual ~RemoteIO(); {
protected:
ProcessSet::weak_ptr pset;
public:
RemoteIOSet(ProcessSet::ptr procs_);
virtual ~RemoteIOSet();
FileSet *getFileSet(std::string filename);
FileSet *getFileSet(const std::set<std::string> &filenames);
bool addToFileSet(std::string filename, FileSet *fs);
bool getFileNames(FileSet *result);
bool getFileStatData(FileSet *fset);
bool readFileContents(const FileSet *fset);
}; };
#endif
} }
} }
#endif #endif
 End of changes. 32 change blocks. 
40 lines changed or deleted 147 lines changed or added


 ProcessSet.h   ProcessSet.h 
skipping to change at line 55 skipping to change at line 55
namespace Dyninst { namespace Dyninst {
namespace ProcControlAPI { namespace ProcControlAPI {
class ProcessSet; class ProcessSet;
class ThreadSet; class ThreadSet;
class LibraryTrackingSet; class LibraryTrackingSet;
class ThreadTrackingSet; class ThreadTrackingSet;
class CallStackUnwindingSet; class CallStackUnwindingSet;
class FollowForkSet; class FollowForkSet;
class LWPTrackingSet; class LWPTrackingSet;
class RemoteIOSet;
class PSetFeatures; class PSetFeatures;
class TSetFeatures; class TSetFeatures;
typedef boost::shared_ptr<ProcessSet> ProcessSet_ptr; typedef boost::shared_ptr<ProcessSet> ProcessSet_ptr;
typedef boost::shared_ptr<ThreadSet> ThreadSet_ptr; typedef boost::shared_ptr<ThreadSet> ThreadSet_ptr;
typedef boost::shared_ptr<const ProcessSet> ProcessSet_const_ptr; typedef boost::shared_ptr<const ProcessSet> ProcessSet_const_ptr;
typedef boost::shared_ptr<const ThreadSet> ThreadSet_const_ptr; typedef boost::shared_ptr<const ThreadSet> ThreadSet_const_ptr;
/** /**
* AddressSet represents a set of Process/Address pairs. It is used to * AddressSet represents a set of Process/Address pairs. It is used to
skipping to change at line 392 skipping to change at line 393
bool postIRPC(IRPC::ptr irpc, AddressSet::ptr addrs, std::multimap<Proce ss::ptr, IRPC::ptr> *result = NULL) const; bool postIRPC(IRPC::ptr irpc, AddressSet::ptr addrs, std::multimap<Proce ss::ptr, IRPC::ptr> *result = NULL) const;
/** /**
* Perform specific operations. Interface objects will only be returned * Perform specific operations. Interface objects will only be returned
* on appropriately supported platforms, others will return NULL. * on appropriately supported platforms, others will return NULL.
**/ **/
LibraryTrackingSet *getLibraryTracking(); LibraryTrackingSet *getLibraryTracking();
ThreadTrackingSet *getThreadTracking(); ThreadTrackingSet *getThreadTracking();
LWPTrackingSet *getLWPTracking(); LWPTrackingSet *getLWPTracking();
FollowForkSet *getFollowFork(); FollowForkSet *getFollowFork();
RemoteIOSet *getRemoteIO();
const LibraryTrackingSet *getLibraryTracking() const; const LibraryTrackingSet *getLibraryTracking() const;
const ThreadTrackingSet *getThreadTracking() const; const ThreadTrackingSet *getThreadTracking() const;
const LWPTrackingSet *getLWPTracking() const; const LWPTrackingSet *getLWPTracking() const;
const FollowForkSet *getFollowFork() const; const FollowForkSet *getFollowFork() const;
const RemoteIOSet *getRemoteIO() const;
}; };
/** /**
* Return a unique ProcessSet representing every running process. It is an error to try to * Return a unique ProcessSet representing every running process. It is an error to try to
* manually modify this ProcessSet. Modifications are done automatically b y ProcControlAPI * manually modify this ProcessSet. Modifications are done automatically b y ProcControlAPI
* as processes are created and destroyed. * as processes are created and destroyed.
**/ **/
ProcessSet::const_ptr getAllProcs(); ProcessSet::const_ptr getAllProcs();
class PC_EXPORT ThreadSet : public boost::enable_shared_from_this<ThreadSet > { class PC_EXPORT ThreadSet : public boost::enable_shared_from_this<ThreadSet > {
 End of changes. 3 change blocks. 
0 lines changed or deleted 3 lines changed or added


 Symtab.h   Symtab.h 
skipping to change at line 42 skipping to change at line 42
#define __SYMTAB_H__ #define __SYMTAB_H__
#include <set> #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" #include "ProcReader.h"
#include "IBSTree.h"
#include "boost/shared_ptr.hpp" #include "boost/shared_ptr.hpp"
class MappedFile; class MappedFile;
#define SYM_MAJOR 8 #define SYM_MAJOR 8
#define SYM_MINOR 1 #define SYM_MINOR 1
#define SYM_BETA 2 #define SYM_BETA 1
namespace Dyninst { namespace Dyninst {
struct SymSegment; struct SymSegment;
namespace SymtabAPI { 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 FunctionBase;
class FuncRange;
typedef IBSTree<FuncRange> FuncRangeLookup;
typedef Dyninst::ProcessReader MemRegReader; typedef Dyninst::ProcessReader 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 emitElfStatic;
friend class emitWin; friend class emitWin;
skipping to change at line 165 skipping to change at line 167
SYMTAB_EXPORT bool getAllDefinedSymbols(std::vector<Symbol *> &ret); SYMTAB_EXPORT bool getAllDefinedSymbols(std::vector<Symbol *> &ret);
// Function // Function
SYMTAB_EXPORT bool findFuncByEntryOffset(Function *&ret, const Offset of fset); SYMTAB_EXPORT bool findFuncByEntryOffset(Function *&ret, const Offset of fset);
SYMTAB_EXPORT bool findFunctionsByName(std::vector<Function *> &ret, con st std::string name, SYMTAB_EXPORT bool findFunctionsByName(std::vector<Function *> &ret, con st std::string name,
NameType nameType = anyName, NameType nameType = anyName,
bool isRegex = false, bool isRegex = false,
bool checkCase = true); bool checkCase = true);
SYMTAB_EXPORT bool getAllFunctions(std::vector<Function *>&ret); SYMTAB_EXPORT bool getAllFunctions(std::vector<Function *>&ret);
//Searches for functions without returning inlined instances
SYMTAB_EXPORT bool getContainingFunction(Offset offset, Function* &func) ; SYMTAB_EXPORT bool getContainingFunction(Offset offset, Function* &func) ;
//Searches for functions and returns inlined instances
SYMTAB_EXPORT bool getContainingInlinedFunction(Offset offset, FunctionB
ase* &func);
// Variable // Variable
SYMTAB_EXPORT bool findVariableByOffset(Variable *&ret, const Offset off set); SYMTAB_EXPORT bool findVariableByOffset(Variable *&ret, const Offset off set);
SYMTAB_EXPORT bool findVariablesByName(std::vector<Variable *> &ret, con st std::string name, SYMTAB_EXPORT bool findVariablesByName(std::vector<Variable *> &ret, con st std::string name,
NameType nameType = anyName, NameType nameType = anyName,
bool isRegex = false, bool isRegex = false,
bool checkCase = true); bool checkCase = true);
SYMTAB_EXPORT bool getAllVariables(std::vector<Variable *> &ret); SYMTAB_EXPORT bool getAllVariables(std::vector<Variable *> &ret);
// Module // Module
skipping to change at line 401 skipping to change at line 407
// Change the type of a symbol after the fact // Change the type of a symbol after the fact
bool changeType(Symbol *sym, Symbol::SymbolType oldType); bool changeType(Symbol *sym, Symbol::SymbolType oldType);
bool changeSymbolOffset(Symbol *sym, Offset newOffset); bool changeSymbolOffset(Symbol *sym, Offset newOffset);
bool deleteSymbolFromIndices(Symbol *sym); bool deleteSymbolFromIndices(Symbol *sym);
bool changeAggregateOffset(Aggregate *agg, Offset oldOffset, Offset newO ffset); bool changeAggregateOffset(Aggregate *agg, Offset oldOffset, Offset newO ffset);
bool deleteAggregate(Aggregate *agg); bool deleteAggregate(Aggregate *agg);
bool parseFunctionRanges();
bool addFunctionRange(FunctionBase *fbase, Dyninst::Offset next_start);
// Used by binaryEdit.C... // Used by binaryEdit.C...
public: public:
SYMTAB_EXPORT bool canBeShared(); SYMTAB_EXPORT bool canBeShared();
SYMTAB_EXPORT Module *getOrCreateModule(const std::string &modName, SYMTAB_EXPORT Module *getOrCreateModule(const std::string &modName,
const Offset modAddr); const Offset modAddr);
public: public:
//Only valid on ELF formats //Only valid on ELF formats
SYMTAB_EXPORT Offset getElfDynamicOffset(); SYMTAB_EXPORT Offset getElfDynamicOffset();
// SymReader interface // SymReader interface
skipping to change at line 593 skipping to change at line 602
bool hasRel_; bool hasRel_;
bool hasRela_; bool hasRela_;
bool hasReldyn_; bool hasReldyn_;
bool hasReladyn_; bool hasReladyn_;
bool hasRelplt_; bool hasRelplt_;
bool hasRelaplt_; bool hasRelaplt_;
bool isStaticBinary_; bool isStaticBinary_;
bool isDefensiveBinary_; bool isDefensiveBinary_;
FuncRangeLookup *func_lookup;
// Line information map from module name to line info
dyn_hash_map<std::string, LineInformation> *lineInfo;
//Don't use obj_private, use getObject() instead. //Don't use obj_private, use getObject() instead.
public: public:
Object *getObject(); Object *getObject();
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:
 End of changes. 10 change blocks. 
3 lines changed or deleted 18 lines changed or added


 Variable.h   Variable.h 
skipping to change at line 51 skipping to change at line 51
//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 {
class Symbol; class Symbol;
class Symtab; class Symtab;
class Aggregate; class Aggregate;
class Function; class Function;
class FunctionBase;
class Variable : public Aggregate, public Serializable, public AnnotatableS parse { class Variable : public Aggregate, public Serializable, public AnnotatableS parse {
friend class Symtab; friend class Symtab;
friend std::ostream &::operator<<(std::ostream &os, const Dyninst::S ymtabAPI::Variable &); friend std::ostream &::operator<<(std::ostream &os, const Dyninst::S ymtabAPI::Variable &);
private: private:
SYMTAB_EXPORT Variable(Symbol *sym); SYMTAB_EXPORT Variable(Symbol *sym);
SYMTAB_EXPORT static Variable *createVariable(Symbol *sym); SYMTAB_EXPORT static Variable *createVariable(Symbol *sym);
public: public:
skipping to change at line 86 skipping to change at line 87
class localVar : public Serializable, public AnnotatableSparse class localVar : public Serializable, public AnnotatableSparse
{ {
friend class typeCommon; friend class typeCommon;
friend class localVarCollection; friend class localVarCollection;
std::string name_; std::string name_;
Type *type_; Type *type_;
std::string fileName_; std::string fileName_;
int lineNum_; int lineNum_;
Function *func_; FunctionBase *func_;
std::vector<VariableLocation> locs_; std::vector<VariableLocation> locs_;
// We start with an abstract location that may include "the frame // We start with an abstract location that may include "the frame
// pointer" as a register. Once a user requests the location list // pointer" as a register. Once a user requests the location list
// we concretize it and set this flag. // we concretize it and set this flag.
bool locsExpanded_; bool locsExpanded_;
// scope_t scope; // scope_t scope;
void expandLocation(const VariableLocation &var, void expandLocation(const VariableLocation &var,
std::vector<VariableLocation> &ret); std::vector<VariableLocation> &ret);
public: public:
SYMTAB_EXPORT localVar() : SYMTAB_EXPORT localVar() :
type_(NULL), lineNum_(-1), func_(NULL), locsExpanded_(false) {} type_(NULL), lineNum_(-1), func_(NULL), locsExpanded_(false) {}
// 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, FunctionBase *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);
SYMTAB_EXPORT ~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
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 walker.h   walker.h 
skipping to change at line 43 skipping to change at line 43
#include "basetypes.h" #include "basetypes.h"
#include "PCProcess.h" #include "PCProcess.h"
#include <vector> #include <vector>
#include <list> #include <list>
#include <string> #include <string>
#include <utility> #include <utility>
#define SW_MAJOR 8 #define SW_MAJOR 8
#define SW_MINOR 1 #define SW_MINOR 1
#define SW_BETA 2 #define SW_BETA 1
#define SW_VERSION_8_1_2
#define SW_VERSION_8_1_1 #define SW_VERSION_8_1_1
#define SW_VERSION_8_1_0 #define SW_VERSION_8_1_0
#define SW_VERSION_8_0_0 #define SW_VERSION_8_0_0
#define SW_VERSION_2_1_1 #define SW_VERSION_2_1_1
#define SW_VERSION_2_1_0 #define SW_VERSION_2_1_0
namespace Dyninst { namespace Dyninst {
class SymbolReaderFactory; class SymbolReaderFactory;
 End of changes. 2 change blocks. 
2 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/