Generally speaking you can't do it just from user-space. procfs is the kernel reporting its process state out to you. So if you WANT to do something like this you'd
a) have to create a kernel module that allows you to communicate content back to it
b) trigger that content retrieval through a signal of some sort.
So, if you REALLY want to do this. I would suggest the following path:
1) Write a kernel module that can communicate program state. Let's call it kpsmod for our discussion.
2) Have it communicate with the userspace have it communicate with user process via some mechanism (say net link) to initiate some registration process, that registers the variable addresses. The userspace program tells the module that its interested in "exporting" itself out on a signal (say SIGHUP or SIGUSR1); make this programmable too. Pass on the name, the address and the sizes to be read (with type information if needed). If the variable is on the stack, it should be rejected. Only globally accessible symbols should be allowed for this (for simplicity)
3) You can even think about accessing the ptrace stack for the process at the time of proc_read of the particular variable.
4) then the kernel module should create a /proc/kpsmod//vars* for every variable and when the variable is read
5) on read dump the memory content via proc (potentially formatted)
and voila :-) you have your desired effect.