Skip to content

Commit 006f277

Browse files
committed
pt: Update PIN to v3.11-97998
1 parent 3f078d2 commit 006f277

File tree

5 files changed

+20
-24
lines changed

5 files changed

+20
-24
lines changed

data-gui

pin/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ PROJ := DATA - Pin
2828

2929
# Pin Version and Source
3030

31-
#VER_STRING=pin-3.7-97619-g0d0c92f4f-gcc-linux
3231
VER_STRING=pin-3.11-97998-g7ecce2dac-gcc-linux
3332

3433
TAR=$(VER_STRING).tar.gz

pintool/addrtrace.cpp

+1-19
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
/***********************************************************************/
2727

28+
#include "pin-macros.H"
2829
#include "pin.H"
2930
#include <fcntl.h>
3031
#include <fstream>
@@ -42,25 +43,6 @@
4243
#include <unistd.h>
4344
#include <vector>
4445

45-
/**
46-
* Pin 3.11 Documentation:
47-
* https://software.intel.com/sites/landingpage/pintool/docs/97998/Pin/html
48-
*/
49-
50-
// Pin above 3.7.97720 deprecates some functions
51-
#if (PIN_PRODUCT_VERSION_MAJOR > 3) || \
52-
(PIN_PRODUCT_VERSION_MAJOR == 3 && PIN_PRODUCT_VERSION_MINOR > 7) || \
53-
(PIN_PRODUCT_VERSION_MAJOR == 3 && PIN_PRODUCT_VERSION_MINOR == 7 && \
54-
PIN_BUILD_NUMBER > 97720)
55-
#define INS_IS_INDIRECT INS_IsIndirectControlFlow
56-
#define INS_HAS_TAKEN_BRANCH INS_IsValidForIpointTakenBranch
57-
#define INS_HAS_IPOINT_AFTER INS_IsValidForIpointAfter
58-
#else
59-
#define INS_IS_INDIRECT INS_IsIndirectBranchOrCall
60-
#define INS_HAS_TAKEN_BRANCH INS_IsBranchOrCall
61-
#define INS_HAS_IPOINT_AFTER INS_HasFallThrough
62-
#endif
63-
6446
using namespace std;
6547

6648
/***********************************************************************/

pintool/call-stack.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
END_LEGAL */
3131

3232
#include "call-stack.H"
33+
#include "pin-macros.H"
3334
#include <iomanip>
3435
#include <iostream>
3536
#include <sstream>
@@ -113,9 +114,9 @@ static void i_trace(TRACE trace, void *v) {
113114
continue;
114115
}
115116
#endif
116-
if (INS_IsDirectBranchOrCall(tail)) {
117+
if (INS_IS_DIRECT(tail)) {
117118
// check if direct or indirect call and take the target accordingly
118-
ADDRINT target = INS_DirectBranchOrCallTargetAddress(tail);
119+
ADDRINT target = INS_DIRECT(tail);
119120
INS_InsertCall(tail, IPOINT_BEFORE, (AFUNPTR)a_process_call,
120121
IARG_ADDRINT, target, IARG_REG_VALUE, REG_STACK_PTR,
121122
IARG_REG_VALUE, vreg, IARG_END);
@@ -127,7 +128,7 @@ static void i_trace(TRACE trace, void *v) {
127128
IARG_END);
128129
}
129130
}
130-
if (INS_IsIndirectBranchOrCall(tail) && !INS_IsRet(tail)) {
131+
if (INS_IS_INDIRECT(tail) && !INS_IsRet(tail)) {
131132
INS_InsertCall(tail, IPOINT_TAKEN_BRANCH, (AFUNPTR)a_process_call,
132133
IARG_BRANCH_TARGET_ADDR, IARG_REG_VALUE,
133134
REG_STACK_PTR, IARG_REG_VALUE, vreg, IARG_END);

pintool/pin-macros.H

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#if !defined(PIN_MACROS_H_)
2+
#define PIN_MACROS_H_
3+
4+
/**
5+
* We support Pin 3.11-97998 Documentation:
6+
* https://software.intel.com/sites/landingpage/pintool/docs/97998/Pin/html
7+
*/
8+
#define INS_DIRECT INS_DirectControlFlowTargetAddress
9+
#define INS_IS_DIRECT INS_IsDirectControlFlow
10+
#define INS_IS_INDIRECT INS_IsIndirectControlFlow
11+
#define INS_HAS_TAKEN_BRANCH INS_IsValidForIpointTakenBranch
12+
#define INS_HAS_IPOINT_AFTER INS_IsValidForIpointAfter
13+
14+
#endif

0 commit comments

Comments
 (0)