From 4eaf734eded9b88b308f87388effd88e76c3e697 Mon Sep 17 00:00:00 2001 From: Alexander Wagner Date: Fri, 3 Mar 2023 11:18:54 +0100 Subject: [PATCH] pt/addrtrace: Add type & vec for imgobj & funcobj --- pintool/addrtrace.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pintool/addrtrace.cpp b/pintool/addrtrace.cpp index 28043705..507983bd 100644 --- a/pintool/addrtrace.cpp +++ b/pintool/addrtrace.cpp @@ -177,6 +177,29 @@ std::vector trace; /* Contains all traced instructions */ ofstream imgfile; /* Holds memory layout with function symbols */ ofstream vdsofile; /* Holds vdso shared library */ +/***********************************************************************/ +/* Image tracking*/ +typedef struct { + string name; + uint64_t baseaddr; + uint64_t endaddr; + string hash; +} imgobj_t; + +typedef std::vector IMGVEC; +IMGVEC imgvec; + +/* Image to function mapping*/ +typedef struct { + string name; + uint64_t baseaddr; + uint64_t endaddr; + string funcname; +} funcobj_t; + +typedef std::vector FUNCVEC; +FUNCVEC funcvec; + /***********************************************************************/ /* Heap tracking */