Skip to content

Instantly share code, notes, and snippets.

@TTimo
Created May 5, 2017 16:56
Show Gist options
  • Save TTimo/360eef3760208e39c3abca70d602e77f to your computer and use it in GitHub Desktop.
Save TTimo/360eef3760208e39c3abca70d602e77f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# gdb command files are seriously limited and inconvenient
# fortunately there is python scripting
# source from the gdb CLI:
# (gdb) source /opt/Valve/mesa.gdb.py
import os
import gdb
ver='3.9'
gdb.execute('set env LD_LIBRARY_PATH=%s/usr/lib:/usr/lib/llvm-%s/lib' % ( os.environ['HOME'], ver ) )
gdb.execute('set env LIBGL_DRIVERS_PATH=%s/usr/lib/dri:/usr/lib/i386-linux-gnu/dri' % os.environ['HOME'] )
gdb.execute('set env LIBGL_DEBUG=verbose')
gdb.execute('set env VK_ICD_FILENAMES=/opt/Valve/mesa/src/amd/vulkan/dev_icd.json')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment