Skip to content

Commit

Permalink
make moar-gdb.py source-able, instead of only autoloadable
Browse files Browse the repository at this point in the history
when not autoloading, "current_objfile" has no meaning.
  • Loading branch information
timo committed Jun 5, 2016
1 parent d221b2e commit 72a4c1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/moar-gdb.py
Expand Up @@ -801,5 +801,8 @@ def register_commands(objfile):

# We have to introduce our classes to gdb so that they can be used
if __name__ == "__main__":
register_printers(gdb.current_objfile())
register_commands(gdb.current_objfile())
the_objfile = gdb.current_objfile()
if the_objfile == None:
the_objfile = gdb.lookup_objfile("libmoar.so")
register_printers(the_objfile)
register_commands(the_objfile)

0 comments on commit 72a4c1a

Please sign in to comment.