The scenario is the following (no code available yet): A linux process runs forever in while(1) loop. The process is implemented in C/C++ (POSIX). The process keeps some data to a std::vector. 

```
myvector.push_back("test1");
myvector.push_back("test1");
myvector.pop_back();
myvector.push_back("test1");

```

The process runs and modifies the vector. I am looking for a mechanism that will print the vector values when executing the binary with a specific command line argument.

Let's say that the process called "myprocess" and is running. I want to execute the same binary from a new shell like ./myprocess -debug and print the values of the STL container. 

Any idea? What is the best mechanism to do it (ie print the memory of another process)