How much code are you testing ? (3)

▶️ Intro : Let Me Be On the previous post we continued our journey with a more complex scenario, using a mix of gdb and valgrind to trace all the function execution inside a given binary. This time, hold on because we’re cranking up the complexity. We’ll dive deeper into low-level analysis and explore how to use Intel PIN, a powerful dynamic instrumentation framework for manipulating and inspecting executable code at runtime. (Photo by FURQAN KHURSHID) ...

June 17, 2025 · Andrea Manzini

wrapping c plus plus classes in Python

This is a quick and dirty way to interface C++ code with Python, translating one or more C++ classes in Python objects. First, we need some c++ sample code: //myclass.h #ifndef MYCLASS_H #define MYCLASS_H #include <string> using namespace std; namespace pets { class Dog { public: Dog(string name, int age); virtual ~Dog(); string talk(); protected: string m_name; int m_age; }; } //myclass.cpp #include "myclass.h" #include <string> namespace pets { Dog::Dog(std::string name, int age): m_name(name),m_age(age) { } Dog::~Dog() { } std::string Dog::talk() { return "BARK! I am a DOG and my name is "+m_name; } } now, we can try a little test program just to exercise our class: ...

August 8, 2016 · Andrea Manzini