forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there any subroutine to store all the memory variables

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
Shahram



Joined: 13 May 2013
Posts: 25

PostPosted: Sat Sep 13, 2014 9:16 am    Post subject: Is there any subroutine to store all the memory variables Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Sep 15, 2014 1:16 pm    Post subject: Reply with quote

No. It's a job you do for yourself, saving the bits you want to save.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Tue Sep 16, 2014 5:03 am    Post subject: Reply with quote

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
View user's profile Send private message
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Tue Sep 16, 2014 7:05 am    Post subject: Re: Reply with quote

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
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Tue Sep 16, 2014 9:41 am    Post subject: Reply with quote

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 Smile .

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Sep 16, 2014 11:25 am    Post subject: Reply with quote

... and of course Windows does this when you hibernate.

E
Back to top
View user's profile Send private message
brucebowler
Guest





PostPosted: Tue Sep 16, 2014 4:53 pm    Post subject: Reply with quote

MATLAB has that capability...
Back to top
rrobe71907



Joined: 26 Sep 2014
Posts: 10
Location: Tamaqua PA

PostPosted: Wed Oct 15, 2014 8:22 pm    Post subject: Re: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group