tools: Fix non-existing key in espcoredump's GDMI payload

This commit is contained in:
Roland Dobai
2020-11-12 14:33:49 +01:00
parent 7f9c84032e
commit 646f3fb801

View File

@@ -1303,7 +1303,8 @@ def gdbmi_freertos_get_task_name(p, tcb_addr): # type: (GdbController, int) ->
""" Get FreeRTOS task name given the TCB address """ """ Get FreeRTOS task name given the TCB address """
try: try:
val = gdbmi_data_evaluate_expression(p, "(char*)((TCB_t *)0x%x)->pcTaskName" % tcb_addr) val = gdbmi_data_evaluate_expression(p, "(char*)((TCB_t *)0x%x)->pcTaskName" % tcb_addr)
except ESPCoreDumpError: except (ESPCoreDumpError, KeyError):
# KeyError is raised when "value" is not in "payload"
return '' return ''
# Value is of form '0x12345678 "task_name"', extract the actual name # Value is of form '0x12345678 "task_name"', extract the actual name