Skip to content

Instantly share code, notes, and snippets.

View ArtemPisarenko's full-sized avatar

Artem Pisarenko ArtemPisarenko

View GitHub Profile
@ArtemPisarenko
ArtemPisarenko / cic_decimator_model.m
Last active February 15, 2023 10:38
CIC decimation filter design model for Matlab/Octave (computing register pruning)
% Matlab script modeling CIC decimation filter design (improved)
% as described in article
%
% E. B. Hogenauer
% "An economical class of digital filters for decimation and interpolation"
% IEEE Transactions on Acoustics, Speech and Signal Processing,
% ASSP29(2):155-162, 1981.
%
% Improvements introduce correction of negative Bj values and calculating
% extra properties.
@ArtemPisarenko
ArtemPisarenko / .qtcreator-gdb-attach-fix.py
Created October 3, 2018 14:12
GDB script to workaround issues with GDB debugging in Qt Creator
#!/usr/bin/python
#
# GDB python script for silly QtCreator, when it used to run debug sessions
# with attaching to running process or remote gdb server.
#
# It automatically fixes following issues:
# - there are no way to allow automatic loading of .gdbinit/python scripts supplied with binary
# in a safe and/or convinient manner, i.e. without disabling safe-load option and/or
# playing with safe-load paths in ~/.gdbinit
# (you may see warning from gdb in debugger console)
@ArtemPisarenko
ArtemPisarenko / ksyms_improved.pl
Last active September 28, 2018 15:53
Script generates source code level trace from instruction execution trace of linux kernel (from QEMU, for example)
#!/usr/bin/perl
# (Improved version of ksyms.pl taken from https://rwmj.wordpress.com/2016/03/17/tracing-qemu-guest-execution/ )
#
# Find everything that looks like a kernel address in the input
# and append it with source code descriptions using addr2line.
#
# Usage:
# ksyms_improved.pl source_root_dir vmlinux_path addr2line_path < input > output
# where