# skip all STL source files define skipstl python # get all sources loadable by gdb def GetSources(): sources = [] for line in gdb.execute('info sources',to_string=True).splitlines(): if line.startswith("/"): sources += [source.strip() for source in line.split(",")] return sources # skip files of which the (absolute) path begins with 'dir' def SkipDir(dir): sources = GetSources() for source in sources: if source.startswith(dir): gdb.execute('skip file %s' % source, to_string=True) # apply only for c++ if 'c++' in gdb.execute('show language', to_string=True): SkipDir("/usr") end end define hookpost-run skipstl end define log-input-actions break src/Input/InputSource.cpp:66 commands silent print action.getType() continue end end set print inferior-events off set print thread-events off define frun file bin/Debugx64Clang/factorio-run end define ftest file bin/Debugx64Clang/factorio-test end set print pretty on set print static-members off set auto-load safe-path / source ~/.config/gdb/factorio_pretty_printers.py python import sys sys.path.insert(0, '/usr/share/gcc-14/python') from libstdcxx.v6.printers import register_libstdcxx_printers register_libstdcxx_printers (None) end