View previous topic :: View next topic |
Author |
Message |
Shahram
Joined: 13 May 2013 Posts: 25
|
Posted: Sat Sep 13, 2014 9:16 am Post subject: Is there any subroutine to store all the memory variables |
|
|
Is there any routines that stores all the variables inside a program.
I just need the data segment, those are located in common blocks and those not located on common blocks.
Last edited by Shahram on Mon Nov 03, 2014 12:06 pm; edited 1 time in total |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon Sep 15, 2014 1:16 pm Post subject: |
|
|
No. It's a job you do for yourself, saving the bits you want to save. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Sep 16, 2014 5:03 am Post subject: |
|
|
Was there any compiler not necessarily Fortran which have done that? I find it as very very very useful feature. I've heard in 70th about some IBM OS which has done a blind dump of everything in RAM memory to the disk. That was useful for continuation of interrupted tasks. But ability of dumping of all variables and loading them back would be even more useful specifically for debugging.
I have done that myself in the early times of my code when it was small and manageable but currently I'm completely lost in the thousands of variables and parameters.
Even then finding some hidden bug took me weeks of painful comparisons. Now I stopped adding variables to the dumping subroutines and just do frequent Fortran text backups to have a chance to return back quickly because finding some superbug became slave's on plantation job. This is also why I use this compiler not any other, I'd stopped programming long ago with bad diagnostics Fortrans, not even mentioning C. |
|
Back to top |
|
|
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Tue Sep 16, 2014 7:05 am Post subject: Re: |
|
|
DanRRight wrote: | Was there any compiler not necessarily Fortran which have done that? ...ability of dumping of all variables and loading them back would be even more useful specifically for debugging. |
PL/I supports data directed input and output. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Sep 16, 2014 9:41 am Post subject: |
|
|
This should in theory be a 'trivial' task no?
Of course it depends when you want the variable values, the 3 logical ones being..... at the beginning, at the end ... and of course any point inbetween .
Shouldn't be too difficult to come up with a routine I would have thought.
I once wrote a Fortran prog to output a list of all variables in a program.
Then just a question of just printing all values to a fixed format.
Depends of course on what the reason is exactly for doing the dump. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Sep 16, 2014 11:25 am Post subject: |
|
|
... and of course Windows does this when you hibernate.
E |
|
Back to top |
|
|
brucebowler Guest
|
Posted: Tue Sep 16, 2014 4:53 pm Post subject: |
|
|
MATLAB has that capability... |
|
Back to top |
|
|
rrobe71907
Joined: 26 Sep 2014 Posts: 10 Location: Tamaqua PA
|
Posted: Wed Oct 15, 2014 8:22 pm Post subject: Re: |
|
|
DanRRight wrote: | Was there any compiler not necessarily Fortran which have done that? I find it as very very very useful feature. I've heard in 70th about some IBM OS which has done a blind dump of everything in RAM memory to the disk. That was useful for continuation of interrupted tasks. But ability of dumping of all variables and loading them back would be even more useful specifically for debugging.
I have done that myself in the early times of my code when it was small and manageable but currently I'm completely lost in the thousands of variables and parameters.
Even then finding some hidden bug took me weeks of painful comparisons. Now I stopped adding variables to the dumping subroutines and just do frequent Fortran text backups to have a chance to return back quickly because finding some superbug became slave's on plantation job. This is also why I use this compiler not any other, I'd stopped programming long ago with bad diagnostics Fortrans, not even mentioning C. |
You may be thinking of something called a CORE DUMP. Back in the day, when a program abended, the system dumped the contents of memory (called the core) to $STDLIST _________________ Rodney Roberts |
|
Back to top |
|
|
|