summaryrefslogtreecommitdiff
path: root/exception.c
AgeCommit message (Collapse)Author
2018-05-18Random whitespace/cosmetic/consistency fixes.Uwe Hermann
2018-04-20srd_exception_catch(): Beautify traceback logging output.Uwe Hermann
2018-04-20Show backtrace when decode() aborts due to an error.Uwe Hermann
The backtrace printing was actually already there, but was emitted using sr_dbg(), which doesn't show up by default for most users. Make it an srd_err() so that most users will see it. This fixes bug #1158.
2017-06-30Acquire/release the Python GIL where needed to avoid threading issues.Uwe Hermann
With these additions, frontends can now call libsigrokdecode API functions from different threads without running into threading issues. The backend releases the GIL when it is performing tasks that might take a while and it doesn't need to run Python/C API calls during that time. This allows frontends to run multiple PD stacks (in multiple frontend threads) "at the same time" in a time-sharing, "interlocked" manner. Whenever one of the decoders is inside e.g. self.wait() it releases the GIL and thus allows other decoders to do some work in the mean time. The user-visible effect is that for use-cases such as running 3 different decoder stacks at the same time for an acquisition, the user will not have to wait for PD 1 to finish decoding, then wait for PD 2 to finish decoding, and only *then* being able to see annotations from PD 3. Instead, all three PDs will decode some chunks of data from time to time, thus the user is able to inspect annotations from all 3 PDs while the acquisition and decoding is still going on.
2015-10-06util: Factor out Python module loadDaniel Elstner
Create a utility function for loading a Python module by its name in UTF-8.
2015-10-06Python: Restrict code to stable ABI subsetDaniel Elstner
Limit usage of the Python C API to the stable ABI subset as defined by PEP 384. This removes some type definitions and functions which libsigrokdecode made use of. Convert all affected code to suitable API alternatives. Also fix a few leaks that became apparent while working on the code. The most visible change is that PyTypeObject is now an opaque type. Thus, the custom Decoder and srd_logic types are now created on the heap via an alternative API. Unfortunately, since tp_name is now inaccessible, type names had to be removed from the log output. Stack traces after Python exceptions are now formatted by calling into Python, since the trace object C API is no longer available.
2015-09-13Build: Include <config.h> first in all source filesDaniel Elstner
Since Autoconf places some important feature flags only into the configuration header, it is necessary to include it globally to guarantee a consistent build.
2015-09-13Fix srd_log() format warningsDaniel Elstner
2014-07-08Make exception output more predictable.Bert Vermeulen
2014-07-08Remove dependency on Python.h from public API headerMarcus Comstedt
This prevents Python.h from being included into client code, where it can mess things up by e.g. redefining _POSIX_C_SOURCE.
2013-05-03Main header is <libsigrokdecode/libsigrokdecode.h> now.Uwe Hermann
This matches the convention used in libsigrok. Potential other headers might end up in libsigrokdecode/, but only libsigrokdecode.h is meant to be #included by frontends directly.
2013-04-23GPL headers: Use correct project name.Uwe Hermann
2013-02-09Doxygen: Mark private functions/variables properly.Uwe Hermann
2012-03-28srd: Some more (optional) consistency renames.Uwe Hermann
2012-03-18srd: Cosmetics, fix/add Doxygen comments.Uwe Hermann
2012-02-10srd: Add/use SRD_API/SRD_PRIV macros.Uwe Hermann
This is not yet finished, more things should be made private.
2012-02-10srd: Cosmetics, whitespace, coding-style fixes.Uwe Hermann
2012-01-26srd: Remove manual log domain ("srd: ") prefixes.Uwe Hermann
2012-01-23srd: add python exception catcher, which routes to srd_err() and srd_dbg()Bert Vermeulen