Commit Graph

3424 Commits

Author SHA1 Message Date
Keenan Lang 4cd8a41ce5 Updated macDefExpandTest to keep from dereferencing NULL 2014-09-15 16:59:11 -05:00
Andrew Johnson 42f0b9be21 Posix: Fix how we check POSIX features
Darwin defines some macros as -1, which means unsupported.
2014-09-11 17:08:49 -05:00
Janet Anderson 81fdbdebd9 Added dummy for solaris build. 2014-09-11 09:10:44 -05:00
Till Straumann f1bb532307 - simplified some code
- epicsStackTrace.c provides generic epicsStackTraceGetFeatures() testing
   the 'epicsBackTrace()' functionality. Call out to epicsFindAddrGetFeatures()
   to inquire about symbol lookup support.
2014-09-10 12:04:36 -07:00
Till Straumann 0252dd1905 - simplified code
- provide epicsFindAddrGetFeatures() instead of epicsStackTraceGetFeatures()
2014-09-10 12:03:50 -07:00
Till Straumann a2339b9219 - WIN32 can now use default osdFindAddr (until symbol lookup is implemented) 2014-09-10 12:03:04 -07:00
Till Straumann cc04994d12 - updated copyright info
- let epicsFindAddr clear out returned symbol info
 - provide epicsFindAddrGetFeatures instead of epicsStackTraceGetFeatures
2014-09-10 12:01:50 -07:00
Till Straumann fad25a3b11 - cleanup
- reduced epicsStackTraceGetFeatures to epicsFindAddrGetFeatures
2014-09-10 12:00:51 -07:00
Till Straumann 438863ebd9 - updated copyright info 2014-09-10 12:00:08 -07:00
Andrew Johnson 431e87f95c libCom/posix: Drop SCHED_FIFO before exec() in child process
osiSpawnDetachedProcess() switches to SCHED_OTHER after fork() so
the new program will not be real-time unless is requests it itself.
Only happens when USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
2014-09-09 18:06:09 -05:00
strauman 6890166376 - renamed:
src/libCom/osi/os/posix/osdBackTrace.c => src/libCom/osi/os/posix/osdExecinfoBackTrace.c
  src/libCom/osi/os/posix/osdFindAddr.c => src/libCom/osi/os/posix/osdElfFindAddr.c

  not all 'posix' platforms can use the above versions (since the used APIs are not really POSIX)
  but a subset can. The platforms which can use either version #include it from 'their'
  osdBackTrace.c/osdFindAddr.c.
2014-09-08 23:28:30 -07:00
Till Straumann 51f5a2fc99 - fixed illegal void* pointer arithmetic by casting to char* 2014-09-08 23:09:18 -07:00
Till Straumann 252af56144 - renamed symbol that clashed on solaris 2014-09-08 23:08:33 -07:00
Till Straumann 278a8dac05 - solaris implementation of epicsBackTrace() via walkcontext() 2014-09-08 23:07:51 -07:00
Till Straumann 8477dec61f - added windows versions of osdBackTrace.c, osdFindAddr.c; the latter
does not implement addr->symbol conversion yet.
2014-09-08 22:31:11 -07:00
Till Straumann 8931954d28 - fixed illegal void* pointer arithmetic (by casting to char*) 2014-09-08 22:30:34 -07:00
Till Straumann 954ba66027 - fixed illegal void* pointer arithmetic by casting to char*
- removed more unused stuff
2014-09-08 22:29:46 -07:00
Till Straumann 4e1677a38f - (hopefully) correct usage of sharedLib.h... 2014-09-08 22:28:41 -07:00
strauman e349b3ab94 - first stab at breaking stack trace facility into separate files 2014-09-08 19:41:06 -07:00
Andrew Johnson 3f88273d0f Linux builds: Define _GNU_SOURCE and _DEFAULT_SOURCE
These replace the mixture of macros used to pick the features
presented by the standard system header files on Linux.

Updated the section of the CA reference manual that showed some
example compile lines to correct for 3.15 build changes.

Removed unused code & out-of-date comments.
2014-09-08 17:57:18 -05:00
Till Straumann fa41fcbe40 - use unistd's _POSIX_MAPPED_FILES to determine if a system has mmap. 2014-09-08 08:10:16 -07:00
Till Straumann 9dd130afb6 - forget about backtrace_symbols() -- always use 'dladdr'. (The former
is non-standard either and AFAIK always based on the latter.) Always
   using dladdr allows us to precisely control the printout formatting
   and keep it consistent.
2014-09-05 15:29:32 -07:00
Till Straumann 423709b795 - call first epicsStackTraceRecurseGbl() through function pointer -- clang
(darwin) had optimized it away.
2014-09-05 11:17:17 -07:00
Till Straumann fd9fed2262 - canonicalized printout formatting
- added EPICS_STACKTRACE_DYN_SYMBOL
 - added USE_DLADDR branch (which is a 'super' of USE_ELF, i.e., the latter
   depends on the former)
2014-09-04 10:59:39 -07:00
Till Straumann 68429f03f2 - added EPICS_STACKTRACE_DYN_SYMBOL 2014-09-04 10:58:27 -07:00
Andrew Johnson 7a9407d7ab libCom: Clean up MS compiler warnings.
This doesn't fix the Microsoft link failure though, that may
need an upgrade of MS Visual Studio on our Hudson Windows VM.
2014-09-04 11:07:59 -05:00
Till Straumann fab9ef6147 - added test case for library symbols
- replaced TABs by spaces
2014-09-03 13:23:23 -07:00
Till Straumann 4352a1df59 - replaced TABs by four blanks 2014-09-03 09:39:15 -07:00
Till Straumann f399b354e6 - replaced TABs by four blanks 2014-09-03 08:13:15 -07:00
Keenan Lang 6d4e284ab1 Added note to fixme comment to state that a function is relying on its current setup. 2014-09-02 17:21:42 -05:00
Keenan Lang 85936ff34c Darwin's osdEnv.c was updated while I was working on this, changed my updated version to match. 2014-09-02 16:55:32 -05:00
Keenan Lang ee197893e7 removing some extra whitespace to cleanup the diff 2014-09-02 16:44:47 -05:00
Keenan Lang 64a98452e3 epicsEnvSet clears macros before setting environment variable to ensure intuitive use of the function in nested iocsh calls. While adding this functionality, fixed a latent bug in macPutValue where if you tried to NULL a macro with the same name as an environment variable, you would go into an infinite loop. 2014-09-02 16:35:32 -05:00
Till Straumann 16bef44e5d - print header message 2014-08-29 15:03:56 -07:00
Till Straumann f2626442b6 - removed message; if there is no support remain silent 2014-08-29 15:03:04 -07:00
Till Straumann 32c6888e1b - removed message about a stack trace going to be printed 2014-08-29 15:02:20 -07:00
Till Straumann 0d323db997 - removed obsolete rule (used during development) 2014-08-29 15:00:54 -07:00
Andrew Johnson 8604d4643a Merged Murali's memlock_all branch. 2014-08-29 10:58:55 -07:00
Till Straumann 079357c242 - let default (no-op) version of stack trace print informative message
that stack traces are not supported.
2014-08-28 15:10:12 -07:00
Till Straumann 768c2c02e7 - paranoia test; errlogFlush; fixed debug messages
1) Added a paranoia test to make sure an ill-formatted
      ELF string table is not overrun if there is no NULL
      char found.

   2) Added errlogFlush() before and after stack dump (suggestion
      by Michael Davidsaver, thanks).

   3) Fixed (out of sync) debug messages.
2014-08-28 11:43:46 -07:00
Till Straumann 47408ed14c - indentation 2014-08-28 11:43:18 -07:00
Till Straumann 5a06c118c8 - added unit test for epicsStackTrace 2014-08-28 10:50:03 -07:00
Till Straumann ccb5be72dd - consistent naming: 'StackTrace' everywhere... 2014-08-28 10:49:22 -07:00
Till Straumann 8b2b03482f - consistent naming: 'StackTrace' everywhere. 2014-08-28 10:47:59 -07:00
Andrew Johnson 7629cf818a Add epicsScanLLong and epicsScanULLong macros and tests. 2014-08-27 23:29:19 -07:00
Andrew Johnson b0cdaddebc Added 64bit and long long epicsParse* functions 2014-08-27 22:21:30 -07:00
Andrew Johnson 9471488796 Add strtoll() and strtoull() for VxWorks
These are not yet provided even in VxWorks 6.9.
2014-08-27 22:11:08 -07:00
Till Straumann 4459ca0ad8 - merged stacktrace onto current 3.15 tip (Thanks Andrew for his help) 2014-08-27 14:34:05 -07:00
Keenan Lang 9d0be21cc1 MAC_HANDLE's in iocshBody weren't being created with environment variables. 2014-08-27 13:31:16 -05:00
Keenan Lang b2c2d9b7d6 Tests changed to accomodate macDefExpand's different args 2014-08-27 13:17:15 -05:00