forked from platformio/platformio-core
Log stdout of GDB client
This commit is contained in:
@ -170,11 +170,12 @@ class GDBClient(BaseProcess): # pylint: disable=too-many-instance-attributes
|
|||||||
stdio.StandardIO(p)
|
stdio.StandardIO(p)
|
||||||
|
|
||||||
def onStdInData(self, data):
|
def onStdInData(self, data):
|
||||||
self._last_server_activity = time.time()
|
|
||||||
if LOG_FILE:
|
if LOG_FILE:
|
||||||
with open(LOG_FILE, "ab") as fp:
|
with open(LOG_FILE, "ab") as fp:
|
||||||
fp.write(data)
|
fp.write(data)
|
||||||
|
|
||||||
|
self._last_server_activity = time.time()
|
||||||
|
|
||||||
if b"-exec-run" in data:
|
if b"-exec-run" in data:
|
||||||
if self._target_is_run:
|
if self._target_is_run:
|
||||||
token, _ = data.split(b"-", 1)
|
token, _ = data.split(b"-", 1)
|
||||||
@ -198,6 +199,10 @@ class GDBClient(BaseProcess): # pylint: disable=too-many-instance-attributes
|
|||||||
reactor.stop()
|
reactor.stop()
|
||||||
|
|
||||||
def outReceived(self, data):
|
def outReceived(self, data):
|
||||||
|
if LOG_FILE:
|
||||||
|
with open(LOG_FILE, "ab") as fp:
|
||||||
|
fp.write(data)
|
||||||
|
|
||||||
self._last_server_activity = time.time()
|
self._last_server_activity = time.time()
|
||||||
super(GDBClient, self).outReceived(data)
|
super(GDBClient, self).outReceived(data)
|
||||||
self._handle_error(data)
|
self._handle_error(data)
|
||||||
|
Reference in New Issue
Block a user