Showing the 'call stack'

Showing the 'call stack'

Post by Larry Pyea » Sat, 18 Jul 1998 04:00:00

Quote:> Hi,
>     Is there a way that I can display the function call history when my signal


Quote:> void Terminate(int SignalNo) {
>    printf("Terminated on %d\n",SignalNo);
>    exit(-1);


Quote:> -----------------------------------------------
> Suppose the error happened inside of 'ReadLine', I'd like the 'Terminate'
> function to indicate that the error occured at line x in 'ReadLine' that was
> call by 'ReadLineInFile' at line y by 'main' at line z...

> Is there a stack somplace that I can get this info from? Must I absolutely use
> the de* options?

The easiest way that I know of is to use abort() instead of
exit(-1) to force a core dump, then look at the core.

Larry D. Pyeatt                     All standard disclaimers apply.


1. 'date' and 'clock' show different times

Dear All,

   The time that the 'date' and 'clock' commands show
 are different (exactly an hour). I have used the commands
 timeconfig, setclock, date and clock commands to fix it
 but I couldn't. A friend in this group told me to check
 the timezone and I used 'timeconfig' to do this but still
 the times shown by these commands are different.
   I am using RedHat 5. Even with the clock in the control-
 panel I couldn't fix this problem.
   Any help or advice would be gratefully appreciated.

   Please send a copy of your reply to my email-box if

   Regards - Hossein

2. location of

3. all man pages show '-' chars as '???'

4. Interrupt Service Routines and multiple processors

5. 'df' and 'du' show wrong sizes

6. Why can't StarOffice save to floppy?

7. problems with the 'w' command -- not showing 'what'\

8. COLA FAQ 7 of 7 10-Aug-2002

9. 'w' shows '-' if telnet or rlogin to linux box

10. 'w' not showing 'what' with 1.3.95

11. what is 'protection fault' and 'system calls' ?

12. Shouldn't 'netstat -ain' show my eth0?

13. 'last' command doesn't show complete login times