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
1
vote
1 answer

count consecutive basic block with BBL_NUMins < 7

I'm new in pintool and I want count number of consecutive Basic Block with BBL_NumINS < 7 and with specific Tail instruction such as Indirect Jump or Indirect Call or ret. So I wrote this code static UINT32 consecutiveBasicBlockscount =…
1
vote
1 answer

PIN: identify MOV and indirect memory operand

For a program analysis tool, I need to identify all types of MOV operations (Register->Register, Memory->Register, Register->Memory). I was able to identify Memory->Register, but failed for the other ones. Another problem are indirect memory…
moo
  • 486
  • 8
  • 22
1
vote
2 answers

How to use Intel Pin on MPI code

I am pretty new to MPI and Intel Pin. I already installed pin-2.13-62732-gcc.4.4.7-linux on my linux environment, I need t use this tool on MPI codes. foreexample I want to get the number of instruction(such as inscount0 which is already existed in…
user2632001
  • 11
  • 1
  • 3
1
vote
3 answers

there is strange malloc functions which I not used

I use pin to analyze my simple program. It has 4 malloc functions, however, when I use pin with pintool named malloctrace, it shows more than 4 mallocs. What are these malloc functions? My OS is Ubuntu 12.04 64bit. below items are code what I make…
1
vote
2 answers

How can I use the intel pin tool to count the instruction executed on linux?

everyone, I am a fresh here as well as to linux i want to use the intel pin tool to help me count the instructions executed in a quick sort program, just a homework, but when i did this as the readme document told me, like cd…
Linjie Leng
  • 19
  • 1
  • 3
1
vote
1 answer

Why Intel Pin cannot identify the image/routine of some executed instructions?

I am creating a large pintool and I have two questions: The tool (abridged below to the relevant part only) sometimes cannot identify the image/routine for particular executed instructions. Does anybody know when/why can that happen? The tool…
Ahmed Nassar
  • 4,683
  • 2
  • 19
  • 26
1
vote
1 answer

Pin Like Tool for compile time injection of instrumentation code

As you might know, PIN is a dynamic binary instrumentation tool. By using Pin for example, I can instrument every load and store in my application. I was wondering If there is a similar tool which injects code at compile time (Using a higher level…
pythonic
  • 20,589
  • 43
  • 136
  • 219
0
votes
0 answers

error occurs when trying to build pintool with make

OS : windows 10 Intel Pin version : pin-3.28 msvc visual studio version : visual studio 2022 conmmunity cygwin 2.926, GNU make 4.4 i was try to use make for building mypintool.dll but make is following error occurs. mkdir -p…
co123
  • 1
  • 1
0
votes
0 answers

pintool syscall number to syscall name

I am using Pintool to analyze a 32-bit program under Windows, and now I want to capture the system calls generated by the program. I know how to use PIN_ AddSyscallEntryFunction() and PIN_ GetSyscallNumber() gets the number of the system call, but I…
0
votes
0 answers

Intel pin permission denied when attaching to a docker process

The version of pin I'm using is 3.22 and the OS is ubuntu 22. I have started some docker containers with docker compose with cap_add=SYS_PTRACE. I got the process ID 4645 of the container by "docker top": $ docker top geo UID PID …
0
votes
0 answers

IntelPIN:How to get app params after "--"

Hi does anyone know how to get app params after "--"? So for example if I have something like: pin -t MyTool -- somebinary input How do I get the string "somebinary input" in MyTool. I checked the documentation but there doesn't seem to be anything…
M4nval
  • 1
0
votes
0 answers

How to tell Intel Pin to profile only a specific function

I want to profile a specific function in a large piece of code using Intel Pin. I have compiled my code with -O3, so I cannot access the debug symbols. I'm compiling my code using the following command: gcc -O3 -march=native -pedantic -o…
Setu
  • 180
  • 8
0
votes
0 answers

compile pin tool with protobuf in makefile error

I have to include google protocol buffer in pintool in order to save trace data but when I compile with this makefile makefile.rules TOOL_LIBS += -lprotobuf -pthread -lboost_system $(OBJDIR)Source1$(OBJ_SUFFIX): trace.pb.cc $(CXX)…
0
votes
1 answer

Intel Pin: malloc and free calls do not return immediately (Windows)

I wrote a pintool for Intel Pin (3.25) that traces malloc and free calls before and after they are executed. Here is my code: #include "pin.H" #include VOID before_malloc(char* img_name, int size) { printf("--> malloc(%d) (%s)\n",…
Lught
  • 134
  • 6
0
votes
0 answers

Get heap bounds in Intel Pin

in Intel Pin (version 3.25), I would like to be able to detect where the heap is allocated at runtime. In GDB, you can run info proc mappings which will report back all mapped address spaces, including the heap. I would like to be able to do…
Lught
  • 134
  • 6