As Sergey pointed out, dumping the memory directly accessible by the process is really simple, e.g.
#include <cstdio>
using namespace std;
int main()
{
int a[] = {1,2,3,4,5,6,7,8,9,10};
unsigned char *p;
p = (unsigned char *)&a[3];
printf("%p", p);
for (int n=0; n<8; ++n)
{
printf(" %02X", *p);
++p;
}
printf("\n");
}