eo_gdb.py: added eo_bt for eo_backtrace alias in an ugly way.

It'll be great if someone teaches how to add a alias in a python gdb script.
This commit is contained in:
Daniel Juyung Seo 2013-05-08 20:53:04 +09:00
parent c886845a1b
commit 4850c53350
1 changed files with 15 additions and 0 deletions

View File

@ -33,3 +33,18 @@ class Eo_backtrace(gdb.Command):
print line
Eo_backtrace()
# ugly alias of eo_backtrace.
# Very crude, but works for the meanwhile
class Eo_bt(gdb.Command):
def __init__(self):
gdb.Command.__init__(self, "eo_bt", gdb.COMMAND_OBSCURE)
def invoke (self, arg, from_tty):
btrace = gdb.execute("backtrace", False, to_string=True).split('\n')
for line in btrace:
if line.find("libeo.so") == -1 and line.find("lib/eo/") == -1:
print line
Eo_bt()