The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/servers/inet/stacktrace.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2 stacktrace.c
    3 
    4 Created:        Jan 19, 1993 by Philip Homburg
    5 
    6 Copyright 1995 Philip Homburg
    7 */
    8 
    9 #include "inet.h"
   10 
   11 PUBLIC void stacktrace()
   12 {
   13         typedef unsigned int reg_t;
   14         reg_t bp, pc, hbp;
   15         extern reg_t get_bp ARGS(( void ));
   16 
   17         bp= get_bp();
   18         while(bp)
   19         {
   20                 pc= ((reg_t *)bp)[1];
   21                 hbp= ((reg_t *)bp)[0];
   22                 printf("0x%lx ", (unsigned long)pc);
   23                 if (hbp != 0 && hbp <= bp)
   24                 {
   25                         printf("???");
   26                         break;
   27                 }
   28                 bp= hbp;
   29         }
   30         printf("\n");
   31 }
   32 
   33 /*
   34  * $PchId: stacktrace.c,v 1.6 1996/05/07 21:11:34 philip Exp $
   35  */

Cache object: 0e10c365a8b8317ca18c900da2282b13


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.