def cont_handler(event): if not isinstance(event, gdb.ContinueEvent): return if not bool(gdb.parameter('adb-log-redirect')): exit_handler(event) return global adblog, log_width, log_colorfn if not adblog: adb.chooseDevice() adblog = ADBLog() adblog.start() log_width = int(gdb.parameter('width')) log_colorfn = _getColorFn(str(gdb.parameter('adb-log-color'))) adblog.running = True
def cont_handler(event): if not isinstance(event, gdb.ContinueEvent): return global continuing continuing = True if not bool(gdb.parameter('adb-log-redirect')): exit_handler(event) continuing = True return global adblog, log_width, log_colorfn if not adblog: adb.chooseDevice() adblog = ADBLog() adblog.start() log_width = int(gdb.parameter('width')) log_colorfn = _getColorFn(str(gdb.parameter('adb-log-color'))) adblog.running = True
def _chooseDevice(self): dev = adb.chooseDevice() print 'Using device %s' % dev self.device = dev