Problem in accessing variables outside shell

Hi,
I have a shell script wherein i am doing some file operations and storing the data in some variables. I am exporting these variables as i need to use them outside shell. Then within the shell i am launching GDB session hoping that i will be able to access the exported variables in the GDB session.
I could launch the GDB session after doing the file operation but i am unable to access the exported variables. Is there any way to access the variables outside the shell?

Thanks in advance
Santosh

I write the variables to a temp file. Then, my other scripts and programs can simply read the test file to determine any variables.

If you write to a temp file similar to the folowing file my_var.tmp

client, Smith Marketing
year, 2007
taxable, yes

Then you could in other scripts do a:

client=$(cat my_var.tmp | grep "^client" | cut -d"," -f2)

Although not perfect, it does allow another way to share variables.

I need to use the variables in the GDB session spawned by the shell. In GDB i cant do cat operation.I am looking for a mechanism to access those variables straightway .