summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-21Fix memory leak in print_searchpaths()Jon Burgess
==175453== 522 bytes in 8 blocks are definitely lost in loss record 2,923 of 3,201 ==175453== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==175453== by 0x59E9BB5: PyObject_Malloc (in /usr/lib64/libpython3.6m.so.1.0) ==175453== by 0x5A35A76: PyBytes_FromStringAndSize (in /usr/lib64/libpython3.6m.so.1.0) ==175453== by 0x4E3FA6E: print_searchpaths (srd.c:173) ==175453== by 0x4E3FA6E: srd_init (srd.c:287) ==175453== by 0x4034BE: test_session_reset_nodata (session.c:238) ==175453== by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0) ==175453== by 0x401237: main (main.c:51)
2018-10-21Fix bad memory accesses during srd_exit()Jon Burgess
When the decoder and session unload functions are called they remove themselves from the list. The code walking the list must be careful to avoid accessing the next pointer which might now be invalid. The g_slist_foreach() takes care of this. Reports from Valgrind before fix: ==175436== Invalid read of size 8 -- ==175436== Address 0xe3f2598 is 8 bytes inside a block of size 16 free'd ==175436== at 0x4C2FDAC: free (vg_replace_malloc.c:530) ==175436== by 0x563C541: g_free (in /usr/lib64/libglib-2.0.so.0.5600.3) ==175436== by 0x5654783: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.5600.3) ==175436== by 0x56552A2: g_slist_remove (in /usr/lib64/libglib-2.0.so.0.5600.3) ==175436== by 0x4E3FEFF: srd_session_destroy (session.c:343) ==175436== by 0x4E3F5C7: srd_exit (srd.c:311) ==175436== by 0x40336F: test_inst_new (inst.c:40) ==175436== by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0) ==175436== by 0x401237: main (main.c:51) ==175436== Block was alloc'd at ==175436== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==175436== by 0x563C435: g_malloc (in /usr/lib64/libglib-2.0.so.0.5600.3) ==175436== by 0x5654056: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.5600.3) ==175436== by 0x5655797: g_slist_append (in /usr/lib64/libglib-2.0.so.0.5600.3) ==175436== by 0x4E3FC75: srd_session_new (session.c:71) ==175436== by 0x403345: test_inst_new (inst.c:37) ==175436== by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0) ==175436== by 0x401237: main (main.c:51)
2018-10-16Update a few Doxygen @since tags.Uwe Hermann
Drop @since tags for non-public functions.
2018-10-16instance.c: Avoid 4 unneeded forward declarations.Uwe Hermann
2018-10-16uart: add support for break condition detectionGerhard Sittig
There are the "traffic inspecting" wait() conditions, which check an edge to find the start of START, then wait for sample points to grab the bit values. Bit times are sampled in their respective center, potential glitches around sample points get ignored. Add another independent set of wait() conditions which check _all_ edges regardless of any data communication. This results in the most reliable and maintainable detection of break conditions, regardless of how they align to data frames. Break is defined as a period of low input signal which spans at least one frame's length. Run the edge inspection after data inspection, which results in the most appropriate annotation output like leading data bits (of incomplete frames), frame errors (violated STOP bit expectations), then break conditions. This approach is most robust in the presence of incomplete input streams.
2018-10-13ook: Fix two typos which affect the decoding results.Uwe Hermann
2018-10-13Various log message improvements.Uwe Hermann
2018-10-13log: Use human-readable output type name everywhere.Uwe Hermann
2018-10-13instance.c: Make oldpins_array_*() static.Uwe Hermann
2018-10-13Decoder_put(): Add more info to OTUPUT_PYTHON log messages.Uwe Hermann
2018-10-06srd.c: Fix a compiler warning with gcc 8.Uwe Hermann
srd.c: In function ‘srd_searchpaths_get’: srd.c:399:40: warning: cast between incompatible function types from ‘gchar * (*)(const gchar *)’ {aka ‘char * (*)(const char *)’} to ‘void * (*)(const void *, void *)’ [-Wcast-function-type] return g_slist_copy_deep(searchpaths, (GCopyFunc)g_strdup, NULL); ^ Upstream glib issue / documentation change: https://gitlab.gnome.org/GNOME/glib/issues/1492 https://gitlab.gnome.org/pwithnall/glib/commit/e81f4c2acea5ada6ae989426e462613f7c612cac
2018-10-06type_decoder.c: Fix trailing whitespace.Uwe Hermann
2018-09-12morse: fix for #1278Christoph Rackwitz
2018-09-11ook_vis: Minor code simplifications.Uwe Hermann
2018-09-11ook_oregon: Minor code simplifications.Uwe Hermann
2018-09-11ook: Minor code simplifications.Uwe Hermann
2018-09-11added ook_visSteve R
2018-09-11added ook_oregonSteve R
2018-09-11added ookSteve R
2018-09-10miller: Minor description/whitespace fixes.Uwe Hermann
2018-09-10atsha204a: Add missing full stop in description.Uwe Hermann
2018-09-09miller: Add missing 'binary' meta-data.Uwe Hermann
2018-09-09Miller encoding PDChristoph Rackwitz
2018-09-09cec: Drop uneeded self.set_stat().Uwe Hermann
2018-09-09cec: Replace unneeded decode_opcode().Uwe Hermann
2018-09-09cec: Simplify a few code snippets.Uwe Hermann
2018-09-09Add HDMI CEC protocol decoder.Jorge Solla
2018-09-09usb_power_delivery: Whitespace/consistency cosmetics.Uwe Hermann
All annotation classes/rows have all-lowercase IDs. Also fix a few minor whitespace/consistency issues.
2018-09-09usb_power_delivery: Drop currently unused self.out_python.Uwe Hermann
2018-09-09usb_power_delivery: Drop non-existing max_w for now.Uwe Hermann
2018-09-09usb_power_delivery: better PD 3.0 support and other changesdavidanger
- better PD 3.0 support - display PD revision in output - different flags for source and sink PDO's and RDO's [Note: This commit is the remaining set of manually merged changes of the recent commits from Peetz0r <peter@haas-en-berg.nl> and the improvements from davidanger <davidanger@163.com> over at https://github.com/davidanger/libsigrokdecode]
2018-09-09usb_power_delivery: wait 1ms instead of 100k samplesPeetz0r
2018-09-09usb_power_delivery: improve wordingPeetz0r
Control channel => Configuration Channel
2018-09-09usb_power_delivery: PPS supportPeetz0r
2018-09-09usb_power_delivery: Move stored PDO's inside Decoder classPeetz0r
Also add timeout functionality to properly decode the last packet in a capture.
2018-09-09usb_power_delivery: print more useful stuffPeetz0r
including: - power in watts - type of PDO (fixed, pps, etc) - which PDO belongs to an RDO also deduplicated get_source_cap() and get_sink_cap()
2018-09-06swim: Simplify a code snippet.Uwe Hermann
2018-09-06Decoder for STM8 series MCUs SWIM protocol.Mike Jagdis
Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk> (github: mjagdis)
2018-08-30srd_exit(): Fix a -Wcast-function-type compiler warning.Uwe Hermann
srd.c: In function ‘srd_exit’: srd.c:310:28: warning: cast between incompatible function types from ‘int (*)(struct srd_session *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type] g_slist_foreach(sessions, (GFunc)srd_session_destroy, NULL); ^
2018-08-30srd_decoder_unload_all(): Fix a -Wcast-function-type compiler warning.Uwe Hermann
decoder.c: In function ‘srd_decoder_unload_all’: decoder.c:1080:27: warning: cast between incompatible function types from ‘int (*)(struct srd_decoder *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type] g_slist_foreach(pd_list, (GFunc)srd_decoder_unload, NULL); ^
2018-08-30log: add a public srd_log_callback_get() API routineGerhard Sittig
Allow applications to query the currently registered log callback. So they can either restore the previously registered routine, or register another routine _and_ log to the previously registered routine as well.
2018-08-30Make srd_inst_decode() return the actual decoder state, not SRD_OKSoeren Apel
2018-08-30counter: Consider edge counter offset also in word processingSoeren Apel
2018-08-30counter: Let user decide how to handle the initial dead_cycles stateSoeren Apel
edge_off and word_off are not included in the if block because a user may want to use edge_off to dismiss unwanted clocks instead of dead_cycles.
2018-08-30counter: Introduce option to ignore edgesGerhard Sittig
2018-08-30counter: Use initial counter values also after a resetSoeren Apel
2018-08-30spi: Create the out_bitrate annotation unconditionallyJosef Gajdusek
The start() method is called before the metadata() method, which results in the the out_bitrate instance variable never getting created and ending up as an AttributeError when decoding. (observed with sigrok-cli and VCD file as the input)
2018-08-29edid: Shorten two code snippets.Uwe Hermann
2018-08-29edid: Add support for extension blocks, cleanupsStefan Brüns
Extension blocks are widely used by e.g. HDMI to signal support for audio, colorspaces and much more. Cleanups: - support short forms for annotations - join overlapping annotations, these were unreadable in PV, and the positions were inaccurate (aligned to bytes instead of bits, no notion of used bits in split fields).
2018-08-25install: unbreak installation with Python 3.7 (os.errno)Gerhard Sittig
The os.errno module has not been an official feature. Python 3.7 removed the corresponding import. This broke the installation of decoders. Prefer 'errno' over 'os.errno'.