From 24e87902914b7665404f7e41c388f247018fa863 Mon Sep 17 00:00:00 2001 From: tikir Date: Fri, 7 Sep 2001 21:14:04 +0000 Subject: [PATCH] Initial dyninstAPI commit for code coverage --- dyninstAPI/h/BPatch.h | 3 +++ dyninstAPI/h/BPatch_flowGraph.h | 11 +++++------ dyninstAPI/h/BPatch_image.h | 3 +++ dyninstAPI/h/BPatch_module.h | 2 ++ dyninstAPI/h/BPatch_point.h | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dyninstAPI/h/BPatch.h b/dyninstAPI/h/BPatch.h index 14b54fa..6f9d003 100644 --- a/dyninstAPI/h/BPatch.h +++ b/dyninstAPI/h/BPatch.h @@ -111,6 +111,7 @@ class BPATCH_DLL_EXPORT BPatch { bool typeCheckOn; int lastError; bool debugParseOn; + bool baseTrampDeletionOn; bool getThreadEvent(bool block); bool havePendingEvent(); @@ -136,6 +137,7 @@ public: bool isTypeChecked() { return typeCheckOn; } bool parseDebugInfo() { return debugParseOn; } + bool baseTrampDeletion() { return baseTrampDeletionOn; } bool isTrampRecursive() { return trampRecursiveOn; } bool hasForcedRelocation_NP() { return forceRelocation_NP; } @@ -182,6 +184,7 @@ public: BPatch_Vector *getThreads(); void setDebugParsing(bool x) { debugParseOn = x; } + void setBaseTrampDeletion(bool x) { baseTrampDeletionOn = x; } void setTypeChecking(bool x) { typeCheckOn = x; } void setTrampRecursive(bool x) { trampRecursiveOn = x; } void setForcedRelocation_NP(bool x) { forceRelocation_NP = x; } diff --git a/dyninstAPI/h/BPatch_flowGraph.h b/dyninstAPI/h/BPatch_flowGraph.h index 15858d1..cbcad9b 100644 --- a/dyninstAPI/h/BPatch_flowGraph.h +++ b/dyninstAPI/h/BPatch_flowGraph.h @@ -41,7 +41,7 @@ public: ~BPatch_flowGraph(); /** returns the set of all basic blocks in the CFG */ - BPatch_Set* getAllBasicBlocks(); + void getAllBasicBlocks(BPatch_Set&); /** returns the vector of entry basic blocks to CFG */ void getEntryBasicBlock(BPatch_Vector&); @@ -57,6 +57,10 @@ public: */ void createSourceBlocks(); + /** fills the dominator and immediate-dom information of basic blocks. + * without calling this method dominator info is not available + */ + void fillDominatorInfo(); private: /** three colors used in depth first search algorithm */ static const int WHITE; @@ -89,11 +93,6 @@ private: static void findBBForBackEdge(BPatch_basicBlock*,BPatch_basicBlock*, BPatch_Set&); - - /** fills the dominator and immediate-dom information of basic blocks. - * without calling this method dominator info is not available - */ - void fillDominatorInfo(); }; #endif /* _BPatch_flowGraph_h_ */ diff --git a/dyninstAPI/h/BPatch_image.h b/dyninstAPI/h/BPatch_image.h index 9229392..3a7dc63 100644 --- a/dyninstAPI/h/BPatch_image.h +++ b/dyninstAPI/h/BPatch_image.h @@ -85,6 +85,9 @@ public: BPatch_point *createInstPointAtAddr(void *address); + BPatch_point *createInstPointAtAddr(void *address, + BPatch_point** alternative); + BPatch_function *findFunction(const char *name); BPatch_function *findBPFunction(const char *name); diff --git a/dyninstAPI/h/BPatch_module.h b/dyninstAPI/h/BPatch_module.h index b5aa1da..69852ae 100644 --- a/dyninstAPI/h/BPatch_module.h +++ b/dyninstAPI/h/BPatch_module.h @@ -104,6 +104,8 @@ public: BPatch_Vector& buffer, bool exactMatch = true); + LineInformation* getLineInformation(); + #ifdef IBM_BPATCH_COMPAT bool getLineNumbers(unsigned int &start, unsigned int &end); char *getUniqueString(char *buffer, int length); diff --git a/dyninstAPI/h/BPatch_point.h b/dyninstAPI/h/BPatch_point.h index f5a9063..d237bb5 100644 --- a/dyninstAPI/h/BPatch_point.h +++ b/dyninstAPI/h/BPatch_point.h @@ -93,8 +93,8 @@ class BPATCH_DLL_EXPORT BPatch_point { friend class BPatch_image; friend class BPatch_function; friend class process; - friend BPatch_point* createInstructionInstPoint(process*proc,void*address); - + friend BPatch_point* createInstructionInstPoint(process*proc,void*address, + BPatch_point** alternative); process *proc; const BPatch_function *func; instPoint *point; -- 1.8.3.1