Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Timestamp of source code from object

597 views
Skip to first unread message

chetan...@gmail.com

unread,
Jan 31, 2016, 10:57:30 AM1/31/16
to
Hi,

Can anyone please help me understand, how to get the timestamps of all the source codes binded in an object. I doubt it can be done using bind utility but really not sure...please help

Thanks,
Chetan

Keith Dick

unread,
Jan 31, 2016, 2:47:09 PM1/31/16
to
For TNS object files (code 100), the INFO command of BIND, with the DETAIL option, lists source file names and a timestamp for each, along with other information. I do not know whether that timestamp is the source file's last modification time or the time of compilation. A quick check of some object file whose history you know will probably let you determine which it is. The source file modification timestamp is in the object file somewhere, because Inspect will tell you if the source file has changed since the program was compiled. I just do not know whether that is the timestamp displayed by the INFO command.

For native object files (code 800, assuming an H or J system), the LISTSOURCE command of ENOFT, with the DETAIL option, lists source file names and a timestamp (among other things), but I do not know whether that timestamp is the source file modification time or the time of compilaton. Again, a little experimenting with a file whose history you know should let you determine which timestamp it shows.

chetan...@gmail.com

unread,
Feb 2, 2016, 8:24:26 PM2/2/16
to
Thanks Keith.

It dont shows the timestamp of source files during compilation. Rather, as u mentioned, it is displaying the timestamp of comilation.

Keith Dick

unread,
Feb 3, 2016, 3:45:24 AM2/3/16
to
chetan...@gmail.com wrote:
> Thanks Keith.
>
> It dont shows the timestamp of source files during compilation. Rather, as u mentioned, it is displaying the timestamp of comilation.

I was afraid of that. Both timestamps are of interest, so I don't know why it only shows one of them.

The source file modification time certainly is recorded in the object file, at least in the debugger information part of the object file. We know this is true, because Inspect will warn you if, during a debugging session, you display the source code but the source file's modification time is different than it was at the time of compilation. There ought to be a way to show the source file modification time that is recorded in the object file, but I'm not aware of how to do it.

I believe the format of native object files (code 800 files) is a well-known Unix standard, so you might be able to find an open source program that will show source file modification timestamps and get it to run on the NonStop system. I do not know of such a program, but one might exist. The format of TNS object files (code 100 files) is unique to the NonStop system, and so there seems to be only a small chance that anyone has written a program that displays the modification time of the source files used in a TNS object file.

wbreidbach

unread,
Feb 3, 2016, 10:37:10 AM2/3/16
to
A description of the object file format can be found in the subvol $SYSTEM.ZGUARD.
Have a look at DOBJFMT and KPTAL.
I used these descriptions to find the binder-timestamp.

wbreidbach

unread,
Feb 3, 2016, 11:43:39 AM2/3/16
to
I found this answer in the Knowledge Base:

The modification timestamp for a source file, at the time of the compile, is found in the Inspect Region of the TNS object file. The timestamp in the Binder regional is the time the object was compiled. There is no way in Binder to retrieve the source modification timestamp from the Inspect Region. Since the source modification date, is stored in the Inspect Region, you have to use the Inspect Info Scope command to retrieve the timestamp.

Unfortunately I did not find any detailed information about the Inspect region.

Probably it might be useful to post your intention, in my eyes collecting knowledge is a very legal intention in this case. I do not think you will find this information in a manual.

Doug Miller

unread,
Feb 3, 2016, 7:10:07 PM2/3/16
to
Keith Dick <kd...@acm.org> wrote in
news:4sKdnXezMv28IyzL...@giganews.com:

>
> The format of TNS
> object files (code 100 files) is unique to the NonStop system,
> and so there seems to be only a small chance that anyone has
> written a program that displays the modification time of the
> source files used in a TNS object file.

Some years ago, I wrote a program that does exactly that, and more. It would provide the
modification timestamp for the source files for any code 100 (TNS compiled object), 301
(Pathway pseudocode), or 700 (ELF native) object file.

The code 100 and 700 parts weren't really all that hard, since the object file formats were
published in $SYSTEM.ZGUARD.DOBJFMT and $SYSTEM.ZGUARD.DELF, respectively.

Tandem doesn't publish the format of the Pathway pseudocode file, though...
0 new messages