- (hopefully) correct usage of sharedLib.h...

This commit is contained in:
Till Straumann
2014-09-08 22:28:41 -07:00
parent e349b3ab94
commit 4e1677a38f
5 changed files with 14 additions and 9 deletions

View File

@@ -12,13 +12,13 @@
#include <dlfcn.h>
#define epicsExportSharedSymbols
#include "epicsStackTrace.h"
#include "epicsStackTracePvt.h"
/* Darwin's finds local symbols, too :-) */
epicsShareFunc int epicsFindAddr(void *addr, epicsSymbol *sym_p)
int epicsFindAddr(void *addr, epicsSymbol *sym_p)
{
Dl_info inf;

View File

@@ -7,9 +7,10 @@
* Author: Till Straumann <strauman@slac.stanford.edu>, 2011
*/
#define epicsExportSharedSymbols
#include "epicsStackTracePvt.h"
epicsShareFunc int epicsBackTrace(void **buf, int buf_sz)
int epicsBackTrace(void **buf, int buf_sz)
{
return -1;
}

View File

@@ -7,15 +7,16 @@
* Author: Till Straumann <strauman@slac.stanford.edu>, 2011
*/
#define epicsExportSharedSymbols
#include "epicsStackTracePvt.h"
#include "epicsStackTrace.h"
epicsShareFunc int epicsFindAddr(void *addr, epicsSymbol *sym_p)
int epicsFindAddr(void *addr, epicsSymbol *sym_p)
{
return -1;
}
epicsShareFunc int epicsStackTraceGetFeatures(void)
int epicsStackTraceGetFeatures(void)
{
return 0;
}

View File

@@ -9,9 +9,10 @@
#include <execinfo.h>
#define epicsExportSharedSymbols
#include "epicsStackTracePvt.h"
epicsShareFunc int epicsBackTrace(void **buf, int buf_sz)
int epicsBackTrace(void **buf, int buf_sz)
{
return backtrace(buf, buf_sz);
}

View File

@@ -25,13 +25,15 @@
#include <sys/mman.h>
#endif
#include "epicsStackTrace.h"
#include "epicsStackTracePvt.h"
#include "epicsThread.h"
#include "epicsMutex.h"
#include <errlog.h>
#define epicsExportSharedSymbols
#include "epicsStackTrace.h"
#include "epicsStackTracePvt.h"
#define FIND_ADDR_DEBUG 0
/* Darwin and GNU have dladdr() and Darwin's already finds local
@@ -633,7 +635,7 @@ size_t idx;
return 0;
}
epicsShareFunc int epicsStackTraceGetFeatures(void)
int epicsStackTraceGetFeatures(void)
{
/* We are a bit conservative here. The actual
* situation depends on how we are linked (something