From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,372795da5c388d93,start X-Google-Attributes: gidfc89c,public X-Google-Thread: f678f,372795da5c388d93,start X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,372795da5c388d93,start X-Google-Attributes: gidfee84,public X-Google-Thread: fa528,372795da5c388d93,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-01-09 13:23:14 PST Newsgroups: comp.unix.osf.osf1,comp.unix.osf.misc,comp.unix.programmer,comp.unix.tru64 Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!uunet!dca.uu.net!ash.uu.net!world!not-for-mail From: mzraly@TheWorld.com (Michael S. Zraly) Subject: Finding source lines from COFF executables on OSF1/alpha Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Thu, 9 Jan 2003 21:22:13 GMT NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: trn 4.0-test72 (19 April 1999) Xref: archiver1.google.com comp.unix.osf.osf1:152 comp.unix.programmer:39957 comp.unix.tru64:9359 On this OS: % uname -a OSF1 ex2-dec16 V5.1 732 alpha with an executable that looks like this: % file a.out a.out: COFF format alpha dynamically linked, demand paged executable or object module not stripped - version 3.13-14 compiled with this: % cxx -V Compaq C++ V6.2-024 for Compaq Tru64 UNIX V5.1 (Rev. 732) Is it possible to take program counter values reported by exc_capture_context, exc_virtual_unwind, etc., and use them along with COFF headers in the executable to find the filename and line numbers associated with them? In other words, can I generate a dbx/ladebug-like stack trace using values written from the executable but without having a real corefile? I know about fork-and-core but that's too heavy handed for the work I have to do (roll-my-own malloc tracing). One issue is dynamic libraries: is there any information I need to get about where dynamic library code is loaded that I cannot get from the executable itself? Or do I have to examine the running process to get that first? Does anyone have any decent examples of using the code declared in ldfcn.h to find this info in the executable? Thanks, Mike Zraly -- Mike Zraly Every man is as God made him, ay, and mzraly@world.std.com often worse. -- Miguel de Cervantes