Skip to content

Instantly share code, notes, and snippets.

@ensonic
Last active August 28, 2015 09:39
Show Gist options
  • Save ensonic/bfaa35e1b2409ba90a50 to your computer and use it in GitHub Desktop.
Save ensonic/bfaa35e1b2409ba90a50 to your computer and use it in GitHub Desktop.
# log backtraces + gsource ids to debug those pesky
# 'Source ID <num> was not found when attempting to remove it
# see: https://git.gnome.org/browse/glib/tree/glib/gmain.c#n1158
python
class MyFinishBreakpoint (gdb.FinishBreakpoint):
def stop (self):
gdb.execute("bt");
print "signal: %s" % self.return_value
return False # don't want to stop
end
set pagination off
break g_source_attach
yes
commands
silent
python MyFinishBreakpoint()
cont
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment