Questions tagged [intel-pin]

Pin is a dynamic binary instrumentation framework for the IA-32 and x86-64 instruction-set architectures that enables the creation of dynamic program analysis tools.

"Pin is a dynamic binary instrumentation framework for the IA-32 and x86-64 instruction-set architectures that enables the creation of dynamic program analysis tools."

Pin resources:

237 questions
2
votes
1 answer

add your own instructions using pin

Is it possible to add your own code in the code generated by intel-pin? I was wondering this for a while, I created a simple tool: #include #include #include "pin.H" // Additional library calls go…
R4444
  • 2,016
  • 2
  • 19
  • 30
2
votes
1 answer

Intel pin: getting instruction memory write\read size

I am trying to change a bit the Memory Reference Trace (Instruction Instrumentation) example from the pin documentation. My goal is to extract from each instruction that access memory also the size of the size of the memory to read\write in bytes. I…
genericname
  • 167
  • 3
  • 11
2
votes
1 answer

Intel PIN tool: Get a trace of EFLAGS values

I am trying to get a complete dynamic trace of a program using Intel PIN tool. My trace would have : {Instruction address, Instruction, Operands, EFLAGS, OPCODES}. I have managed to get the first three using xed-interface.H provided in the kit. Now,…
2
votes
0 answers

Intel Pin memory management

I was observing the memory layout for different OpenCV applications (edge.cpp, for example) by looking at /proc/$PID/maps. As expected, there is a heap, and a stack as well as other expected segments. However, when I'm instrumenting these…
dyster
  • 21
  • 2
2
votes
1 answer

Intel Pin: measuring empty instrumentation overhead

I want to measure how my Pintool worsens the execution time of an executable in the case where it simply does "empty instrumentation". Basicly in my Pintool I got a callback which is called every time an Image is loaded which, in turn, inserts…
Simus
  • 319
  • 2
  • 18
2
votes
0 answers

Intel Pin: how are routines actually instrumented?

I was wondering how Intel Pin instruments routines. More specifically, when calling RTN_InsertCall with IPOINT_BEFORE, the instrumentation occurs just before the call instruction to the function or also for jump instructions to the function? I am…
Simus
  • 319
  • 2
  • 18
2
votes
1 answer

Error Building Pin Tool that Uses External Library

I declared a function foo() in a header file imp.h and implemented it in imp.c. Then I generated a shared library named libimp.so and in my Pin tool I called foo(). In order to link the tool with this new library I added the following definitions to…
TheAhmad
  • 810
  • 1
  • 9
  • 21
2
votes
1 answer

Intel PIN Routine address retrieval: Linux vs. Windows

I'm new to PIN so perhaps there is an easy explanation to this. I'm puzzled by routine addresses PIN returns on Windows only. I created a minimal test program to illustrate my point. I'm currently using PIN 2.14. My inspected application is a Debug…
paralax
  • 31
  • 1
  • 5
2
votes
2 answers

Modify application instruction in PIN

I am using Intel PIN to modify an instruction in my application. I am using the Safecopy() example from this link as a reference: https://software.intel.com/sites/landingpage/pintool/docs/81205/Pin/html/index.html#SafeCopy I have the following…
Rohit Poduri
  • 99
  • 2
  • 9
2
votes
1 answer

Tracking native instructions in Intel PIN

I am using the Intel PIN tool to do some analysis on the assembly instructions of a C program. I have a simple C program which prints "Hello World", which I have compiled and generated an executable. I have the assembly instruction trace generated…
Rohit Poduri
  • 99
  • 2
  • 9
2
votes
1 answer

system library call not working in Intel PIN Fini Function

I want to execute one shell command (gcore $pid) at the end of pin tool. In order to complete this goal, I try to modify the itrace pin tool and do one simple shell command first. I add one statement system("ls > /tmp/test") at the starting of Fini…
慕冬亮
  • 339
  • 1
  • 2
  • 10
2
votes
1 answer

Section addresses goes beyond the image region - Intel Pin

I developed a simple pintool to list all the sections of the program's main executable image (iterating over all of its sections), and also its low and high limits using IMG_HighAddress and IMG_LowAddress; according to Pin, these return the definite…
Jaaz
  • 53
  • 6
2
votes
0 answers

Changing Value of a Register using PIN binary instrumentation tool

I am trying to make some changes to the value of a register using PIN_SetContextReg. First I get the value of REG_INST_PTR using PIN_GetContextReg as old_val, then I wanna make some changes to this value and set it at the same register as new_val.…
ankahira
  • 87
  • 1
  • 11
2
votes
1 answer

Meaning of image in intel pin tool

I am new on Intel pin tool, and begin to study pin tool recently. In tutorial, it describe modes of pin tool: Sometimes, however, it can be useful to look at different granularity than a trace. For this purpose Pin offers two additional modes:…
Timberjack30
  • 61
  • 1
  • 7
2
votes
0 answers

PIN not capturing getpid() system call

Using a code example provided in the PIN API titled strace.cpp on a binary should provide an output file containing all the system calls used, as well as some other information. The binary I use as a test is a simple C binary that contains a…
TypeKazt
  • 318
  • 1
  • 13
1 2
3
15 16