z_mirror/dotfiles
git clone https://git.raiguard.me/z_mirror/dotfiles
efeb434
noctalia
1# skip all STL source files 2define skipstl 3python 4# get all sources loadable by gdb 5def GetSources(): 6 sources = [] 7 for line in gdb.execute('info sources',to_string=True).splitlines(): 8 if line.startswith("/"): 9 sources += [source.strip() for source in line.split(",")] 10 return sources 11 12# skip files of which the (absolute) path begins with 'dir' 13def SkipDir(dir): 14 sources = GetSources() 15 for source in sources: 16 if source.startswith(dir): 17 gdb.execute('skip file %s' % source, to_string=True) 18 19# apply only for c++ 20if 'c++' in gdb.execute('show language', to_string=True): 21 SkipDir("/usr") 22end 23end 24 25define hookpost-run 26 skipstl 27end 28 29define log-input-actions 30 break src/Input/InputSource.cpp:66 31 commands 32 silent 33 print action.getType() 34 continue 35 end 36end 37 38set print inferior-events off 39set print thread-events off 40 41define frun 42 file bin/Debugx64Clang/factorio-run 43end 44 45define ftest 46 file bin/Debugx64Clang/factorio-test 47end 48 49set print pretty on 50set print static-members off 51 52set auto-load safe-path / 53 54source ~/.config/gdb/factorio_pretty_printers.py 55 56python 57import sys 58sys.path.insert(0, '/usr/share/gcc-14/python') 59from libstdcxx.v6.printers import register_libstdcxx_printers 60register_libstdcxx_printers (None) 61end