From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7aab61a1a53035c9,start X-Google-Attributes: gid103376,public From: Corey Minyard Subject: Re: Plea for help Date: 1997/01/26 Message-ID: #1/1 X-Deja-AN: 212468094 sender: minyard@wf-rch references: <9701231552.AA07941@most> organization: Wonderforce Research newsgroups: comp.lang.ada Date: 1997-01-26T00:00:00+00:00 List-Id: "W. Wesley Groleau (Wes)" writes: > I'm looking for C or Ada code to give the addresses of all > the stack frames above its call site, on SPARC/Solaris, > Pentium/SCO Unix and/or PowerMac/MachTen. This cannot directly be done by user code on the SPARC. To do a RELIABLE stack traceback on the SPARC requires interrupts to be turned off. It can be done without it, but it will occasionally crash. I wrote one of these for VxWorks on SPARC, but I could not use it on Solaris because it would occasionally crash. Perhaps there is a system call to do it, but that would be the only way. On Pentium, it is easy, just get the frame pointer and follow it back (assuming frame pointers are not turned off. > > We have Ada code on HP RISC boxes that contains a C routine--I'll shorten > the routine name to Trace. When called, trace generates a string of the > form " where each xxxx is the > address of a stack frame. An "offline" tool uses linker and debug info > to translate each trace into a symbolic stack dump similar to what one > gets from a debugger. (Thanks very much to an anonymous comp.lang.ada > reader for the HP RISC version!) > According to the HPUX documentation, you have to look at the symbol table to determine the procedure type to get a reliable traceback, so I gave up. Is this on HPUX? I'd like to see a good HPPA traceback routine. -- Corey Minyard Internet: minyard@acm.org Work: minyard@nortel.ca UUCP: minyard@wf-rch.cirr.com