This is Unofficial EPICS BASE Doxygen Site
osdBackTrace.cpp
Go to the documentation of this file.
1 /*
2  * Copyright: Stanford University / SLAC National Laboratory.
3  *
4  * EPICS BASE is distributed subject to a Software License Agreement found
5  * in file LICENSE that is included with this distribution.
6  *
7  * Author: Till Straumann <strauman@slac.stanford.edu>, 2014
8  */
9 
10 #include <windows.h>
11 
12 #include "epicsStackTracePvt.h"
13 
14 int epicsBackTrace(void **buf, int buf_sz)
15 {
16 #ifdef CaptureStackBackTrace
17  /* Docs say that (for some windows versions) the sum of
18  * skipped + captured frames must be less than 63
19  */
20  if ( buf_sz >= 63 )
21  buf_sz = 62;
22  return CaptureStackBackTrace(0, buf_sz, buf, 0);
23 #else
24  /* Older versions of MinGW */
25  return -1;
26 #endif
27 }
int epicsBackTrace(void **buf, int buf_sz)
void ** buf