Depending on the version of UV you are on you should be able to access SYSTEM(9001) from memory. This is an array which contains the call stack.
> -----Original Message----- > From: [email protected] [mailto:u2-users- > [email protected]] On Behalf Of David A Barrett > Sent: Wednesday, 24 June 2009 8:46 a.m. > To: [email protected] > Subject: [U2] What Program Am I? > > We've got a UV client/server application with a thick VB client. The > vintage is around 1997, and the architecture has a debug mode that I > leave > on all the time that logs the calls back to the server and the > arguments > passed back and forth. The server side stuff is all phantomed off, so > the > output is in the &PH& file. Additionally, you can put display > statements > in the server side programs and the output from these will be sent to > the > &PH& record, mingled in with the other stuff. > > Debugging is old school, as you can't step through programs and any > DEBUG > statement will halt the server side program with no ability to do > interactive I/O, and the client side window will appear hung, requiring > the three finger salute. So you spend a lot of time putting in lines > of > code that look like: > > DISPLAY "HERE I AM #17" > > and the like. Eventually I got fed up with counting value marks in > &PH& > file records and wrote a routine that formats MV data up nicely for > display and makes a lot of tedious stuff easier. It makes my life > easier. > For tricky parts of the system, I often leave the debugging output > calls > in the programs; in case I need to come back some day and fiddle some > more. > > But there is one thing I'd like to be able to do... > > It would be super if it were possible to see the call stack from a > running > program. Kind of like the the UV "T" debugger command. Sometimes I'm > just wondering, "How the hell did I get *there*". Or I'll see > debugging > output in the &PH& file and I wonder, "What program is that from?". In > those cases it would be useful to have the call stack sitting beside > the > output in the &PH& file. > > Does anybody know a way to do this? I've even considered building a > little $INCLUDE snippet that updates @USER1 or a named common area and > recompiling ever server side program with it added. > > Any help will be greatly appreciated. > > Dave Barrett, > Lawyers' Professional Indemnity Company > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
