Hi,
I am trying to trace a subset of code. The application compiles, and DynamoRIO statistics are displayed. But no memtrace file is generated.
Please help, how can I get the memtrace file ?
I am using DynamoRIO-Linux-9.0.1 on WSL (windows subsystem linux) Ubuntu.
The source code is:
-----------------------------------
// File name: start_stop.c
#include "stdio.h"
#include "stdlib.h"
#include "dr_api.h"
int main() {
int set_env_result = setenv("DYNAMORIO_OPTIONS",
"-stderr_mask 0xc -rstats_to_stderr -client_lib ';;-offline'", 1);
printf("Set env result %d\n", set_env_result);
int setup_result = dr_app_setup();
printf("dr setup result %d.\n", setup_result);
dr_app_start();
printf("Hello, World\n");
dr_app_stop_and_cleanup();
return 0;
}
-----------------------
Compile command:
-----------------------
DYNAMO_HOME = /home/ubuntu/DynamoRIO-Linux-9.0.1
TARGET = start_stop
compile:
g++ -DX86_64 -DDR_HOST_X86 -DDR_HOST_X64 -DHAS_ZLIB \
-DLINUX -D_LARGEFILE64_SOURCE \
-I${DYNAMO_HOME} -I${DYNAMO_HOME}/include \
-I${DYNAMO_HOME}/tools/include\
-I${DYNAMO_HOME}/ext/include \
-I${DYNAMO_HOME}/tools \
-o $(TARGET).o \
-c $(TARGET).c
link:
g++ -Wl,--hash-style=both -Wl,--as-needed \
-rdynamic $(TARGET).o \
-o $(TARGET) \
${DYNAMO_HOME}/tools/lib64/debug/libdrmemtrace_static.a \
${DYNAMO_HOME}/lib64/debug/libdynamorio_static.a \
${DYNAMO_HOME}/lib64/libdrlibc.a \
-ldl
---------------------------------
Thanks.