From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b1059d1a61cd4014,start X-Google-Attributes: gidfee84,public From: jardin@iprolink.ch (Benoit Jardin) Subject: Stack organization on Alpha Date: 1997/03/14 Message-ID: <332980b7.29550364@news.iprolink.ch>#1/1 X-Deja-AN: 225923416 Reply-To: jardin@iprolink.ch Newsgroups: comp.unix.osf.osf1 I am currently trying to have a process dump the stack traces of its threads at runtime. This mechanism is to be embedded within a multithreaded middleware application that requires responsivness. Currently, I have a dedicated thread that detect when the application is not being responsive and that core dumps it in order to be able to later analyse what was hapenning at that particular time under a debugger. In order to improve this mechanism, I now need to be able to analyse multiple stack traces taken at regular intervals when the system is not being responsive. I achieve this by retrieving through /proc the list of threads running in the process along with and their associated registers. Now using these registers, I need to be able to walk up the stack in order to dump it in my log files. This is currently working fine for Sparc. Now, porting it to Alpha, I am encountering some problems in understanding how to walk up the stack frames from one function call to another. I have tried to look at the gdb source code, but after spending a day on it, I'm afraid it will take me quite a while to understand how they do. So if any of you has already investigated these Alpha stacks an can help me with it, that would be great. Otherwise, I guess I will have to restrict myself in just printing the current PC of all the threads without dumping the whole stacks... Thanks, -- Benoit Jardin