Hi there,
I'm trying to get a memory trace for only some calls to a third party library like OpenMPI in my application.
Therefore, I would like to use the start-stop interface as suggested in the documentation, but for some reason im not able to get it going.
I also looked at the burst_static.cpp code and its corresponding CMake build instructions.
In order to test the build process, I created a simple example that looks like this running on aarch64:
```
#include <stdlib.h>
#include <stdio.h>
#include "dr_api.h"
int main(int argc, char *argv[]){
int *a = (int*)malloc(10 * sizeof(int));
dr_app_setup_and_start();
for(int i = 0; i < 10; ++i)
a[i] = i + 1;
dr_app_stop_and_cleanup();
volatile int p = a[2];
printf("p: %d\n",p);
free(a);
return 0;
}
```
and the CMakeLists.txt:
```
project(test)
cmake_minimum_required(VERSION 3.20)
find_package(DynamoRIO REQUIRED)
add_executable(test.bin "burst_static.cpp")
configure_DynamoRIO_static(test.bin)
use_DynamoRIO_static_client(test.bin drmemtrace_static)
target_compile_options(test.bin PUBLIC "-fPIC")
```
The build process fails with: /usr/bin/ld: cannot find -ldrmemtrace_static, thus I'm linking manually against drmemtrace_static.a.
Then the app runs fine, but no memory traces are generated. At this point, I'm thinking that I'm doing something fundamentally wrong but cannot figure out what. I would appreciate any pointers towards a solution.
Best,
Niklas