Skip to content

Instantly share code, notes, and snippets.


Mark mpictor

  • Austin, TX
View GitHub Profile
mpictor /
Created April 27, 2020 20:48
gdb / qemu kernel debug notes
# notes from when I had trouble with kexec some time back. possibly useful to others.
# disable kaslr or boot with nokaslr, or no symbols will match and no breakpoints will be hit
# hbreak used to be necessary? not any more
qemu-system-x86_64 --version
#QEMU emulator version 4.0.0
gdb --version
#GNU gdb (Gentoo 8.3 vanilla) 8.3
mpictor / default.xml
Created January 7, 2019 19:22
libvirt missing ip
View default.xml
<forward mode='nat'>
<port start='1024' end='65535'/>
<bridge name='virbr0' stp='off' delay='0'/>
<mac address='52:54:00:e0:18:a8'/>
mpictor /
Last active July 30, 2018 21:08
4.17.6: "smartpqi 0000:b1:00.0: resetting scsi 0:1:0:0" (mke2fs hangs)

kernel version: 4.17.6 (similar failures with 4.14.28, 4.14.53)

kernel config: file below

hardware: HP ProLiant DL360 Gen10

firmware: UEFI (Note: issue not encountered with legacy boot)

In dmesg, these two lines jump out at me (line 1160-1161):

mpictor / CMakeLists.txt
Last active January 4, 2016 20:59
cmake generates invalid Makefile
View CMakeLists.txt
# ----- GENERATED FILE -----
# ----- Do not edit! -----
# schema name: index_attribute
# (short name: index_attribute)
# contains 5 entities, 1 types
PROJECT( index_attribute)
# list headers so they can be installed - entity, type, misc
set( index_attribute_entity_hdrs
mpictor / gist:1967483
Created March 3, 2012 18:49
part 21 encode/decode binary
View gist:1967483
//my version of
def in_bin = ["0", "1", "111011", "100100101010", "001101", "01000" ]
def p21_rep = [] //in_bin encoded in part 21 format
def d = [] //extra binary digits in p21_rep
def hex = [] //hex part of p21_rep
def nibbles = [] //number of hex digits
def out_bin = [] //p21_rep decoded
def num_bits = [] //number of used bits
def zeros = [] //number of binary zeros to prepend to out_bin
def padded = [] //num_bits + d
mpictor / parser-output.txt
Created November 5, 2011 01:38
Return type or local variable requires type label
View parser-output.txt
# parser output for line 94 of file below
# $ ../bin/fedex_plus -d9 -l94 -u94 ../../test/test_generics_type_label.exp
Schema line number: 94
Next token is token TOK_IDENTIFIER ()
Shifting token TOK_IDENTIFIER ()
Entering state 117
Reducing stack by rule 147 (line 1135):
$1 = token TOK_IDENTIFIER ()
-> $$ = nterm id_list ()
mpictor / CMakeLists.txt
Created October 21, 2011 20:16
Cmake and ctest scripts demonstrating build targets that are also test targets. CMakeLists is rather complicated because it generates source code from targets in a list.
View CMakeLists.txt
#this sets a property so that the target doesn't get built by 'make' or 'make all'
#useful when testing generation of schema code/compiling schem libs/etc
set_target_properties( ${target} PROPERTIES EXCLUDE_FROM_ALL ON )
mpictor / doxyassist.xml
Created October 1, 2011 23:45
doxyassist file for StepClassLibrary - subprojects don't show up in main project
View doxyassist.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- run doxyassist from scl root dir:
../doxyassist/ doc/doxyassist.xml -->
<!-- The main tag provides the version (1.0 only for now). The type attribute
is not required, and defaults to "generic". To use a different project handler,
change its type. The "name" attribute defines the name of your configuration.
Note: you must define and use the ""
namespace for the XML file to be processed properly. -->
<DoxyAssist xmlns=""
mpictor / test_schema.exp
Created September 8, 2011 09:58
Small schema with "Query expression source must be an aggregate" error
View test_schema.exp
-- $ ../bin/fedex_plus ../../data/test_schema.exp
-- ../../data/test_schema.exp:34: --ERROR: Query expression source must be an aggregate.
-- Errors in input
SCHEMA test_schema;
ENTITY representation_item
SUPERTYPE OF (ONEOF (binary_representation_item, compound_representation_item));
name : label;
mpictor / spaces_in_fct.exp
Created July 29, 2011 23:57
express schema that exposes fedex_plus bug
View spaces_in_fct.exp
TYPE identifier = STRING; END_TYPE;
TYPE transformation = STRING; END_TYPE;
TYPE rigid_placement = STRING; END_TYPE;
TYPE dimension_count = INTEGER; END_TYPE;
TYPE compound_item_definition = STRING; END_TYPE;
TYPE founded_item_select = STRING; END_TYPE;
TYPE id_attribute_select = STRING; END_TYPE;