Skip to content

Instantly share code, notes, and snippets.

View peterix's full-sized avatar
⛱️
Take out the parasols! Take out the plastic chairs!

Petr Mrázek peterix

⛱️
Take out the parasols! Take out the plastic chairs!
View GitHub Profile
@peterix
peterix / gist:1103951
Created July 25, 2011 11:32
Stonesense debug stuffs
#0 0xf785a53e in free () from /usr/lib32/libc.so.6
#1 0xf3c7e1ee in Dispose (arg=0x0) at /home/peterix/projects/dfapi/plugins/stonesense/WorldSegment.h:44
#2 read_segment (arg=0x0) at /home/peterix/projects/dfapi/plugins/stonesense/MapLoading.cpp:1211
#3 0xf3c7e598 in threadedSegment (thread=0xa488ed8, arg=0x0) at /home/peterix/projects/dfapi/plugins/stonesense/MapLoading.cpp:1244
#4 0xf3881227 in thread_func_trampoline () from /usr/lib32/liballegro.so.5.0
#5 0xf38b2674 in thread_proc_trampoline () from /usr/lib32/liballegro.so.5.0
#6 0xf77d2c77 in start_thread () from /usr/lib32/libpthread.so.0
#7 0xf78bb50e in clone () from /usr/lib32/libc.so.6
@peterix
peterix / gist:1240869
Created September 25, 2011 17:26
Problem with metasm
[peterix@peterix metasm]$ ruby samples/disassemble-gui.rb live:warf -P heapscan
<Process:pid: 26021
8048000 /home/peterix/DF/libs/Dwarf_Fortress
8C3E000 [heap]
F5009000 /usr/lib32/libjpeg.so.8.0.2
F5049000 /usr/lib32/libpng12.so.0.44.0
F5091000 /home/peterix/DF/hack/plugins/prospector.plug.so
F509B000 /home/peterix/DF/hack/plugins/flows.plug.so
F509E000 /home/peterix/DF/hack/plugins/cleanowned.plug.so
F50A2000 /home/peterix/DF/hack/plugins/autodump.plug.so
@peterix
peterix / gist:1310816
Created October 24, 2011 23:55
prospector output
[DFHack]# prospect all
Base materials:
SOIL : 33395
STONE : 1118547
FEATSTONE : 53606
OBSIDIAN : 5
VEIN : 756960
MAGMA : 224305
Layer materials:
if(!load_from_path(p, "objects.png", IMGObjectSheet)) return;
if(!load_from_path(p, "creatures.png", IMGCreatureSheet)) return;
if(!load_from_path(p, "ramps.png", IMGRampSheet)) return;
if(!load_from_path(p, "SSStatusIcons.png", IMGStatusSheet)) return;
if(!load_from_path(p, "gibs.png", IMGBloodSheet)) return;
if(!load_from_path(p, "engravings_floor.png", IMGEngFloorSheet)) return;
if(!load_from_path(p, "engravings_left.png", IMGEngLeftSheet)) return;
if(!load_from_path(p, "engravings_right.png", IMGEngRightSheet)) return;
(gdb) thread apply all bt full
Thread 6 (Thread 0xb5005b70 (LWP 21411)):
#0 0x00847a38 in clone () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#1 0x003d0f00 in file_compressorst::def_ibuff () from /home/peterix/DF/libs/libgraphics.so
No symbol table info available.
#2 0x00000000 in ?? ()
No symbol table info available.
------ Build started: Project: ZERO_CHECK, Configuration: Release Win32 ------
------ Build started: Project: generate_headers, Configuration: Release Win32 ------
Generating ../../../library/include/dfhack/df/static.inc
Building Custom Rule E:/dfapi/library/CMakeLists.txt
CMake does not need to re-run because E:\dfapi\build\VC2010\library\CMakeFiles\generate.stamp is up-to-date.
------ Build started: Project: dfhack, Configuration: Release Win32 ------
DataDefs.cpp
E:\dfapi\library\DataDefs.cpp(125): error C2589: 'struct' : illegal token on right side of '::'
E:\dfapi\library\DataDefs.cpp(125): error C2059: syntax error : '::'
E:\dfapi\library\DataDefs.cpp(125): error C2332: 'struct' : missing tag name
void __cdecl sub_89289C0(int unit_)
{
int unit__; // esi@1
int v2; // eax@3
int v3; // edx@3
int v4; // edx@4
int v5; // ecx@4
int v6; // edi@5
signed int v7; // edx@7
signed int v8; // eax@8
call "%VS100COMNTOOLS%vsvars32.bat"
md VC2010
cd VC2010
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..\.. -DBUILD_DFUSION=OFF -DCMAKE_INSTALL_PREFIX=C:/DF
nmake
pause
[peterix@peterix xml]$ ./start.sh
WARNING: GType GdkWindow is not known to GObject
WARNING: GType GdkWindow is not known to GObject
WARNING: Declared GType name 'GdkWindow' for class 'GDK-WINDOW' is invalid (g_type_name returned 0)
Gtk-Message: Failed to load module "canberra-gtk-module"
WARNING: GType GtkFileChooserEmbed is not known to GObject
WARNING: GType GtkFileChooserEmbed is not known to GObject
WARNING: Declared GType name 'GtkFileChooserEmbed' for class 'FILE-CHOOSER-EMBED' is invalid (g_type_name returned 0)
WARNING: GType LispArrayListStore is not known to GObject
WARNING: GType LispArrayListStore is not known to GObject
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
worktree = /home/peterix/projects/dfapi/library/xml
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://github.com/peterix/df-structures.git
[branch "master"]